Commit Graph

1149 Commits

Author SHA1 Message Date
geroge
b49678aaf0
Merge pull request #118 from IronRookieCoder/fix/agents-build-empty-list
Fix/agents build empty list
2026-05-16 10:58:08 +08:00
IronRookieCoder
aaeb662bee fix(agents): reload empty agent definitions in menu
## Bug 详情
生产构建后执行交互式 /agents 时,菜单可能从 AppState 读到空的 agentDefinitions,导致显示 No agents found;同一环境下 bun run dev 可以正常显示 agents。

## 根因
生产 bundle 中底层 agent loader 和内置 agents 均可用,但 /agents 动态菜单只消费启动时注入的 AppState.agentDefinitions。构建产物复现时该状态可能为空,菜单没有现场刷新兜底。

## 修复方案
在 AgentsMenu 打开时检测 allAgents 和 activeAgents 是否同时为空;为空时基于当前 cwd 调用 getAgentDefinitionsWithOverrides 重新加载并写回 AppState,正常已有 agents 的路径直接跳过。

## 变更要点
- 为 AgentsMenu 增加空 agentDefinitions 的 fallback reload
- 使用取消标记避免组件卸载后继续写状态
- 保持现有编辑、删除和正常 dev 路径不变

## 自测
- bun run build
- ./dist/cli-bun.js agents 可列出 27 active agents
- bun run typecheck 仍存在仓库既有类型错误,未新增 AgentsMenu 相关错误
2026-05-16 10:48:31 +08:00
IronRookieCoder
fd55d42048
Merge branch 'y574444354:main' into main 2026-05-16 09:08:18 +08:00
linkai0924
091d3a07d1
Merge pull request #117 from y574444354/fix/hub-command
fix(favorite): ensure /hub enabled skills appear in command list immediately
2026-05-15 22:49:22 +08:00
林凯90331
5bfaeb21bd fix(favorite): ensure /hub enabled skills appear in command list immediately
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>
2026-05-15 22:46:03 +08:00
DoSun
754157fd88
Merge pull request #114 from Askhz/fix/thinking-model-duplicate-response
fix(serve): skip thinking-only message fragments to prevent duplicate response in cs-cloud
2026-05-15 18:12:58 +08:00
Askhz
02899ce69f fix(serve): skip thinking-only message fragments to prevent duplicate response in cs-cloud
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>
2026-05-15 17:58:53 +08:00
github-actions[bot]
7f9d8ba78a chore(release): bump version to 4.1.0 2026-05-15 09:03:10 +00:00
linkai0924
81b8abc9e3
Merge pull request #84 from IronRookieCoder/fix/issue-34-agent-team-idle
fix(agent-team): handle idle teammate coordination failures
2026-05-15 17:01:46 +08:00
linkai0924
0b271a7847
Merge pull request #86 from IronRookieCoder/fix-snip-tool
fix(builtin-tools): handle undefined message_ids in SnipTool.call()
2026-05-15 17:01:26 +08:00
linkai0924
8f1d3cebd9
Merge pull request #113 from y574444354/opt/mcp-detector
opt/mcp detector
2026-05-15 16:56:06 +08:00
林凯90331
c45544c066 fix(mcp): add availability hint for failed servers in list panel
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>
2026-05-15 16:55:02 +08:00
linkai0924
d98b4d0cde
Merge pull request #112 from y574444354/opt/mcp-detector
fix(favorite): sync load/unload state and improve error visibility
2026-05-15 16:45:49 +08:00
林凯90331
b0f10760fe fix(favorite): sync load/unload state and improve error visibility
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>
2026-05-15 16:44:24 +08:00
linkai0924
d1f5ee72a5
Merge pull request #111 from y574444354/feat/upgrade-fix
fix(update): enhance failure diagnostics and prevent claude symlink deletion
2026-05-15 16:23:55 +08:00
林凯90331
c2d5077cf9 fix(update): enhance failure diagnostics and prevent claude symlink deletion
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>
2026-05-15 16:19:13 +08:00
linkai0924
2857e77065
Merge pull request #110 from y574444354/fix/rawdump-0515
fix(raw-dump): reverse commit order to prevent duplicate uploads
2026-05-15 15:39:54 +08:00
林凯90331
47aa3271be fix(raw-dump): reverse commit order to prevent duplicate uploads
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>
2026-05-15 15:38:08 +08:00
DoSun
4dc157e493
Merge pull request #108 from y574444354/fix/linux-cloud-hang
Fix/linux cloud hang
2026-05-15 14:56:48 +08:00
DoSun
0dc1f67a04 refactor: remove special handling for upgrade command, simplify logic
统一对所有 cloud 子命令先 ensureCsCloud 再执行,移除对 upgrade
的特殊判断,逻辑更清晰简洁。

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-15 14:53:01 +08:00
DoSun
bf62a5e118 fix: use process.argv to get raw args for cs-cloud to fix Linux hang issue
参考 opencode 实现,从 process.argv 重新获取原始参数,避免 commander 的
参数解析影响 cs-cloud 的正常运行。修复 Linux 上通过 csc cloud start
调用会卡住的问题。

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-15 14:49:49 +08:00
linkai0924
10ef26b1d4
Merge pull request #107 from y574444354/fix/raw-dump-ua
fix(raw-dump): add user-agent header to worker requests
2026-05-15 14:47:27 +08:00
IronRookieCoder
39106e4f9d
Merge branch 'main' into fix-snip-tool 2026-05-15 14:40:34 +08:00
geroge
37fe62a5de
Merge pull request #91 from IronRookieCoder/fix/issue-49-show-memory-pid
feat(config): add showMemoryPid setting to toggle footer memory/PID display
2026-05-15 14:34:04 +08:00
林凯90331
3be987891b fix(raw-dump): add user-agent header to worker requests
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>
2026-05-15 14:33:33 +08:00
geroge
ba9c2e1538
Merge pull request #89 from IronRookieCoder/fix/issue-46-47
fix(windows): prevent terminal startup failures
2026-05-15 14:33:28 +08:00
geroge
8e52334f0a
Merge pull request #83 from IronRookieCoder/fix/issue-37-bash-autobg
fix(bash): wake foreground task after auto-backgrounding
2026-05-15 14:32:20 +08:00
geroge
0007879cf4
Merge pull request #82 from IronRookieCoder/fix/issue-41
fix(cursor): handle ANSI wrapped line offset recovery
2026-05-15 14:31:48 +08:00
DoSun
ecb0df50d3 fix: add type guards and null checks for UUID handling in snip functionality
- 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>
2026-05-15 14:26:33 +08:00
github-actions[bot]
de83394e8a chore(release): bump version to 4.0.26 2026-05-15 03:47:01 +00:00
linkai0924
7d38f3af4b
Merge pull request #106 from y574444354/fix/semver
fix(deps): move semver from devDependencies to dependencies
2026-05-15 11:44:22 +08:00
林凯90331
c0ff0fb716 fix(deps): move semver from devDependencies to dependencies
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>
2026-05-15 11:39:45 +08:00
github-actions[bot]
90f27f36d6 chore(release): bump version to 4.0.25 2026-05-15 03:18:45 +00:00
linkai0924
117a857b25
Merge pull request #105 from y574444354/fix/publish
ci(publish-npm): fix publish workflow
2026-05-15 11:18:01 +08:00
林凯90331
0641c2857f ci(publish-npm): remove --ignore-scripts from publish command
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>
2026-05-15 11:17:07 +08:00
linkai0924
b90c8fc828
Merge pull request #104 from y574444354/fix/centos-input
fix(ink): treat newline as return and suppress favorite fetch error in TUI
2026-05-15 11:16:39 +08:00
林凯90331
675ebea846 ci(publish-npm): switch from vite build to default build
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>
2026-05-15 11:14:12 +08:00
林凯90331
6b5b801dae fix(ink): treat newline as return and suppress favorite fetch error in TUI
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>
2026-05-15 11:06:18 +08:00
github-actions[bot]
f2585ae08b chore(release): bump version to 4.0.24 2026-05-15 02:40:29 +00:00
DoSun
22c5c7a1bb
Merge pull request #103 from y574444354/fix/serve
Fix/serve
2026-05-15 10:38:57 +08:00
linkai0924
5eea9bac64
Merge pull request #102 from y574444354/feat/binary-archive
fix(workflow): use raw tag name for release and drop v prefix from ar…
2026-05-15 10:36:15 +08:00
林凯90331
5758b7dcef fix(workflow): use raw tag name for release and drop v prefix from artifact
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>
2026-05-15 10:34:19 +08:00
DoSun
9f5502b4b6 fix: prevent SSE event cross-workspace leakage
- 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>
2026-05-15 10:34:06 +08:00
DoSun
196ff5ba21 feat: add task notification mode and skip review builtin option
- 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>
2026-05-15 10:34:05 +08:00
DoSun
e93a60264c fix: resolve session status and cross-workspace leakage issues
- 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>
2026-05-15 10:34:05 +08:00
DoSun
ad7bc194b2
Merge pull request #101 from y574444354/fix/some-task
fix: resolve serve command hanging in Node.js runtime
2026-05-15 10:33:36 +08:00
DoSun
f21aa406db fix: resolve serve command hanging in Node.js runtime
- 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)
2026-05-15 10:31:59 +08:00
linkai0924
96913f7ead
Merge pull request #100 from y574444354/feat/binary-archive
fix(workflow): correct download-artifact action SHA
2026-05-15 10:29:17 +08:00
林凯90331
a7bc970ece fix(workflow): correct download-artifact action SHA
Use the proper commit SHA for actions/download-artifact@v4.

The previous SHA belonged to actions/upload-artifact, causing resolution failure.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-15 10:25:04 +08:00
linkai0924
f328d69963
Merge pull request #99 from y574444354/feat/binary-archive
ci: add publish binary workflow
2026-05-15 10:20:32 +08:00