cc-viewer 0.2.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/cli.js +14 -12
- package/lib/assets/{index-DfxlBPQC.js → index-Cc1O-iKV.js} +149 -149
- package/lib/index.html +1 -1
- package/lib/server.js +58 -4
- package/locales/ar.json +13 -15
- package/locales/da.json +13 -15
- package/locales/de.json +13 -15
- package/locales/en.json +13 -15
- package/locales/es.json +13 -15
- package/locales/fr.json +13 -15
- package/locales/it.json +13 -15
- package/locales/ja.json +13 -15
- package/locales/ko.json +13 -15
- package/locales/no.json +13 -15
- package/locales/pl.json +13 -15
- package/locales/pt-BR.json +13 -15
- package/locales/ru.json +13 -15
- package/locales/th.json +13 -15
- package/locales/tr.json +13 -15
- package/locales/uk.json +13 -15
- package/locales/zh-TW.json +12 -14
- package/locales/zh.json +12 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,9 +16,9 @@ npm install -g cc-viewer
|
|
|
16
16
|
ccv
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
该命令会自动配置本地安装的 Claude Code 以启用监控,并在 shell 配置文件(`~/.zshrc` 或 `~/.bashrc`)中添加自动修复 hook。之后正常使用 Claude Code,打开浏览器访问 `http://localhost:7008` 即可查看监控界面。
|
|
20
20
|
|
|
21
|
-
Claude Code 更新后无需手动操作,下次运行 `claude`
|
|
21
|
+
Claude Code 更新后无需手动操作,下次运行 `claude` 时会自动检测并重新配置。
|
|
22
22
|
|
|
23
23
|
### 卸载
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ Claude Code 更新后无需手动操作,下次运行 `claude` 时会自动检
|
|
|
26
26
|
ccv --uninstall
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
一键清理 cli.js
|
|
29
|
+
一键清理 cli.js 中的配置和 shell 配置文件中的 hook。
|
|
30
30
|
|
|
31
31
|
## 功能
|
|
32
32
|
|
|
@@ -40,6 +40,7 @@ ccv --uninstall
|
|
|
40
40
|
- Response Body 默认全部展开
|
|
41
41
|
- 支持 JSON 视图与纯文本视图切换
|
|
42
42
|
- 支持一键复制 JSON 内容
|
|
43
|
+
- MainAgent 请求支持 Body Diff JSON,折叠展示与上一次 MainAgent 请求的差异(仅显示变更/新增字段)
|
|
43
44
|
|
|
44
45
|
### 对话模式
|
|
45
46
|
|
|
@@ -51,8 +52,8 @@ ccv --uninstall
|
|
|
51
52
|
- `thinking` 块默认折叠,点击展开查看思考过程
|
|
52
53
|
- `tool_use` 显示为紧凑的工具调用卡片(Bash、Read、Edit、Write、Glob、Grep、Task 等均有专属展示)
|
|
53
54
|
- 用户选择型消息(AskUserQuestion)以问答形式展示
|
|
54
|
-
-
|
|
55
|
-
-
|
|
55
|
+
- 系统标签(`<system-reminder>`、`<project-reminder>` 等)自动折叠
|
|
56
|
+
- 自动过滤系统文本,只展示用户的真实输入
|
|
56
57
|
- 支持多 session 分段展示(`/compact`、`/clear` 等操作后自动分段)
|
|
57
58
|
- 每条消息显示精确到秒的时间戳
|
|
58
59
|
|
package/cli.js
CHANGED
|
@@ -137,23 +137,25 @@ if (showAll) {
|
|
|
137
137
|
|
|
138
138
|
try {
|
|
139
139
|
const cliResult = injectCliJs();
|
|
140
|
-
if (cliResult === 'exists') {
|
|
141
|
-
console.log(t('cli.inject.exists'));
|
|
142
|
-
} else {
|
|
143
|
-
console.log(t('cli.inject.success'));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
140
|
const shellResult = installShellHook();
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
console.log(t('cli.hook.exists', { path: shellResult.path }));
|
|
141
|
+
|
|
142
|
+
if (cliResult === 'exists' && shellResult.status === 'exists') {
|
|
143
|
+
console.log(t('cli.alreadyWorking'));
|
|
151
144
|
} else {
|
|
152
|
-
|
|
145
|
+
if (cliResult === 'exists') {
|
|
146
|
+
console.log(t('cli.inject.exists'));
|
|
147
|
+
} else {
|
|
148
|
+
console.log(t('cli.inject.success'));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (shellResult.status === 'installed') {
|
|
152
|
+
console.log(t('cli.hook.installed', { path: shellResult.path }));
|
|
153
|
+
} else if (shellResult.status !== 'exists') {
|
|
154
|
+
console.log(t('cli.hook.fail', { error: shellResult.error }));
|
|
155
|
+
}
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
console.log(t('cli.usage.hint'));
|
|
156
|
-
console.log(t('cli.usage.uninstallHint'));
|
|
157
159
|
} catch (err) {
|
|
158
160
|
if (err.code === 'ENOENT') {
|
|
159
161
|
console.error(t('cli.inject.notFound', { path: cliPath }));
|