Code Cleanup and Quality of Life

Checks to make sure repo is indexed before generating code.
Don't generate tests for changes to tests.
Remove unused code.
Fix bootstrapping issue with langchaingo tables.
This commit is contained in:
2025-04-20 08:31:26 -04:00
parent 4b8b8132fd
commit 25f8cae8cb
9 changed files with 282 additions and 256 deletions

View File

@@ -40,7 +40,7 @@ func (c *chunks) run(ctx context.Context, cmd *cli.Command) error {
db := database.FromContext(ctx)
llmRef := llm.FromContext(ctx)
repoID, err := db.RepoIDFromPath(ctx, cmd.String("repo"))
repoID, _, err := db.UpsertRepo(ctx, cmd.String("repo"))
if err != nil {
return err
}
@@ -51,10 +51,6 @@ func (c *chunks) run(ctx context.Context, cmd *cli.Command) error {
return err
}
if err := relDocs.RankChunks(ctx, cmd.String("query"), chunks); err != nil {
return err
}
for _, chunk := range chunks {
slog.Info("found relevant chunk", "name", chunk.Name, "start", chunk.Start, "end", chunk.End, "score", chunk.Score, "id", chunk.ChunkID)
}