cc-viewer 1.4.5 → 1.4.7
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 +1 -0
- package/cli.js +39 -5
- package/dist/assets/index-BtBbkSY4.js +617 -0
- package/dist/assets/index-tbq5NdU4.css +32 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/proxy.js +22 -5
- package/pty-manager.js +2 -2
- package/dist/assets/index-BDl542y5.css +0 -32
- package/dist/assets/index-Usb6v9iJ.js +0 -617
package/README.md
CHANGED
|
@@ -81,6 +81,7 @@ Click the "Conversation Mode" button in the top-right corner to parse the Main A
|
|
|
81
81
|
- User selection messages (AskUserQuestion) are displayed in a Q&A format
|
|
82
82
|
- Bidirectional mode sync: switching to Conversation Mode automatically navigates to the conversation corresponding to the selected request; switching back to Raw Mode automatically navigates to the selected request
|
|
83
83
|
- Settings panel: toggle the default collapsed state of tool results and thinking blocks
|
|
84
|
+
- Mobile chat browse: in mobile CLI mode, tap the "Chat Browse" button in the top bar to slide in a read-only chat view overlay, allowing you to browse the full conversation history on your phone
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
### Statistics Tool
|
package/cli.js
CHANGED
|
@@ -32,6 +32,27 @@ function getShellConfigPath() {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
function buildShellHook(isNative) {
|
|
35
|
+
// Commands/flags that should pass through directly without ccv interception
|
|
36
|
+
// These are non-interactive commands that don't involve API calls
|
|
37
|
+
const passthroughCommands = [
|
|
38
|
+
// Subcommands (no API calls)
|
|
39
|
+
'doctor', // health check for auto-updater
|
|
40
|
+
'install', // install native build
|
|
41
|
+
'update', // self-update
|
|
42
|
+
'upgrade', // alias for update
|
|
43
|
+
'auth', // authentication management
|
|
44
|
+
'setup-token', // token setup
|
|
45
|
+
'agents', // list configured agents
|
|
46
|
+
'plugin', // plugin management
|
|
47
|
+
'mcp', // MCP server configuration
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const passthroughFlags = [
|
|
51
|
+
// Version/help info
|
|
52
|
+
'--version', '-v', '--v',
|
|
53
|
+
'--help', '-h',
|
|
54
|
+
];
|
|
55
|
+
|
|
35
56
|
if (isNative) {
|
|
36
57
|
return `${SHELL_HOOK_START}
|
|
37
58
|
claude() {
|
|
@@ -41,6 +62,17 @@ claude() {
|
|
|
41
62
|
command claude "$@"
|
|
42
63
|
return
|
|
43
64
|
fi
|
|
65
|
+
# Pass through certain commands directly without ccv interception
|
|
66
|
+
case "$1" in
|
|
67
|
+
${passthroughCommands.join('|')})
|
|
68
|
+
command claude "$@"
|
|
69
|
+
return
|
|
70
|
+
;;
|
|
71
|
+
${passthroughFlags.join('|')})
|
|
72
|
+
command claude "$@"
|
|
73
|
+
return
|
|
74
|
+
;;
|
|
75
|
+
esac
|
|
44
76
|
ccv run -- claude --ccv-internal "$@"
|
|
45
77
|
}
|
|
46
78
|
${SHELL_HOOK_END}`;
|
|
@@ -200,7 +232,7 @@ async function runProxyCommand(args) {
|
|
|
200
232
|
}
|
|
201
233
|
}
|
|
202
234
|
|
|
203
|
-
async function runCliMode() {
|
|
235
|
+
async function runCliMode(extraClaudeArgs = []) {
|
|
204
236
|
const nativePath = resolveNativePath();
|
|
205
237
|
if (!nativePath) {
|
|
206
238
|
console.error(t('cli.cMode.notFound'));
|
|
@@ -231,7 +263,7 @@ async function runCliMode() {
|
|
|
231
263
|
|
|
232
264
|
// 3. 启动 PTY 中的 claude
|
|
233
265
|
const { spawnClaude, killPty } = await import('./pty-manager.js');
|
|
234
|
-
await spawnClaude(proxyPort, process.cwd());
|
|
266
|
+
await spawnClaude(proxyPort, process.cwd(), extraClaudeArgs);
|
|
235
267
|
|
|
236
268
|
// 4. 自动打开浏览器
|
|
237
269
|
const url = `http://127.0.0.1:${port}`;
|
|
@@ -259,7 +291,8 @@ const args = process.argv.slice(2);
|
|
|
259
291
|
const isUninstall = args.includes('--uninstall');
|
|
260
292
|
const isHelp = args.includes('--help') || args.includes('-h') || args[0] === 'help';
|
|
261
293
|
const isVersion = args.includes('--v') || args.includes('--version') || args.includes('-v');
|
|
262
|
-
const isCliMode = args.includes('--c');
|
|
294
|
+
const isCliMode = args.includes('--c') || args.includes('-c');
|
|
295
|
+
const isDangerousMode = args.includes('-d') || args.includes('--d');
|
|
263
296
|
|
|
264
297
|
if (isHelp) {
|
|
265
298
|
console.log(t('cli.help'));
|
|
@@ -276,8 +309,9 @@ if (isVersion) {
|
|
|
276
309
|
process.exit(0);
|
|
277
310
|
}
|
|
278
311
|
|
|
279
|
-
if (isCliMode) {
|
|
280
|
-
|
|
312
|
+
if (isCliMode || isDangerousMode) {
|
|
313
|
+
const extraArgs = isDangerousMode ? ['--dangerously-skip-permissions'] : [];
|
|
314
|
+
runCliMode(extraArgs).catch(err => {
|
|
281
315
|
console.error('CLI mode error:', err);
|
|
282
316
|
process.exit(1);
|
|
283
317
|
});
|