Optimized the spawn call to match direct cs-cloud execution performance:
- Use process.env directly instead of spreading (avoids unnecessary copy)
- Explicitly disable shell to avoid overhead
- Removed debug timestamp logging for cleaner output
The spawn performance now matches direct cs-cloud binary execution.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
Changed the command execution logging from stderr debug message to stdout info message for better user experience.
- console.error -> console.log
- Removed [DEBUG] prefix
- Cleaner "Executing:" format
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
Added debug logging to print the exact cs-cloud command being executed.
This helps verify that arguments are passed correctly when debugging cloud hang issues.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
Fixed the root cause of Linux csc cloud commands hanging by addressing spawn() call issues, not network/permission problems:
- Changed stdio from "inherit" to ["ignore", "inherit", "inherit"] to close stdin and prevent blocking
- Removed duplicate ensureCsCloud() call that was unnecessary since runCsCloud already calls it
- Added disconnect event handler for better error handling
- Added explicit detached: false option
The real issue was that stdin inheritance caused the spawn call to block on Linux, even when the cs-cloud binary already existed and worked fine when called directly.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
Remove mainPartID/mainMessageID from SubagentToolState. Emit
message.part.updated with random id and callID for task progress,
so consumer can match by callID when part IDs differ after tab switch.
All auxiliary requests (session memory, extract memories, side queries,
forked agents) now resolve to the model with the lowest creditConsumption
from the /v1/models list when using the CoStrict provider, instead of
falling back to the main conversation model.
- Add getCheapestCoStrictModel() to select cheapest model from cached list
- Resolve haiku-family models to cheapest model in resolveCoStrictModel
- Change getSmallFastModel() for CoStrict to return haiku alias
- Fix sideQuery() to respect opts.model with known-model validation
- Override mainLoopModel in SessionMemory and extractMemories forked agents
- Use getSmallFastModel() for findRelevantMemories under CoStrict
Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
The /global/favorite/skills GET route was hardcoded to list only
skill-type favorites, causing cloud hub to show Cloud status for
non-skill favorites (agent, command, mcp) even after they were
loaded locally.
Now it reads the optional type query parameter and passes it to
listFavoriteItems, matching the opencode server behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Include parent commit hashes in raw dump commit reporting.
- git log format now includes %P (parent hashes)
- parseCommitLog extracts parent_ids as string array
- CommitPayload type extended with parent_ids field
- merge commits may have multiple parents
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>