Replace incomplete clearSkillCaches() with clearCommandsCache() so the
loadAllCommands memoize layer is also busted when a cloud favorite skill is
enabled or disabled via /hub.
Add skillChangeDetector.notify() to trigger an immediate REPL command list
refresh instead of waiting for the file watcher to detect the change.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
normalizeMessages() splits a multi-block AssistantMessage (e.g. [thinking,
text]) into one message per content block. When serve mode emits both the
thinking-only fragment and the text message as separate session.message events,
cs-cloud's adaptMessageEvent creates two assistant messages (one via the
streaming path, one via the non-streaming path), causing the response to appear
twice in the UI.
Fix: skip thinking-only normalized messages in normalizeMessage(), since the
thinking content is already rendered via the stream_event path.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
Show 'failed (may be unavailable)' next to disconnected servers instead of plain 'failed'
Add footer note explaining unavailable servers cannot be used until reconnected
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Clear listFavoriteItems cache after load/unload to ensure UI reflects latest state on next open
Filter defaultValue by Active status in cloud-enabled menu so unloaded items are not pre-selected
Surface specific error reasons instead of generic failure count in cloud-enabled menu
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add analyzeNpmError() to classify npm install failures (permission, network, missing package, locked file, etc.) and return InstallResult with errorCategory, suggestion, and raw npmStderr.
Display targeted troubleshooting steps with colored cause and fix suggestions when csc update fails.
Fix removeInstalledSymlink() to only delete symlinks pointing into our managed ~/.local/share/claude/versions/ directory, preventing accidental removal of user-installed claude binaries from other sources.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add --reverse to git log in getCommitLog so commits are returned
oldest-first. Previously, git log defaulted to newest-first, causing
the loop in uploadCommits to overwrite state with the oldest commit.
The next run then queried git log <oldest>..HEAD, re-fetching all
already-uploaded commits and triggering infinite duplicate uploads.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Set User-Agent to csc/${version} in both auth() and authWithFallback()
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
- Add UUID type import and type guard in force-snip command
- Add null/undefined checks in snipCompact, snipProjection, and sessionStorage
- Improve optional chaining in SnipTool for safer property access
- Prevent potential runtime errors from invalid UUID values
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
Some terminals on CentOS emit \n or \r\n instead of \r for the Enter key.
Map both sequences to 'return' in parseKeypress so key.return is set correctly.
Replace console.warn with logForDebugging in favorite.ts to prevent
network errors from polluting the TUI output.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
- Register session cwd before publishing created event (was async void,
causing cwd to be undefined during event dispatch)
- Fix EventBus cwd filter: skip events when sessionCwd is undefined
instead of allowing them through unfiltered
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
- Add TASK_NOTIFICATION_TAG to distinguish task notifications from regular prompts
- Add SKIP_REVIEW_BUILTIN=1 env var to skip review builtin generation
during dev/build for faster startup
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
- Fix GET /session/status returning empty object due to missing await
(c.json() was serializing Promise instead of resolved value)
- Add getEffectiveBusyStatus() to prioritize actual prompting state
- Supplement status responses with persisted sessions from loadedIndex
- Add strict cwd filtering to GET /session list to prevent
sessions from appearing across multiple workspaces
- Add busy_status field to GET /session/:id response
This closes the issue where /conversations/status returns {} even
though /conversations shows running sessions, and prevents the same
session from appearing in multiple workspace requests.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
- Add Bun.serve polyfill using Node.js http.createServer to bridge Hono fetch handler
- Add Bun.semver polyfill delegating to npm semver package
- Add Bun.version and Bun.env stubs
- Fix childSpawn.ts to only pass -d/--feature flags for .ts/.tsx source files
- Make serve() async to correctly resolve port when --port 0 (random allocation)
Node.js v20 does not support the syntax. Replace all patterns with a new helper that wraps the operation in try/finally and explicitly calls Symbol.dispose.
Also rename listBuiltinSkillNames to listBuiltinSkills in generate-review-builtin.ts.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add 30s in-memory cache for favorite item list to reduce API calls
Expand supported MCP server types beyond local/remote to stdio/sse/ws/sdk and more
Change single MCP server conversion to use stdio type with separate command/args/env fields
Reduce page size from 100 to 20 for faster initial load
Switch parallel remote fetching to sequential to avoid rate limiting
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>