on main help sign in
chore: minor internal/app improvements (#1696)
commit59e4adc2fb034f51e0757a7ee94642196a758977 authorChristian Rocha <christian@rocha.is> dateSat 27 Dec 2025, 12:19 (1 year ago) parent67e8f14
2 files changed+3−3
internal/app/app.go+2−2 internal/app/lsp.go+1−1
internal/app/app.go+2−2
@@ -69,7 +69,7 @@ func New(ctx context.Context, conn *sql.DB, cfg *config.Config) (*App, error) {
6969 messages := message.NewService(q)
7070 files := history.NewService(q, conn)
7171 skipPermissionsRequests := cfg.Permissions != nil && cfg.Permissions.SkipRequests
72− allowedTools := []string{}
72+ var allowedTools []string
7373 if cfg.Permissions != nil && cfg.Permissions.AllowedTools != nil {
7474 allowedTools = cfg.Permissions.AllowedTools
7575 }
@@ -415,7 +415,7 @@ func (app *App) Shutdown() {
415415 })
416416 }
417417
418− // Call call cleanup functions.
418+ // Call all cleanup functions.
419419 for _, cleanup := range app.cleanupFuncs {
420420 if cleanup != nil {
421421 wg.Go(func() {
internal/app/lsp.go+1−1
@@ -38,7 +38,7 @@ func (app *App) createAndStartLSPClient(ctx context.Context, name string, config
3838 // Create LSP client.
3939 lspClient, err := lsp.New(ctx, name, config, app.config.Resolver())
4040 if err != nil {
41− slog.Error("Failed to create LSP client for", name, err)
41+ slog.Error("Failed to create LSP client for", "name", name, "error", err)
4242 updateLSPState(name, lsp.StateError, err, nil, 0)
4343 return
4444 }