Commit Graph

66 Commits

Author SHA1 Message Date
Mohamed Boudra
104aae95da Stop emitting TTS after speech detection 2025-11-15 18:41:31 +01:00
Mohamed Boudra
377fa196f8 Abort realtime playback as soon as speech arrives 2025-11-15 18:26:37 +01:00
Mohamed Boudra
e7b8cc373c Add JSON validation to MCP tool responses 2025-11-15 18:18:14 +01:00
Mohamed Boudra
2a02f41182 refactor: implement agent cancellation and deletion with UI controls
Add cancel button during agent runs, real-time mode toggle in all states, and agent deletion via long-press action sheet. Server now handles cancel_agent_request and delete_agent_request messages, cleaning up agent state and notifying clients.
2025-11-15 18:13:04 +01:00
Mohamed Boudra
b45583a2b2 refactor: standardize pending permission keying and user message hydration 2025-11-15 17:36:15 +01:00
Mohamed Boudra
edcfdf970d refactor(ui): extract diff viewer and tool call parsers into reusable components 2025-11-15 16:28:57 +01:00
Mohamed Boudra
c37e499562 refactor(agent): unify timeline events with tool_call schema and add resume/refresh capabilities 2025-11-15 11:58:41 +01:00
Mohamed Boudra
8cf808b14d refactor(agent): consolidate agent system into unified AgentManager with provider-based architecture
Replace separate ACP and agent-types modules with unified AgentManager using provider pattern. Migrate Claude and Codex implementations to provider-specific clients. Streamline session-agent integration, remove old ACP notification types, and introduce agent timeline events. Delete obsolete documentation and test files. Add AgentRegistry for persistence and agent-stream-based communication pattern.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 02:06:09 +01:00
Mohamed Boudra
90b0094aae feat: add agent registry 2025-11-14 20:20:17 +01:00
Mohamed Boudra
5a2b84ee6f test(agent): enhance timeline event tracking for commands and file changes 2025-11-14 19:59:34 +01:00
Mohamed Boudra
0f3668c9ed test(agent): add permission request handling tests for Codex agent 2025-11-14 19:40:46 +01:00
Mohamed Boudra
1dfb7913b1 feat(agent): add AgentManager for lifecycle and session management 2025-11-14 19:25:37 +01:00
Mohamed Boudra
8a0a6d9488 refactor(agent): add session history persistence and permission timeouts for Claude agent 2025-11-14 19:14:23 +01:00
Mohamed Boudra
b2c89df7c7 refactor(file-explorer): add deep linking, path navigation, diff preview, and Codex session persistence 2025-11-14 19:02:54 +01:00
Mohamed Boudra
c5b30ed878 Add read-only file explorer 2025-11-07 20:36:23 +01:00
Mohamed Boudra
a118fd3315 refactor(agent): add wait_for_agent tool and simplify prompt sending API 2025-11-03 11:47:15 +01:00
Mohamed Boudra
1d22fe46e7 refactor: streamline agent orchestration and add blockquote styling
- Simplify agent-prompt.md with clearer delegation rules and workflow
- Add blockquote markdown styling to message component
- Update agent type to support both claude and codex agents

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 19:59:10 +01:00
Mohamed Boudra
54c19f89bf fix(git-diff): refresh diff data on screen mount and ignore agents.json
- Always request fresh git diff when screen opens (no caching)
- Add packages/server/agents.json to .gitignore (runtime data)
- Remove agents.json from git tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 22:36:24 +01:00
Mohamed Boudra
086dde30cc feat(agent): add git diff viewer and improve permission handling
- Add git diff viewer screen accessible via agent dropdown menu
- Implement git_diff_request/response WebSocket messages
- Add dropdown menu to agent screen header with "View Changes" option
- Clear pending permissions when starting new agent turn to prevent conflicts
- Treat agent refusals as completed rather than failed state
- Add test coverage for permission handling edge cases
- Configure vitest to run in single-threaded mode for stability
- Remove redundant wrapper in agent stream view

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 22:19:16 +01:00
Mohamed Boudra
70a1852e57 refactor(modal): replace bottom sheet with native modal and custom animations
Replace @gorhom/bottom-sheet with React Native's native Modal component and implement custom slide-in/slide-out animations using Reanimated. This provides better control over modal behavior and animations while reducing dependency on external libraries.

Key changes:
- Replace BottomSheetModal with native Modal component
- Implement custom slide animations using Reanimated shared values
- Add backdrop fade in/out animations
- Extract modal sections into focused components (ModalHeader, WorkingDirectorySection, AssistantSelector, ModeSelector, WorktreeSection)
- Add responsive layout support with compact/wide screen detection
- Fix keyboard animation to use transform instead of padding
- Improve modal lifecycle management with mount/unmount state tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 20:37:14 +01:00
Mohamed Boudra
edf47a24bc refactor(agent): consolidate agent type definitions and add multi-agent-type support 2025-10-26 18:03:03 +01:00
Mohamed Boudra
cf7e14e36b fix(keyboard): use transform instead of padding for keyboard animation 2025-10-26 16:19:30 +01:00
Mohamed Boudra
d47019919e refactor(ui): improve footer controls layout and add scroll-to-bottom button
Simplify agent screen layout by removing redundant status bar container and consolidating all footer controls into the input area component. Add smooth fade animations for realtime mode transitions and a floating scroll-to-bottom button for better UX.

Changes:
- Consolidate status bar and controls into AgentInputArea for cleaner layout hierarchy
- Add scroll-to-bottom button to AgentStreamView with fade animations
- Fix realtime controls stacking on non-agent screens
- Add lastActivityAt serialization to MCP server agent responses
- Remove unnecessary layout wrapper in agent screen

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 15:03:33 +01:00
Mohamed Boudra
c4bb10d3c9 feat: add voice note recording overlay with transcription feedback and worktree support 2025-10-26 13:48:14 +01:00
Mohamed Boudra
dcfdccf07f fix(worktree): implement worktree creation for agent isolation
- Add worktree utility functions for git worktree management
- Fix stale closure issue in create-agent-modal causing worktreeName to not be sent
- Refactor create-agent-modal to use useCallback for all functions in proper order
- Add tilde path expansion before worktree creation to fix "Not in a git repository" error
- Add worktreeName parameter to create_agent_request WebSocket message
- Add debug logging for worktree creation flow
- Remove noisy logging (message chunk updates, session updates, agent update notifications)

The worktree feature allows creating isolated git worktrees for each agent,
enabling work on different branches simultaneously without conflicts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 13:28:05 +01:00
Mohamed Boudra
4323d7d193 fix(session): emit agent_status on mode change for immediate UI update
When a user accepts an ExitPlanMode permission, the agent sends a
current_mode_update notification. Previously this was only forwarded
as an agent_update message, but the frontend relies on agent_status
messages to update the mode selector UI.

Now we detect current_mode_update notifications and emit an additional
agent_status message immediately, ensuring the UI updates without
waiting for the agent to complete its turn.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:18:51 +01:00
Mohamed Boudra
7fee9d4dc4 refactor(agent-manager): add error logging for agent prompt refusal 2025-10-26 09:52:43 +01:00
Mohamed Boudra
fdaf403f13 chore(deps): upgrade claude-code-acp to v0.8.5 and improve test lifecycle management 2025-10-26 09:51:18 +01:00
Mohamed Boudra
7d1ef63c8f chore(deps): upgrade claude-code-acp to v0.8.4 and optimize image upload implementation 2025-10-26 09:07:41 +01:00
Mohamed Boudra
b1faab72ce chore(deps): upgrade claude-code-acp to v0.8.4 and mark express dependencies as optional 2025-10-26 08:57:57 +01:00
Mohamed Boudra
1d8e86985b test(agent-manager): add session ID verification and improve agent state persistence 2025-10-26 08:29:52 +01:00
Mohamed Boudra
604e359437 test(agent-manager): add test for loading persisted agent and sending new prompt 2025-10-26 07:59:35 +01:00
Mohamed Boudra
9f22acfead fix(agent-manager): persist agent state before killing to enable resumption 2025-10-26 07:53:51 +01:00
Mohamed Boudra
a81a8a86b8 test: replace console.log with assertion for agent mode verification 2025-10-26 07:44:33 +01:00
Mohamed Boudra
0cc9666df0 chore: reset agents.json and add mode change handling to agent manager 2025-10-26 07:41:27 +01:00
Mohamed Boudra
a3224175ee feat: add image upload support to agent chat with attachment preview 2025-10-26 07:35:06 +01:00
Mohamed Boudra
faf087b3a6 refactor: standardize footer height calculations and alignment across components 2025-10-25 22:14:15 +02:00
Mohamed Boudra
8d591da671 refactor: add dynamic input height, agent sorting, and last activity tracking 2025-10-25 21:56:44 +02:00
Mohamed Boudra
1d6de732b6 feat: implement graceful agent shutdown and update dev script
- Add graceful shutdown to AgentManager that waits for processing agents to complete
- Update server to handle SIGTERM and SIGINT with proper agent cleanup
- Switch dev script to use node --watch --import tsx for faster restarts
- Add shutdown timeout handling with configurable wait period

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 21:20:27 +02:00
Mohamed Boudra
c277f3fd7c chore: add claude-code-acp dependency to root package and update agent state 2025-10-25 20:50:12 +02:00
Mohamed Boudra
1fd9b77680 refactor: upgrade claude-code-acp to v0.8.3 and optimize agent initialization flow 2025-10-25 19:37:13 +02:00
Mohamed Boudra
42e5f864a6 refactor: improve formatting consistency and session persistence in agent management 2025-10-25 18:50:56 +02:00
Mohamed Boudra
d2313b9d1c refactor: memoize useWebSocket return value and improve formatting consistency 2025-10-25 18:49:42 +02:00
Mohamed Boudra
64d1518a6f Prompt is too long 2025-10-25 15:14:44 +02:00
Mohamed Boudra
3115c702bf refactor(server): implement lazy agent initialization with state machine pattern 2025-10-24 20:18:25 +02:00
Mohamed Boudra
8d93eeb5c5 feat: switch to local claude-code-acp package and remove screen transition animations 2025-10-24 18:10:12 +02:00
Mohamed Boudra
dd4fa90c5a fix: resolve session resumption issue by storing Claude's internal session ID
- Add discriminated union for agent options with proper type (claude)
- Store Claude's internal session ID separately from ACP session ID
- Use Zod schema validation for persisted agents
- Use correct session ID when resuming agents (Claude ID for Claude agents)
- Update to @boudra/claude-code-acp@0.8.1 which extracts Claude session ID
2025-10-24 17:09:37 +02:00
Mohamed Boudra
3483bd9afd fix: improve realtime controls layout and add agent status bar
- Change realtime controls to horizontal layout with fixed height (88px)
- Add orientation prop to VolumeMeter for horizontal/vertical modes
- Create AgentStatusBar component showing mode badge and agent status
- Add agent persistence system for managing agent state across restarts
- Fix bottom sheet dismiss handling to clear state properly
- Remove debug timer from realtime controls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 11:17:05 +02:00
Mohamed Boudra
15320819a7 fix: migrate to @boudra/expo-two-way-audio and add tool call details bottom sheet 2025-10-23 20:01:52 +02:00
Mohamed Boudra
74fffcd8a3 refactor: optimize audio initialization and fix agent interactions
- Lazy initialize audio (on-demand instead of mount) in both player and Speechmatics hooks
- Add audio session teardown on stop for proper cleanup
- Implement agent audio recording with sendAgentAudio in AgentInputArea
- Fix Android navigation race condition in CreateAgentModal (navigate before closing)
- Add animations to global footer and agent screen (FadeIn/FadeOut)
- Auto-cancel stuck agents when sending new messages
- Fix permission request ID propagation from AgentManager to Session
- Apply theme background color via AppContainer wrapper

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 13:15:18 +02:00