From cbd0c5f22b36c0a69373d8bc5fd048179b427b7f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Feb 2026 16:27:42 +0000 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20fmt.Errorf(static)=20=E2=86=92=20e?= =?UTF-8?q?rrors.New?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- cmd/workspace/cmd_agent.go | 3 ++- cmd/workspace/config.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/workspace/cmd_agent.go b/cmd/workspace/cmd_agent.go index a25cbf7..8d0697e 100644 --- a/cmd/workspace/cmd_agent.go +++ b/cmd/workspace/cmd_agent.go @@ -23,6 +23,7 @@ package workspace import ( "encoding/json" + "errors" "fmt" "path/filepath" "strings" @@ -92,7 +93,7 @@ func agentContextPath(wsPath, provider, name string) string { func parseAgentID(id string) (provider, name string, err error) { parts := strings.SplitN(id, "/", 2) if len(parts) != 2 || parts[0] == "" || parts[1] == "" { - return "", "", fmt.Errorf("agent ID must be provider/agent-name (e.g. claude-opus/qa)") + return "", "", errors.New("agent ID must be provider/agent-name (e.g. claude-opus/qa)") } return parts[0], parts[1], nil } diff --git a/cmd/workspace/config.go b/cmd/workspace/config.go index 91a5303..b5ad997 100644 --- a/cmd/workspace/config.go +++ b/cmd/workspace/config.go @@ -1,6 +1,7 @@ package workspace import ( + "errors" "fmt" "os" "path/filepath" @@ -99,5 +100,5 @@ func FindWorkspaceRoot() (string, error) { dir = parent } - return "", fmt.Errorf("not in a workspace") + return "", errors.New("not in a workspace") } From 72c17b23829b312ac25d9f7a90eb1b9b0aa5299e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Feb 2026 16:28:05 +0000 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20sort.Slice=20=E2=86=92=20slices.So?= =?UTF-8?q?rtFunc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- cmd/tasks/cmd.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/tasks/cmd.go b/cmd/tasks/cmd.go index f6803b0..31b9779 100644 --- a/cmd/tasks/cmd.go +++ b/cmd/tasks/cmd.go @@ -5,13 +5,13 @@ package tasks import ( "context" "os" - "sort" + "slices" "strings" "time" + "forge.lthn.ai/core/cli/pkg/cli" "forge.lthn.ai/core/go-agentic" "forge.lthn.ai/core/go-ai/ai" - "forge.lthn.ai/core/cli/pkg/cli" "forge.lthn.ai/core/go/pkg/i18n" ) @@ -154,8 +154,8 @@ var taskCmd = &cli.Command{ agentic.PriorityLow: 3, } - sort.Slice(tasks, func(i, j int) bool { - return priorityOrder[tasks[i].Priority] < priorityOrder[tasks[j].Priority] + slices.SortFunc(tasks, func(a, b agentic.Task) int { + return priorityOrder[a.Priority] - priorityOrder[b.Priority] }) task = &tasks[0]