mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-27 15:13:37 +08:00
Pulls 21 upstream commits (147 files, +17234 / -317) since merge-base
4bea9ee6. Major upstream additions:
- feat(trace): session trace monitoring + LangSmith-style two-pane UI
(large new subtree under src/server/services/traceCaptureService.ts,
src/server/api/traces.ts, desktop/src/components/trace/, lib/trace/)
- feat(adapters): WhatsApp linked-device adapter (new sub-tree)
- feat(adapter): Telegram command menu
- feat(desktop): plugin list bulk toggles
- feat(desktop): output style desktop config
- fix(agent): defer permission/runtime restarts during active turns
- fix(agent): avoid concurrent worktree config writes
- fix(desktop): native preview screenshots, memory file preview-first
Conflict resolution (8 files, all handled by hand):
- desktop/package.json: kept fork version 0.5.8 (vs upstream 0.4.1)
and the fork's homepage URL.
- src/server/router.ts: kept BOTH /api/projects (fork) and
/api/traces (upstream) handlers + imports.
- desktop/src/components/chat/chatBlocks.test.tsx: kept fork's
"expanded by default" thinking-block tests; upstream had the old
"collapsed by default" assertions which contradict the live
ThinkingBlock.tsx default (`useState(true)`).
- desktop/src/pages/Settings.tsx: merged imports — added
`type TranslationKey` (upstream, used by trace tab) plus kept
fork's providerCompat store imports.
- desktop/src/components/plugins/PluginList.tsx: integrated
upstream's bulk-toggle (selectedPluginIds, ConfirmDialog,
bulkEnable/Disable) on top of fork's catalog/marketplace/inline
actions. Row layout now has checkbox + details button + inline
toggle/uninstall + chevron all coexisting. Both ConfirmDialog
instances (uninstall + bulk-batch) kept.
- src/server/api/sessions.ts: kept BOTH session-summary (handoff,
fork) and trace-call (upstream) handler functions and imports.
Routing dispatch was auto-merged correctly.
- src/server/services/conversationService.ts: unified
SessionStartOptions to carry fork's coordinatorMode +
handoffSystemPrompt AND upstream's resumeInterruptedTurn.
- src/server/ws/handler.ts: unified RuntimeOverride type to keep
fork's `thinkingEnabled` field (used 30+ times elsewhere) AND
upstream's new ActiveUserTurnState plus the deferred-restart Maps
(activeUserTurns, deferredRuntimeRestarts, deferredPermissionModes).
cleanupSessionRuntimeState now drains both fork's session sets
(coordinatorModeSessions, handoffSummarySessions) and upstream's
new Maps.
Verification:
- bun run lint (desktop): clean.
- bun test src/server/__tests__/mcp.test.ts -t marketplace: 2/2 pass.
- bun test src/server/__tests__/sessions.test.ts: 76/77 pass. The
single failure (slash-commands legacy custom commands) reproduces
on un-merged origin/main and is pre-existing — not introduced by
this merge.
Not-tested:
- Full bun run verify gate. Recommended before push/PR.
- Live trace UI smoke (no provider creds in this environment).
- Plugin list bulk-toggle smoke (no headed Electron available).
- WhatsApp adapter (separate sub-tree, not exercised by typecheck).
Confidence: medium-high (typecheck clean, no markers, conflicts all
semantically reasonable). Recommend a maintainer eye on
ws/handler.ts and conversationService.ts before merging upward,
since the deferred-restart vs handoff-injection paths touch the
same Map-of-pending-state surface.
Scope-risk: broad (147 files brought in via merge). Risk surface is
contained because trace + WhatsApp are independent subtrees and the
hand-resolved conflicts kept both sides additive rather than
rewriting either's logic.