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

@@ -73,6 +73,14 @@ func readConfig(ctx context.Context, cmd *cli.Command) (context.Context, error)
return nil, fmt.Errorf("problem parsing config: %w", err)
}
if cfg.IndexChunkSize == 0 {
cfg.IndexChunkSize = 512 * 4
}
if cfg.RelevantDocs == 0 {
cfg.RelevantDocs = 5
}
return config.WrapContext(ctx, cfg), nil
}
@@ -84,7 +92,10 @@ func initLogging(ctx context.Context, _ *cli.Command) (context.Context, error) {
return nil, err
}
slog.SetLogLoggerLevel(lvl)
handler := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: lvl,
}))
slog.SetDefault(handler)
return ctx, nil
}