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:
13
cmd/main.go
13
cmd/main.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user