From dce59978aa6121d4f5c7a5480ab8516659af95a5 Mon Sep 17 00:00:00 2001 From: Virgil Date: Thu, 2 Apr 2026 00:38:10 +0000 Subject: [PATCH] fix(agentic): add workspace command aliases Co-Authored-By: Virgil --- pkg/agentic/commands_workspace.go | 4 ++++ pkg/agentic/commands_workspace_test.go | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/pkg/agentic/commands_workspace.go b/pkg/agentic/commands_workspace.go index 59860e0..8deae44 100644 --- a/pkg/agentic/commands_workspace.go +++ b/pkg/agentic/commands_workspace.go @@ -11,9 +11,13 @@ import ( func (s *PrepSubsystem) registerWorkspaceCommands() { c := s.Core() c.Command("workspace/list", core.Command{Description: "List all agent workspaces with status", Action: s.cmdWorkspaceList}) + c.Command("agentic:workspace/list", core.Command{Description: "List all agent workspaces with status", Action: s.cmdWorkspaceList}) c.Command("workspace/clean", core.Command{Description: "Remove completed/failed/blocked workspaces", Action: s.cmdWorkspaceClean}) + c.Command("agentic:workspace/clean", core.Command{Description: "Remove completed/failed/blocked workspaces", Action: s.cmdWorkspaceClean}) c.Command("workspace/dispatch", core.Command{Description: "Dispatch an agent to work on a repo task", Action: s.cmdWorkspaceDispatch}) + c.Command("agentic:workspace/dispatch", core.Command{Description: "Dispatch an agent to work on a repo task", Action: s.cmdWorkspaceDispatch}) c.Command("workspace/watch", core.Command{Description: "Watch workspaces until they complete", Action: s.cmdWorkspaceWatch}) + c.Command("agentic:workspace/watch", core.Command{Description: "Watch workspaces until they complete", Action: s.cmdWorkspaceWatch}) c.Command("watch", core.Command{Description: "Watch workspaces until they complete", Action: s.cmdWorkspaceWatch}) c.Command("agentic:watch", core.Command{Description: "Watch workspaces until they complete", Action: s.cmdWorkspaceWatch}) } diff --git a/pkg/agentic/commands_workspace_test.go b/pkg/agentic/commands_workspace_test.go index 5e1bbbd..529e372 100644 --- a/pkg/agentic/commands_workspace_test.go +++ b/pkg/agentic/commands_workspace_test.go @@ -10,6 +10,21 @@ import ( "github.com/stretchr/testify/assert" ) +func TestCommandsworkspace_RegisterWorkspaceCommands_Good_Aliases(t *testing.T) { + s, c := testPrepWithCore(t, nil) + + s.registerWorkspaceCommands() + + assert.Contains(t, c.Commands(), "workspace/list") + assert.Contains(t, c.Commands(), "agentic:workspace/list") + assert.Contains(t, c.Commands(), "workspace/clean") + assert.Contains(t, c.Commands(), "agentic:workspace/clean") + assert.Contains(t, c.Commands(), "workspace/dispatch") + assert.Contains(t, c.Commands(), "agentic:workspace/dispatch") + assert.Contains(t, c.Commands(), "workspace/watch") + assert.Contains(t, c.Commands(), "agentic:workspace/watch") +} + // --- CmdWorkspaceList Bad/Ugly --- func TestCommandsworkspace_CmdWorkspaceList_Bad_NoWorkspaceRootDir(t *testing.T) {