refactor(extension): auto-index on tool call and skip registration when binary missing
- Only register tool if `codexis` binary is in PATH - Run incremental index via `pi.exec` on each tool call to keep DB fresh - Remove `findDatabase` helper; derive DB path from git root directly - Replace `defineTool` with inline `pi.registerTool` call - Update imports (`@sinclair/typebox`, lazy `execSync`) - Fix output flag help text in main.go
This commit is contained in:
2
main.go
2
main.go
@@ -20,7 +20,7 @@ const dbFileName = "index.db"
|
||||
|
||||
func main() {
|
||||
force := flag.Bool("force", false, "Force full re-index (ignore file hashes)")
|
||||
output := flag.String("o", "", "Output database path (default: <root>/.codexis.db)")
|
||||
output := flag.String("o", "", "Output database path (default: <root>/.codexis/index.db)")
|
||||
flag.Parse()
|
||||
|
||||
root := "."
|
||||
|
||||
Reference in New Issue
Block a user