feat(web): add orchestrator command system in chat interface #521

Merged
jason.woltje merged 1 commits from feat/ms19-orchestrator-chat into main 2026-02-26 03:39:01 +00:00
Owner

Summary

  • Create useOrchestratorCommands hook with command parsing and API execution
  • Support /status, /agents, /jobs, /queue, /pause, /resume, /help commands
  • Intercept slash commands in Chat.tsx to route through orchestrator instead of LLM
  • Add command autocomplete dropdown in ChatInput with keyboard navigation
  • Format API responses as markdown tables and structured output
  • Graceful error handling for unreachable orchestrator
  • 34 new unit tests (21 hook, 10 autocomplete, 3 integration)

Test plan

  • 21 useOrchestratorCommands hook tests
  • 10 ChatInput command autocomplete tests
  • 3 Chat.tsx integration tests
  • 1363 total web tests pass
  • TypeScript typecheck clean
  • Lint clean

Relates to #511

## Summary - Create useOrchestratorCommands hook with command parsing and API execution - Support /status, /agents, /jobs, /queue, /pause, /resume, /help commands - Intercept slash commands in Chat.tsx to route through orchestrator instead of LLM - Add command autocomplete dropdown in ChatInput with keyboard navigation - Format API responses as markdown tables and structured output - Graceful error handling for unreachable orchestrator - 34 new unit tests (21 hook, 10 autocomplete, 3 integration) ## Test plan - [x] 21 useOrchestratorCommands hook tests - [x] 10 ChatInput command autocomplete tests - [x] 3 Chat.tsx integration tests - [x] 1363 total web tests pass - [x] TypeScript typecheck clean - [x] Lint clean Relates to #511
jason.woltje added 1 commit 2026-02-26 03:38:53 +00:00
feat(web): add orchestrator command system in chat interface (CT-ORCH-001)
All checks were successful
ci/woodpecker/push/web Pipeline was successful
bdffc4994b
Add a /command system to the chat UI that routes slash commands to the
orchestrator proxy instead of the LLM. Implements /status, /agents,
/jobs (/queue), /pause, /resume, and /help commands with formatted
markdown responses (tables, bold, code blocks). Adds a command
autocomplete dropdown above the chat input that filters suggestions
as the user types and supports keyboard navigation (ArrowUp/Down,
Tab/Enter to accept, Escape to dismiss).

- apps/web/src/hooks/useOrchestratorCommands.ts: New hook that parses
  command prefixes, dispatches to /api/orchestrator/* proxy routes,
  and formats JSON responses into readable markdown.
- apps/web/src/components/chat/Chat.tsx: Intercepts slash commands
  before LLM routing; adds user message + command result as messages.
- apps/web/src/components/chat/ChatInput.tsx: Command autocomplete
  dropdown with keyboard navigation and click-to-fill support.
- 59 unit/integration tests covering hook, autocomplete, and routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit b110c469c4 into main 2026-02-26 03:39:01 +00:00
Sign in to join this conversation.