(name: string)
| 22 | |
| 23 | const DB_PATH = `${process.env.HOME}/.local/share/opencode/storage/plugin/magic-context/context.db`; |
| 24 | function getArg(name: string): string | null { |
| 25 | const index = process.argv.indexOf(name); |
| 26 | return index >= 0 ? (process.argv[index + 1] ?? null) : null; |
| 27 | } |
| 28 | |
| 29 | async function main() { |
| 30 | const directory = getArg("--directory") ?? process.cwd(); |