fix(agentic): add workspace command aliases

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 00:38:10 +00:00
parent 31aca2b66f
commit dce59978aa
2 changed files with 19 additions and 0 deletions

View file

@ -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})
}

View file

@ -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) {