cc-viewer 1.4.13 → 1.4.16
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 +6 -2
- package/dist/assets/{index-B3PatjPN.js → index-CwFfGP5V.js} +133 -133
- package/dist/assets/{index-ADbGFOYO.css → index-k2L1uWUr.css} +2 -2
- package/dist/index.html +2 -2
- package/i18n.js +3 -3
- package/package.json +2 -1
- package/plugin-loader.js +138 -0
- package/proxy.js +41 -1
- package/server.js +171 -5
package/cli.js
CHANGED
|
@@ -241,12 +241,16 @@ async function runCliMode(extraClaudeArgs = []) {
|
|
|
241
241
|
|
|
242
242
|
console.log(t('cli.cMode.starting'));
|
|
243
243
|
|
|
244
|
+
// 2. 设置 CLI 模式标记(必须在 import proxy.js 之前,
|
|
245
|
+
// 因为 proxy.js → interceptor.js 可能触发 server.js 加载,
|
|
246
|
+
// server.js 的 isCliMode 在模块顶层求值且只执行一次)
|
|
247
|
+
process.env.CCV_CLI_MODE = '1';
|
|
248
|
+
|
|
244
249
|
// 1. 启动代理
|
|
245
250
|
const { startProxy } = await import('./proxy.js');
|
|
246
251
|
const proxyPort = await startProxy();
|
|
247
252
|
|
|
248
|
-
//
|
|
249
|
-
process.env.CCV_CLI_MODE = '1';
|
|
253
|
+
// 3. 启动 HTTP 服务器
|
|
250
254
|
const serverMod = await import('./server.js');
|
|
251
255
|
|
|
252
256
|
// 等待服务器启动完成
|