cc-viewer 1.0.3 → 1.0.5

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 CHANGED
@@ -1,83 +1,81 @@
1
1
  # CC-Viewer
2
2
 
3
- Claude Code 请求监控系统,实时捕获并可视化展示 Claude Code 的所有 API 请求与响应。方便开发者监控自己的 Context,以便于 Vibe Coding 过程中回顾和排查问题。
3
+ A request monitoring system for Claude Code that captures and visualizes all API requests and responses in real time. Helps developers monitor their Context for reviewing and debugging during Vibe Coding.
4
4
 
5
- [English](./docs/README.en.md) | [繁體中文](./docs/README.zh-TW.md) | [한국어](./docs/README.ko.md) | [日本語](./docs/README.ja.md) | [Deutsch](./docs/README.de.md) | [Español](./docs/README.es.md) | [Français](./docs/README.fr.md) | [Italiano](./docs/README.it.md) | [Dansk](./docs/README.da.md) | [Polski](./docs/README.pl.md) | [Русский](./docs/README.ru.md) | [العربية](./docs/README.ar.md) | [Norsk](./docs/README.no.md) | [Português (Brasil)](./docs/README.pt-BR.md) | [ไทย](./docs/README.th.md) | [Türkçe](./docs/README.tr.md) | [Українська](./docs/README.uk.md)
5
+ [简体中文](./docs/README.zh.md) | [繁體中文](./docs/README.zh-TW.md) | [한국어](./docs/README.ko.md) | [日本語](./docs/README.ja.md) | [Deutsch](./docs/README.de.md) | [Español](./docs/README.es.md) | [Français](./docs/README.fr.md) | [Italiano](./docs/README.it.md) | [Dansk](./docs/README.da.md) | [Polski](./docs/README.pl.md) | [Русский](./docs/README.ru.md) | [العربية](./docs/README.ar.md) | [Norsk](./docs/README.no.md) | [Português (Brasil)](./docs/README.pt-BR.md) | [ไทย](./docs/README.th.md) | [Türkçe](./docs/README.tr.md) | [Українська](./docs/README.uk.md)
6
6
 
7
- ## 使用方法
7
+ ## Usage
8
8
 
9
9
  ```bash
10
10
  npm install -g cc-viewer
11
11
  ```
12
12
 
13
- 安装完成后运行:
13
+ After installation, run:
14
14
 
15
15
  ```bash
16
16
  ccv
17
17
  ```
18
18
 
19
- 该命令会自动配置本地安装的 Claude Code 以启用监控,并在 shell 配置文件(`~/.zshrc` `~/.bashrc`)中添加自动修复 hook。之后正常使用 Claude Code,打开浏览器访问 `http://localhost:7008` 即可查看监控界面。
19
+ Then use Claude Code as usual and open `http://localhost:7008` in your browser to view the monitoring interface.
20
20
 
21
- Claude Code 更新后无需手动操作,下次运行 `claude` 时会自动检测并重新配置。
21
+ After Claude Code updates, no manual action is needed — the next time you run `claude`, it will automatically detect and reconfigure.
22
22
 
23
- ### 卸载
23
+ ### Uninstall
24
24
 
25
25
  ```bash
26
26
  ccv --uninstall
27
27
  ```
28
28
 
29
- 一键清理 cli.js 中的配置和 shell 配置文件中的 hook。
29
+ ## Features
30
30
 
31
- ## 功能
31
+ ### Request Monitoring (Raw Mode)
32
32
 
33
- ### 请求监控(原文模式)
33
+ - Real-time capture of all API requests from Claude Code, including streaming responses
34
+ - Left panel shows request method, URL, duration, and status code
35
+ - Automatically identifies and labels Main Agent and Sub Agent requests
36
+ - Right panel supports Request / Response tab switching
37
+ - Request Body expands `messages`, `system`, `tools` one level by default
38
+ - Response Body fully expanded by default
39
+ - Toggle between JSON view and plain text view
40
+ - One-click JSON content copy
41
+ - MainAgent requests support Body Diff JSON, showing a collapsible diff with the previous MainAgent request (only changed/added fields)
34
42
 
35
- - 实时捕获 Claude Code 发出的所有 API 请求,包括流式响应
36
- - 左侧请求列表展示请求方法、URL、耗时、状态码
37
- - 自动识别并标记 Main Agent 和 Sub Agent 请求
38
- - 右侧详情面板支持 Request / Response 两个 Tab 切换查看
39
- - Request Body 中 `messages`、`system`、`tools` 默认展开一层子属性
40
- - Response Body 默认全部展开
41
- - 支持 JSON 视图与纯文本视图切换
42
- - 支持一键复制 JSON 内容
43
- - MainAgent 请求支持 Body Diff JSON,折叠展示与上一次 MainAgent 请求的差异(仅显示变更/新增字段)
43
+ ### Chat Mode
44
44
 
45
- ### 对话模式
45
+ Click the "Chat mode" button in the top right to parse Main Agent's full conversation history into a chat interface:
46
46
 
47
- 点击右上角「对话模式」按钮,将 Main Agent 的完整对话历史解析为聊天界面:
47
+ - User messages right-aligned (blue bubbles), Main Agent replies left-aligned (dark bubbles) with Markdown rendering
48
+ - `/compact` messages auto-detected and displayed collapsed, click to expand full summary
49
+ - Tool call results displayed inline within the corresponding Assistant message
50
+ - `thinking` blocks collapsed by default, click to expand
51
+ - `tool_use` shown as compact tool call cards (Bash, Read, Edit, Write, Glob, Grep, Task each have dedicated displays)
52
+ - User selection messages (AskUserQuestion) shown in Q&A format
53
+ - System tags (`<system-reminder>`, `<project-reminder>`, etc.) auto-collapsed
54
+ - System text auto-filtered, showing only real user input
55
+ - Multi-session segmented display (auto-segmented after `/compact`, `/clear`, etc.)
56
+ - Each message shows a timestamp accurate to the second
48
57
 
49
- - 用户消息右对齐(蓝色气泡),Main Agent 回复左对齐(深色气泡),支持 Markdown 渲染
50
- - `/compact` 消息自动识别并折叠展示,点击展开查看完整摘要
51
- - 工具调用结果内联显示在对应的 Assistant 消息内部
52
- - `thinking` 块默认折叠,点击展开查看思考过程
53
- - `tool_use` 显示为紧凑的工具调用卡片(Bash、Read、Edit、Write、Glob、Grep、Task 等均有专属展示)
54
- - 用户选择型消息(AskUserQuestion)以问答形式展示
55
- - 系统标签(`<system-reminder>`、`<project-reminder>` 等)自动折叠
56
- - 自动过滤系统文本,只展示用户的真实输入
57
- - 支持多 session 分段展示(`/compact`、`/clear` 等操作后自动分段)
58
- - 每条消息显示精确到秒的时间戳
58
+ ### Token Stats
59
59
 
60
- ### Token 消耗统计
60
+ Hover panel in the header area:
61
61
 
62
- Header 区域的「Token 消耗统计」悬浮面板:
62
+ - Token counts grouped by model (input/output)
63
+ - Cache creation/read counts and cache hit rate
64
+ - Main Agent cache expiration countdown
63
65
 
64
- - 按模型分组统计 input/output token 数量
65
- - 显示 cache creation/read 数量及缓存命中率
66
- - Main Agent 缓存失效倒计时
66
+ ### Log Management
67
67
 
68
- ### 日志管理
68
+ Via the CC-Viewer dropdown menu in the top left:
69
69
 
70
- 通过左上角 CC-Viewer 下拉菜单:
70
+ - Import local logs: browse historical log files, grouped by project, opens in new window
71
+ - Load local JSONL file: directly select and load a local `.jsonl` file (up to 200MB)
72
+ - Download current log: download the current monitoring JSONL log file
73
+ - Export user prompts: extract and display all user inputs, with system-reminder collapsible view
74
+ - Export prompts to TXT: export user prompts to a local `.txt` file
71
75
 
72
- - 导入本地日志:浏览历史日志文件,按项目分组,在新窗口打开
73
- - 加载本地 JSONL 文件:直接选择本地 `.jsonl` 文件加载查看(支持最大 200MB)
74
- - 当前日志另存为:下载当前监控的 JSONL 日志文件
75
- - 导出用户 Prompt:提取并展示所有用户输入,支持 system-reminder 折叠查看
76
- - 导出 Prompt 为 TXT:将用户 Prompt 导出为本地 `.txt` 文件
76
+ ### Multi-language Support
77
77
 
78
- ### 多语言支持
79
-
80
- CC-Viewer 支持 18 种语言,根据系统语言环境自动切换:
78
+ CC-Viewer supports 18 languages, automatically switching based on system locale:
81
79
 
82
80
  简体中文 | English | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | 日本語 | Polski | Русский | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | Українська
83
81
 
package/cli.js CHANGED
@@ -149,7 +149,7 @@ try {
149
149
  }
150
150
 
151
151
  if (shellResult.status === 'installed') {
152
- console.log(t('cli.hook.installed', { path: shellResult.path }));
152
+ console.log('All READY!');
153
153
  } else if (shellResult.status !== 'exists') {
154
154
  console.log(t('cli.hook.fail', { error: shellResult.error }));
155
155
  }