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

1 Commits

Author SHA1 Message Date
bdffc4994b feat(web): add orchestrator command system in chat interface (CT-ORCH-001)
All checks were successful
ci/woodpecker/push/web Pipeline was successful
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>
2026-02-25 21:38:06 -06:00