cc-viewer 1.6.13 → 1.6.15

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/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>Claude Code Viewer</title>
7
7
  <link rel="icon" href="/favicon.ico?v=1">
8
8
  <link rel="shortcut icon" href="/favicon.ico?v=1">
9
- <script type="module" crossorigin src="/assets/index-DweLszVc.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-DrOfiUVQ.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-CVCiS6Zl.css">
11
11
  </head>
12
12
  <body>
@@ -32,7 +32,8 @@ export function isMainAgentRequest(body) {
32
32
  }
33
33
  }
34
34
 
35
- if (body.tools.length > 10) {
35
+ // v2.1.81+: 轻量 MainAgent 初始请求工具数可能 < 10,降低阈值兼容
36
+ if (body.tools.length > 5) {
36
37
  const hasEdit = body.tools.some(t => t.name === 'Edit');
37
38
  const hasBash = body.tools.some(t => t.name === 'Bash');
38
39
  const hasTaskOrAgent = body.tools.some(t => t.name === 'Task' || t.name === 'Agent');
@@ -50,8 +50,8 @@ export function isMainAgentEntry(entry) {
50
50
  if (firstMsgContent.includes('<available-deferred-tools>')) return true;
51
51
  }
52
52
 
53
- // Old architecture: >10 tools with core tool set
54
- if (body.tools.length > 10) {
53
+ // v2.1.81+: lightweight MainAgent may have < 10 tools, lowered threshold
54
+ if (body.tools.length > 5) {
55
55
  const hasEdit = body.tools.some(t => t.name === 'Edit');
56
56
  const hasBash = body.tools.some(t => t.name === 'Bash');
57
57
  const hasTaskOrAgent = body.tools.some(t => t.name === 'Task' || t.name === 'Agent');
@@ -104,7 +104,7 @@ export function extractCachedContent(entry) {
104
104
  if (lastCacheIndex >= 0) {
105
105
  for (let i = 0; i <= lastCacheIndex; i++) {
106
106
  const block = body.system[i];
107
- if (block.type === 'text' && block.text) result.system.push(block.text);
107
+ if (block.type === 'text' && block.text && block.cache_control) result.system.push(block.text);
108
108
  }
109
109
  }
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-viewer",
3
- "version": "1.6.13",
3
+ "version": "1.6.15",
4
4
  "description": "Claude Code Logger visualization management tool",
5
5
  "license": "MIT",
6
6
  "main": "server.js",