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>
semver is required at runtime by the Node.js polyfill in cli-node.js
(globalThis.Bun.semver fallback) and by src/utils/semver.ts fallback.
Moving it to dependencies ensures it is installed during global npm install.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Allow lifecycle scripts to run during npm publish for both actual and dry-run releases.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Replace bun run build:vite with bun run build in the publish workflow.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
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>
Release now uses the exact tag name (e.g., v4.0.23 or 4.0.23) instead of reconstructing it.
Artifact filenames no longer include a v prefix (e.g., csc-4.0.23-linux-x64.tar.gz).
Existing releases will have new artifacts appended instead of recreated.
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>