From b4021782c107ee22a44ccf86190c03a7673f3a34 Mon Sep 17 00:00:00 2001 From: dj-oyu <68707227+dj-oyu@users.noreply.github.com> Date: Sun, 15 Mar 2026 18:51:25 +0900 Subject: [PATCH] fix: resolve golangci-lint issues in refactored files - Remove extra blank line (gci) - Break long function signature for golines - Remove tautological nil check (govet nilness) Co-Authored-By: Claude Opus 4.6 (1M context) --- pkg/agent/loop.go | 1 - pkg/agent/loop_run.go | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 5ed87144d..8a295ab8b 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -1357,7 +1357,6 @@ func (al *AgentLoop) publishToolMedia(ctx context.Context, result *tools.ToolRes }) } - // Helper to extract provider from registry for cleanup func extractProvider(registry *AgentRegistry) (providers.LLMProvider, bool) { if registry == nil { diff --git a/pkg/agent/loop_run.go b/pkg/agent/loop_run.go index 810f93a73..99bfc2ea3 100644 --- a/pkg/agent/loop_run.go +++ b/pkg/agent/loop_run.go @@ -535,10 +535,7 @@ func (al *AgentLoop) runAgentLoopImpl(ctx context.Context, agent *AgentInstance, } // 5d. Store result summary for task completion notification - - if task != nil { - task.Result = utils.Truncate(finalContent, 280) - } + task.Result = utils.Truncate(finalContent, 280) // 6. Save final assistant message to session (deferred write-behind) @@ -644,7 +641,9 @@ func (al *AgentLoop) cleanupHeartbeatWorktree(agent *AgentInstance, opts process // publishTaskCompletion publishes the final task status on completion for // background tasks, including the LLM response in the completion bubble. -func (al *AgentLoop) publishTaskCompletion(task *activeTask, finalContent *string, opts processOptions, taskKey string) { +func (al *AgentLoop) publishTaskCompletion( + task *activeTask, finalContent *string, opts processOptions, taskKey string, +) { al.activeTasks.Delete(taskKey) if opts.TaskID == "" {