cc-viewer 1.6.295 → 1.6.297
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/cli.js +9 -6
- package/concepts/en/GlobalSettings.md +1 -0
- package/concepts/zh/GlobalSettings.md +1 -0
- package/dist/assets/{App-Br-u2TKk.js → App-dYoYpFDk.js} +1 -1
- package/dist/assets/{MdxEditorPanel-Cy4egsQx.js → MdxEditorPanel-zjdym1tp.js} +1 -1
- package/dist/assets/{Mobile-ZHF74GQs.js → Mobile-Br4m9B11.js} +1 -1
- package/dist/assets/index-Be7o3L97.js +2 -0
- package/dist/assets/seqResourceLoaders-B_fIl-OW.js +2 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/interceptor.js +2 -1
- package/server/lib/ask-bridge.js +11 -0
- package/server/lib/interceptor-core.js +3 -3
- package/server/lib/kv-cache-analyzer.js +3 -3
- package/server/lib/log-management.js +46 -99
- package/server/lib/log-stream.js +102 -8
- package/server/lib/log-watcher.js +22 -13
- package/server/lib/ws-backpressure.js +106 -0
- package/server/routes/events.js +3 -3
- package/server/routes/logs.js +5 -5
- package/server/routes/workspaces.js +3 -3
- package/server/server.js +124 -11
- package/server/workspace-registry.js +18 -20
- package/dist/assets/index-DMuCrfTo.js +0 -2
- package/dist/assets/seqResourceLoaders-C7X23dCJ.js +0 -2
package/cli.js
CHANGED
|
@@ -389,7 +389,8 @@ async function runCliMode(extraClaudeArgs = [], cwd, noOpen = false) {
|
|
|
389
389
|
|
|
390
390
|
// 4. 自动打开浏览器
|
|
391
391
|
const protocol = serverMod.getProtocol();
|
|
392
|
-
const
|
|
392
|
+
const basePath = process.env.CCV_BASE_PATH || '';
|
|
393
|
+
const url = `${protocol}://127.0.0.1:${port}${basePath}`;
|
|
393
394
|
if (!noOpen) {
|
|
394
395
|
try {
|
|
395
396
|
// URL 含 & 在 cmd.exe 下会被当命令分隔符切断 query;用 spawn 数组传参避免 shell interpolation。
|
|
@@ -410,7 +411,7 @@ async function runCliMode(extraClaudeArgs = [], cwd, noOpen = false) {
|
|
|
410
411
|
const _lanIps = serverMod.getAllLocalIps();
|
|
411
412
|
const _token = serverMod.getAccessToken();
|
|
412
413
|
for (const _ip of _lanIps) {
|
|
413
|
-
console.log(` ➜ Network: ${protocol}://${_ip}:${port}?token=${_token}`);
|
|
414
|
+
console.log(` ➜ Network: ${protocol}://${_ip}:${port}${basePath}?token=${_token}`);
|
|
414
415
|
}
|
|
415
416
|
// 密码登录已启用时,把当前密码打印出来 —— 否则 `ccv --usePassword`(随机密码)在 CLI 模式下
|
|
416
417
|
// 用户无从得知密码(server.js 的密码打印只在非 CLI 模式生效)。空密码=无防护,给出警告。
|
|
@@ -551,7 +552,8 @@ async function runSdkMode(extraClaudeArgs = [], cwd, noOpen = false) {
|
|
|
551
552
|
|
|
552
553
|
// 自动打开浏览器
|
|
553
554
|
const protocol = serverMod.getProtocol();
|
|
554
|
-
const
|
|
555
|
+
const basePath = process.env.CCV_BASE_PATH || '';
|
|
556
|
+
const url = `${protocol}://127.0.0.1:${port}${basePath}`;
|
|
555
557
|
if (!noOpen) {
|
|
556
558
|
try {
|
|
557
559
|
// URL 含 & 在 cmd.exe 下会被当命令分隔符切断 query;用 spawn 数组传参避免 shell interpolation。
|
|
@@ -572,7 +574,7 @@ async function runSdkMode(extraClaudeArgs = [], cwd, noOpen = false) {
|
|
|
572
574
|
const _lanIps = serverMod.getAllLocalIps();
|
|
573
575
|
const _token = serverMod.getAccessToken();
|
|
574
576
|
for (const _ip of _lanIps) {
|
|
575
|
-
console.log(` ➜ Network: ${protocol}://${_ip}:${port}?token=${_token}`);
|
|
577
|
+
console.log(` ➜ Network: ${protocol}://${_ip}:${port}${basePath}?token=${_token}`);
|
|
576
578
|
}
|
|
577
579
|
// 密码登录已启用时,把当前密码打印出来 —— 否则 `ccv --usePassword`(随机密码)在 CLI 模式下
|
|
578
580
|
// 用户无从得知密码(server.js 的密码打印只在非 CLI 模式生效)。空密码=无防护,给出警告。
|
|
@@ -628,8 +630,9 @@ async function runCliModeWorkspaceSelector(extraClaudeArgs = [], noOpen = false)
|
|
|
628
630
|
serverMod.setWorkspaceClaudePath(claudePath, isNpmVersion);
|
|
629
631
|
|
|
630
632
|
// 自动打开浏览器
|
|
633
|
+
const basePath = process.env.CCV_BASE_PATH || '';
|
|
631
634
|
const wsProtocol = serverMod.getProtocol();
|
|
632
|
-
const url = `${wsProtocol}://127.0.0.1:${port}`;
|
|
635
|
+
const url = `${wsProtocol}://127.0.0.1:${port}${basePath}`;
|
|
633
636
|
if (!noOpen) {
|
|
634
637
|
try {
|
|
635
638
|
// URL 含 & 在 cmd.exe 下会被当命令分隔符切断 query;用 spawn 数组传参避免 shell interpolation。
|
|
@@ -650,7 +653,7 @@ async function runCliModeWorkspaceSelector(extraClaudeArgs = [], noOpen = false)
|
|
|
650
653
|
const _lanIps = serverMod.getAllLocalIps();
|
|
651
654
|
const _token = serverMod.getAccessToken();
|
|
652
655
|
for (const _ip of _lanIps) {
|
|
653
|
-
console.log(` ➜ Network: ${wsProtocol}://${_ip}:${port}?token=${_token}`);
|
|
656
|
+
console.log(` ➜ Network: ${wsProtocol}://${_ip}:${port}${basePath}?token=${_token}`);
|
|
654
657
|
}
|
|
655
658
|
|
|
656
659
|
// 注册退出处理
|
|
@@ -66,6 +66,7 @@ All UI settings are persisted to `<log_dir>/preferences.json` via the `/api/pref
|
|
|
66
66
|
| `CCV_PROJECT_DIR` | `process.cwd()` | Project working directory for file operations and Git commands |
|
|
67
67
|
| `CCV_PROXY_PORT` | unset | Local MITM proxy port |
|
|
68
68
|
| `CCV_BYPASS_PERMISSIONS` | unset | `=1` skip tool permission approval (with `--dangerously-skip-permissions`) |
|
|
69
|
+
| `CCV_DISABLE_ASK_HOOK` | unset | `=1` skip cc-viewer's web AskUserQuestion prompt; let it fall through to the terminal / a downstream PermissionRequest hook |
|
|
69
70
|
| `CCV_DISABLE_DELTA` | unset | `=1` disable incremental log storage, write full messages every time |
|
|
70
71
|
| `CCV_DEBUG` | unset | `=1` enable HTTP proxy debug logging |
|
|
71
72
|
| `CCV_DEBUG_PLUGINS` | unset | `=1` enable plugin loading debug logging |
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
| `CCV_PROJECT_DIR` | `process.cwd()` | 项目工作目录,用于文件操作和 Git 命令 |
|
|
67
67
|
| `CCV_PROXY_PORT` | 未设置 | 本地 MITM 代理端口 |
|
|
68
68
|
| `CCV_BYPASS_PERMISSIONS` | 未设置 | `=1` 跳过工具权限审批(配合 `--dangerously-skip-permissions`) |
|
|
69
|
+
| `CCV_DISABLE_ASK_HOOK` | 未设置 | `=1` 跳过 cc-viewer 网页端 AskUserQuestion 答题,交回终端 / 下游 PermissionRequest hook 处理 |
|
|
69
70
|
| `CCV_DISABLE_DELTA` | 未设置 | `=1` 禁用增量日志存储,每次写入完整消息 |
|
|
70
71
|
| `CCV_DEBUG` | 未设置 | `=1` 启用 HTTP 代理调试日志 |
|
|
71
72
|
| `CCV_DEBUG_PLUGINS` | 未设置 | `=1` 启用插件加载调试日志 |
|