From f2c7efcf1670f02e556cc7f8604d4f875baacbca Mon Sep 17 00:00:00 2001 From: seagochen Date: Thu, 26 Feb 2026 16:30:06 +0900 Subject: [PATCH] style: fix golangci-lint formatting (gci, golines) Co-Authored-By: Claude Opus 4.6 --- pkg/agent/loop.go | 17 ++++++++++++++--- pkg/agent/ls_helpers_test.go | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 1bbd4b34c..6d78e2e0e 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -274,7 +274,10 @@ func (al *AgentLoop) ProcessDirect(ctx context.Context, content, sessionKey stri // ProcessDirectWithWorkDir processes a message with an explicit working directory context. // The workDir is injected into the system prompt so the AI resolves file paths relative to it. -func (al *AgentLoop) ProcessDirectWithWorkDir(ctx context.Context, content, sessionKey, workDir string) (string, error) { +func (al *AgentLoop) ProcessDirectWithWorkDir( + ctx context.Context, + content, sessionKey, workDir string, +) (string, error) { msg := bus.InboundMessage{ Channel: "cli", SenderID: "cron", @@ -1338,7 +1341,11 @@ func (al *AgentLoop) handleModeCommand(content, sessionKey string, agent *AgentI // executeCmdMode executes a shell command in command mode via ExecTool. // Output is formatted as a console code block for channel display. -func (al *AgentLoop) executeCmdMode(ctx context.Context, agent *AgentInstance, content, sessionKey, channel, chatID string) (string, error) { +func (al *AgentLoop) executeCmdMode( + ctx context.Context, + agent *AgentInstance, + content, sessionKey, channel, chatID string, +) (string, error) { content = strings.TrimSpace(content) if content == "" { return "", nil @@ -1530,7 +1537,11 @@ func editShowFile(path string) string { data, err := os.ReadFile(path) if err != nil { if os.IsNotExist(err) { - return fmt.Sprintf("File not found: %s\nUse :edit %s -m \"\"\" to create it.", shortenHomePath(path), filepath.Base(path)) + return fmt.Sprintf( + "File not found: %s\nUse :edit %s -m \"\"\" to create it.", + shortenHomePath(path), + filepath.Base(path), + ) } return fmt.Sprintf("Error reading file: %v", err) } diff --git a/pkg/agent/ls_helpers_test.go b/pkg/agent/ls_helpers_test.go index fd1b34e5d..652f1d6de 100644 --- a/pkg/agent/ls_helpers_test.go +++ b/pkg/agent/ls_helpers_test.go @@ -49,8 +49,8 @@ func TestIsPermString(t *testing.T) { {"drwxr-xr-x", true}, {"-rw-r--r--", true}, {"lrwxrwxrwx", true}, - {"-rwsr-xr-x", true}, // setuid - {"drwxrwxrwt", true}, // sticky + {"-rwsr-xr-x", true}, // setuid + {"drwxrwxrwt", true}, // sticky {"hello world", false}, // wrong length/chars {"----------", true}, {"xrwxrwxrwx", false}, // invalid first char