cc-viewer 1.0.11 → 1.0.13

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
@@ -42,6 +42,7 @@ ccv --uninstall
42
42
  - Body Diff JSON tooltip is dismissible; once closed, the preference is persisted server-side and never shown again
43
43
  - Sensitive headers (`x-api-key`, `authorization`) are automatically masked in JSONL log files to prevent credential leakage
44
44
  - Inline token usage stats per request (input/output tokens, cache creation/read, hit rate)
45
+ - Compatible with Claude Code Router (CCR) and other proxy setups — requests are matched by API path pattern as a fallback
45
46
 
46
47
  ### Chat Mode
47
48
 
@@ -60,6 +61,7 @@ Click the "Chat mode" button in the top right to parse Main Agent's full convers
60
61
  - Multi-session segmented display (auto-segmented after `/compact`, `/clear`, etc.)
61
62
  - Each message shows a timestamp accurate to the second, derived from API request timing
62
63
  - Settings panel: toggle default collapse state for tool results and thinking blocks
64
+ - Global settings: toggle filtering of irrelevant requests (count_tokens, heartbeat) from the request list
63
65
 
64
66
  ### Translation
65
67
 
package/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { readFileSync, writeFileSync, unlinkSync, existsSync } from 'node:fs';
3
+ import { readFileSync, writeFileSync, existsSync } from 'node:fs';
4
4
  import { resolve } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { homedir } from 'node:os';
@@ -12,7 +12,7 @@ const INJECT_START = '// >>> Start CC Viewer Web Service >>>';
12
12
  const INJECT_END = '// <<< Start CC Viewer Web Service <<<';
13
13
  const INJECT_IMPORT = "import '../../cc-viewer/interceptor.js';";
14
14
  const INJECT_BLOCK = `${INJECT_START}\n${INJECT_IMPORT}\n${INJECT_END}`;
15
- const SHOW_ALL_FILE = '/tmp/cc-viewer-show-all';
15
+
16
16
 
17
17
  const SHELL_HOOK_START = '# >>> CC-Viewer Auto-Inject >>>';
18
18
  const SHELL_HOOK_END = '# <<< CC-Viewer Auto-Inject <<<';
@@ -121,20 +121,11 @@ if (isUninstall) {
121
121
  console.log(t('cli.uninstall.hookFail', { error: shellResult.error }));
122
122
  }
123
123
 
124
- try { unlinkSync(SHOW_ALL_FILE); } catch {}
125
-
126
124
  console.log(t('cli.uninstall.done'));
127
125
  process.exit(0);
128
126
  }
129
127
 
130
128
  // 正常安装流程
131
- const showAll = process.argv.includes('--all');
132
- if (showAll) {
133
- try { writeFileSync(SHOW_ALL_FILE, '1'); } catch {}
134
- } else {
135
- try { unlinkSync(SHOW_ALL_FILE); } catch {}
136
- }
137
-
138
129
  try {
139
130
  const cliResult = injectCliJs();
140
131
  const shellResult = installShellHook();