cc-viewer 1.3.8 → 1.4.0

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 CHANGED
@@ -199,12 +199,66 @@ async function runProxyCommand(args) {
199
199
  }
200
200
  }
201
201
 
202
+ async function runCliMode() {
203
+ const nativePath = resolveNativePath();
204
+ if (!nativePath) {
205
+ console.error(t('cli.cMode.notFound'));
206
+ process.exit(1);
207
+ }
208
+
209
+ console.log(t('cli.cMode.starting'));
210
+
211
+ // 1. 启动代理
212
+ const { startProxy } = await import('./proxy.js');
213
+ const proxyPort = await startProxy();
214
+
215
+ // 2. 设置 CLI 模式标记,启动 HTTP 服务器
216
+ process.env.CCV_CLI_MODE = '1';
217
+ const serverMod = await import('./server.js');
218
+
219
+ // 等待服务器启动完成
220
+ await new Promise(resolve => {
221
+ const check = () => {
222
+ const port = serverMod.getPort();
223
+ if (port) resolve(port);
224
+ else setTimeout(check, 100);
225
+ };
226
+ setTimeout(check, 200);
227
+ });
228
+
229
+ const port = serverMod.getPort();
230
+
231
+ // 3. 启动 PTY 中的 claude
232
+ const { spawnClaude, killPty } = await import('./pty-manager.js');
233
+ await spawnClaude(proxyPort, process.cwd());
234
+
235
+ // 4. 自动打开浏览器
236
+ const url = `http://127.0.0.1:${port}`;
237
+ try {
238
+ const cmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
239
+ const { execSync } = await import('node:child_process');
240
+ execSync(`${cmd} ${url}`, { stdio: 'ignore', timeout: 5000 });
241
+ } catch {}
242
+
243
+ console.log(`CC Viewer: ${url}`);
244
+
245
+ // 5. 注册退出处理
246
+ const cleanup = () => {
247
+ killPty();
248
+ serverMod.stopViewer();
249
+ process.exit();
250
+ };
251
+ process.on('SIGINT', cleanup);
252
+ process.on('SIGTERM', cleanup);
253
+ }
254
+
202
255
  // === 主逻辑 ===
203
256
 
204
257
  const args = process.argv.slice(2);
205
258
  const isUninstall = args.includes('--uninstall');
206
259
  const isHelp = args.includes('--help') || args.includes('-h') || args[0] === 'help';
207
260
  const isVersion = args.includes('--v') || args.includes('--version') || args.includes('-v');
261
+ const isCliMode = args.includes('--c');
208
262
 
209
263
  if (isHelp) {
210
264
  console.log(t('cli.help'));
@@ -221,7 +275,12 @@ if (isVersion) {
221
275
  process.exit(0);
222
276
  }
223
277
 
224
- if (args[0] === 'run') {
278
+ if (isCliMode) {
279
+ runCliMode().catch(err => {
280
+ console.error('CLI mode error:', err);
281
+ process.exit(1);
282
+ });
283
+ } else if (args[0] === 'run') {
225
284
  runProxyCommand(args);
226
285
  } else if (isUninstall) {
227
286
  const cliResult = removeCliJsInjection();
@@ -0,0 +1,32 @@
1
+ body{margin:0;background-color:#0d0d0d}*{scrollbar-width:thin;scrollbar-color:#3a3a3a #0d0d0d}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:#0d0d0d}*::-webkit-scrollbar-thumb{background:#3a3a3a;border-radius:3px}*::-webkit-scrollbar-thumb:hover{background:#555}.diff-view{background:#1a1a2e;border:1px solid #2a2a3e;border-radius:8px;padding:8px 12px}.diff-line-del{background:#ef444426;color:#fca5a5;padding:0 4px}.diff-line-add{background:#22c55e26;color:#86efac;padding:0 4px}.code-highlight{color:#e6edf3}.hl-keyword{color:#ff7b72}.hl-string{color:#a5d6ff}.hl-comment{color:#8b949e;font-style:italic}.hl-number{color:#79c0ff}.hl-linenum{color:#484f58;-webkit-user-select:none;user-select:none}.chat-md pre{background:#0d1117;border:1px solid #2a2a2a;border-radius:6px;padding:12px;overflow-x:auto;font-size:13px;line-height:1.5}.chat-md code{background:#1a1a2e;padding:2px 6px;border-radius:4px;font-size:13px;color:#e5e7eb}.chat-md pre code{background:none;padding:0}.chat-md p{margin:6px 0}.chat-md ul,.chat-md ol{padding-left:20px;margin:6px 0}.chat-md li{margin:2px 0}.chat-md h1,.chat-md h2,.chat-md h3{margin:12px 0 6px;color:#fff}.chat-md h1{font-size:1.3em}.chat-md h2{font-size:1.15em}.chat-md h3{font-size:1.05em}.chat-md blockquote{border-left:3px solid #3b82f6;margin:8px 0;padding:4px 12px;color:#9ca3af}.chat-md table{border-collapse:collapse;margin:8px 0;font-size:13px}.chat-md th,.chat-md td{border:1px solid #2a2a2a;padding:6px 10px}.chat-md th{background:#1a1a1a;color:#fff}.chat-md a{color:#60a5fa}.chat-md hr{border:none;border-top:1px solid #2a2a2a;margin:12px 0}.chat-md strong{color:#f1f5f9}.chat-md em{color:#cbd5e1}.ant-tooltip .ant-tooltip-inner{background-color:#090909}.ant-tooltip .ant-tooltip-arrow:before,.ant-tooltip .ant-tooltip-arrow:after{background:#090909}._helpBtn_cvsqb_1{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#1a1a1a;border:1px solid #444;color:#aaa;font-size:11px;line-height:1;cursor:pointer;margin-left:4px;vertical-align:middle;transition:background .2s;-webkit-user-select:none;user-select:none}._helpBtn_cvsqb_1:hover{background:#333}._modalBody_cvsqb_24{max-height:60vh;overflow-y:auto;line-height:1.7}._modalBody_cvsqb_24 h1,._modalBody_cvsqb_24 h2,._modalBody_cvsqb_24 h3{margin-top:.8em}._modalBody_cvsqb_24 p{margin:.5em 0}._modalBody_cvsqb_24 code{background:#2a2a2a;padding:1px 4px;border-radius:3px;font-size:.9em}._modalBody_cvsqb_24 pre{background:#1a1a1a;padding:12px;border-radius:6px;overflow-x:auto}._spinWrap_cvsqb_54{display:flex;justify-content:center;padding:40px 0}._modalBody_cvsqb_24 textarea{width:100%;min-height:200px;background:#1a1a1a;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:1px solid #333;border-radius:6px;padding:10px 14px;resize:vertical;outline:none}._headerBar_1ata5_2{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%}._titleText_1ata5_11{color:#fff;font-size:18px;cursor:pointer}._logoImage_1ata5_17{height:24px;width:24px;margin-right:6px;border-radius:3px;vertical-align:text-bottom}._titleArrow_1ata5_25{font-size:12px;margin-left:4px}._tokenStatsTag_1ata5_31{border-radius:12px;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;color:#ccc}._tokenStatsIcon_1ata5_39{margin-right:4px}._liveTag_1ata5_44{border-radius:12px}._liveDotWrap_1ata5_48{display:inline-flex;align-items:center;justify-content:center;width:10px;height:10px;vertical-align:middle;margin-right:2px;position:relative;top:-1px}._liveTag_1ata5_44 .ant-badge-status-processing{animation:_breathe_1ata5_1 2.5s ease-in-out infinite}@keyframes _breathe_1ata5_1{0%,to{opacity:.4;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}._liveSpinner_1ata5_70{display:block;animation:_spinPlusStar_1ata5_1 2s linear infinite}._liveSpinnerDiag_1ata5_75{animation:_diagFade_1ata5_1 2s ease-in-out infinite}@keyframes _spinPlusStar_1ata5_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _diagFade_1ata5_1{0%,to{opacity:1}50%{opacity:0}}._inflightList_1ata5_90{min-width:180px}._inflightItem_1ata5_94{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12px}._inflightItem_1ata5_94+._inflightItem_1ata5_94{border-top:1px solid #333}._inflightTag_1ata5_106{color:#52c41a;font-weight:500;white-space:nowrap}._inflightModel_1ata5_112{color:#999;white-space:nowrap}._inflightTime_1ata5_117{color:#666;margin-left:auto;white-space:nowrap}._liveTagHistory_1ata5_123{background:#2a2a2a;border-color:#424242;color:#d1d5db}._liveTagText_1ata5_129{margin-left:4px}._countdownStrong_1ata5_134{font-variant-numeric:tabular-nums}._langSelector_1ata5_139,._settingsBtn_1ata5_150{color:#888;font-size:12px;cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #555;border-radius:4px;padding:2px 8px}._settingsBtn_1ata5_150:hover{color:#bbb;border-color:#777}._settingsItem_1ata5_166{display:flex;justify-content:space-between;align-items:center;padding:12px 0}._settingsLabel_1ata5_173{font-size:14px}._tokenStatsEmpty_1ata5_178{padding:8px 4px;color:#999;font-size:13px}._tokenStatsContainer_1ata5_185{display:flex;gap:12px;align-items:flex-start}._tokenStatsColumn_1ata5_191{min-width:240px}._toolStatsColumn_1ata5_195{min-width:180px}._modelCard_1ata5_200{border:1px solid #333;border-radius:6px;padding:8px 10px;background:#111}._modelCardSpaced_1ata5_207{margin-bottom:10px}._modelName_1ata5_213{font-size:13px;font-weight:600;color:#e5e5e5;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._statsTable_1ata5_223{width:100%;border-collapse:collapse}._th_1ata5_228{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#888;font-weight:400;text-align:right}._td_1ata5_238{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#e5e5e5;text-align:right}._label_1ata5_247{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#aaa;font-weight:400;text-align:left}._rowBorder_1ata5_257{border-bottom:1px solid #2a2a2a}._rebuildCard_1ata5_261{border:1px solid #333;border-radius:6px;padding:8px 10px;margin-top:10px;background:#111}._rebuildTotalRow_1ata5_269{border-top:1px solid #444}._rebuildTotalRow_1ata5_269 td{font-weight:600}._promptExportBar_1ata5_278{margin-bottom:12px}._promptScrollArea_1ata5_282{max-height:500px;overflow:auto}._promptEmpty_1ata5_287{color:#999;padding:12px}._promptTimestamp_1ata5_293{color:#666;font-size:12px;margin:12px 0 4px;padding-bottom:6px}._textPromptCard_1ata5_301{margin:4px 0;background:#141414;border-radius:6px;border:1px solid #303030;padding:10px 14px}._preText_1ata5_310{white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.6;color:#d9d9d9;margin:4px 0}._systemCollapse_1ata5_320{margin:4px 0;background:#1a1a1a;border:1px solid #303030;border-radius:6px}._systemLabel_1ata5_327{color:#888;font-size:12px}._preSys_1ata5_332{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#999;margin:0}._promptTextarea_1ata5_342{box-sizing:border-box;background:#000;width:100%;min-height:400px;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:none;resize:vertical;padding:10px 14px;outline:none}._projectStatsCenter_1ata5_358{display:flex;justify-content:center;padding:40px 0}._projectStatsEmpty_1ata5_364{color:#999;padding:40px 0;text-align:center;font-size:13px}._projectStatsContent_1ata5_371{display:flex;flex-direction:column;gap:16px}._projectStatsUpdated_1ata5_377{color:#666;font-size:12px;text-align:right}._projectStatsSummary_1ata5_383{display:grid;grid-template-columns:1fr 1fr;gap:10px}._projectStatCard_1ata5_389{background:#111;border:1px solid #333;border-radius:8px;padding:14px 12px;text-align:center}._projectStatValue_1ata5_397{font-size:22px;font-weight:700;color:#e5e5e5;font-family:monospace;font-variant-numeric:tabular-nums}._projectStatLabel_1ata5_405{font-size:12px;color:#888;margin-top:4px}._projectStatsSection_1ata5_411{display:flex;flex-direction:column;gap:10px}._projectStatsSectionTitle_1ata5_417{font-size:14px;font-weight:600;color:#ccc;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelCard_1ata5_425{background:#111;border:1px solid #333;border-radius:6px;padding:10px 12px}._projectStatsModelHeader_1ata5_432{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelName_1ata5_441{font-size:13px;font-weight:600;color:#e5e5e5}._projectStatsModelCount_1ata5_447{font-size:12px;color:#888;font-family:monospace}._centerEmpty_ckz8l_1{display:flex;align-items:center;justify-content:center;height:100%}._scrollContainer_ckz8l_8{overflow:auto;height:100%}._listItem_ckz8l_13{cursor:pointer;padding:8px 12px;border-left:3px solid transparent;border-bottom:1px solid #1f1f1f;transition:background .15s}._listItem_ckz8l_13:hover{background:#151515}._listItemActive_ckz8l_25{background:#1a2332;border-left-color:#3b82f6}._listItemActive_ckz8l_25:hover{background:#1a2332}._itemContent_ckz8l_34{width:100%;min-width:0}._itemHeader_ckz8l_39{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-size:12px}._tagNoMargin_ckz8l_47{margin:0;font-size:12px}._modelName_ckz8l_52{font-size:12px}._time_ckz8l_56{font-size:12px;color:#6b7280;margin-left:auto}._detailRow_ckz8l_62{display:flex;gap:8px;font-size:12px;align-items:center}._urlText_ckz8l_69{color:#555;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}._duration_ckz8l_78{color:#6b7280;flex-shrink:0}._statusOk_ckz8l_83{color:#52c41a;opacity:.5;flex-shrink:0}._statusErr_ckz8l_89{color:#ef4444;flex-shrink:0}._statusDefault_ckz8l_94{color:#9ca3af;flex-shrink:0}._usageBox_ckz8l_99{background:#111;border-radius:4px;padding:3px 6px;margin-top:4px;font-size:12px;color:#6b7280;line-height:1.6}._cacheDot_ckz8l_109{display:inline-block;width:6px;height:6px;border-radius:50%;margin:0 3px;vertical-align:middle}._cacheDotLoss_ckz8l_118{background-color:#8b1a1a;cursor:help}._cacheDotNormal_ckz8l_123{background-color:#3a3a3a}._GzYRV{line-height:1.2;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{font-size:1.2em;margin-right:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{font-weight:600;margin-right:5px;color:#000}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{font-weight:bolder;margin-right:5px;color:#fdf6e3}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}._container_1h2lr_1{background:#0d1117;border-radius:6px;border:1px solid #2a2a2a;padding:12px;font-size:13px;font-family:monospace;overflow:auto}._container_y3z3z_1{height:100%;overflow:auto;padding:0 16px}._emptyState_y3z3z_7{display:flex;align-items:center;justify-content:center;height:100%}._urlSection_y3z3z_14{padding:12px 0;border-bottom:1px solid #1f1f1f;display:flex;align-items:flex-start}._urlLeft_y3z3z_21{flex:1;min-width:0}._tokenStatsBox_y3z3z_26{flex-shrink:0;padding-left:12px;display:flex;align-items:center}._tokenGrid_y3z3z_33{display:flex;border:1px solid #303030;border-radius:6px;overflow:hidden;min-width:360px;font-size:11px;line-height:1.6}._tokenRows_y3z3z_43{flex:1}._tokenRow_y3z3z_43{display:flex}._tokenRowBorder_y3z3z_51{border-top:1px solid #303030}._tokenLabel_y3z3z_55{color:#888;padding:4px 8px;white-space:nowrap;font-weight:600}._tokenTd_y3z3z_62{flex:1;color:#d1d5db;text-align:right;padding:4px 8px;font-family:monospace;white-space:nowrap}._tokenHitRate_y3z3z_71{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#d1d5db;padding:4px 8px;font-family:monospace;white-space:nowrap;border-left:1px solid #303030;min-width:100px}._tokenHitRateLabel_y3z3z_84{color:#888;font-size:10px;font-family:sans-serif}._tokenRowBorder_y3z3z_51 td{border-top:1px solid #303030}._urlText_y3z3z_94{color:#d1d5db;font-size:13px;margin-bottom:8px;word-break:break-all}._metaText_y3z3z_101,._headersContainer_y3z3z_105{font-size:12px}._headerRow_y3z3z_109{display:flex;padding:4px 0;border-bottom:1px solid #1f1f1f}._headerKey_y3z3z_115{min-width:200px;flex-shrink:0}._headerValue_y3z3z_120{word-break:break-all;margin-left:8px}._streamingBox_y3z3z_125{padding:20px;background:#1a1a1a;border-radius:6px;border:1px solid #2a2a2a}._bodyToolbar_y3z3z_132{display:flex;gap:8px;margin-bottom:8px}._rawTextPre_y3z3z_138{background:#0d1117;border:1px solid #2a2a2a;border-radius:6px;padding:12px;font-size:12px;color:#e5e7eb;overflow:auto;max-height:600px;white-space:pre-wrap;word-break:break-all}._tabContent_y3z3z_151{padding:12px 0}._collapseSpacing_y3z3z_155{margin-bottom:16px}._bodyLabel_y3z3z_159{margin:0}._bodyHeader_y3z3z_163{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}._diffSection_y3z3z_170{margin-bottom:16px}._diffToggle_y3z3z_174{display:inline-block;margin-bottom:8px;cursor:pointer}._diffIcon_y3z3z_180{font-size:12px;margin-left:4px}._viewInChatBtn_y3z3z_185{display:inline-flex;align-items:center;height:26px;border-radius:13px;border:1px solid #424242;background:transparent;color:#888;cursor:pointer;font-size:12px;transition:all .2s;padding:0 10px;white-space:nowrap}._viewInChatBtn_y3z3z_185:hover{border-color:#666;color:#d1d5db;background:#ffffff0f}._reminderSelect_y3z3z_206{min-width:140px;font-size:12px}._reminderSelect_y3z3z_206 .ant-select-selector{border-radius:2px!important;border-color:#424242!important;background:transparent!important;min-height:26px!important;height:auto!important;padding:0 8px!important;font-family:monospace}._reminderSelect_y3z3z_206 .ant-select-selection-placeholder{font-size:11px}._wrapper_1o255_1{margin:6px 0}._header_1o255_5{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}._filePath_1o255_12{color:#a78bfa;font-size:12px;font-weight:600}._toggle_1o255_18{color:#6b7280;font-size:11px;cursor:pointer;-webkit-user-select:none;user-select:none}._code_1o255_25{margin:0;font-size:12px;line-height:1.5;overflow:auto}._plainResult_1uh60_1{background:#111;border-radius:6px;font-size:12px}._plainTitle_1uh60_7{font-size:11px}._plainPre_1uh60_11{color:#d1d5db;margin:0;white-space:pre-wrap;word-break:break-all;font-size:12px;padding:8px 12px}._codeResult_1uh60_20{background:#0d1117;border-radius:6px;border:1px solid #1e2a3a;overflow:hidden}._codeHeader_1uh60_27{display:flex;justify-content:space-between;align-items:center;padding:4px 10px;background:#161b22;border-bottom:1px solid #1e2a3a}._codeTitle_1uh60_36{font-size:11px;color:#8b949e}._codeToggle_1uh60_41{font-size:11px;color:#484f58;cursor:pointer;-webkit-user-select:none;user-select:none}._codePre_1uh60_48{margin:0;padding:8px 12px;font-size:12px;line-height:1.5;overflow:auto;max-height:500px}._markdownBody_1uh60_57{padding:8px 12px;font-size:13px;line-height:1.6;overflow:auto;max-height:500px}._tag_17wfp_1{display:inline-block;font-size:10px;color:#6b7280;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:3px;padding:0 4px;margin-left:6px;cursor:pointer;line-height:18px;vertical-align:middle;transition:color .2s,border-color .2s;-webkit-user-select:none;user-select:none}._tag_17wfp_1:hover{color:#93c5fd;border-color:#93c5fd4d}._tagActive_17wfp_22{color:#93c5fd;border-color:#93c5fd40}._tagLoading_17wfp_27{cursor:wait;opacity:.7}._spinner_17wfp_32{display:inline-block;width:10px;height:10px;border:1.5px solid rgba(147,197,253,.3);border-top-color:#93c5fd;border-radius:50%;animation:_spin_17wfp_32 .6s linear infinite;margin-right:3px;vertical-align:middle}@keyframes _spin_17wfp_32{to{transform:rotate(360deg)}}._avatar_w9l4s_3{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}._avatarImg_w9l4s_13{width:32px;height:32px;border-radius:50%;flex-shrink:0;object-fit:cover}._bubble_w9l4s_21{border-radius:8px;padding:10px 14px;max-width:100%;font-size:14px;line-height:1.6;word-break:break-word}._messageRow_w9l4s_32{display:flex;gap:10px;padding:8px 0}._messageRowEnd_w9l4s_38{display:flex;gap:10px;padding:8px 0;justify-content:flex-end}._contentCol_w9l4s_47{min-width:0;flex:1}._contentColLimited_w9l4s_52{min-width:0;max-width:80%;width:fit-content}._labelRow_w9l4s_60{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px}._labelRowEnd_w9l4s_67{display:flex;justify-content:flex-end;align-items:center;margin-bottom:2px}._labelRight_w9l4s_74{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}._labelText_w9l4s_82{font-size:11px}._timeText_w9l4s_86,._timeTextNoMargin_w9l4s_92{font-size:10px;color:#6b7280;flex-shrink:0}._labelTextRight_w9l4s_98{font-size:11px;margin-left:auto}._bubbleUser_w9l4s_105{background:#1668dc;color:#e5e7eb}._bubbleAssistant_w9l4s_111{background:#141414;color:#e5e7eb;transition:box-shadow 0s;position:relative}._bubbleHighlight_w9l4s_119{box-shadow:0 0 10px #1668dc99}._bubbleHighlightFading_w9l4s_123{box-shadow:0 0 10px #1668dc00;transition:box-shadow 5s ease-out}._borderSvg_w9l4s_128{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}._borderSvgFading_w9l4s_137{opacity:0;transition:opacity 5s ease-out}._borderRect_w9l4s_142{animation:_dashRotate_w9l4s_1 4s linear infinite}@keyframes _dashRotate_w9l4s_1{0%{stroke-dashoffset:0}to{stroke-dashoffset:-100}}._bubblePlan_w9l4s_151{background:#141428;border:5px solid #1668dc;font-size:12px;color:#e5e7eb}._bubbleSubAgent_w9l4s_159{background:#1a1a2e;color:#e5e7eb}._bubbleSelection_w9l4s_165{background:#1a3a1a;color:#e5e7eb}._systemTagLabel_w9l4s_173{font-size:12px}._skillLabel_w9l4s_177{font-size:12px;color:#a78bfa}._systemTagPre_w9l4s_182{font-size:12px;color:#9ca3af;white-space:pre-wrap;word-break:break-all;margin:0}._collapseMargin_w9l4s_190{margin:4px 0}._collapseNoMargin_w9l4s_194{margin:0}._thinkingLabel_w9l4s_200{font-size:12px}._toolBox_w9l4s_206{background:#1a1a2e;border:1px solid #2a2a3e;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._toolLabel_w9l4s_215{color:#a78bfa}._codePre_w9l4s_221{font-size:12px;margin:4px 0 0;white-space:pre-wrap;word-break:break-all;background:#0d1117;border-radius:4px;padding:6px 8px}._pathTag_w9l4s_233{color:#7dd3fc;font-size:11px}._descSpan_w9l4s_240{color:#6b7280;font-weight:400}._secondarySpan_w9l4s_245{color:#6b7280}._patternSpan_w9l4s_249{color:#fbbf24}._kvContainer_w9l4s_255{margin-top:4px;font-size:11px}._kvItem_w9l4s_260{margin:2px 0}._kvKey_w9l4s_264{color:#7dd3fc}._kvValue_w9l4s_268{color:#9ca3af}._toolResult_w9l4s_274{background:#111827;border:1px solid #1e293b;border-radius:6px;padding:6px 10px;margin:2px 0 6px;font-size:11px}._toolResultLabel_w9l4s_283{font-size:11px}._compactLabel_w9l4s_289{font-size:12px;color:#93c5fd}._compactPre_w9l4s_294{font-size:12px;color:#d1d5db;white-space:pre-wrap;word-break:break-all;margin:0}._viewRequestBtn_w9l4s_304{font-size:10px;color:#555;cursor:pointer;margin-left:6px;flex-shrink:0}._viewRequestBtn_w9l4s_304:hover{color:#93c5fd}._optionList_w9l4s_318{padding-left:8px}._optionDesc_w9l4s_322{color:#555;margin-left:6px;font-weight:400}._questionText_w9l4s_330{font-size:13px;color:#ccc;margin-bottom:4px}._questionSpacing_w9l4s_336{margin-bottom:10px}._option_w9l4s_318{font-size:12px;padding:1px 0}._askQuestionBox_w9l4s_349{background:#0d1f0d;border:1px solid #2ea043;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._askQuestionHeader_w9l4s_358{display:inline-block;background:#1a3a1a;color:#7ee787;font-size:10px;padding:1px 6px;border-radius:4px;margin-bottom:4px;font-weight:600}._askQuestionText_w9l4s_369{color:#e5e7eb;font-size:13px;margin-bottom:4px}._askOptionItem_w9l4s_375{font-size:12px;color:#9ca3af;padding:1px 0}._planModeBox_w9l4s_383{background:#0d1528;border:1px solid #1668dc;border-radius:8px;padding:8px 12px;margin:6px 0;font-size:12px}._planModeLabel_w9l4s_392{color:#93c5fd;font-weight:600}._planModePermissions_w9l4s_397{margin-top:6px;padding-top:6px;border-top:1px solid #1e3a5f}._planModePermLabel_w9l4s_403{color:#6b7280;font-size:11px;margin-bottom:2px}/**
2
+ * Copyright (c) 2014 The xterm.js authors. All rights reserved.
3
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4
+ * https://github.com/chjj/term.js
5
+ * @license MIT
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ *
25
+ * Originally forked from (with the author's permission):
26
+ * Fabrice Bellard's javascript vt100 for jslinux:
27
+ * http://bellard.org/jslinux/
28
+ * Copyright (c) 2011 Fabrice Bellard
29
+ * The original design remains. The terminal itself
30
+ * has been extended to include xterm CSI codes, among
31
+ * other features.
32
+ */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}._terminalPanel_1at8e_1{height:100%;display:flex;flex-direction:column;background:#0a0a0a}._terminalContainer_1at8e_8{flex:1;overflow:hidden;padding:4px 8px}._centerEmpty_s1mzc_1{display:flex;align-items:center;justify-content:center;height:100%}._container_s1mzc_8{flex:1;overflow:auto;padding:16px 24px;display:flex;flex-direction:column}._sessionDividerText_s1mzc_16{font-size:11px;color:#555}._lastResponseLabel_s1mzc_21{font-size:11px}._splitContainer_s1mzc_25{display:flex;flex-direction:row;height:100%;overflow:hidden}._chatSection_s1mzc_32{display:flex;flex-direction:column;min-width:0;overflow:hidden}._vResizer_s1mzc_39{width:5px;background:#1a1a1a;cursor:col-resize;flex-shrink:0;border-left:1px solid #2a2a2a;border-right:1px solid #2a2a2a;transition:background .15s}._vResizer_s1mzc_39:hover{background:#333}._chatInputBar_s1mzc_53{display:flex;align-items:flex-end;gap:8px;padding:10px 16px;background:#111;border-top:1px solid #2a2a2a;flex-shrink:0}._chatInputWrapper_s1mzc_63{flex:1;display:flex;flex-direction:column;background:#1a1a1a;border:1px solid #333;border-radius:12px;transition:border-color .2s;overflow:hidden}._chatInputWrapper_s1mzc_63:focus-within{border-color:#555}._chatTextareaWrap_s1mzc_78{position:relative;flex:1}._chatTextarea_s1mzc_78{width:100%;min-height:22px;max-height:120px;padding:10px 14px;background:transparent;color:#e0e0e0;border:none;outline:none;resize:none;font-size:14px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._chatTextarea_s1mzc_78::placeholder{color:#555}._chatInputHint_s1mzc_102{font-size:11px;color:#444;padding:0 14px 6px;-webkit-user-select:none;user-select:none}._chatSendBtn_s1mzc_109{width:36px;height:36px;border-radius:10px;border:none;background:#4a9eff;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,opacity .15s}._chatSendBtn_s1mzc_109:hover{background:#3a8eef}._chatSendBtn_s1mzc_109:disabled{opacity:.35;cursor:default}._chatSendBtn_s1mzc_109 svg{width:18px;height:18px}._messageListWrap_s1mzc_138{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}._stickyBottomBtn_s1mzc_146{position:absolute;left:16px;bottom:12px;display:flex;align-items:center;gap:5px;padding:6px 14px;border-radius:18px;border:1px solid #3a3a3a;background:#1a1a1ae6;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#bbb;font-size:12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;z-index:10;box-shadow:0 2px 8px #0006}._stickyBottomBtn_s1mzc_146:hover{background:#282828f2;color:#eee;border-color:#555}._ptyPromptBubble_s1mzc_172{margin:8px 0;padding:12px 16px;border-radius:12px;border:1px solid #3a3a3a;background:#161616;animation:_ptyPromptFadeIn_s1mzc_1 .25s ease-out}._ptyPromptResolved_s1mzc_181{opacity:.55}@keyframes _ptyPromptFadeIn_s1mzc_1{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}._ptyPromptQuestion_s1mzc_190{font-size:13px;color:#ccc;margin-bottom:10px;line-height:1.4}._ptyPromptOptions_s1mzc_197{display:flex;flex-wrap:wrap;gap:8px}._ptyPromptOption_s1mzc_197{padding:6px 14px;border-radius:18px;border:1px solid #3a3a3a;background:#1a1a1a;color:#bbb;font-size:12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}._ptyPromptOption_s1mzc_197:hover{background:#2a2a2a;color:#eee;border-color:#555}._ptyPromptOptionPrimary_s1mzc_221{padding:6px 14px;border-radius:18px;border:1px solid #4a9eff;background:#4a9eff26;color:#4a9eff;font-size:12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}._ptyPromptOptionPrimary_s1mzc_221:hover{background:#4a9eff40;color:#6ab4ff;border-color:#6ab4ff}._ptyPromptOptionChosen_s1mzc_239{padding:6px 14px;border-radius:18px;border:1px solid #4a9eff;background:#4a9eff33;color:#4a9eff;font-size:12px;cursor:default;white-space:nowrap}._ptyPromptOptionDimmed_s1mzc_250{padding:6px 14px;border-radius:18px;border:1px solid #2a2a2a;background:transparent;color:#444;font-size:12px;cursor:default;white-space:nowrap}._ghostText_s1mzc_261{position:absolute;top:0;left:0;right:0;padding:10px 14px;color:#444;font-size:14px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;pointer-events:none;white-space:pre-wrap;overflow:hidden;max-height:120px}._suggestionChip_s1mzc_277{display:flex;align-items:center;gap:8px;padding:8px 14px;background:#1a1a1a;border-top:1px solid #2a2a2a;cursor:pointer;flex-shrink:0;transition:background .15s}._suggestionChip_s1mzc_277:hover{background:#222}._suggestionChipText_s1mzc_293{flex:1;color:#555;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._suggestionChipAction_s1mzc_302{color:#4a9eff;font-size:14px;flex-shrink:0}._resizer_yamj2_1{width:6px;cursor:col-resize;background:#1f1f1f;flex-shrink:0;transition:background .2s}._resizer_yamj2_1:hover{background:#3b82f6}._layout_16uf8_1{height:100vh;overflow:hidden}._header_16uf8_6{background:#111;border-bottom:1px solid #1f1f1f;padding:0 24px;height:60px;line-height:60px}._content_16uf8_14{flex:1;overflow:hidden}._mainContainer_16uf8_19{display:flex;height:100%}._leftPanel_16uf8_24{flex-shrink:0;border-right:1px solid #1f1f1f;display:flex;flex-direction:column;background:#0a0a0a}._leftPanelHeader_16uf8_32{padding:10px 16px;border-bottom:1px solid #1f1f1f;font-size:13px;color:#9ca3af;font-weight:500;display:flex;justify-content:space-between;align-items:center}._leftPanelCount_16uf8_43{font-size:12px;color:#555;font-weight:400}._leftPanelBody_16uf8_49{flex:1;overflow:hidden}._rightPanel_16uf8_54{flex:1;overflow:hidden;background:#0d0d0d}._modalActions_16uf8_60{margin-bottom:12px}._spinCenter_16uf8_64{text-align:center;padding:40px}._emptyCenter_16uf8_69{text-align:center;color:#999;padding:40px}._logCheckbox_16uf8_75{margin-right:8px}._logListContainer_16uf8_79{background:#0d0d0d;border-radius:8px;overflow:hidden}._logListItem_16uf8_85{cursor:pointer;padding:8px 12px;border-bottom:1px solid #222}._logItemRow_16uf8_91{display:flex;align-items:center;width:100%;justify-content:space-between;flex-wrap:nowrap;gap:12px}._logItemRow_16uf8_91>span:first-child{display:flex;align-items:center;flex:1;min-width:0;overflow:hidden}._logFileName_16uf8_108{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logItemRow_16uf8_91>span:last-child{display:flex;align-items:center;flex-shrink:0;gap:8px}._logFileIcon_16uf8_121{margin-right:8px;color:#3b82f6;flex-shrink:0}._loadingOverlay_16uf8_127{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#000000bf;display:flex;align-items:center;justify-content:center;z-index:9999}._loadingText_16uf8_140{color:#fff;font-size:16px;font-weight:700}._footer_16uf8_146{height:18px;background:#000;display:flex;align-items:center;justify-content:flex-end;padding:0 12px;flex-shrink:0}._footerRight_16uf8_156{display:flex;align-items:center;gap:6px;font-size:11px;color:#555}._footerLink_16uf8_164{display:inline-flex;align-items:center;gap:3px;color:#555;text-decoration:none}._footerLink_16uf8_164:hover{color:#888}._footerIcon_16uf8_176{width:12px;height:12px}._footerDivider_16uf8_181{color:#333}._footerText_16uf8_185{color:#555}._guideContainer_16uf8_189{display:flex;align-items:center;justify-content:center;height:100%;background:#0a0a0a}._guideContent_16uf8_197{max-width:560px;padding:40px}._guideIcon_16uf8_202{margin-bottom:20px;opacity:.6}._guideTitle_16uf8_207{font-size:20px;font-weight:600;color:#e0e0e0;margin:0 0 28px}._guideStep_16uf8_214{display:flex;gap:14px;margin-bottom:22px}._guideStepNum_16uf8_220{flex-shrink:0;width:24px;height:24px;border-radius:50%;background:#1a1a2e;color:#7c8aff;font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:center;margin-top:1px}._guideStepBody_16uf8_235{flex:1;min-width:0}._guideText_16uf8_240{color:#aaa;font-size:14px;line-height:1.6;margin:0 0 8px}._guideCode_16uf8_247{display:block;background:#141414;border:1px solid #252525;border-radius:6px;padding:10px 14px;color:#8b9cf7;font-size:13px;line-height:1.5;word-break:break-all;white-space:pre-wrap}