@@ -69,7 +69,7 @@ func New(ctx context.Context, conn *sql.DB, cfg *config.Config) (*App, error) {
messages := message.NewService(q)
files := history.NewService(q, conn)
skipPermissionsRequests := cfg.Permissions != nil && cfg.Permissions.SkipRequests
- allowedTools := []string{}
+ var allowedTools []string
if cfg.Permissions != nil && cfg.Permissions.AllowedTools != nil {
allowedTools = cfg.Permissions.AllowedTools
}
@@ -415,7 +415,7 @@ func (app *App) Shutdown() {
})
}
- // Call call cleanup functions.
+ // Call all cleanup functions.
for _, cleanup := range app.cleanupFuncs {
if cleanup != nil {
wg.Go(func() {
@@ -38,7 +38,7 @@ func (app *App) createAndStartLSPClient(ctx context.Context, name string, config
// Create LSP client.
lspClient, err := lsp.New(ctx, name, config, app.config.Resolver())
if err != nil {
- slog.Error("Failed to create LSP client for", name, err)
+ slog.Error("Failed to create LSP client for", "name", name, "error", err)
updateLSPState(name, lsp.StateError, err, nil, 0)
return
}