Commit Graph
251 Commits
Author SHA1 Message Date
weishu ce6234da3f fix: prevent race condition in MessageQueue2 wait logic 2025-12-30 13:26:33 +08:00
weishu b160888101 feat: implement message backfill to prevent message loss on reconnection 2025-12-30 13:22:27 +08:00
weishu 90e6879552 feat: add local session soft resume support for remote codex sessions 2025-12-30 11:59:34 +08:00
weishu 7845708123 fix git commit prompt 2025-12-29 14:36:24 +08:00
weishu afdec27b13 Release version 0.3.0 2025-12-28 20:57:16 +08:00
weishu 334cebc2da feat: add real-time permission and model mode synchronization close #21
Implements bidirectional sync of permission/model modes between CLI sessions and web app. Adds Codex-specific permission modes (read-only, safe-yolo, yolo) alongside Claude's modes. Web can now control CLI session state via RPC set-session-config handler, while CLI broadcasts state changes through keep-alive payloads. UI controls are flavor-aware, showing appropriate modes for Claude vs Codex vs Gemini. Type centralization in api/types eliminates circular dependencies.
2025-12-28 20:51:18 +08:00
weishu 2dc09a80db fix: pass through all permission modes in claudeRemote 2025-12-28 20:51:18 +08:00
weishu 05deb6fff8 feat: add directory autocomplete with validation for new session form 2025-12-28 16:31:53 +08:00
weishu ce40de900f fix: update slash command descriptions for claude, codex, and gemini.
close #20
2025-12-28 15:19:08 +08:00
weishu fbc0d601f8 feat: add slash command autocomplete to HappyComposer
Implements full-stack slash command autocomplete with agent-specific built-in commands and user-defined command discovery. Includes React Strict Mode fix for suggestion handling.
2025-12-28 15:19:08 +08:00
weishu 2004d22afe fix: capture process PID in local variable for TypeScript control flow 2025-12-28 14:01:12 +08:00
weishu c35a5ce827 feat: add git worktree session support with improved UI
Implement comprehensive worktree session support allowing users to spawn sessions in temporary git worktrees. Includes backend worktree management, full-stack integration, and refined UI for session type selection.

Backend:
- Add worktree creation/removal utilities with branch management
- Track worktree metadata (basePath, branch, name, path) in session metadata
- Automatic cleanup of worktrees when sessions fail or exit
- Enhanced error handling with stderr tail logging

UI improvements:
- Redesign session type toggle with improved alignment and spacing
- Move worktree description inline with label for cleaner layout
- Add branch name input field that appears when worktree mode selected
- Auto-focus on worktree input when switching modes
- Reduce gap between radio options from gap-3 to gap-1.5
- Update descriptive text and placeholders for clarity

Integration:
- Thread worktree parameters through API client, RPC handlers, and daemon
- Add worktreeEnv utility to read worktree info from environment
- Update session spawning to support both simple and worktree modes
2025-12-28 13:17:58 +08:00
weishu 50d5c4fd35 fix: resolve TypeScript type inference issue in claudeLocal.ts
Remove unnecessary Promise wrapper and move args building outside try block
so cleanupMcpConfig becomes const with proper type inference instead of never
2025-12-28 13:12:15 +08:00
Evan7198andweishu 62f0cf4c41 fix: improve cross-platform compatibility for path and file operations
Use basename() instead of split('/').pop() and 'wx' flag instead of
fs constants for better Windows compatibility.
2025-12-28 12:16:51 +08:00
weishu 2ef7e0ec5f refactor: extract MCP config handling to use temp files on Windows 2025-12-28 11:36:56 +08:00
weishu 7922356669 feat: add timeout and retry logic to bun install in release script 2025-12-28 00:03:37 +08:00
weishu 1d50f3c2f3 0.2.2 2025-12-27 23:45:24 +08:00
weishu 007721bdc8 fix: codex session selection 2025-12-27 22:24:18 +08:00
weishu 3bdcc14ed0 refactor: simplify yolo mode implementation by removing env vars
Remove HAPPY_GEMINI_ARGS and HAPPY_GEMINI_COMMAND environment variables.
Refactor gemini.ts to export registerGeminiAgent(yolo) function that
directly configures args instead of reading from environment.
2025-12-27 21:24:16 +08:00
58e61b3db9 feat: create new session with yolo mode (#13)
* feat: create new session with yolo mode

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: harden sequence typecheck

* feat: add unified --yolo flag across all agents

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2025-12-27 21:03:34 +08:00
weishu 5342512ff1 Release version 0.2.1
fix: compile error for ink

see https://github.com/vadimdemedes/ink/issues/571
2025-12-26 21:45:46 +08:00
weishu f03c7f2cc8 feat: add intelligent session matching based on cwd and timestamp 2025-12-26 21:11:43 +08:00
weishu 19c2e054a9 fix: extend ink Key type with runtime properties 2025-12-26 20:45:50 +08:00
weishu b497abda98 refactor: extract CLI argument parsing into shared utility 2025-12-26 20:45:37 +08:00
weishu 5d79a3f1ef refactor: extract spawn abort handling into shared utility 2025-12-26 18:18:12 +08:00
weishu b3499bb5ed fix: terminal state restoration and abort handling regression
Fixes regression introduced in 1a23bfa430.

- Add restoreTerminalState helper to disable kitty keyboard protocol and
  CSI u key release reporting when switching modes or cleaning up
- Improve claudeLocal abort handling with SIGINT → SIGTERM → SIGKILL
  escalation timeouts for graceful process termination
- Fix useSwitchControls to properly handle CSI u space sequences (0x20)
  and key.name/key.sequence detection for space key presses
- Fix typo: exutFuture → exitFuture in claudeLocalLauncher
2025-12-26 18:07:45 +08:00
weishu 3adaa0f77c refactor: use ref objects for session tracking in closures 2025-12-26 18:02:33 +08:00
Ruihang XiaandGitHub e2731fc7f0 fix: disable autoload dotenv (#11)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2025-12-26 17:07:07 +08:00
weishu d26a7c8996 Fix: Preserve MCP Notification Handler Binding
This change addresses the regression introduced by commit 38e8fe8d02, which broke the codex switch.
2025-12-26 17:05:03 +08:00
weishu 702072e9ba refactor: extract process management utilities for cross-platform support
Consolidate process lifecycle management (kill, check alive) into a new
utility module with proper Windows/Unix handling, replacing scattered
process.kill() calls with consistent async APIs.
2025-12-26 16:12:03 +08:00
weishu eee7a249fa feat: implement unified local launch failure handling policy 2025-12-26 16:11:58 +08:00
weishu 5d5023883e refactor: safely access Bun.main with optional chaining 2025-12-26 12:40:44 +08:00
weishu 76b84a0b52 refactor: unify bun compiled detection with windows support
- Add shared isBunCompiled() function for consistent runtime detection
- Support Windows virtual filesystem paths (/~BUN/) alongside Linux/macOS (/$bunfs/)
- Use Bun.main for reliable detection instead of process.argv[1]
- Remove redundant $bunfs checks from cli/src/index.ts
- Update cli/src/utils/bunRuntime.ts to use shared detection function
- Create server/src/utils/bunCompiled.ts for server-side compilation check
2025-12-26 11:29:12 +08:00
weishu abec6d958d refactor: update dependencies including zod, vitest, and type packages 2025-12-25 23:18:13 +08:00
weishu 3765cc539b refactor: update dependencies and fix TypeScript instantiation depth issues
Updates ModelContextProtocol SDK and multiple dependent libraries to latest versions. Refactors TypeScript schemas to avoid instantiation depth issues by widening Zod types and using explicit type parameters.
2025-12-25 22:56:08 +08:00
weishu 38e8fe8d02 refactor: remove eslint and tsx-related dependencies after bun migration
Removes dev dependencies no longer needed after migrating from tsx to bun as TypeScript runtime and removing linting toolchain. Moves workbox-window to web package dependencies where it's actually used.
2025-12-25 22:29:35 +08:00
weishu 4314aececd refactor: migrate from tsx to bun as TypeScript runtime
Remove tsx dependency and update all dev scripts and documentation to use bun
as the primary TypeScript runtime for development. Consolidate process detection
logic in daemon.ts to check for dev mode via src/index.ts regardless of runtime.
2025-12-25 22:13:58 +08:00
weishu 18e6310451 feat: implement web terminal feature with xterm.js and Socket.IO proxy
- Add CLI-side terminal management via Bun.Terminal with TerminalManager
- Implement server-side Socket.IO proxy for terminal I/O between web and CLI
- Create web terminal UI component with xterm.js and support for resize/reconnect
- Add terminal route and navigation button in session chat
- Include comprehensive terminal implementation plan and architecture docs
2025-12-25 21:57:18 +08:00
weishu 0762f0772f refactor: move directory creation before lock file operations. fix #6 2025-12-25 21:48:33 +08:00
weishu 73f5a51548 fix url of happy project 2025-12-25 17:42:22 +08:00
weishu 21ed9fca2f docs: update Gemini default args to experimental-acp
Update HAPPY_GEMINI_ARGS default from --acp to --experimental-acp and add note about Gemini remote-only mode.
2025-12-25 16:56:26 +08:00
weishu 1405e2bca9 Release version 0.1.3 2025-12-25 15:18:03 +08:00
weishu 3cdfee0c36 0.1.2 2025-12-25 13:05:15 +08:00
weishu c224188dd3 chore: allow release dry-run without npm login 2025-12-25 12:46:26 +08:00
weishu ffabc0196d chore: remove unused 2025-12-25 12:34:16 +08:00
weishu 4fb2a203c6 feat: add pre-checks to release-all script for safety
Add validation checks before releasing:
- Ensure we're on the main branch to prevent accidental releases from feature branches
- Verify npm authentication to prevent failed publish attempts

This prevents common release mistakes and improves release workflow reliability.
2025-12-25 12:30:10 +08:00
weishu dbbeedea0d refactor: unify release workflow into single release-all script
Consolidate version bumping, building, npm publishing, and git operations into a single release script that handles platform packages first. This solves the issue where optionalDependencies needed platform packages published before bun install could generate complete lockfile hashes.

Changes:
- Created cli/scripts/release-all.ts with support for --dry-run, --publish-npm, and --skip-build flags
- Removed release-it dependency and old release/publish-npm scripts
- Simplified GitHub Actions release workflow to always use --generate-notes
- Deleted obsolete release configuration files (.release-it.json, .release-it.notes.js, publish-npm.ts)
2025-12-25 12:26:49 +08:00
weishu d11bfbef86 chore: prepare release 0.1.0 with native binary support
- Update CLI version to 0.1.0
- Change bin script extension from .js to .cjs for ES module compatibility
- Add release-it as dev dependency for version management
- Update all platform-specific binary package versions to 0.1.0
- Enhance release workflow to support custom RELEASE_NOTES.md
2025-12-25 11:31:03 +08:00
weishu f65611b287 chore: run tools:unpack before tests 2025-12-25 11:12:29 +08:00
weishu 19abddb997 chore: setup integration test environment in CI workflow 2025-12-25 11:07:47 +08:00