78 Commits

Author SHA1 Message Date
程序员阿江(Relakkes)
d059a8b487 feat: add Provider management UI, CLI Tasks page, and enhance NewTaskModal
- Settings: new Providers tab with full CRUD, activation, and connectivity
  test; Model tab shows active provider name; General tab simplified
- Tasks: new CLI Tasks page displaying task lists from ~/.claude/tasks/
  with status, owner, and dependency (blocks/blockedBy) visualization
- NewTaskModal: add Advanced options (model, permission mode, working dir)
- Backend: fix TaskService to parse CLI V2 task format; extend /api/tasks
  with /lists endpoint for grouped queries
- Fix ModelInfo.context type from number to string

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 10:05:50 +08:00
程序员阿江(Relakkes)
da2be1f81b Merge branch 'worktree-feature-scheduled-tasks' into docs/ui-clone-requirements
Resolve PLAN.md conflict by keeping both plans: Provider management
system and Scheduled Tasks enhancement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 01:48:03 +08:00
程序员阿江(Relakkes)
b1db66ac8c feat: add scheduled task edit UI, CronUpdateTool, wizard components and tests 2026-04-07 01:44:44 +08:00
程序员阿江(Relakkes)
bd658d98f6 Merge branch 'worktree-feature-model-config' into docs/ui-clone-requirements 2026-04-07 01:33:09 +08:00
程序员阿江(Relakkes)
985b1a8b7d feat: add Provider management system — multi-provider CRUD, activation, and connectivity test
Implement a full Provider management layer compatible with Claude Code's settings.json protocol.

- ProviderService: CRUD + activation + settings.json sync + HTTP connectivity test
- Provider REST API: 8 endpoints (list, get, create, update, delete, activate, test)
- API key masking in GET responses (sk-a****xyz)
- Models API refactored to read from active Provider dynamically
- 42 unit tests + 6 real-config integration tests, all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 01:29:52 +08:00
程序员阿江(Relakkes)
5d908b2828 feat: redesign sidebar — project filter dropdown + time-grouped session list
Replace project-grouped session list with a flat time-grouped layout
(Today / Yesterday / Last 7 days / Last 30 days / Older) matching
the original Claude Code desktop design. Add ProjectFilter component
with multi-select dropdown for filtering by project. Deduplicate
sessions by ID in the store to fix duplicate-key React errors caused
by the same session appearing across multiple project directories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 01:08:55 +08:00
程序员阿江(Relakkes)
d601bbf968 docs: add sidebar redesign spec — project filter + time-grouped list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 00:40:21 +08:00
程序员阿江(Relakkes)
767abfc233 fix: restore tool calls on page refresh — handle server type mapping
Server marks assistant messages with tool_use blocks as type='tool_use'
(not 'assistant'), and user messages with tool_result blocks as
type='tool_result' (not 'user'). mapHistoryMessagesToUiMessages now
handles both type variants when parsing content arrays, so tool calls
are properly restored after page refresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 23:26:29 +08:00
程序员阿江(Relakkes)
5e4e7d3955 fix: soften error indicators in tool call groups — icon instead of red badge
- Replace "ERROR" text badge with material error icon (less visually jarring)
- Add "pending" icon when tool results haven't been matched yet
- Remove red border on error groups — all groups now use the same neutral border
- Single tool call ERROR badge also changed to icon

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 23:13:18 +08:00
程序员阿江(Relakkes)
5e71da88c3 fix: preserve intermediate text between tool calls, restore thinking blocks on refresh
Two bugs fixed:

1. Intermediate assistant text (e.g. "项目已经有 node_modules,直接启动") was
   lost between tool calls because content_start didn't flush streamingText.
   Now we flush accumulated text as assistant_text before switching to the
   next content block.

2. History reload (page refresh) now restores thinking blocks alongside
   tool_use, tool_result, and text blocks. Previously thinking blocks were
   intentionally dropped — now they're preserved for full conversation replay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 23:01:37 +08:00
程序员阿江(Relakkes)
83559ce7be feat: sync CLI status (verb, elapsed, tokens) to StreamingIndicator
- Store statusVerb from server 'status' WebSocket messages
- StreamingIndicator now shows the real CLI verb (Canoodling, Thinking, etc.)
  plus elapsed time and output token count
- Only show StreamingIndicator during tool_executing (not during thinking,
  where ThinkingBlock already provides feedback)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:49:33 +08:00
程序员阿江(Relakkes)
905d4216a5 fix: hide duplicate StreamingIndicator during thinking, fix plain text color in code blocks
- StreamingIndicator now only shows during 'tool_executing' state
  (ThinkingBlock already animates during 'thinking')
- Plain text code blocks force dark color (#24292f) instead of prism's
  default faded gray which was invisible on our beige background

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:45:07 +08:00
程序员阿江(Relakkes)
8cc38f6979 chore: delete highlightCode.ts, remove hljs CSS, fix test for new DiffViewer
- Deleted desktop/src/components/chat/highlightCode.ts (no longer needed)
- Removed all .hljs-* CSS rules from globals.css
- Updated chatBlocks test for react-diff-viewer-continued (doesn't render
  diff content in jsdom, so test verifies component mounting instead)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 22:29:52 +08:00
程序员阿江(Relakkes)
9dc0dbacad feat: rewrite MarkdownRenderer code blocks with React CodeViewer — no more HTML string templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:21:47 +08:00
程序员阿江(Relakkes)
e3714e9245 feat: rewrite DiffViewer with react-diff-viewer-continued — GitHub PR-style diffs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:19:58 +08:00
程序员阿江(Relakkes)
b9a387406a feat: rewrite CodeViewer with prism-react-renderer — pure React rendering, GitHub theme
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:17:48 +08:00
程序员阿江(Relakkes)
941d8f0314 chore: add prism-react-renderer + react-diff-viewer-continued, remove highlight.js + diff
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:16:03 +08:00
程序员阿江(Relakkes)
3b83c9bd34 fix: disable hljs.highlightAuto for unknown languages, hide line numbers for plain text
- highlightAuto was misdetecting plain text (file trees, command output) as
  code and applying wrong syntax colors (red keywords, green tags, etc.)
- Now only highlights when language is explicitly specified and known to hljs
- Code blocks without a specified language render as clean plain text
- Line numbers hidden for plain text blocks (only shown for actual code)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 21:55:00 +08:00
程序员阿江(Relakkes)
be9ae99793 fix: address code review findings — consistent px-3, rounded-lg, leading-[1.3]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 21:41:48 +08:00
程序员阿江(Relakkes)
d25be78f0c fix: streamline AssistantMessage, ThinkingBlock, and StreamingIndicator — remove avatar, compact layout
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:38:14 +08:00
程序员阿江(Relakkes)
001994d0bd feat: group consecutive tool calls into collapsible summaries in MessageList
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:36:39 +08:00
程序员阿江(Relakkes)
458945da52 feat: add ToolCallGroup + compact ToolCallBlock for collapsible tool summaries
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:35:04 +08:00
程序员阿江(Relakkes)
defa72292e fix: sync markdown code blocks with CodeViewer compact styles
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:32:41 +08:00
程序员阿江(Relakkes)
7ed1c920cc fix: compact diff viewer — tighter rows, gutter indicators, softer borders
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:31:40 +08:00
程序员阿江(Relakkes)
cc9fe832c2 fix: compact code block rendering — tighter line height, softer borders
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:30:34 +08:00
程序员阿江(Relakkes)
993b96cd39 Stabilize the desktop transcript so long agent sessions stay readable
The desktop app now keeps the composer stable while turns are active,
reduces low-signal tool noise in the transcript, restores project context
under the composer after session creation, and relies on the CLI's own
permission requests instead of injecting broader desktop-side Bash asks.

This also brings in the supporting desktop app source tree and the server
routes/session metadata needed for git info, filesystem browsing, session
resume, slash commands, and SDK-backed permission bridging so the UI can
operate as a coherent feature instead of a partial patch.

Constraint: Desktop transcript needs to stay usable during long multi-tool sessions without hiding file-change diffs
Constraint: Permission prompts must mirror CLI behavior closely enough that read-only commands do not get desktop-only prompts
Rejected: Keep rendering Read/Bash bodies inline | too noisy and unlike the intended transcript model
Rejected: Commit only the touched desktop files | would leave the newly introduced desktop app incomplete in git history
Confidence: medium
Scope-risk: broad
Reversibility: messy
Directive: Treat non-writing tools as summary-first transcript events; do not re-expand them by default without validating the UX against long sessions
Tested: cd desktop && bun run lint
Tested: cd desktop && bun run test -- --run
Tested: bun test src/server/__tests__/conversations.test.ts
Not-tested: Manual visual regression against the exact screenshots in a live desktop session
Not-tested: Full root TypeScript check (repository still has unrelated extracted-native parse failures)
2026-04-06 20:37:44 +08:00
程序员阿江(Relakkes)
52f00a95d6 fix: address Codex review findings — auth, cron CLI, workdir, model IDs
- Enforce auth on API/WS when non-localhost or SERVER_AUTH_REQUIRED=1
- Fix CronScheduler: add --verbose flag and correct stream-json message envelope
- Resolve session workdir from JSONL file instead of hardcoding process.cwd()
- Give Opus 4.6 1M a unique composite ID (claude-opus-4-6-20250610:1m)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 15:21:55 +08:00
程序员阿江(Relakkes)
ce0908a4e0 feat: complete server-side gaps — tool visibility, cron execution engine, team real-time push
- Fix translateCliMessage to return ServerMessage[] with full tool lifecycle
  (tool_result, tool_use_complete, toolInput, thinking, stream_event)
- Add CronScheduler that actually executes scheduled tasks via CLI subprocess,
  with execution log persistence and GET /api/scheduled-tasks/:id/runs API
- Add TeamWatcher polling ~/.claude/teams/ every 3s, broadcasting team_update/
  team_created/team_deleted to all WebSocket clients
- 280 tests pass (51 new), real LLM integration verified via MiniMax API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:42:32 +08:00
程序员阿江(Relakkes)
29c9fb8f4a feat: add CLI subprocess chat, Agent Teams API, and real background tasks
Three new modules completing the server-side functionality:

1. ConversationService: spawns CLI as subprocess with --input-format
   stream-json, forwards WebSocket messages to CLI stdin/stdout.
   CLI handles all AI communication, tool execution, and permissions.
   Graceful fallback to echo mode when CLI unavailable.

2. Agent Teams API: GET/DELETE /api/teams, member listing with status
   derivation (running/idle/completed), transcript reading from
   CLI-generated JSONL files. Teams created by CLI, API is read-only.

3. TaskService: replaces placeholder with real task file scanning
   from ~/.claude/tasks/, supports nested team directories.

229 tests passing (49 new: 12 conversations + 27 teams + 10 tasks).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:05:22 +08:00
程序员阿江(Relakkes)
f1c310a004 docs: trim scope to core features and add Agent Teams UI spec
- Remove Search, Dispatch, Customize pages (not needed for MVP)
- Sidebar simplified to: New session + Scheduled + project filter + sessions
- Add Agent Teams panel design: team status bar, member tabs with color
  coding, teammate transcript switching, running/completed/failed states
- Add Agent Teams interaction flow (create → view members → switch → back)
- Requirements reduced from 118 to 89 items, focused on:
  1. Core conversation (messages, tools, permissions, streaming)
  2. Session management with project selection
  3. Scheduled tasks
  4. Agent Teams member activity visualization

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 13:41:36 +08:00
程序员阿江(Relakkes)
0c6d2754b4 feat: add Desktop UI backend server with full REST API and WebSocket support
Add complete server-side implementation for the Claude Code Desktop App UI:

- REST API: sessions, conversations, settings, models, scheduled tasks,
  search, agents, and status endpoints (9 modules, 30+ endpoints)
- WebSocket: real-time chat streaming with state transitions, ping/pong,
  permission request forwarding, and stop generation support
- Services: sessionService (JSONL read/write, CLI-compatible),
  settingsService (atomic writes), cronService, searchService (ripgrep),
  agentService (YAML management)
- Middleware: CORS (localhost-only), auth, unified error handling
- Tests: 180 tests (unit + E2E + business flow), all passing
- Docs: PRD, UI design spec, server architecture design

Non-invasive: all new code under src/server/, no changes to existing CLI code.
CLI/UI data interop: reads/writes the same JSONL/JSON files as the CLI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 13:23:44 +08:00
程序员阿江(Relakkes)
072e5bcc48 fix: unify anchor IDs between VitePress and GitHub with custom slugify
Add GitHub-compatible slugify (github-slugger algorithm) to VitePress
config so heading anchor IDs are consistent across both platforms.
Update all inline anchor links in 22 doc files accordingly.
2026-04-05 10:13:57 +08:00
程序员阿江(Relakkes)
755804fb96 docs: add Channel System links to README 2026-04-05 09:31:18 +08:00
程序员阿江(Relakkes)
4c9a77f903 feat: add Channel System documentation (CN/EN) 2026-04-05 09:23:50 +08:00
程序员阿江(Relakkes)
cf55c55d00 feat: add Computer Use architecture docs and fix all anchor links
- Add Computer Use architecture deep dive documentation (CN/EN)
  with 4 generated diagrams (architecture, security gates,
  Python Bridge, patch environment comparison)
- Move Computer Use section below Skills in sidebar and README
- Fix 153 broken anchor links across 18 documentation files:
  - CN docs: add missing `、` after Chinese numeral prefixes
  - EN docs: add missing `_` prefix for number-starting heading IDs
  - Fix em-dash and special character encoding in anchor hrefs
2026-04-05 01:16:25 +08:00
程序员阿江(Relakkes)
89e6ff3781 feat: add Agent Framework Deep Dive documentation (CN/EN)
从源码视角深度解析 Claude Code 底层 Agent 架构设计,涵盖核心循环、
工具系统、提示词工程、上下文压缩、技能插件、权限体系、故障恢复,
以及与 LangChain/ReAct 的对比分析。中英双版本,含 4 张配图。
2026-04-05 00:51:16 +08:00
程序员阿江(Relakkes)
1d7cbb845a feat: enlarge hero image and add medium-zoom for image lightbox
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 23:50:13 +08:00
程序员阿江(Relakkes)
dcbb6cb03b feat: add ads.txt for Google AdSense verification
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 23:35:14 +08:00
程序员阿江(Relakkes)
6077de4f47 fix: correct custom domain to claudecode-haha.relakkesyang.org
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:59:36 +08:00
程序员阿江(Relakkes)
fb937704f0 feat: integrate Google AdSense (ca-pub-5210914487984731)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:56:24 +08:00
程序员阿江(Relakkes)
adde39fcbb feat: integrate Google Analytics (G-D42DM82263)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:51:29 +08:00
程序员阿江(Relakkes)
e9b72e0980 fix: set VitePress base to / for custom domain
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:43:08 +08:00
程序员阿江(Relakkes)
7b8a7ead9f fix: set VitePress base to /cc-haha/ for GitHub Pages subpath
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:33:54 +08:00
程序员阿江(Relakkes)
64f2908bce ci: add GitHub Actions workflow for VitePress docs deployment
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:24:06 +08:00
程序员阿江(Relakkes)
007b8abab8 docs: add VitePress documentation site with i18n and GitHub Pages deployment
- Set up VitePress with bilingual support (Chinese root + English /en/)
- Create unified sidebar navigation with all doc sections
- Add custom Anthropic brand theme (#D97757)
- Create Quick Start pages (zh/en) from README content
- Migrate 7 .en.md files to docs/en/ directory structure
- Translate memory/agent/skills docs to English (9 files)
- Generate English-only architecture diagrams (11 images via PicTactic)
- Copy English-ready images for agent/skills sections (21 images)
- Configure custom domain (claudecodehaha.relakkesyang.org)
- Localize Chinese UI labels (sidebar, outline, footer)
- Add documentation site badge to READMEs
- Fix dead links and update cross-references for VitePress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:21:45 +08:00
程序员阿江(Relakkes)
61a857c2de docs: move banner above badges in READMEs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 20:15:54 +08:00
程序员阿江(Relakkes)
c7b6f2083d docs: crop banner to 60% height for slimmer profile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 20:07:23 +08:00
程序员阿江(Relakkes)
b933e43ce2 docs: add project banner with Claude branding to READMEs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 20:03:30 +08:00
程序员阿江(Relakkes)
b81073d87b docs: move nav links above fold and remove runtime screenshot from READMEs
Navigation links now appear immediately after the project description for
quicker access. The runtime screenshot was redundant with the text content
and architecture diagrams below. Image file kept in docs/images/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 19:50:25 +08:00
程序员阿江(Relakkes)
cbe1fde4be docs: add skills system documentation with architecture diagrams
Add comprehensive Skills system documentation covering the extensible
capability plugin architecture, including usage guide and deep-dive
implementation analysis with 9 branded architecture diagrams.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 19:47:28 +08:00