The slash command menu only detected `/` at the start of the entire
input text. Now it detects `/` at the start of the current line where
the cursor is positioned, enabling slash commands to work in multiline
input.
Changes:
- Track cursor position in MessageInput to extract current line
- Parse slash command from current line at cursor instead of full input
- Update handleCommandSelect to replace only the current line's command
- Add onSelect handler to track cursor movement
- Update regex in parseSlashCommand to support multiline arguments
- Add unit tests for multiline slash command scenarios
Closes#109
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add AvailableCommand type re-export from ACP SDK
- Handle available_commands_update events in AcpClientFactory
- Store available commands in SessionAgent state
- Add IPC channel and handler for fetching session commands
- Create commandStore for renderer state management
- Update useApp hook to fetch and listen for command updates
- Create SlashCommandMenu component with keyboard navigation
- Integrate slash command detection and validation in MessageInput
- Add unit tests for slash command utilities and store
Commands are defined by ACP agents and sent as plain text for
the agent to parse and execute. The client provides autocomplete
and validation based on the available commands list.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>