Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Add runtime model switching and TUI commands

9 months ago

b248029
Authored
mweinbach2/8/2026, 6:22:32 AM
Introduce a new client message type `set_model` and server event `config_updated`. Implement AgentSession#setModel to update the active model (and sub-agent model), reload the system prompt, and emit errors on invalid input or when the agent is busy. startServer now handles incoming `set_model` messages.

Enhance the TUI with slash commands (e.g. /model, /connect, /status, /help, /new, /clear, /exit), local connection storage under ~/.ai-coworker, session state/log files, session logging, composer improvements, keyboard navigation for slash suggestions, and UI feedback for model changes. Adjust some session fields to be mutable to support runtime updates.

Add tests for safe parsing of `set_model` messages and for AgentSession#setModel behavior (successful update and empty-model error).

Parent73586dc

6 files changed
  • src/server/protocol.ts+7−0
  • src/server/session.ts+38−2
  • src/server/startServer.ts+5−0
  • src/tui/index.tsx+673−19
  • test/protocol.test.ts+30−0
  • test/session.test.ts+29−0