cc-viewer 1.6.310 → 1.6.312
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/dist/assets/App-DXhyaS3P.css +1 -0
- package/dist/assets/App-DtRb6L04.js +2 -0
- package/dist/assets/{MdxEditorPanel-Dfn62V7N.js → MdxEditorPanel-CpcelHyU.js} +1 -1
- package/dist/assets/Mobile-DwiM0Dm6.js +1 -0
- package/dist/assets/{index-DgGJTx-b.js → index-4qAcuvOR.js} +2 -2
- package/dist/assets/seqResourceLoaders-BVRDP3Yd.js +2 -0
- package/dist/assets/seqResourceLoaders-CX6xejM7.css +41 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/lib/ansi-safe-slice.js +76 -0
- package/server/lib/pty-flood-coalescer.js +21 -1
- package/server/pty-manager.js +9 -43
- package/server/scratch-pty-manager.js +4 -21
- package/server/server.js +65 -24
- package/dist/assets/App-JIy7ipem.js +0 -2
- package/dist/assets/App-LcZ7ezR-.css +0 -1
- package/dist/assets/Mobile-Dbhv9o_l.js +0 -1
- package/dist/assets/seqResourceLoaders-CC0PRWqk.js +0 -2
- package/dist/assets/seqResourceLoaders-H8fAJXE5.css +0 -41
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._liveTag_sg7sp_3{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;border-radius:999px;border:1px solid;border-color:var(--ctx-color);color:var(--ctx-color);padding:0 10px;height:100%;font-size:12px;line-height:1;overflow:hidden;transition:border-color .3s,color .3s;white-space:nowrap;background:var(--bg-base-pure)}._liveTagFill_sg7sp_23{position:absolute;left:0;top:0;bottom:0;width:var(--ctx-percent, 0);background-color:var(--ctx-color);opacity:.35;transition:width .5s ease,background-color .3s;pointer-events:none}._liveTagContent_sg7sp_36{position:relative;z-index:1;display:inline-flex;align-items:center}._liveTagHistory_sg7sp_44{background:var(--bg-surface);border-color:var(--border-light);color:var(--text-primary)}._liveTagText_sg7sp_51{margin-left:4px;font-variant-numeric:tabular-nums}._cachePopoverPlaceholder_sg7sp_57{min-width:300px}._editButton_31hdb_10{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;background:transparent;border:none;padding:0 2px;margin-left:4px;cursor:pointer;font-size:inherit;line-height:1;color:var(--text-secondary, #888);opacity:0;border-radius:3px;transition:opacity .12s ease,color .12s ease,background-color .12s ease}._editButton_31hdb_10 .anticon{display:inline-flex;align-items:center;line-height:1;position:relative;top:-1px}._editButton_31hdb_10:hover,._editButton_31hdb_10:focus-visible{opacity:1;color:var(--text-primary, #333);background-color:var(--bg-hover, rgba(0, 0, 0, .04));outline:none}._editButton_31hdb_10:focus-visible{box-shadow:0 0 0 2px var(--focus-ring, rgba(64, 158, 255, .4))}._footer_31hdb_55{display:flex;justify-content:space-between;align-items:center;gap:8px}._footerLeft_31hdb_61,._footerRight_31hdb_65{display:flex;gap:8px}._projectNameRow_31hdb_70{display:flex;align-items:center;gap:8px;margin-bottom:12px;padding:6px 10px;background:var(--bg-secondary, rgba(0, 0, 0, .03));border-radius:4px;font-size:12px}._projectNameLabel_31hdb_80{color:var(--text-secondary, #888)}._projectNameValue_31hdb_83{color:var(--text-primary, #333);font-family:var(--font-mono, ui-monospace, SFMono-Regular, monospace);word-break:break-all}._panel_1nxl3_1{display:flex;flex-direction:column;gap:14px}._required_1nxl3_7{margin-left:2px;color:var(--color-error-light, #ff7b7b)}._optional_1nxl3_12{margin-left:6px;font-size:12px;font-weight:400;color:var(--text-secondary)}._row_1nxl3_19{display:flex;align-items:center;justify-content:space-between;gap:12px}._label_1nxl3_26{font-size:14px;font-weight:500}._control_1nxl3_31{display:inline-flex;align-items:center;gap:10px}._field_1nxl3_37{display:flex;flex-direction:column;gap:6px}._fieldLabel_1nxl3_43{font-size:13px;color:var(--text-secondary)}._help_1nxl3_48{font-size:12px;color:var(--text-secondary);line-height:1.4}._warn_1nxl3_54{font-size:12px;line-height:1.5;color:var(--color-error-light, #ff7b7b)}._hint_1nxl3_60{font-size:12px;line-height:1.5;color:var(--text-secondary)}._helpIcon_1nxl3_67{margin-left:6px;color:var(--text-tertiary, #999);cursor:help;font-size:13px}._detailsToggle_1nxl3_74{display:inline-flex;align-items:center;gap:5px;align-self:flex-start;padding:0;border:none;background:none;cursor:pointer;font-size:12px;color:var(--text-secondary)}._detailsToggle_1nxl3_74:hover{color:var(--text-primary, var(--text-secondary))}._details_1nxl3_74{display:flex;flex-direction:column;gap:10px}._actions_1nxl3_98{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;padding-top:16px;border-top:1px solid var(--border-secondary)}._testBtn_1nxl3_108{margin-right:auto}._tabRow_1q32a_4{display:flex;align-items:flex-end;gap:6px;padding:0 8px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}._tabRow_1q32a_4::-webkit-scrollbar{display:none}._tabBtn_1q32a_24{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;font-size:14px;line-height:1.5;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--text-secondary);cursor:pointer;transition:color .18s,border-color .18s,background .18s;white-space:nowrap;flex-shrink:0;-webkit-user-select:none;user-select:none}._tabBtn_1q32a_24:hover{color:var(--color-primary)}._tabBtn_1q32a_24._tabBtnActive_1q32a_52,._tabBtn_1q32a_24._tabBtnActive_1q32a_52:hover{background:var(--bg-container);color:var(--color-primary);border-color:var(--border-primary);border-bottom:2px solid var(--bg-container);border-radius:10px 10px 0 0;font-weight:500;margin-bottom:-1px;position:relative;z-index:2}._toolBody_1q32a_8{border:1px solid var(--border-primary);border-top:none;border-radius:8px;background:var(--bg-container);padding:18px 20px;min-width:0}[data-theme=light] ._toolBody_1q32a_8{box-shadow:0 3px 8px #00000014}[data-theme=light] ._tabBtnActive_1q32a_52{box-shadow:0 -3px 8px #0000000f}[data-theme=dark] ._toolBody_1q32a_8 .ant-input,[data-theme=dark] ._toolBody_1q32a_8 .ant-input-affix-wrapper,[data-theme=dark] ._toolBody_1q32a_8 .ant-select-selector{background-color:var(--bg-elevated)}._scrollBody_riojj_1{height:100%;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding:4px 2px;background:var(--bg-container)}._headerBar_riojj_15{display:flex;align-items:center;gap:8px}._refreshBtn_riojj_21{flex:0 0 auto}._statusTag_riojj_27{display:inline-flex;align-items:center;margin-left:auto}._statusTag_riojj_27 .ant-tag{margin-inline-end:0}._center_riojj_36{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:40px 0;color:var(--text-secondary)}._hint_riojj_46{color:var(--text-secondary);font-size:13px}._chip_bvaji_4{position:relative;line-height:0;cursor:pointer;-webkit-user-select:none;user-select:none;transition:opacity .15s}._chip_bvaji_4:hover{opacity:.75}._logo_bvaji_16{display:block;transition:color .15s}._connecting_bvaji_22{opacity:.5}._dotError_bvaji_27{position:absolute;right:-2px;top:-2px;width:6px;height:6px;border-radius:50%;background:var(--color-error, #ff4d4f);pointer-events:none}._modelCard_1gpju_3{border:1px solid var(--border-secondary);border-radius:6px;padding:8px 10px;background:var(--bg-container)}._modelName_1gpju_9{font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid var(--border-secondary)}._statsTable_1gpju_17{width:100%;border-collapse:collapse}._th_1gpju_21{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:var(--text-tertiary);font-weight:400;text-align:right}._td_1gpju_30{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:var(--text-primary);text-align:right}._label_1gpju_38{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:var(--text-light);font-weight:400;text-align:left}._rowBorder_1gpju_47{border-bottom:1px solid var(--border-primary)}._rebuildTotalRow_1gpju_50{border-top:1px solid var(--border-light)}._rebuildTotalRow_1gpju_50 td{font-weight:600}._cachePopoverEmpty_1gpju_56{padding:8px 4px;color:var(--text-tertiary);font-size:13px}._toolChipGrid_1gpju_61{display:flex;flex-wrap:wrap;gap:4px;padding:2px 0 6px 2px}._cacheToolChip_1gpju_67{font-size:11px;padding:0 6px;border-radius:3px;background:var(--bg-surface);color:var(--text-secondary);line-height:18px;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--border-primary);cursor:help}._titleIcon_1gpju_81{margin-right:8px}._detailMarkdownCard_1gpju_86{border:1px solid var(--border-secondary);border-radius:6px;padding:8px 10px;background:var(--bg-container)}._memoryMarkdown_1gpju_93{font-size:12.5px;line-height:1.55;color:var(--text-primary);word-break:break-word}._memoryMarkdown_1gpju_93 p{margin:0 0 6px}._memoryMarkdown_1gpju_93 ul,._memoryMarkdown_1gpju_93 ol{margin:4px 0 6px;padding-left:20px}._memoryMarkdown_1gpju_93 li{margin:2px 0}._memoryMarkdown_1gpju_93 h1,._memoryMarkdown_1gpju_93 h2,._memoryMarkdown_1gpju_93 h3,._memoryMarkdown_1gpju_93 h4{font-size:13px;font-weight:600;margin:8px 0 4px;color:var(--text-primary)}._memoryMarkdown_1gpju_93 h1{font-size:14px}._memoryMarkdown_1gpju_93 a{color:var(--primary-color, #1677ff);text-decoration:none;cursor:pointer}._memoryMarkdown_1gpju_93 a:hover{text-decoration:underline}._memoryMarkdown_1gpju_93 code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;padding:1px 4px;border-radius:3px;background:var(--bg-surface);color:var(--text-primary)}._memoryMarkdown_1gpju_93 pre{margin:6px 0;padding:8px 10px;border-radius:4px;background:var(--bg-surface);overflow-x:auto}._memoryMarkdown_1gpju_93 pre code{padding:0;background:transparent;font-size:12px}._memoryMarkdown_1gpju_93 blockquote{margin:4px 0;padding:2px 8px;border-left:3px solid var(--border-hover);color:var(--text-secondary)}._memoryMarkdown_1gpju_93 hr{margin:8px 0;border:none;border-top:1px solid var(--border-secondary)}._headerBar_uzc7r_2{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%}._logoWrap_uzc7r_10{display:inline-flex;align-items:center;position:relative;margin-top:14px}._logoWrapActive_uzc7r_17:after{content:"";position:absolute;top:-10px;bottom:-10px;left:0;right:-200px}._logoImage_uzc7r_26{height:24px;width:24px;border-radius:3px;vertical-align:middle;opacity:.75;transition:opacity .2s;cursor:pointer}._logoImageActive_uzc7r_36{opacity:1}._compactBtn_uzc7r_43{font-size:12px;height:30px;display:inline-flex;align-items:center;justify-content:center}._compactBtnNoBorder_uzc7r_52{width:30px;height:30px;min-width:30px;padding:0;border:none;font-size:18px;line-height:1;display:inline-flex;align-items:center;justify-content:center}._compactBtnNoBorder_uzc7r_52 .anticon{display:inline-flex;align-items:center;justify-content:center;line-height:0}._headerProjectName_uzc7r_79{font-size:12px;color:inherit;white-space:nowrap}._headerProjectName_uzc7r_79:hover [data-alias-edit-trigger],._headerProjectName_uzc7r_79:focus-within [data-alias-edit-trigger]{opacity:.55}._countdownStrong_uzc7r_96{font-variant-numeric:tabular-nums}._qrcodePopover_uzc7r_101{display:flex;flex-direction:column;align-items:center;padding:8px}._qrcodeSection_uzc7r_108{display:flex;flex-direction:column;align-items:center;padding:16px;margin-bottom:12px;border:1px solid var(--border-secondary);border-radius:8px;background:var(--bg-container)}._qrcodeTitle_uzc7r_119{font-size:14px;font-weight:600;color:var(--text-primary);margin-bottom:12px}._qrcodeUrlInput_uzc7r_126{margin-top:12px;font-size:12px;font-family:Menlo,Monaco,monospace}._qrcodeUrlCopy_uzc7r_132{cursor:pointer;color:var(--text-tertiary);transition:color .2s}._qrcodeUrlCopy_uzc7r_132:hover{color:var(--color-primary-light)}._authSection_uzc7r_143{display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;width:100%;margin-top:12px;padding:12px;border:1px solid var(--border-secondary);border-radius:8px;background:var(--bg-container);gap:8px}._authHeaderRow_uzc7r_157{display:flex;align-items:center;justify-content:space-between}._authTitle_uzc7r_163{font-size:13px;font-weight:600;color:var(--text-primary)}._authPasswordLabel_uzc7r_169{font-size:12px;color:var(--text-secondary)}._authPasswordInput_uzc7r_174{font-size:12px;font-family:Menlo,Monaco,monospace}._authSaveBtn_uzc7r_179{align-self:flex-end}._authEmptyWarn_uzc7r_183{font-size:12px;color:var(--color-error-light);line-height:1.4}._settingsGroupBox_uzc7r_191{border:1px solid var(--border-secondary);border-radius:8px;background:var(--bg-container);padding:4px 16px;margin-bottom:12px}._settingsGroupTitle_uzc7r_199{font-size:14px;font-weight:600;color:var(--text-primary);padding:12px 0 4px;border-bottom:1px solid var(--border-secondary)}._settingsItem_uzc7r_208{display:flex;justify-content:space-between;align-items:center;padding:12px 0}._settingsLabel_uzc7r_215{font-size:14px}._settingsHelpIcon_uzc7r_220{font-size:16px;color:var(--text-disabled);cursor:help;margin-left:4px}._settingsDivider_uzc7r_227{border-top:1px solid var(--border-primary);margin:12px 0}._logDirInput_uzc7r_232{margin-top:8px;background:var(--bg-base-alt);border-color:var(--border-light);color:var(--text-primary);font-family:monospace;font-size:13px}._tokenStatsEmpty_uzc7r_242{padding:8px 4px;color:var(--text-tertiary);font-size:13px}._tokenStatsContainer_uzc7r_249{display:flex;gap:12px;align-items:flex-start}._tokenStatsColumn_uzc7r_255{min-width:240px}._toolStatsColumn_uzc7r_259{min-width:180px}._modelCardSpaced_uzc7r_265{margin-bottom:10px}._rebuildCard_uzc7r_274{border:1px solid var(--border-secondary);border-radius:6px;padding:8px 10px;margin-top:10px;background:var(--bg-container)}._promptExportBar_uzc7r_283{margin-bottom:12px}._promptScrollArea_uzc7r_287{max-height:500px;overflow:auto}._promptEmpty_uzc7r_292{color:var(--text-tertiary);padding:12px}._promptTimestamp_uzc7r_298{color:var(--text-muted);font-size:12px;margin:12px 0 4px;padding-bottom:6px}._textPromptCard_uzc7r_306{margin:4px 0;background:var(--bg-container);border-radius:6px;border:1px solid var(--border-secondary);padding:10px 14px}._preText_uzc7r_315{white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.6;color:var(--text-primary);margin:4px 0}._systemCollapse_uzc7r_325{margin:4px 0;background:var(--bg-elevated);border:1px solid var(--border-secondary);border-radius:6px}._systemLabel_uzc7r_332{color:var(--text-tertiary);font-size:12px}._preSys_uzc7r_337{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:var(--text-tertiary);margin:0}._promptTextarea_uzc7r_347{box-sizing:border-box;background:var(--bg-base-pure);width:100%;min-height:400px;color:var(--text-primary);font-family:monospace;font-size:13px;line-height:1.6;border:none;resize:vertical;padding:10px 14px;outline:none}._projectStatsCenter_uzc7r_363{display:flex;justify-content:center;padding:40px 0}._projectStatsEmpty_uzc7r_369{color:var(--text-tertiary);padding:40px 0;text-align:center;font-size:13px}._projectStatsContent_uzc7r_376{display:flex;flex-direction:column;gap:16px}._projectStatsUpdated_uzc7r_382{color:var(--text-muted);font-size:12px;text-align:right}._projectStatsSummary_uzc7r_388{display:grid;grid-template-columns:1fr 1fr;gap:10px}._projectStatCard_uzc7r_394{background:var(--bg-container);border:1px solid var(--border-secondary);border-radius:8px;padding:14px 12px;text-align:center}._projectStatValue_uzc7r_402{font-size:22px;font-weight:700;color:var(--text-primary);font-family:monospace;font-variant-numeric:tabular-nums}._projectStatLabel_uzc7r_410{font-size:12px;color:var(--text-tertiary);margin-top:4px}._projectStatsSection_uzc7r_416{display:flex;flex-direction:column;gap:10px}._projectStatsSectionTitle_uzc7r_422{font-size:14px;font-weight:600;color:var(--text-secondary);padding-bottom:4px;border-bottom:1px solid var(--border-secondary)}._projectStatsModelCard_uzc7r_430{background:var(--bg-container);border:1px solid var(--border-secondary);border-radius:6px;padding:10px 12px}._projectStatsModelHeader_uzc7r_437{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid var(--border-secondary)}._projectStatsModelName_uzc7r_446{font-size:13px;font-weight:600;color:var(--text-primary)}._projectStatsModelCount_uzc7r_452{font-size:12px;color:var(--text-tertiary);font-family:monospace}._cacheCopyBtn_uzc7r_460{font-size:14px;color:var(--text-tertiary);cursor:pointer;transition:color .2s;margin-left:8px}._cacheCopyBtn_uzc7r_460:hover{color:var(--text-primary)}._cacheTokenInfo_uzc7r_472{display:flex;align-items:center;font-size:12px;font-family:monospace;color:var(--text-light);margin-bottom:8px}._cacheCodeBlock_uzc7r_485{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:var(--text-secondary);background:var(--bg-container);border:1px solid var(--border-primary);border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._cacheCodeBlockSystem_uzc7r_499{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:var(--text-secondary);background:var(--bg-code-system);border:1px solid var(--border-code-system);border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._cacheNavBtn_uzc7r_513{margin-left:auto;font-size:11px;color:var(--color-primary);cursor:pointer;border:1px solid var(--color-primary);border-radius:3px;padding:1px 6px;white-space:nowrap}._cacheNavBtn_uzc7r_513:hover{background:var(--color-primary-bg-light)}._cacheNavList_uzc7r_528{width:600px;max-height:300px;overflow-y:auto}._cacheNavItem_uzc7r_534{padding:4px 8px;font-size:12px;color:var(--text-secondary);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:3px}._cacheNavItem_uzc7r_534:hover{background:var(--color-primary-bg-lighter);color:var(--text-white)}._cacheBlockHighlight_uzc7r_550{box-shadow:0 0 10px var(--color-primary-shadow);transition:box-shadow .2s ease-in}._cacheBlockHighlightFading_uzc7r_555{box-shadow:0 0 10px transparent;transition:box-shadow 3s ease-out}._cacheBorderSvg_uzc7r_560{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}._cacheBorderSvgFading_uzc7r_569{opacity:0;transition:opacity 3s ease-out}._cacheBorderRect_uzc7r_574{animation:_cacheDashRotate_uzc7r_1 4s linear infinite}@keyframes _cacheDashRotate_uzc7r_1{0%{stroke-dashoffset:0}to{stroke-dashoffset:-100}}._thLeft_uzc7r_584{text-align:left}._cacheWriteToken_uzc7r_599{color:var(--color-code-orange)}._cacheReadToken_uzc7r_603{color:var(--color-success)}._cacheCtxPercent_uzc7r_607{color:var(--text-tertiary);margin-left:6px}._qrcodeIcon_uzc7r_627{width:30px;height:30px;padding:6px;box-sizing:border-box;color:var(--text-secondary);cursor:pointer;border-radius:6px;transition:color .15s ease,background-color .15s ease;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;background:none;border:none}._qrcodeIcon_uzc7r_627:hover{color:var(--text-primary);background:var(--bg-hover, rgba(0, 0, 0, .04))}._qrcodeIcon_uzc7r_627:focus-visible{outline:2px solid var(--primary-color, #1677ff);outline-offset:1px}._approvalBell_uzc7r_653{position:relative;width:30px;height:30px;padding:6px;box-sizing:border-box;color:var(--color-warning, #faad14);cursor:pointer;border-radius:6px;transition:color .15s ease,background-color .15s ease;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;background:none;border:none}._approvalBell_uzc7r_653:hover{color:var(--text-primary);background:var(--bg-hover, rgba(0, 0, 0, .04))}._approvalBell_uzc7r_653:focus-visible{outline:2px solid var(--primary-color, #1677ff);outline-offset:1px}._approvalBellBadge_uzc7r_678{position:absolute;top:0;right:0;min-width:14px;height:14px;padding:0 3px;box-sizing:border-box;background:var(--color-error, #ff4d4f);color:#fff;font-size:9px;line-height:14px;border-radius:7px;text-align:center;font-weight:600}._proxySwapIcon_uzc7r_695{margin-right:4px;font-size:11px}._proxyProfileTag_uzc7r_701{border-radius:12px;background:var(--border-secondary);border:1px solid var(--border-light);color:var(--text-tertiary);font-size:12px;cursor:pointer;transition:color .2s,border-color .2s}._proxyProfileTag_uzc7r_701:hover{color:var(--text-secondary);border-color:var(--text-disabled)}._pinnedShortcut_uzc7r_717{height:24px;margin-top:11px;display:inline-flex;align-items:center;justify-content:center;font-size:16px;line-height:1;color:var(--text-tertiary);opacity:.75;cursor:pointer;transition:opacity .2s,color .2s}._pinnedShortcut_uzc7r_717:hover{opacity:1;color:var(--text-secondary)}._pinnedShortcut_uzc7r_717 .anticon{display:inline-flex;align-items:center;justify-content:center;line-height:0}._themeToggle_uzc7r_746{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:30px;height:30px;padding:0;border:none;border-radius:6px;background:transparent;color:var(--text-secondary);cursor:pointer;transition:background-color .2s ease,color .2s ease;flex-shrink:0;outline:none}._themeToggle_uzc7r_746:hover{background:var(--color-bg-hover, rgba(127, 127, 127, .12));color:var(--text-primary)}._themeToggle_uzc7r_746:focus-visible{box-shadow:0 0 0 2px var(--primary-color, #1677ff)}._themeToggleIcon_uzc7r_772{display:block}._headerRightRow_uzc7r_777 .ant-space-item{display:inline-flex;align-items:center}._headerCountdownTag_uzc7r_783{height:30px;margin:0;padding:0 10px;display:inline-flex;align-items:center;background:var(--bg-surface);border:1px solid var(--border-hover);border-radius:6px;line-height:1}._centerEmpty_midza_1{display:flex;align-items:center;justify-content:center;height:100%}._scrollContainer_midza_8{overflow:auto;height:100%;-webkit-overflow-scrolling:touch;will-change:scroll-position}._listItem_midza_15{cursor:pointer;padding:8px 12px;border-left:6px solid transparent;border-right:1px solid var(--border-primary);border-top:1px solid transparent;border-bottom:1px solid var(--border-primary);transition:background .15s}._listItem_midza_15:hover{border-left-color:var(--border-hover)}._listItemActive_midza_29{background:var(--color-primary-bg-faint);border-left-color:var(--color-primary-light);border-right:1px solid var(--color-primary-light);border-top:1px solid var(--color-primary-light);border-bottom:1px solid var(--color-primary-light)}._listItemActive_midza_29,._listItemActive_midza_29:hover{background:var(--color-primary-bg-faint);border-left-color:var(--color-primary-light);border-right-color:var(--color-primary-light);border-top-color:var(--color-primary-light);border-bottom-color:var(--color-primary-light)}._itemContent_midza_46{width:100%;min-width:0}._itemHeader_midza_51{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-size:12px}._tagNoMargin_midza_59{margin:0;font-size:12px}._modelName_midza_64{font-size:12px;color:var(--text-tertiary)}._modelNameMain_midza_69{color:var(--color-code-orange)}._time_midza_73{font-size:12px;color:var(--text-gray);margin-left:auto}._detailRow_midza_79{display:flex;gap:8px;font-size:12px;align-items:center}._urlText_midza_86{color:var(--text-disabled);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}._duration_midza_95{color:var(--text-gray);flex-shrink:0}._statusOk_midza_100{color:var(--color-success);opacity:.5;flex-shrink:0}._statusErr_midza_106{color:var(--color-error);flex-shrink:0}._statusDefault_midza_111{color:var(--text-tertiary);flex-shrink:0}._usageBox_midza_116{background:var(--bg-container);border-radius:4px;padding:3px 6px;margin-top:4px;font-size:12px;color:var(--text-gray);line-height:1.6}._cacheDot_midza_126{display:inline-block;width:6px;height:6px;border-radius:50%;margin:0 3px;vertical-align:middle}._cacheDotLoss_midza_135{background-color:var(--color-red-dark-bg);cursor:help}._cacheDotNormal_midza_140{background-color:var(--border-hover)}._tagMainAgent_midza_144{color:var(--color-code-orange);border-color:var(--color-code-orange-border);background:var(--color-code-orange-bg)}._tagPlan_midza_150{color:var(--color-error-muted);border-color:var(--color-error-muted);background-color:var(--bg-base-pure)}._tagMuted_midza_156{color:var(--text-muted);border-color:var(--border-light);background-color:var(--bg-base-pure)}._tooltipPreLine_midza_162{white-space:pre-line}._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_qeuid_1{background:var(--bg-container);border-radius:6px;border:1px solid var(--border-primary);padding:12px;font-size:13px;font-family:monospace;overflow:auto}._root_17dqd_1{display:flex;height:100%;min-height:0;gap:0}._sidebar_17dqd_9{width:220px;flex-shrink:0;border-right:1px solid var(--border-primary);overflow-y:auto;padding:4px 0;-webkit-overflow-scrolling:touch}._section_17dqd_18{-webkit-user-select:none;user-select:none}._sectionHeader_17dqd_22{display:flex;align-items:center;gap:6px;width:100%;padding:6px 10px;cursor:pointer;color:var(--text-primary);font-size:12px;font-weight:600;transition:background .15s;background:none;border:0;text-align:left;font:inherit}._sectionHeader_17dqd_22:hover{background:var(--overlay-light-faint)}._sectionHeader_17dqd_22:focus-visible{outline:1px solid var(--color-primary-outline);outline-offset:-1px}._arrow_17dqd_48{font-size:10px;color:var(--text-tertiary);flex-shrink:0}._sectionTitle_17dqd_54{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._sectionCount_17dqd_62{font-size:11px;color:var(--text-muted);background:var(--bg-elevated);border-radius:10px;padding:0 6px;line-height:18px}._sectionBody_17dqd_71{padding:2px 0}._historyToggle_17dqd_76{display:flex;align-items:center;gap:6px;width:100%;padding:4px 10px 4px 14px;cursor:pointer;color:var(--text-muted);font-size:11px;transition:color .15s,background .15s;background:none;border:0;text-align:left;font:inherit}._historyToggle_17dqd_76:hover{color:var(--text-tertiary);background:var(--overlay-light-faint)}._historyToggle_17dqd_76:focus-visible{outline:1px solid var(--color-primary-outline);outline-offset:-1px}._historyToggleLabel_17dqd_102{flex:1}._item_17dqd_107{display:flex;align-items:center;justify-content:space-between;width:100%;padding:4px 9px 4px 23px;font-size:12px;color:var(--text-tertiary);cursor:pointer;transition:background .15s,color .15s;background:none;border:1px solid transparent;border-radius:4px;box-sizing:border-box;text-align:left;font:inherit}._item_17dqd_107:hover{background:var(--overlay-light-faint);color:var(--text-primary)}._item_17dqd_107:focus-visible{outline:1px solid var(--color-primary-outline);outline-offset:-1px}._itemActive_17dqd_135,._itemActive_17dqd_135:hover{background:var(--color-primary-bg-faint);color:var(--color-primary);border-color:var(--color-primary-light)}._itemContent_17dqd_142{flex:1;min-width:0;overflow:hidden}._itemLabel_17dqd_148{font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}._itemSublabel_17dqd_156{font-size:10px;color:var(--text-disabled);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}._itemTime_17dqd_165{font-size:9px;color:var(--text-disabled);flex-shrink:0;margin-left:4px;font-family:monospace}._content_17dqd_174{flex:1;min-width:0;overflow:auto;padding:12px 16px;-webkit-overflow-scrolling:touch}._contentEmpty_17dqd_182{height:100%;display:flex;align-items:center;justify-content:center}._contentInner_17dqd_189{padding-bottom:20px}._emptyWrap_17dqd_193{display:flex;align-items:center;justify-content:center;height:200px}._roleHeader_17dqd_201{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:nowrap}._roleBadge_17dqd_209{font-size:10px;font-weight:600;letter-spacing:.04em;padding:2px 7px;border-radius:4px;flex-shrink:0}._role_user_17dqd_218{background:var(--color-primary-bg-lighter);color:var(--color-primary-lighter);border:1px solid var(--color-primary-bg-medium)}._role_assistant_17dqd_224{background:var(--color-purple-bg);color:var(--color-code-purple);border:1px solid var(--color-purple-border)}._roleLabel_17dqd_230{font-size:11px;color:var(--text-muted);flex:1;min-width:0}._contentTime_17dqd_237{margin-left:auto;font-size:10px;color:var(--text-disabled);font-family:monospace;flex-shrink:0}._turnDivider_17dqd_245{border:none;border-top:1px solid var(--border-primary);margin:14px 0}._textBlock_17dqd_252{margin-bottom:8px;border:1px solid var(--border-primary);border-radius:6px;overflow:hidden}._textBlockBar_17dqd_259{display:flex;align-items:center;gap:6px;padding:4px 10px;background:var(--bg-container);border-bottom:1px solid var(--border-primary)}._textBlockBody_17dqd_268{padding:10px 12px;font-size:13px;line-height:1.7;color:var(--text-primary);word-break:break-word}._textBlockCompact_17dqd_276{position:relative;padding:8px 10px;font-size:12px;color:var(--text-light)}._textBlockCompactFloat_17dqd_283{float:right;margin-left:6px;margin-bottom:2px}._thinkingBlock_17dqd_290{margin-bottom:8px;border:1px solid var(--color-thinking-border);border-radius:6px;overflow:hidden;background:var(--color-thinking-bg)}._thinkingHeader_17dqd_298{display:flex;align-items:center;gap:6px;padding:5px 10px;cursor:pointer;font-size:12px;color:var(--text-tertiary);transition:background .15s}._thinkingHeader_17dqd_298:hover{background:var(--overlay-light-faint)}._thinkingPreview_17dqd_313{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-muted);font-size:11px}._thinkingBody_17dqd_323{padding:8px 12px;border-top:1px solid var(--color-thinking-border)}._toolBlock_17dqd_329{margin-bottom:8px;border:1px solid var(--border-primary);border-radius:6px;overflow:hidden}._toolBlockResult_17dqd_336{border-color:var(--color-green-border)}._toolBlockError_17dqd_340{border-color:var(--color-red-dark-border)}._toolBlockHeader_17dqd_344{display:flex;align-items:center;gap:8px;padding:5px 10px;background:var(--bg-container);border-bottom:1px solid var(--border-primary);font-size:12px;flex-wrap:wrap}._toolBlockBody_17dqd_355{padding:8px 10px;font-size:12px}._toolName_17dqd_360{color:var(--text-primary);font-weight:500;font-family:monospace}._toolId_17dqd_366{color:var(--text-disabled);font-size:10px;font-family:monospace;margin-left:auto}._errorLabel_17dqd_373{font-size:10px;color:var(--color-error-light);background:var(--color-error-bg-light);border:1px solid var(--color-error-border);border-radius:3px;padding:1px 5px}._blockTag_17dqd_383{font-size:9px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;padding:1px 5px;border-radius:3px;background:var(--bg-elevated);color:var(--text-muted);border:1px solid var(--border-primary);flex-shrink:0}._blockTagText_17dqd_396{background:var(--color-primary-bg-faint);color:var(--color-primary-lighter);border-color:var(--color-primary-bg-lighter)}._blockTagThinking_17dqd_402{background:var(--color-warning-bg-faint);color:var(--color-warning);border-color:var(--color-warning-border-light)}._blockTagResult_17dqd_408{background:var(--color-green-dark-bg);color:var(--color-success);border-color:var(--color-green-dark-border)}._blockTagError_17dqd_414{background:var(--color-error-bg-faint);color:var(--color-error-light);border-color:var(--color-error-border-light)}._jsonBlock_17dqd_421{margin-bottom:8px;border:1px solid var(--border-primary);border-radius:6px;overflow:hidden}._jsonBlockLabel_17dqd_428{font-size:10px;color:var(--text-muted);padding:3px 10px;background:var(--bg-container);border-bottom:1px solid var(--border-primary);font-family:monospace}._blockSeparator_17dqd_438{border:none;border-top:1px solid var(--border-primary);margin:16px 0}._markdownBody_17dqd_445{font-size:13px;line-height:1.7;color:var(--text-primary);word-break:break-word}._container_rg6mx_1{height:100%;overflow:hidden;padding:0 16px;display:flex;flex-direction:column;background:var(--bg-base)}._emptyState_rg6mx_10{display:flex;align-items:center;justify-content:center;height:100%}._urlSection_rg6mx_17{padding:12px 0;border-bottom:1px solid var(--border-primary);display:flex;align-items:flex-start;flex-shrink:0}._urlLeft_rg6mx_25{flex:1;min-width:0}._tokenStatsBox_rg6mx_30{flex-shrink:0;padding-left:12px;display:flex;align-items:center}._tokenGrid_rg6mx_37{display:flex;border:1px solid var(--border-secondary);border-radius:6px;overflow:hidden;min-width:360px;font-size:11px;line-height:1.6}._tokenRows_rg6mx_47{flex:1}._tokenRow_rg6mx_47{display:flex}._tokenRowBorder_rg6mx_55{border-top:1px solid var(--border-secondary)}._tokenLabel_rg6mx_59{color:var(--text-tertiary);padding:4px 8px;white-space:nowrap;font-weight:600}._tokenTd_rg6mx_66{flex:1;color:var(--text-primary);text-align:right;padding:4px 8px;font-family:monospace;white-space:nowrap}._tokenHitRate_rg6mx_75{display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--text-primary);padding:4px 8px;font-family:monospace;white-space:nowrap;border-left:1px solid var(--border-secondary);min-width:100px}._tokenHitRateLabel_rg6mx_88{color:var(--text-tertiary);font-size:10px;font-family:sans-serif}._tokenRowBorder_rg6mx_55 td{border-top:1px solid var(--border-secondary)}._urlText_rg6mx_98{color:var(--text-primary);font-size:13px;margin-bottom:8px;word-break:break-all}._metaText_rg6mx_105,._headersContainer_rg6mx_109{font-size:12px}._headerRow_rg6mx_113{display:flex;padding:4px 0;border-bottom:1px solid var(--border-primary)}._headerKey_rg6mx_119{min-width:200px;flex-shrink:0}._headerValue_rg6mx_124{word-break:break-all;margin-left:8px}._streamingBox_rg6mx_129{padding:20px;background:var(--bg-elevated);border-radius:6px;border:1px solid var(--border-primary)}._bodyToolbar_rg6mx_136{display:flex;gap:8px;margin-bottom:8px}._rawTextPre_rg6mx_142{background:var(--bg-code-dark);border:1px solid var(--border-primary);border-radius:6px;padding:12px;font-size:12px;color:var(--text-primary);overflow:auto;max-height:600px;white-space:pre-wrap;word-break:break-all}._tabContent_rg6mx_155{padding:16px 0 0;height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch}._collapseSpacing_rg6mx_163{margin-bottom:16px}._bodyLabel_rg6mx_167{margin:0}._bodyHeader_rg6mx_171{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}._diffSection_rg6mx_178{margin-bottom:16px}._diffToggle_rg6mx_182{display:inline-block;margin-bottom:8px;cursor:pointer}._diffIcon_rg6mx_188{font-size:12px;margin-left:4px}._viewInChatBtn_rg6mx_193{display:inline-flex;align-items:center;height:26px;border-radius:13px;border:1px solid var(--border-light);background:#0000;color:var(--text-tertiary);cursor:pointer;font-size:12px;transition:all .2s;padding:0 10px;white-space:nowrap}._viewInChatBtn_rg6mx_193:hover{border-color:var(--text-muted);color:var(--text-primary);background:var(--overlay-light-faint)}._reminderSelect_rg6mx_214{min-width:140px;font-size:12px}._reminderSelect_rg6mx_214 .ant-select-selector.ant-select-selector{border-radius:2px;border-color:var(--border-light);background:#0000;min-height:26px;height:auto;padding:0 8px;font-family:monospace}._reminderSelect_rg6mx_214 .ant-select-selection-placeholder{font-size:11px}._diffHeaderRow_rg6mx_233{display:flex;align-items:center;gap:8px}._diffSpaceRight_rg6mx_239{margin-left:auto}._reminderFilterWrapper_rg6mx_243{display:inline-flex;align-items:center;gap:4px}._reminderLabel_rg6mx_249{color:var(--text-tertiary);font-size:12px;font-family:monospace}._cacheTabContent_rg6mx_255{padding-top:0;overflow:hidden}._userPromptList_rg6mx_260{width:600px;max-height:300px;overflow-y:auto}._userPromptItem_rg6mx_266{padding:4px 8px;font-size:12px;color:var(--text-secondary);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:3px}._userPromptNavBtn_rg6mx_277{margin-left:auto;font-size:11px;color:var(--color-primary);cursor:pointer;border:1px solid var(--color-primary);border-radius:3px;padding:1px 6px;white-space:nowrap}._cacheContent_rg6mx_288{padding:8px 0;height:100%;display:flex;flex-direction:column}._cacheTokenBar_rg6mx_295{display:flex;align-items:center;font-size:12px;font-family:monospace;color:var(--text-light);margin-bottom:12px;flex-shrink:0}._cacheTokenWrite_rg6mx_305{color:var(--color-code-orange)}._cacheTokenRead_rg6mx_309{color:var(--color-success)}._cacheCopyIcon_rg6mx_313{margin-left:8px;cursor:pointer;color:var(--text-tertiary);transition:color .2s}._cacheScrollArea_rg6mx_320{flex:1;overflow-y:auto;min-height:0}._cacheSectionBlock_rg6mx_326{margin-bottom:12px}._cacheSectionHeader_rg6mx_330{font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:6px;cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:4px}._cacheCollapseArrow_rg6mx_342{display:inline-block;transition:transform .2s;font-size:10px}._cachePre_rg6mx_348{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:var(--text-secondary);background:var(--bg-container);border:1px solid var(--border-primary);border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._cacheHighlightSvg_rg6mx_362{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}._cachePreSystem_rg6mx_371{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:var(--text-secondary);background:var(--bg-code-system);border:1px solid var(--border-code-system);border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._container_rg6mx_1 .ant-tabs>.ant-tabs-nav{margin-bottom:0}._container_rg6mx_1 .ant-tabs{flex:1;min-height:0;display:flex;flex-direction:column}._container_rg6mx_1 .ant-tabs>.ant-tabs-content-holder{flex:1;min-height:0}._container_rg6mx_1 .ant-tabs-content,._container_rg6mx_1 .ant-tabs-tabpane-active{height:100%}._resizer_pzn4b_1{width:6px;cursor:col-resize;background:var(--bg-elevated);flex-shrink:0;transition:background .2s}._resizer_pzn4b_1:hover{background:var(--color-primary-light)}._flag_1q4ri_3{display:inline-flex;align-items:center;justify-content:center;font-size:13px;line-height:1;cursor:help;-webkit-user-select:none;user-select:none;height:14px;background:none;border:none;padding:0;color:inherit;font-family:inherit}._flag_1q4ri_3:focus-visible{outline:2px solid var(--primary-color, #1677ff);outline-offset:2px;border-radius:2px}._popover_1q4ri_27{color:var(--text-secondary);font-size:13px;line-height:22px}._meta_1q4ri_33{color:var(--text-tertiary);font-size:12px}._usagePill_18dz6_4{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;border-radius:999px;border:1px solid;border-color:var(--text-disabled);color:var(--text-disabled);padding:0 7px;height:15px;font-size:11px;line-height:1;overflow:hidden;white-space:nowrap;cursor:default;background:var(--bg-base-pure)}._usageFill_18dz6_12{position:absolute;left:0;top:0;bottom:0;width:var(--usage-percent, 0);background-color:#999;opacity:.2;transition:width .5s ease;pointer-events:none}._usageContent_18dz6_38{position:relative;z-index:1;display:inline-flex;align-items:center}._usageText_18dz6_45{font-variant-numeric:tabular-nums}._muted_18dz6_50{border-color:var(--border-light);color:var(--text-disabled);background:var(--bg-surface)}._pop_18dz6_57{min-width:220px;font-size:12px;color:var(--text-primary)}._popTitle_18dz6_63{font-weight:600;margin-bottom:6px}._popTable_18dz6_69{border-collapse:collapse}._popTable_18dz6_69 td{padding-top:3px;padding-bottom:3px;vertical-align:middle}._tdName_18dz6_74{color:var(--text-secondary);padding-right:5px;white-space:nowrap}._tdBar_18dz6_74{padding-right:5px;white-space:nowrap}._tdReset_18dz6_92{color:var(--text-secondary);font-variant-numeric:tabular-nums;white-space:nowrap}._bar_18dz6_101{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100px;height:14px;border-radius:999px;border:1px solid var(--text-disabled);overflow:hidden;background:var(--bg-base-pure);vertical-align:middle}._barFill_18dz6_115{position:absolute;left:0;top:0;bottom:0;background-color:var(--text-secondary);opacity:.15;pointer-events:none}._barText_18dz6_125{position:relative;z-index:1;font-size:11px;line-height:1;font-variant-numeric:tabular-nums;color:var(--text-primary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty,__publicField=(obj,key,value)=>((obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value:value}):obj[key]=value)(obj,"symbol"!=typeof key?key+"":key,value);import{j as jsxRuntimeExports}from"./vendor-codemirror-Si44UqBp.js";import{a as reactExports,I as Icon,b as _extends,R as React__default,s as staticMethods,M as Modal,C as ConfigProvider,B as Badge,i as Button,j as RefIcon$4,k as RefIcon$5,S as Spin,l as Select,T as Tooltip,m as RefIcon$6,n as Switch,o as Radio,p as RefIcon$7}from"./vendor-antd-Bur5ZxWE.js";import{f as fetchAllRepos,b as buildGitTree,i as isImageFile,I as ImageLightbox,F as FullFileDiffView,u as useSessionStoragePersistedSet,a as ImageViewer,c as FileContentView,l as loadExpandedPaths,s as saveExpandedPaths,d as computeTokenStats,e as computeToolUsageStats,g as computeSkillUsageStats,h as computeCacheRebuildStats,j as classifyRequest,k as sharedChrome,C as ConceptHelp,m as formatTokenCount,A as AppBase,n as appConfig,o as loadFsSkills,p as loadProjectMemory,q as loadClaudeMdList,r as parseImOrigin,t as isSystemText,v as classifyUserContent,w as isMainAgent,x as styles$3,y as getEffectiveModel,z as sumUsageContextTokens,B as sumUsageInputTokens,D as adaptContextWindow,E as getModelMaxTokens,O as OPTIMISTIC_CLEAR_PERCENT,T as TerminalWsProvider,G as ApprovalModal,R as RefIcon$1,H as RefIcon$2,J as ChatView,K as TerminalPanel,L as CachePopoverContent,M as MemoryDetailModal,S as SkillsManagerModal,P as PluginModal,N as ProcessModal,Q as ProxyModal,U as OpenFolderIcon,V as RefIcon$3,W as AUTO_APPROVE_INSTANT,X as VoicePackSettings,Y as ToolApprovalPanel,Z as useProjectAlias}from"./seqResourceLoaders-CC0PRWqk.js";import{a as apiUrl,t,i as isIOS,b as isPad,s as setViewMode,L as LANG_OPTIONS,c as setLang,g as getLang}from"./index-DgGJTx-b.js";import"./vendor-mdxeditor-Cco3AQJS.js";import"./vendor-xterm-DckPrCx1.js";import"./vendor-markdown-DOJHsAxX.js";import"./vendor-highlight-IFTJ9nxW.js";import"./vendor-virtuoso-CW9EqKMt.js";var RollbackOutlined$1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},RollbackOutlined=function(props,ref){return reactExports.createElement(Icon,_extends({},props,{ref:ref,icon:RollbackOutlined$1}))},RefIcon=reactExports.forwardRef(RollbackOutlined);const styles$2_container="_container_tjqxo_1",styles$2_fileListSection="_fileListSection_tjqxo_10",styles$2_header="_header_tjqxo_19",styles$2_headerLeft="_headerLeft_tjqxo_28",styles$2_headerTitle="_headerTitle_tjqxo_34",styles$2_fileCount="_fileCount_tjqxo_42",styles$2_closeBtn="_closeBtn_tjqxo_50",styles$2_changesContainer="_changesContainer_tjqxo_66",styles$2_changeItem="_changeItem_tjqxo_73",styles$2_changeItemActive="_changeItemActive_tjqxo_90",styles$2_dirItem="_dirItem_tjqxo_99",styles$2_dirArrow="_dirArrow_tjqxo_110",styles$2_dirName="_dirName_tjqxo_119",styles$2_status="_status_tjqxo_124",styles$2_icon="_icon_tjqxo_133",styles$2_fileName="_fileName_tjqxo_142",styles$2_diffSection="_diffSection_tjqxo_149",styles$2_diffHeader="_diffHeader_tjqxo_157",styles$2_diffFilePath="_diffFilePath_tjqxo_167",styles$2_diffBadge="_diffBadge_tjqxo_177",styles$2_diffContent="_diffContent_tjqxo_189",styles$2_diffPlaceholder="_diffPlaceholder_tjqxo_195",styles$2_statusText="_statusText_tjqxo_206",styles$2_errorText="_errorText_tjqxo_213",styles$2_emptyText="_emptyText_tjqxo_220",styles$2_warningText="_warningText_tjqxo_227",styles$2_fileSizeNote="_fileSizeNote_tjqxo_239",styles$2_statusTextItalic="_statusTextItalic_tjqxo_244",styles$2_imagePreviewWrap="_imagePreviewWrap_tjqxo_248",styles$2_imagePreview="_imagePreview_tjqxo_248",styles$2_rotated90="_rotated90_tjqxo_264",styles$2_repoHeader="_repoHeader_tjqxo_269",styles$2_repoArrow="_repoArrow_tjqxo_288",styles$2_repoArrowExpanded="_repoArrowExpanded_tjqxo_299",styles$2_repoName="_repoName_tjqxo_303",styles$2_repoBadge="_repoBadge_tjqxo_310",STATUS_COLORS={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},STATUS_LABELS={"??":"U"},EXT_COLORS$1={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function getFileIcon$1(name){const ext=name.includes(".")?name.split(".").pop().toLowerCase():"",color=EXT_COLORS$1[ext]||"#888";return jsxRuntimeExports.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:color,strokeWidth:"1.5",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsxRuntimeExports.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function TreeDir({name:name,node:node,depth:depth,selectedFile:selectedFile,selectedRepo:selectedRepo,repoPath:repoPath,onFileClick:onFileClick}){const dirNames=Object.keys(node.dirs).sort(),files=[...node.files].sort((a,b)=>a.name.localeCompare(b.name));return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[name&&jsxRuntimeExports.jsxs("div",{className:styles$2_dirItem,style:{paddingLeft:8+16*depth},children:[jsxRuntimeExports.jsx("span",{className:styles$2_dirArrow,children:jsxRuntimeExports.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:styles$2_rotated90,children:jsxRuntimeExports.jsx("polyline",{points:"9 6 15 12 9 18"})})}),jsxRuntimeExports.jsx("span",{className:styles$2_icon,children:jsxRuntimeExports.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:jsxRuntimeExports.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}),jsxRuntimeExports.jsx("span",{className:styles$2_dirName,children:name})]}),dirNames.map(dir=>jsxRuntimeExports.jsx(TreeDir,{name:dir,node:node.dirs[dir],depth:name?depth+1:depth,selectedFile:selectedFile,selectedRepo:selectedRepo,repoPath:repoPath,onFileClick:onFileClick},dir)),files.map(file=>jsxRuntimeExports.jsxs("div",{className:`${styles$2_changeItem} ${selectedFile===file.fullPath&&selectedRepo===repoPath?styles$2_changeItemActive:""}`,style:{paddingLeft:8+16*(name?depth+1:depth)},onClick:()=>onFileClick&&onFileClick(repoPath,file.fullPath),children:[jsxRuntimeExports.jsx("span",{className:styles$2_icon,children:getFileIcon$1(file.name)}),jsxRuntimeExports.jsx("span",{className:styles$2_fileName,children:file.name}),jsxRuntimeExports.jsx("span",{className:styles$2_status,style:{color:STATUS_COLORS[file.status]||"#888"},children:STATUS_LABELS[file.status]||file.status})]},file.fullPath))]})}function MobileGitDiff({visible:visible,onClose:onClose}){const[repos,setRepos]=reactExports.useState(null),[error,setError]=reactExports.useState(null),[loading,setLoading]=reactExports.useState(!0),[selectedFile,setSelectedFile]=reactExports.useState(null),[selectedRepo,setSelectedRepo]=reactExports.useState(null),[collapsedRepos,setCollapsedRepos]=reactExports.useState(new Set),[diffData,setDiffData]=reactExports.useState(null),[diffError,setDiffError]=reactExports.useState(null),[diffLoading,setDiffLoading]=reactExports.useState(!1),[lightboxOpen,setLightboxOpen]=reactExports.useState(!1),mounted=reactExports.useRef(!0);reactExports.useEffect(()=>{if(mounted.current=!0,visible)return setLoading(!0),setError(null),fetchAllRepos().then(results=>{mounted.current&&(setRepos(results),setLoading(!1))}).catch(()=>{mounted.current&&(setError("Failed to load git status"),setLoading(!1))}),()=>{mounted.current=!1}},[visible]),reactExports.useEffect(()=>{if(!selectedFile||!selectedRepo)return setDiffData(null),void setDiffError(null);setDiffLoading(!0),setDiffData(null),setDiffError(null);const repoParam=selectedRepo&&"."!==selectedRepo?`&repo=${encodeURIComponent(selectedRepo)}`:"";fetch(apiUrl(`/api/git-diff?files=${encodeURIComponent(selectedFile)}${repoParam}`)).then(r=>{if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}).then(data=>{mounted.current&&(data.diffs&&data.diffs[0]?setDiffData(data.diffs[0]):setDiffError("No diff data available"),setDiffLoading(!1))}).catch(err=>{mounted.current&&(setDiffError(`${t("ui.fileLoadError")}: ${err.message}`),setDiffLoading(!1))})},[selectedFile,selectedRepo]);const totalChanges=reactExports.useMemo(()=>repos?repos.reduce((sum,r)=>sum+r.changes.length,0):0,[repos]),isSingleRepo=!repos||repos.length<=1,handleFileClick=(repoPath,filePath)=>{setSelectedFile(filePath),setSelectedRepo(repoPath)},diffDisplayPath=selectedFile&&selectedRepo&&"."!==selectedRepo?`${selectedRepo}/${selectedFile}`:selectedFile;return jsxRuntimeExports.jsxs("div",{className:styles$2_container,children:[jsxRuntimeExports.jsxs("div",{className:styles$2_fileListSection,children:[jsxRuntimeExports.jsxs("div",{className:styles$2_header,children:[jsxRuntimeExports.jsxs("div",{className:styles$2_headerLeft,children:[jsxRuntimeExports.jsx("span",{className:styles$2_headerTitle,children:t("ui.gitChanges")}),jsxRuntimeExports.jsx("span",{className:styles$2_fileCount,children:totalChanges})]}),onClose&&jsxRuntimeExports.jsx("button",{className:styles$2_closeBtn,onClick:onClose,children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntimeExports.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),jsxRuntimeExports.jsxs("div",{className:styles$2_changesContainer,children:[loading&&jsxRuntimeExports.jsx("div",{className:styles$2_statusText,children:"Loading..."}),error&&jsxRuntimeExports.jsx("div",{className:styles$2_errorText,children:error}),!loading&&!error&&(!repos||0===repos.length)&&jsxRuntimeExports.jsx("div",{className:styles$2_emptyText,children:"No changes"}),!loading&&!error&&repos&&repos.map(repo=>{const collapsed=collapsedRepos.has(repo.path);return isSingleRepo?jsxRuntimeExports.jsx(TreeDir,{name:"",node:buildGitTree(repo.changes),depth:0,selectedFile:selectedFile,selectedRepo:selectedRepo,repoPath:repo.path,onFileClick:handleFileClick},repo.path):jsxRuntimeExports.jsxs(React__default.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:styles$2_repoHeader,onClick:()=>setCollapsedRepos(prev=>{const next=new Set(prev);return collapsed?next.delete(repo.path):next.add(repo.path),next}),children:[jsxRuntimeExports.jsx("span",{className:`${styles$2_repoArrow} ${collapsed?"":styles$2_repoArrowExpanded}`,children:jsxRuntimeExports.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntimeExports.jsx("polyline",{points:"9 6 15 12 9 18"})})}),jsxRuntimeExports.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),jsxRuntimeExports.jsx("circle",{cx:"18",cy:"6",r:"3"}),jsxRuntimeExports.jsx("circle",{cx:"6",cy:"18",r:"3"}),jsxRuntimeExports.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),jsxRuntimeExports.jsx("span",{className:styles$2_repoName,children:repo.name}),jsxRuntimeExports.jsx("span",{className:styles$2_repoBadge,children:repo.changes.length})]}),!collapsed&&jsxRuntimeExports.jsx(TreeDir,{name:"",node:buildGitTree(repo.changes),depth:1,selectedFile:selectedFile,selectedRepo:selectedRepo,repoPath:repo.path,onFileClick:handleFileClick})]},repo.path)})]})]}),jsxRuntimeExports.jsx("div",{className:styles$2_diffSection,children:selectedFile?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:styles$2_diffHeader,children:[jsxRuntimeExports.jsx("span",{className:styles$2_diffFilePath,children:diffDisplayPath}),jsxRuntimeExports.jsx("span",{className:styles$2_diffBadge,children:"DIFF"})]}),jsxRuntimeExports.jsxs("div",{className:styles$2_diffContent,children:[diffLoading&&jsxRuntimeExports.jsx("div",{className:styles$2_statusText,children:t("ui.loading")}),diffError&&jsxRuntimeExports.jsx("div",{className:styles$2_errorText,children:diffError}),!diffLoading&&!diffError&&diffData&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:diffData.is_large?jsxRuntimeExports.jsxs("div",{className:styles$2_warningText,children:[jsxRuntimeExports.jsx("p",{children:t("ui.largeFileWarning")}),jsxRuntimeExports.jsxs("p",{className:styles$2_fileSizeNote,children:[t("ui.fileSize"),": ",(diffData.size/1048576).toFixed(2)," MB"]})]}):isImageFile(selectedFile)&&!diffData.is_deleted?jsxRuntimeExports.jsxs("div",{className:styles$2_imagePreviewWrap,children:[jsxRuntimeExports.jsx("img",{className:styles$2_imagePreview,src:apiUrl(`/api/file-raw?path=${encodeURIComponent(diffDisplayPath)}`),alt:selectedFile,onClick:()=>setLightboxOpen(!0)}),lightboxOpen&&jsxRuntimeExports.jsx(ImageLightbox,{src:apiUrl(`/api/file-raw?path=${encodeURIComponent(diffDisplayPath)}`),alt:selectedFile,onClose:()=>setLightboxOpen(!1)})]}):diffData.is_binary?jsxRuntimeExports.jsx("div",{className:`${styles$2_statusText} ${styles$2_statusTextItalic}`,children:t("ui.binaryFileNotice")}):jsxRuntimeExports.jsx(FullFileDiffView,{file_path:selectedFile,old_string:diffData.old_content,new_string:diffData.new_content})})]})]}):jsxRuntimeExports.jsxs("div",{className:styles$2_diffPlaceholder,children:[jsxRuntimeExports.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[jsxRuntimeExports.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),jsxRuntimeExports.jsx("circle",{cx:"18",cy:"6",r:"3"}),jsxRuntimeExports.jsx("circle",{cx:"6",cy:"18",r:"3"}),jsxRuntimeExports.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),jsxRuntimeExports.jsx("span",{children:t("ui.mobileGitDiffHint")})]})})]})}const styles$1_container="_container_1hzyt_1",styles$1_fileListSection="_fileListSection_1hzyt_10",styles$1_header="_header_1hzyt_19",styles$1_headerLeft="_headerLeft_1hzyt_28",styles$1_headerTitle="_headerTitle_1hzyt_34",styles$1_fileCount="_fileCount_1hzyt_42",styles$1_closeBtn="_closeBtn_1hzyt_50",styles$1_treeContainer="_treeContainer_1hzyt_66",styles$1_treeItem="_treeItem_1hzyt_73",styles$1_treeItemActive="_treeItemActive_1hzyt_90",styles$1_treeItemIgnored="_treeItemIgnored_1hzyt_99",styles$1_arrow="_arrow_1hzyt_103",styles$1_arrowExpanded="_arrowExpanded_1hzyt_113",styles$1_icon="_icon_1hzyt_117",styles$1_fileName="_fileName_1hzyt_126",styles$1_contentSection="_contentSection_1hzyt_133",styles$1_contentPlaceholder="_contentPlaceholder_1hzyt_141",styles$1_statusText="_statusText_1hzyt_152",styles$1_errorText="_errorText_1hzyt_159",styles$1_emptyText="_emptyText_1hzyt_166",EXT_COLORS={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function getFileIcon(name){const ext=name.includes(".")?name.split(".").pop().toLowerCase():"",color=EXT_COLORS[ext]||"#888";return jsxRuntimeExports.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:color,strokeWidth:"1.5",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsxRuntimeExports.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function MobileTreeNode({item:item,path:path,depth:depth,expandedPaths:expandedPaths,onToggleExpand:onToggleExpand,currentFile:currentFile,onFileClick:onFileClick}){const[children,setChildren]=reactExports.useState(null),[loading,setLoading]=reactExports.useState(!1),childPath=path?`${path}/${item.name}`:item.name,expanded=expandedPaths.has(childPath),isDir="directory"===item.type,isSelected=!isDir&¤tFile===childPath,isGitIgnored=item.gitIgnored||!1;reactExports.useEffect(()=>{isDir&&expanded&&null===children&&!loading&&(setLoading(!0),fetch(apiUrl(`/api/files?path=${encodeURIComponent(childPath)}`)).then(r=>r.ok?r.json():Promise.reject()).then(data=>{setChildren(data),setLoading(!1)}).catch(()=>{setLoading(!1)}))},[expanded]);const handleClick=reactExports.useCallback(()=>{isDir?onToggleExpand(childPath):onFileClick(childPath)},[isDir,childPath,onToggleExpand,onFileClick]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:`${styles$1_treeItem} ${isSelected?styles$1_treeItemActive:""} ${isGitIgnored?styles$1_treeItemIgnored:""}`,style:{paddingLeft:8+16*depth},onClick:handleClick,children:[isDir?jsxRuntimeExports.jsx("span",{className:`${styles$1_arrow} ${expanded?styles$1_arrowExpanded:""}`,children:jsxRuntimeExports.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntimeExports.jsx("polyline",{points:"9 6 15 12 9 18"})})}):jsxRuntimeExports.jsx("span",{style:{width:16,flexShrink:0}}),jsxRuntimeExports.jsx("span",{className:styles$1_icon,children:isDir?jsxRuntimeExports.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:jsxRuntimeExports.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})}):getFileIcon(item.name)}),jsxRuntimeExports.jsx("span",{className:styles$1_fileName,children:item.name}),loading&&jsxRuntimeExports.jsx("span",{style:{fontSize:10,color:"var(--text-disabled)"},children:"..."})]}),isDir&&expanded&&children&&children.map(child=>jsxRuntimeExports.jsx(MobileTreeNode,{item:child,path:childPath,depth:depth+1,expandedPaths:expandedPaths,onToggleExpand:onToggleExpand,currentFile:currentFile,onFileClick:onFileClick},child.name))]})}function MobileFileExplorer({visible:visible,onClose:onClose,targetFile:targetFile,projectName:projectName}){const[items,setItems]=reactExports.useState(null),[loading,setLoading]=reactExports.useState(!0),[error,setError]=reactExports.useState(null),[expandedPaths,setExpandedPaths]=useSessionStoragePersistedSet({projectName:projectName,load:loadExpandedPaths,save:saveExpandedPaths}),[currentFile,setCurrentFile]=reactExports.useState(null),mounted=reactExports.useRef(!0),lastTargetRef=reactExports.useRef(null);reactExports.useEffect(()=>(mounted.current=!0,visible?(setLoading(!0),setError(null),fetch(apiUrl("/api/files?path=")).then(r=>r.ok?r.json():Promise.reject()).then(data=>{mounted.current&&(setItems(data),setLoading(!1))}).catch(()=>{mounted.current&&(setError(t("ui.fileLoadError")),setLoading(!1))}),()=>{mounted.current=!1}):(setCurrentFile(null),void(lastTargetRef.current=null))),[visible]),reactExports.useEffect(()=>{targetFile&&visible&&lastTargetRef.current!==targetFile.file&&(lastTargetRef.current=targetFile.file,setCurrentFile(targetFile.file),targetFile.ancestors&&targetFile.ancestors.length>0&&setExpandedPaths(prev=>{const next=new Set(prev);return targetFile.ancestors.forEach(p=>next.add(p)),next}))},[targetFile,visible]);const handleToggleExpand=reactExports.useCallback(path=>{setExpandedPaths(prev=>{const next=new Set(prev);return next.has(path)?next.delete(path):next.add(path),next})},[]),handleFileClick=reactExports.useCallback(path=>{setCurrentFile(path)},[]),handleFileClose=reactExports.useCallback(()=>{setCurrentFile(null)},[]),itemCount=items?items.length:0;return jsxRuntimeExports.jsxs("div",{className:styles$1_container,children:[jsxRuntimeExports.jsxs("div",{className:styles$1_fileListSection,children:[jsxRuntimeExports.jsxs("div",{className:styles$1_header,children:[jsxRuntimeExports.jsxs("div",{className:styles$1_headerLeft,children:[jsxRuntimeExports.jsx("span",{className:styles$1_headerTitle,children:t("ui.projectFolder")}),jsxRuntimeExports.jsx("span",{className:styles$1_fileCount,children:itemCount})]}),onClose&&jsxRuntimeExports.jsx("button",{className:styles$1_closeBtn,onClick:onClose,children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntimeExports.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),jsxRuntimeExports.jsxs("div",{className:styles$1_treeContainer,children:[loading&&jsxRuntimeExports.jsx("div",{className:styles$1_statusText,children:t("ui.loading")}),error&&jsxRuntimeExports.jsx("div",{className:styles$1_errorText,children:t("ui.fileLoadError")}),!loading&&!error&&(!items||0===items.length)&&jsxRuntimeExports.jsx("div",{className:styles$1_emptyText,children:t("ui.mobileFileExplorerHint")}),!loading&&!error&&items&&items.map(item=>jsxRuntimeExports.jsx(MobileTreeNode,{item:item,path:"",depth:0,expandedPaths:expandedPaths,onToggleExpand:handleToggleExpand,currentFile:currentFile,onFileClick:handleFileClick},item.name))]})]}),jsxRuntimeExports.jsx("div",{className:styles$1_contentSection,children:currentFile?isImageFile(currentFile)?jsxRuntimeExports.jsx(ImageViewer,{filePath:currentFile,onClose:handleFileClose}):jsxRuntimeExports.jsx(FileContentView,{filePath:currentFile,onClose:handleFileClose}):jsxRuntimeExports.jsxs("div",{className:styles$1_contentPlaceholder,children:[jsxRuntimeExports.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:jsxRuntimeExports.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})}),jsxRuntimeExports.jsx("span",{children:t("ui.mobileFileExplorerHint")})]})})]})}const styles_container="_container_1bb9n_1",styles_header="_header_1bb9n_9",styles_headerTitle="_headerTitle_1bb9n_18",styles_closeBtn="_closeBtn_1bb9n_24",styles_content="_content_1bb9n_38",styles_empty="_empty_1bb9n_47",styles_fixedTable="_fixedTable_1bb9n_54",styles_ellipsisCell="_ellipsisCell_1bb9n_58",styles_thLeft="_thLeft_1bb9n_65",styles_colWide="_colWide_1bb9n_69",styles_colNarrow="_colNarrow_1bb9n_73",REASON_KEYS=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],I18N_MAP={ttl:"cacheLoss.ttl",system_change:"cacheLoss.systemChange",tools_change:"cacheLoss.toolsChange",model_change:"cacheLoss.modelChange",msg_truncated:"cacheLoss.msgTruncated",msg_modified:"cacheLoss.msgModified",key_change:"cacheLoss.keyChange"};function MobileStats({requests:requests=[],visible:visible,onClose:onClose}){const{byModel:byModel,models:models,toolStats:toolStats,skillStats:skillStats,cacheStats:cacheStats,activeReasons:activeReasons,totalCount:totalCount,totalCache:totalCache,hasCacheStats:hasCacheStats,subAgentEntries:subAgentEntries,hasSubAgentStats:hasSubAgentStats,teammateEntries:teammateEntries,hasTeammateStats:hasTeammateStats,isEmpty:isEmpty}=reactExports.useMemo(()=>{const byModel2=computeTokenStats(requests),models2=Object.keys(byModel2),toolStats2=computeToolUsageStats(requests),skillStats2=computeSkillUsageStats(requests),cacheStats2=computeCacheRebuildStats(requests),activeReasons2=REASON_KEYS.filter(k=>cacheStats2[k].count>0),totalCount2=activeReasons2.reduce((sum,k)=>sum+cacheStats2[k].count,0),totalCache2=activeReasons2.reduce((sum,k)=>sum+cacheStats2[k].cacheCreate,0),hasCacheStats2=activeReasons2.length>0,subAgentCounts={},teammateCounts={};for(let i=0;i<requests.length;i++){const cls=classifyRequest(requests[i],requests[i+1]);if("SubAgent"===cls.type){const label=cls.subType||"Other";subAgentCounts[label]=(subAgentCounts[label]||0)+1}else if("Teammate"===cls.type){const label=cls.subType||"Teammate";teammateCounts[label]=(teammateCounts[label]||0)+1}}const subAgentEntries2=Object.entries(subAgentCounts).sort((a,b)=>b[1]-a[1]),hasSubAgentStats2=subAgentEntries2.length>0,teammateEntries2=Object.entries(teammateCounts).sort((a,b)=>b[1]-a[1]),hasTeammateStats2=teammateEntries2.length>0,isEmpty2=0===models2.length&&0===toolStats2.length&&!hasCacheStats2&&!hasSubAgentStats2&&!hasTeammateStats2&&0===skillStats2.length;return{byModel:byModel2,models:models2,toolStats:toolStats2,skillStats:skillStats2,cacheStats:cacheStats2,activeReasons:activeReasons2,totalCount:totalCount2,totalCache:totalCache2,hasCacheStats:hasCacheStats2,subAgentEntries:subAgentEntries2,hasSubAgentStats:hasSubAgentStats2,teammateEntries:teammateEntries2,hasTeammateStats:hasTeammateStats2,isEmpty:isEmpty2}},[requests]);return visible?jsxRuntimeExports.jsxs("div",{className:styles_container,children:[jsxRuntimeExports.jsxs("div",{className:styles_header,children:[jsxRuntimeExports.jsx("span",{className:styles_headerTitle,children:t("ui.tokenStats")}),jsxRuntimeExports.jsx("button",{className:styles_closeBtn,onClick:onClose,children:jsxRuntimeExports.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntimeExports.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),jsxRuntimeExports.jsx("div",{className:styles_content,children:isEmpty?jsxRuntimeExports.jsx("div",{className:styles_empty,children:"—"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[skillStats.length>0&&jsxRuntimeExports.jsxs("div",{className:sharedChrome.modelCard,children:[jsxRuntimeExports.jsx("div",{className:sharedChrome.modelName,children:t("ui.skillUsageStats")}),jsxRuntimeExports.jsxs("table",{className:sharedChrome.statsTable,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:`${sharedChrome.th} ${styles_thLeft}`,children:"Skill"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:t("ui.cacheRebuild.count")})]})}),jsxRuntimeExports.jsxs("tbody",{children:[skillStats.map(([name,count])=>jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rowBorder,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:name}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:count})]},name)),skillStats.length>1&&jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rebuildTotalRow,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:"Total"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:skillStats.reduce((s,e)=>s+e[1],0)})]})]})]})]}),hasSubAgentStats&&jsxRuntimeExports.jsxs("div",{className:sharedChrome.modelCard,children:[jsxRuntimeExports.jsx("div",{className:sharedChrome.modelName,children:t("ui.subAgentStats")}),jsxRuntimeExports.jsxs("table",{className:sharedChrome.statsTable,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:`${sharedChrome.th} ${styles_thLeft}`,children:"SubAgent"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:t("ui.cacheRebuild.count")})]})}),jsxRuntimeExports.jsxs("tbody",{children:[subAgentEntries.map(([name,count])=>jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rowBorder,children:[jsxRuntimeExports.jsxs("td",{className:sharedChrome.label,children:[name," ",jsxRuntimeExports.jsx(ConceptHelp,{doc:`SubAgent-${name}`})]}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:count})]},name)),subAgentEntries.length>1&&jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rebuildTotalRow,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:"Total"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:subAgentEntries.reduce((s,e)=>s+e[1],0)})]})]})]})]}),hasTeammateStats&&jsxRuntimeExports.jsxs("div",{className:sharedChrome.modelCard,children:[jsxRuntimeExports.jsx("div",{className:sharedChrome.modelName,children:"Teammate"}),jsxRuntimeExports.jsxs("table",{className:sharedChrome.statsTable,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:`${sharedChrome.th} ${styles_thLeft}`,children:"Name"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:t("ui.cacheRebuild.count")})]})}),jsxRuntimeExports.jsxs("tbody",{children:[teammateEntries.map(([name,count])=>jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rowBorder,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:name}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:count})]},name)),teammateEntries.length>1&&jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rebuildTotalRow,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:"Total"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:teammateEntries.reduce((s,e)=>s+e[1],0)})]})]})]})]}),toolStats.length>0&&jsxRuntimeExports.jsxs("div",{className:sharedChrome.modelCard,children:[jsxRuntimeExports.jsx("div",{className:sharedChrome.modelName,children:t("ui.toolUsageStats")}),jsxRuntimeExports.jsxs("table",{className:sharedChrome.statsTable,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:`${sharedChrome.th} ${styles_thLeft}`,children:"Tool"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:t("ui.cacheRebuild.count")})]})}),jsxRuntimeExports.jsxs("tbody",{children:[toolStats.map(([name,count])=>jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rowBorder,children:[jsxRuntimeExports.jsxs("td",{className:sharedChrome.label,children:[name," ",jsxRuntimeExports.jsx(ConceptHelp,{doc:`Tool-${name}`})]}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:count})]},name)),toolStats.length>1&&jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rebuildTotalRow,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:"Total"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:toolStats.reduce((s,e)=>s+e[1],0)})]})]})]})]}),hasCacheStats&&jsxRuntimeExports.jsxs("div",{className:sharedChrome.modelCard,children:[jsxRuntimeExports.jsxs("div",{className:sharedChrome.modelName,children:["MainAgent",jsxRuntimeExports.jsx(ConceptHelp,{doc:"MainAgent"})," ",t("ui.cacheRebuildStats"),jsxRuntimeExports.jsx(ConceptHelp,{doc:"CacheRebuild"})]}),jsxRuntimeExports.jsxs("table",{className:`${sharedChrome.statsTable} ${styles_fixedTable}`,children:[jsxRuntimeExports.jsxs("colgroup",{children:[jsxRuntimeExports.jsx("col",{className:styles_colWide}),jsxRuntimeExports.jsx("col",{className:styles_colNarrow}),jsxRuntimeExports.jsx("col",{className:styles_colNarrow})]}),jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:`${sharedChrome.th} ${styles_thLeft}`,children:t("ui.cacheRebuild.reason")}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:t("ui.cacheRebuild.count")}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:t("ui.cacheRebuild.cacheCreate")})]})}),jsxRuntimeExports.jsxs("tbody",{children:[activeReasons.map(k=>jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rowBorder,children:[jsxRuntimeExports.jsx("td",{className:`${sharedChrome.label} ${styles_ellipsisCell}`,title:t(`ui.${I18N_MAP[k]}`),children:t(`ui.${I18N_MAP[k]}`)}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:cacheStats[k].count}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:formatTokenCount(cacheStats[k].cacheCreate)})]},k)),activeReasons.length>1&&jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rebuildTotalRow,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:"Total"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:totalCount}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:formatTokenCount(totalCache)})]})]})]})]}),models.map(model=>{const s=byModel[model],totalInput=s.input+s.cacheCreation+s.cacheRead,cacheHitRate=totalInput>0?(s.cacheRead/totalInput*100).toFixed(1):"0.0";return jsxRuntimeExports.jsxs("div",{className:sharedChrome.modelCard,children:[jsxRuntimeExports.jsx("div",{className:sharedChrome.modelName,children:model}),jsxRuntimeExports.jsx("table",{className:sharedChrome.statsTable,children:jsxRuntimeExports.jsxs("tbody",{children:[jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:"Token"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:"input"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:"output"})]}),jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rowBorder,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:formatTokenCount(totalInput)}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:formatTokenCount(s.output)})]}),jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:"Cache"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:"create"}),jsxRuntimeExports.jsx("td",{className:sharedChrome.th,children:"read"})]}),jsxRuntimeExports.jsxs("tr",{className:sharedChrome.rowBorder,children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:formatTokenCount(s.cacheCreation)}),jsxRuntimeExports.jsx("td",{className:sharedChrome.td,children:formatTokenCount(s.cacheRead)})]}),jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:sharedChrome.label,children:t("ui.hitRate")}),jsxRuntimeExports.jsxs("td",{colSpan:2,className:sharedChrome.td,children:[cacheHitRate,"%"]})]})]})})]},model)})]})})]}):null}const CALIBRATION_MODELS=appConfig.calibrationModels;function MobileCtxLabelText({projectName:projectName}){const alias=useProjectAlias(projectName),base=`${t("ui.liveMonitoring")}${projectName?`: ${projectName}`:""}`;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[base,alias?` (${alias})`:""]})}const _Mobile=class _Mobile extends AppBase{constructor(props){var v;super(props),__publicField(this,"handleCalibrationModelChange",value=>{this.setState({calibrationModel:value}),localStorage.setItem("ccv_calibrationModel",value)}),__publicField(this,"reloadFsSkills",async()=>loadFsSkills(this,{isLocalLog:this._isLocalLog})),__publicField(this,"handleOpenSkillsModal",async()=>{const cached=this.state._fsSkills,needFetch=!Array.isArray(cached);if(this.setState(prev=>{var _a;return{_skillsModal:{open:!0,loading:needFetch,skills:Array.isArray(cached)?cached:[],error:null,toggling:(null==(_a=prev._skillsModal)?void 0:_a.toggling)||new Set},mobileCachePanelVisible:!1}},()=>this._onCachePanelOpenChange(!1)),needFetch){const result=await this.reloadFsSkills();this.setState(prev=>({_skillsModal:{...prev._skillsModal,loading:!1,skills:result.ok?result.skills:[],error:result.ok?null:result.reason}}))}}),__publicField(this,"handleToggleSkill",async skill=>{var _a,_b;const key=`${skill.source}-${skill.name}`;if(null==(_b=null==(_a=this.state._skillsModal)?void 0:_a.toggling)?void 0:_b.has(key))return;const enable=!skill.enabled,flipEnabled=target=>s=>s.source===skill.source&&s.name===skill.name?{...s,enabled:target}:s;this.setState(prev=>{const next=new Set(prev._skillsModal.toggling);return next.add(key),{_skillsModal:{...prev._skillsModal,toggling:next,skills:prev._skillsModal.skills.map(flipEnabled(enable))}}});try{const r=await fetch(apiUrl("/api/skills/toggle"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:skill.source,name:skill.name,enable:enable})}),data=await r.json();if(!r.ok)return this.setState(prev=>({_skillsModal:{...prev._skillsModal,skills:prev._skillsModal.skills.map(flipEnabled(!enable))}})),void("DEST_CONFLICT"===data.code?staticMethods.error(t("ui.skillToggleConflict",{name:skill.name})):staticMethods.error(t("ui.skillToggleFailed",{reason:data.error||"unknown"})));this.setState(prev=>({_fsSkills:Array.isArray(prev._fsSkills)?prev._fsSkills.map(s=>s.source===skill.source&&s.name===skill.name?{...s,enabled:enable}:s):prev._fsSkills}));const result=await this.reloadFsSkills();result.ok&&this.setState(prev=>{const orderMap=new Map(prev._skillsModal.skills.map((s,i)=>[`${s.source}-${s.name}`,i])),merged=[...result.skills].sort((a,b)=>{const ai=orderMap.get(`${a.source}-${a.name}`),bi=orderMap.get(`${b.source}-${b.name}`);return void 0===ai&&void 0===bi?0:void 0===ai?1:void 0===bi?-1:ai-bi});return{_skillsModal:{...prev._skillsModal,skills:merged}}})}catch(e){this.setState(prev=>({_skillsModal:{...prev._skillsModal,skills:prev._skillsModal.skills.map(flipEnabled(!enable))}})),staticMethods.error(t("ui.skillToggleFailed",{reason:e.message}))}finally{this.setState(prev=>{const next=new Set(prev._skillsModal.toggling);return next.delete(key),{_skillsModal:{...prev._skillsModal,toggling:next}}})}}),__publicField(this,"loadMemory",async()=>loadProjectMemory(this)),__publicField(this,"handleRefreshMemory",async()=>{if(this.state._memoryRefreshing)return;this.setState({_memoryRefreshing:!0});const seq=++this._memorySeq;let ok=!1,stale=!1;try{const r=await fetch(apiUrl("/api/project-memory")),data=await r.json();seq!==this._memorySeq?stale=!0:r.ok?(this.setState({_memory:data}),ok=!0):this.setState({_memory:!1})}catch{seq!==this._memorySeq?stale=!0:this.setState({_memory:!1})}finally{stale||this.setState({_memoryRefreshing:!1})}stale||(ok?staticMethods.success(t("ui.memoryRefreshSuccess")):staticMethods.error(t("ui.memoryRefreshFailed"),5))}),__publicField(this,"loadMemoryDetail",async name=>{const seq=++this._memoryDetailSeq;this.setState({_memoryDetail:{name:name,loading:!0}});try{const r=await fetch(apiUrl(`/api/project-memory?file=${encodeURIComponent(name)}`)),data=await r.json();if(seq!==this._memoryDetailSeq)return;if(!r.ok)return void this.setState({_memoryDetail:{name:name,error:data.error||`http:${r.status}`}});this.setState({_memoryDetail:{name:name,content:data.content||""}})}catch(e){seq===this._memoryDetailSeq&&this.setState({_memoryDetail:{name:name,error:e.message||"network"}})}}),__publicField(this,"_onCachePanelOpenChange",open=>{open&&null===this.state._fsSkills&&!this._isLocalLog&&this.reloadFsSkills(),open&&null===this.state._memory&&this.loadMemory(),open&&null===this.state._claudeMd&&this.loadClaudeMdList()}),__publicField(this,"loadClaudeMdList",async()=>loadClaudeMdList(this)),__publicField(this,"loadClaudeMdDetail",async(id,tail,scope)=>{const seq=++this._claudeMdDetailSeq,title=`${t("global"===scope?"ui.claudeMdScopeGlobal":"ui.claudeMdScopeProject")} · ${tail}`;this.setState({_claudeMdDetail:{name:title,loading:!0}});try{const r=await fetch(apiUrl(`/api/claude-md?id=${encodeURIComponent(id)}`)),data=await r.json();if(seq!==this._claudeMdDetailSeq)return;if(!r.ok)return void this.setState({_claudeMdDetail:{name:title,error:data.error||`http:${r.status}`}});this.setState({_claudeMdDetail:{name:title,content:data.content||""}})}catch(e){seq===this._claudeMdDetailSeq&&this.setState({_claudeMdDetail:{name:title,error:e.message||"network"}})}}),__publicField(this,"_handleMobileOpenFile",(filePath,ancestors)=>{this.state.localLogFile||this.setState({...this._closeAllMobileOverlays(),mobileFileExplorerVisible:!0,mobileFileExplorerTarget:{file:filePath,ancestors:ancestors||[]}})}),__publicField(this,"handleExportPromptsTxt",prompts=>{if(!prompts||0===prompts.length)return;const blocks=[];for(const p of prompts){const lines=[],ts=p.timestamp?new Date(p.timestamp).toLocaleString():"";ts&&lines.push(`${ts}:\n`);const textParts=(p.segments||[]).filter(seg=>"text"===seg.type).map(seg=>seg.content);textParts.length>0&&lines.push(textParts.join("\n")),blocks.push(lines.join("\n"))}if(0===blocks.length)return;const blob=new Blob([blocks.join("\n\n\n\n")],{type:"text/plain;charset=utf-8"}),url=URL.createObjectURL(blob),a=document.createElement("a");a.href=url,a.download=`user-prompts-${(new Date).toISOString().slice(0,10)}.txt`,a.click(),URL.revokeObjectURL(url)}),__publicField(this,"handlePendingPermission",data=>{this.setState({globalPermission:data})}),__publicField(this,"handlePendingPlanApproval",data=>{this.setState({globalPlanApproval:data})}),__publicField(this,"handleAutoApproveChange",seconds=>{this.setState({autoApproveSeconds:seconds}),this.context.updatePreferences({autoApproveSeconds:seconds})}),__publicField(this,"_handleTerminalFilePath",path=>{this.setState(prev=>({terminalPendingImages:[...prev.terminalPendingImages,{path:path,source:"terminal"}]}))}),__publicField(this,"_handleRemoveTerminalImage",idx=>{this.setState(prev=>({terminalPendingImages:prev.terminalPendingImages.filter((_,i)=>i!==idx)}))}),__publicField(this,"_handleClearTerminalImages",()=>{this.setState({terminalPendingImages:[]})}),Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,mobileFileExplorerVisible:!1,mobileCachePanelVisible:!1,globalPermission:null,globalPlanApproval:null,autoApproveSeconds:0,hasGit:!0,terminalPendingImages:[],_fsSkills:null,_memory:null,_memoryRefreshing:!1,_memoryDetail:null,_claudeMd:null,_claudeMdDetail:null,pluginModalVisible:!1,processModalVisible:!1,proxyModalVisible:!1,_skillsModal:{open:!1,loading:!1,skills:[],error:null,toggling:new Set},calibrationModel:(v=localStorage.getItem("ccv_calibrationModel")||"auto",CALIBRATION_MODELS.some(m=>m.value===v)?v:"auto")}),this._lastContextPercent=0,this._fsSkillsSeq=0,this._memorySeq=0,this._memoryDetailSeq=0,this._claudeMdSeq=0,this._claudeMdDetailSeq=0}_closeAllMobileOverlays(){return{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,mobileFileExplorerVisible:!1,mobileCachePanelVisible:!1,pluginModalVisible:!1,processModalVisible:!1,proxyModalVisible:!1}}componentDidMount(){var _a,_b,_c,_d;if(super.componentDidMount(),fetch(apiUrl("/api/git-repos")).then(r=>r.ok?r.json():Promise.reject()).then(data=>{var _a2;(null==(_a2=data.repos)?void 0:_a2.length)||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>{fetch(apiUrl("/api/git-status")).then(r=>{r.ok||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>this.setState({hasGit:!1,mobileGitDiffVisible:!1}))}),isIOS&&!isPad&&window.visualViewport&&(this._onVisualViewportChange=()=>{const el=this._layoutRef.current;if(!el)return;const vv=window.visualViewport;el.style.position="fixed",el.style.top=`${vv.offsetTop}px`,el.style.height=`${vv.height}px`,el.style.width="100%",el.style.left="0"},window.visualViewport.addEventListener("resize",this._onVisualViewportChange),window.visualViewport.addEventListener("scroll",this._onVisualViewportChange),this._onVisualViewportChange()),isPad){const inElectronTab="undefined"!=typeof window&&!!window.tabBridge;this._modeSwitchDialog=null,inElectronTab?(this._onDeviceMode=on=>{const target=on?"pad":"pc";localStorage.getItem("ccv_viewMode")!==target&&setViewMode(target)},this._disposeDeviceMode=null==(_b=(_a=window.tabBridge).onDeviceModeChange)?void 0:_b.call(_a,this._onDeviceMode),null==(_d=(_c=window.tabBridge).requestDeviceMode)||_d.call(_c)):(this._mqlWide=window.matchMedia("(min-width: 1400px)"),this._onWideChange=e=>{e.matches?this._modeSwitchDialog=Modal.confirm({title:t("ui.modeSwitchTitle"),content:t("ui.modeSwitchToFullView"),okText:t("ui.ok"),onOk:()=>{this._modeSwitchDialog=null,setViewMode("pc")},onCancel:()=>{this._modeSwitchDialog=null}}):this._modeSwitchDialog&&(this._modeSwitchDialog.destroy(),this._modeSwitchDialog=null)},this._mqlWide.addEventListener("change",this._onWideChange))}}componentWillUnmount(){this._onVisualViewportChange&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",this._onVisualViewportChange),window.visualViewport.removeEventListener("scroll",this._onVisualViewportChange)),this._disposeDeviceMode&&(this._disposeDeviceMode(),this._disposeDeviceMode=null),this._mqlWide&&this._mqlWide.removeEventListener("change",this._onWideChange),this._modeSwitchDialog&&(this._modeSwitchDialog.destroy(),this._modeSwitchDialog=null),this._fsSkillsSeq++,this._memorySeq++,this._memoryDetailSeq++,this._claudeMdSeq++,this._claudeMdDetailSeq++,super.componentWillUnmount()}componentDidUpdate(prevProps,prevState){super.componentDidUpdate&&super.componentDidUpdate(prevProps,prevState),prevState.projectName!==this.state.projectName&&(this._fsSkillsSeq++,this._memorySeq++,this._claudeMdSeq++,this._claudeMdDetailSeq++,this.setState({_fsSkills:null,_memory:null,_memoryDetail:null,_memoryRefreshing:!1,_claudeMd:null,_claudeMdDetail:null}))}static parseSegments(text){const segments=[],regex=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let match,lastIndex=0;for(;null!==(match=regex.exec(text));){const before=text.slice(lastIndex,match.index).trim();before&&segments.push({type:"text",content:before});const tagName=match[1];if(lastIndex=match.index+match[0].length,_Mobile.COMMAND_TAGS.has(tagName))continue;const innerRegex=new RegExp(`^<${tagName}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${tagName}>$`),innerMatch=match[0].match(innerRegex),content2=innerMatch?innerMatch[1].trim():match[0].trim();segments.push({type:"system",content:content2,label:tagName})}const after=text.slice(lastIndex).trim();return after&&segments.push({type:"text",content:after}),segments}static extractUserTexts(messages){const userMsgs=[],fullTexts=[];let slashCmd=null;for(const msg of messages)if("user"===msg.role)if("string"==typeof msg.content){const text=parseImOrigin(msg.content).text.trim();if(!text)continue;if(!isSystemText(text)){if(/Implement the following plan:/i.test(text))continue;userMsgs.push(text),fullTexts.push(text)}}else if(Array.isArray(msg.content)){const{commands:commands,textBlocks:textBlocks}=classifyUserContent(msg.content);commands.length>0&&(slashCmd=commands[commands.length-1]);const userParts=[];for(const b of textBlocks)/Implement the following plan:/i.test((b.text||"").trim())||userParts.push(b.text.trim());const allParts=msg.content.filter(b=>{var _a;return"text"===b.type&&(null==(_a=b.text)?void 0:_a.trim())}).map(b=>b.text.trim());userParts.length>0&&(userMsgs.push(userParts.join("\n")),fullTexts.push(allParts.join("\n")))}return{userMsgs:userMsgs,fullTexts:fullTexts,slashCmd:slashCmd}}extractUserPrompts(requests){var _a;const prompts=[],seen=new Set;let prevSlashCmd=null;const mainAgentRequests=requests.filter(r=>isMainAgent(r));for(let ri=0;ri<mainAgentRequests.length;ri++){const req=mainAgentRequests[ri],messages=(null==(_a=req.body)?void 0:_a.messages)||[],timestamp=req.timestamp||"",{userMsgs:userMsgs,fullTexts:fullTexts,slashCmd:slashCmd}=_Mobile.extractUserTexts(messages);slashCmd&&"/compact"!==slashCmd&&slashCmd!==prevSlashCmd&&prompts.push({type:"prompt",segments:[{type:"text",content:slashCmd}],timestamp:timestamp}),prevSlashCmd=slashCmd;for(let i=0;i<userMsgs.length;i++){const key=userMsgs[i];if(seen.has(key))continue;seen.add(key);const raw=fullTexts[i]||key;prompts.push({type:"prompt",segments:_Mobile.parseSegments(raw),timestamp:timestamp})}}return prompts}renderOriginalPrompt(p){const textSegments=p.segments.filter(seg=>"text"===seg.type);return 0===textSegments.length?null:jsxRuntimeExports.jsx("div",{className:styles$3.mobilePromptCard,children:textSegments.map((seg,j)=>jsxRuntimeExports.jsx("pre",{className:styles$3.mobilePromptPreText,children:seg.content},j))})}_captureDropContext(){return{toTerminal:this.state.mobileTerminalVisible}}_dispatchUploadedFiles(results,ctx){const uploaded=results.filter(Boolean);uploaded.length&&((null==ctx?void 0:ctx.toTerminal)?this.setState(prev=>({terminalPendingImages:[...prev.terminalPendingImages,...uploaded.map(r=>({path:r.path,source:"drop"}))]})):this.setState(prev=>({pendingUploadPaths:[...prev.pendingUploadPaths||[],...uploaded.map(r=>`"${r.path}"`)]})))}render(){var _a,_b,_c,_d,_e,_f,_g,_h;const{filteredRequests:filteredRequests,fileLoading:fileLoading,fileLoadingCount:fileLoadingCount,mainAgentSessions:mainAgentSessions}=this.renderPrepare(),prefs=this._prefValues();if(this.state.workspaceMode)return this.renderWorkspaceMode();const mobileIsLocalLog=!!this._isLocalLog;let mobileModelName=null;for(let i=filteredRequests.length-1;i>=0;i--){const effective=getEffectiveModel(filteredRequests[i]);if(isMainAgent(filteredRequests[i])&&effective){mobileModelName=effective;break}}let mobileContextPercent=0,mobileContextTokens=0;if(!mobileIsLocalLog){const contextWindow=this.state.contextWindow;let lastMainAgent=null,mobileInputTokens=0;if(filteredRequests.length>0)for(let i=filteredRequests.length-1;i>=0;i--)if(isMainAgent(filteredRequests[i])&&(null==(_b=null==(_a=filteredRequests[i].response)?void 0:_a.body)?void 0:_b.usage)){lastMainAgent=filteredRequests[i];const u=lastMainAgent.response.body.usage;mobileContextTokens=sumUsageContextTokens(u),mobileInputTokens=sumUsageInputTokens(u);break}if(null!=(null==contextWindow?void 0:contextWindow.used_percentage))mobileContextPercent=Math.min(100,Math.max(0,Math.round(contextWindow.used_percentage)));else if(lastMainAgent){const maxTokens=adaptContextWindow((null==contextWindow?void 0:contextWindow.context_window_size)||getModelMaxTokens(getEffectiveModel(lastMainAgent)||this.state.settingsModel),mobileInputTokens);maxTokens>0&&mobileContextTokens>0&&(mobileContextPercent=Math.min(100,Math.max(0,Math.round(mobileContextTokens/maxTokens*100))))}this.state.contextBarLocked?(this._lastContextPercent=0,mobileContextPercent=0,mobileContextTokens=0):(0===mobileContextPercent&&this._lastContextPercent>0?mobileContextPercent=this._lastContextPercent:this._lastContextPercent=mobileContextPercent,this.state.contextBarOptimistic&&(mobileContextPercent=OPTIMISTIC_CLEAR_PERCENT))}const wsOpen=!mobileIsLocalLog&&!this.state.sdkMode;return jsxRuntimeExports.jsx(TerminalWsProvider,{open:wsOpen,children:jsxRuntimeExports.jsx(ApprovalModal,{enabled:isPad&&this.state.approvalPrefs.modalEnabled,soundEnabled:this.state.approvalPrefs.soundEnabled,voicePackPrefs:this.state.approvalPrefs.voicePack,approvalGlobal:this.state.approvalGlobal,dismissedIds:this.state.approvalDismissedIds,onDismiss:this.handleApprovalDismiss,onJumpTab:this.handleApprovalJumpTab,otherTabs:this.state.approvalOtherTabs,children:jsxRuntimeExports.jsx(ConfigProvider,{theme:this.themeConfig,children:jsxRuntimeExports.jsxs("div",{className:styles$3.mobileCLIRoot,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[this.state.isDragging&&jsxRuntimeExports.jsx("div",{className:styles$3.dragOverlay,children:jsxRuntimeExports.jsxs("div",{className:styles$3.dragOverlayContent,children:[jsxRuntimeExports.jsx(RefIcon$1,{className:styles$3.dragIcon}),jsxRuntimeExports.jsx("p",{children:t("ui.dragDropHint")})]})}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileCLIHeader,children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobileCLIHeaderLeft,children:[jsxRuntimeExports.jsx("button",{className:styles$3.mobileMenuBtn,onClick:()=>this.setState(prev=>({mobileMenuVisible:!prev.mobileMenuVisible})),"aria-label":t("ui.mobileMenu"),"aria-expanded":this.state.mobileMenuVisible,"aria-haspopup":"menu",children:jsxRuntimeExports.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),jsxRuntimeExports.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),jsxRuntimeExports.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),mobileIsLocalLog?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Badge,{status:"processing",color:"green"}),jsxRuntimeExports.jsx("span",{className:styles$3.mobileCLIStatusLabel,children:t("ui.historyLog",{file:this._localLogFile})})]}):(()=>{const contextPercent=mobileContextPercent,ctxColor=contextPercent>=75?"var(--color-error-light)":contextPercent>=55?"var(--color-warning-light)":"var(--color-success)",ctxLabel=`${t("ui.liveMonitoring")}${this.state.projectName?`: ${this.state.projectName}`:""}`;return jsxRuntimeExports.jsxs("span",{className:styles$3.mobileCtxTag,style:{borderColor:ctxColor,color:ctxColor,cursor:"pointer"},title:ctxLabel,role:"button",tabIndex:0,"aria-label":t("ui.openCachePanel"),onClick:()=>this.setState(prev=>({...this._closeAllMobileOverlays(),mobileCachePanelVisible:!prev.mobileCachePanelVisible}),()=>this._onCachePanelOpenChange(this.state.mobileCachePanelVisible)),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.setState(prev=>({...this._closeAllMobileOverlays(),mobileCachePanelVisible:!prev.mobileCachePanelVisible}),()=>this._onCachePanelOpenChange(this.state.mobileCachePanelVisible)))},children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileCtxTagFill,style:{width:`${contextPercent}%`,backgroundColor:ctxColor}}),jsxRuntimeExports.jsx("span",{className:styles$3.mobileCtxTagContent,children:jsxRuntimeExports.jsx(MobileCtxLabelText,{projectName:this.state.projectName})})]})})()]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileCLIHeaderRight,children:[mobileIsLocalLog?jsxRuntimeExports.jsx(Button,{type:"text",size:"small",icon:jsxRuntimeExports.jsx(RefIcon,{}),onClick:()=>history.back(),className:styles$3.mobileNavBtn,children:t("ui.mobileGoBack")}):this.state.hasGit?jsxRuntimeExports.jsx(Button,{type:"text",size:"small",icon:jsxRuntimeExports.jsx(RefIcon$2,{}),onClick:()=>this.setState(prev=>({...this._closeAllMobileOverlays(),mobileGitDiffVisible:!prev.mobileGitDiffVisible})),style:{color:this.state.mobileGitDiffVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileGitDiffVisible?t("ui.mobileGitDiffExit"):t("ui.mobileGitDiffBrowse")}):null,!mobileIsLocalLog&&jsxRuntimeExports.jsx(Button,{type:"text",size:"small",icon:jsxRuntimeExports.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("polyline",{points:"4 17 10 11 4 5"}),jsxRuntimeExports.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),onClick:()=>this.setState(prev=>({...this._closeAllMobileOverlays(),mobileTerminalVisible:!prev.mobileTerminalVisible})),style:{color:this.state.mobileTerminalVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileTerminalVisible?t("ui.mobileTerminalExit"):t("ui.mobileTerminalBrowse")})]}),this.state.mobileMenuVisible&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:styles$3.mobileMenuOverlay,onClick:()=>this.setState({mobileMenuVisible:!1})}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileMenuDropdown,children:[!mobileIsLocalLog&&jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),mobileFileExplorerVisible:!0})},children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntimeExports.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),t("ui.projectFolder")]}),jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),mobileLogMgmtVisible:!0}),this.handleImportLocalLogs()},children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsxRuntimeExports.jsx("polyline",{points:"14 2 14 8 20 8"}),jsxRuntimeExports.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),jsxRuntimeExports.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),t("ui.logManagement")]}),jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),mobilePromptVisible:!0})},children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),jsxRuntimeExports.jsx("polyline",{points:"14 2 14 8 20 8"}),jsxRuntimeExports.jsx("line",{x1:"12",y1:"18",x2:"12",y2:"12"}),jsxRuntimeExports.jsx("line",{x1:"12",y1:"12",x2:"9",y2:"15"}),jsxRuntimeExports.jsx("line",{x1:"12",y1:"12",x2:"15",y2:"15"})]}),t("ui.userPrompt")]}),jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),pluginModalVisible:!0})},children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}),jsxRuntimeExports.jsx("rect",{x:"2",y:"9",width:"6",height:"6",rx:"1"}),jsxRuntimeExports.jsx("rect",{x:"16",y:"9",width:"6",height:"6",rx:"1"}),jsxRuntimeExports.jsx("rect",{x:"9",y:"16",width:"6",height:"6",rx:"1"})]}),t("ui.pluginManagement")]}),jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),processModalVisible:!0})},children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("path",{d:"M12 2v4"}),jsxRuntimeExports.jsx("path",{d:"M12 18v4"}),jsxRuntimeExports.jsx("path",{d:"m4.93 4.93 2.83 2.83"}),jsxRuntimeExports.jsx("path",{d:"m16.24 16.24 2.83 2.83"}),jsxRuntimeExports.jsx("path",{d:"M2 12h4"}),jsxRuntimeExports.jsx("path",{d:"M18 12h4"}),jsxRuntimeExports.jsx("path",{d:"m4.93 19.07 2.83-2.83"}),jsxRuntimeExports.jsx("path",{d:"m16.24 7.76 2.83-2.83"})]}),t("ui.processManagement")]}),jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),proxyModalVisible:!0})},children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("polyline",{points:"17 1 21 5 17 9"}),jsxRuntimeExports.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),jsxRuntimeExports.jsx("polyline",{points:"7 23 3 19 7 15"}),jsxRuntimeExports.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]}),t("ui.proxySwitch")]}),jsxRuntimeExports.jsx("div",{className:styles$3.mobileMenuDivider}),jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),mobileStatsVisible:!0})},children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),jsxRuntimeExports.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),jsxRuntimeExports.jsx("rect",{x:"3",y:"14",width:"7",height:"7"}),jsxRuntimeExports.jsx("rect",{x:"14",y:"14",width:"7",height:"7"})]}),t("ui.tokenStats")]}),jsxRuntimeExports.jsxs("button",{className:styles$3.mobileMenuItem,onClick:()=>{this.setState({...this._closeAllMobileOverlays(),mobileSettingsVisible:!0})},children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"3"}),jsxRuntimeExports.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),t("ui.settings")]})]})]})]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileCLIBody,children:[!mobileIsLocalLog&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[fileLoading&&jsxRuntimeExports.jsxs("div",{className:styles$3.mobileLoadingOverlay,children:[jsxRuntimeExports.jsx("div",{className:styles$3.mobileLoadingSpinner}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileLoadingLabel,children:[t("ui.loadingChat"),fileLoadingCount>0?` (${fileLoadingCount})`:""]})]}),jsxRuntimeExports.jsx("div",{className:styles$3.mobileChatInner,children:jsxRuntimeExports.jsx(ChatView,{...this._settingsProps(),requests:filteredRequests,mainAgentSessions:mainAgentSessions,streamingLatest:this.state.streamingLatest,userProfile:this.state.userProfile,collapseToolResults:prefs.collapseToolResults,expandThinking:prefs.expandThinking,showFullToolContent:prefs.showFullToolContent,onlyCurrentSession:!mobileIsLocalLog&&prefs.onlyCurrentSession,isLocalLog:mobileIsLocalLog,showThinkingSummaries:prefs.showThinkingSummaries,onViewRequest:null,scrollToTimestamp:null,onScrollTsDone:()=>{},cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:this.state.mobileTerminalVisible,mobileChatVisible:!0,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:sid=>this.loadSession(sid),onPendingPermission:this.handlePendingPermission,onPendingPlanApproval:this.handlePendingPlanApproval,onPendingAsk:this.handleApprovalAsk,onPendingPtyPlan:this.handleApprovalPtyPlan,planAutoApproveSeconds:null==(_c=this.state.approvalPrefs)?void 0:_c.planAutoApproveSeconds,ownTabId:this.state.ownTabId,projectName:this.state.projectName,suppressInlineApprovalPanels:!0,pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed,uploadingDrop:this.state.uploadingDrop,onMobileOpenFile:this._handleMobileOpenFile,onClearContextOptimistic:this.handleClearContextOptimistic,onUserMessageSent:this.handleUserMessageSent})})]}),!mobileIsLocalLog&&jsxRuntimeExports.jsx("div",{className:`${styles$3.mobileChatOverlay} ${this.state.mobileTerminalVisible?styles$3.mobileChatOverlayVisible:""}`,children:jsxRuntimeExports.jsx(TerminalPanel,{...this._settingsProps(),modelName:mobileModelName,onFilePath:this._handleTerminalFilePath,pendingImages:this.state.terminalPendingImages,onRemovePendingImage:this._handleRemoveTerminalImage,onClearPendingImages:this._handleClearTerminalImages,onClearContextOptimistic:this.handleClearContextOptimistic})}),jsxRuntimeExports.jsx("div",{className:`${styles$3.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?styles$3.mobileGitDiffOverlayVisible:""}`,children:jsxRuntimeExports.jsx("div",{className:styles$3.mobileGitDiffInner,children:jsxRuntimeExports.jsx(MobileGitDiff,{visible:this.state.mobileGitDiffVisible,onClose:()=>this.setState({mobileGitDiffVisible:!1})})})}),jsxRuntimeExports.jsx("div",{className:`${styles$3.mobileCachePanelOverlay} ${this.state.mobileCachePanelVisible?styles$3.mobileCachePanelOverlayVisible:""}`,children:jsxRuntimeExports.jsxs("div",{className:styles$3.mobileCachePanelInner,children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobileCachePanelHeader,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileCachePanelTitle,children:t("ui.contextManagement")}),jsxRuntimeExports.jsx("button",{className:styles$3.mobileCachePanelClose,onClick:()=>this.setState({mobileCachePanelVisible:!1},()=>this._onCachePanelOpenChange(!1)),"aria-label":t("ui.closeCachePanel"),children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntimeExports.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),jsxRuntimeExports.jsx("div",{className:styles$3.mobileCachePanelBody,children:this.state.mobileCachePanelVisible&&jsxRuntimeExports.jsx(CachePopoverContent,{requests:filteredRequests,serverCachedContent:this.state.serverCachedContent,contextPercent:mobileContextPercent,contextTokens:mobileContextTokens,fsSkills:this.state._fsSkills,onSkillImported:this.reloadFsSkills,onOpenSkillsModal:this.handleOpenSkillsModal,memory:this.state._memory,memoryRefreshing:this.state._memoryRefreshing,claudeMd:this.state._claudeMd,calibrationModel:this.state.calibrationModel,onCalibrationModelChange:this.handleCalibrationModelChange,onOpenMemoryDetail:this.loadMemoryDetail,onOpenClaudeMd:this.loadClaudeMdDetail,onRefreshMemory:this.handleRefreshMemory})})]})}),jsxRuntimeExports.jsx(MemoryDetailModal,{detail:this.state._memoryDetail,onClose:()=>this.setState({_memoryDetail:null}),onOpenMemoryDetail:this.loadMemoryDetail}),jsxRuntimeExports.jsx(MemoryDetailModal,{detail:this.state._claudeMdDetail,onClose:()=>this.setState({_claudeMdDetail:null}),linkMode:"passthrough"}),jsxRuntimeExports.jsx(SkillsManagerModal,{open:(null==(_d=this.state._skillsModal)?void 0:_d.open)||!1,loading:(null==(_e=this.state._skillsModal)?void 0:_e.loading)||!1,error:(null==(_f=this.state._skillsModal)?void 0:_f.error)||null,skills:(null==(_g=this.state._skillsModal)?void 0:_g.skills)||[],toggling:null==(_h=this.state._skillsModal)?void 0:_h.toggling,onToggle:s=>this.handleToggleSkill(s),onClose:()=>this.setState(prev=>({_skillsModal:{...prev._skillsModal,open:!1}}))}),jsxRuntimeExports.jsx(PluginModal,{open:this.state.pluginModalVisible,onClose:()=>this.setState({pluginModalVisible:!1})}),jsxRuntimeExports.jsx(ProcessModal,{open:this.state.processModalVisible,onClose:()=>this.setState({processModalVisible:!1})}),jsxRuntimeExports.jsx(ProxyModal,{open:this.state.proxyModalVisible,onClose:()=>this.setState({proxyModalVisible:!1}),proxyProfiles:this.state.proxyProfiles,activeProxyId:this.state.activeProxyId,defaultConfig:this.state.defaultConfig,onProxyProfileChange:this.handleProxyProfileChange}),jsxRuntimeExports.jsx("div",{className:`${styles$3.mobileFileExplorerOverlay} ${this.state.mobileFileExplorerVisible?styles$3.mobileFileExplorerOverlayVisible:""}`,children:jsxRuntimeExports.jsx("div",{className:styles$3.mobileFileExplorerInner,children:jsxRuntimeExports.jsx(MobileFileExplorer,{visible:this.state.mobileFileExplorerVisible,onClose:()=>this.setState({mobileFileExplorerVisible:!1,mobileFileExplorerTarget:null}),targetFile:this.state.mobileFileExplorerTarget,projectName:this.state.projectName})})}),jsxRuntimeExports.jsx("div",{className:`${styles$3.mobileStatsOverlay} ${this.state.mobileStatsVisible?styles$3.mobileStatsOverlayVisible:""}`,children:jsxRuntimeExports.jsx("div",{className:styles$3.mobileStatsInner,children:jsxRuntimeExports.jsx(MobileStats,{requests:filteredRequests,visible:this.state.mobileStatsVisible,onClose:()=>this.setState({mobileStatsVisible:!1})})})}),jsxRuntimeExports.jsxs("div",{className:`${styles$3.mobileLogMgmtOverlay} ${this.state.mobileLogMgmtVisible?styles$3.mobileLogMgmtOverlayVisible:""}`,children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobileLogMgmtHeader,children:[jsxRuntimeExports.jsxs("span",{className:styles$3.mobileLogMgmtTitle,children:[jsxRuntimeExports.jsx(OpenFolderIcon,{apiEndpoint:apiUrl("/api/open-log-dir"),title:t("ui.openLogDir"),size:14}),t("ui.importLocalLogs")]}),jsxRuntimeExports.jsx("button",{className:styles$3.mobileLogMgmtClose,onClick:()=>this.setState({mobileLogMgmtVisible:!1,selectedLogs:new Set}),children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntimeExports.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileLogMgmtActions,children:[jsxRuntimeExports.jsx(Button,{size:"small",type:this.state.selectedLogs.size>=2&&![...this.state.selectedLogs].some(f=>f.endsWith(".jsonl.zip"))?"primary":"default",disabled:this.state.selectedLogs.size<2||[...this.state.selectedLogs].some(f=>f.endsWith(".jsonl.zip")),onClick:this.handleMergeLogs,style:this.state.selectedLogs.size<2||[...this.state.selectedLogs].some(f=>f.endsWith(".jsonl.zip"))?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:void 0,children:t("ui.mergeLogs")}),jsxRuntimeExports.jsx(Button,{size:"small",icon:jsxRuntimeExports.jsx(RefIcon$3,{}),disabled:![...this.state.selectedLogs].some(f=>f.endsWith(".jsonl")),onClick:this.handleArchiveLogs,style:[...this.state.selectedLogs].some(f=>f.endsWith(".jsonl"))?void 0:{color:"var(--text-muted)",borderColor:"var(--border-light)"},children:t("ui.archiveLogs")}),jsxRuntimeExports.jsx(Button,{size:"small",icon:jsxRuntimeExports.jsx(RefIcon$4,{}),disabled:0===this.state.selectedLogs.size,onClick:this.handleDeleteLogs,style:0===this.state.selectedLogs.size?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:{color:"var(--color-error-light)",borderColor:"var(--color-error-light)"},children:t("ui.deleteLogs")}),jsxRuntimeExports.jsx(Button,{size:"small",icon:jsxRuntimeExports.jsx(RefIcon$5,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:t("ui.refreshStats")})]}),jsxRuntimeExports.jsx("div",{className:styles$3.mobileLogMgmtBody,children:this.state.localLogsLoading?jsxRuntimeExports.jsx("div",{className:styles$3.spinCenter,children:jsxRuntimeExports.jsx(Spin,{})}):(()=>{const currentLogs=this.state.localLogs[this.state.currentProject];return currentLogs&&0!==currentLogs.length?jsxRuntimeExports.jsx("div",{className:styles$3.logListContainer,children:this.renderLogTable(currentLogs,!0)}):jsxRuntimeExports.jsx("div",{className:styles$3.emptyCenter,children:t("ui.noLogs")})})()})]}),jsxRuntimeExports.jsxs("div",{className:`${styles$3.mobileSettingsOverlay} ${this.state.mobileSettingsVisible?styles$3.mobileSettingsOverlayVisible:""}`,children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobileLogMgmtHeader,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileLogMgmtTitle,children:t("ui.settings")}),jsxRuntimeExports.jsx("button",{className:styles$3.mobileLogMgmtClose,onClick:()=>this.setState({mobileSettingsVisible:!1}),children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntimeExports.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsBody,children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsGroup,children:[jsxRuntimeExports.jsx("div",{className:styles$3.mobileSettingsSectionTitle,children:t("ui.chatDisplay")}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.permission.autoApprove.setting")}),jsxRuntimeExports.jsx(Select,{size:"small",value:this.state.autoApproveSeconds||0,onChange:this.handleAutoApproveChange,options:[{label:t("ui.permission.autoApprove.off"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"10s",value:10},{label:t("ui.permission.autoApprove.instant"),value:AUTO_APPROVE_INSTANT}],style:{width:100}})]}),this.state.approvalPrefs&&jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsxs("span",{className:styles$3.mobileSettingsLabel,children:[t("ui.approval.settings.planAutoApprove"),jsxRuntimeExports.jsx(Tooltip,{title:t("ui.approval.settings.planAutoApproveHelp"),trigger:"click",children:jsxRuntimeExports.jsx(RefIcon$6,{className:styles$3.mobileSettingsHelpIcon})})]}),jsxRuntimeExports.jsx(Select,{size:"small",value:this.state.approvalPrefs.planAutoApproveSeconds||0,onChange:value=>this.handleApprovalPrefsChange({planAutoApproveSeconds:value}),options:[{label:t("ui.permission.autoApprove.off"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"10s",value:10},{label:t("ui.permission.autoApprove.instant"),value:AUTO_APPROVE_INSTANT}],style:{width:100}})]}),isPad&&this.state.approvalPrefs&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.approval.settings.modalEnabled")}),jsxRuntimeExports.jsx(Switch,{checked:!1!==this.state.approvalPrefs.modalEnabled,onChange:checked=>this.handleApprovalPrefsChange({modalEnabled:checked})})]}),"undefined"!=typeof window&&window.tabBridge&&jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.approval.settings.notifyOnlyWhenHidden")}),jsxRuntimeExports.jsx(Switch,{checked:!1!==this.state.approvalPrefs.notifyOnlyWhenHidden,onChange:checked=>this.handleApprovalPrefsChange({notifyOnlyWhenHidden:checked})})]})]}),this.state.approvalPrefs&&jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.approval.settings.soundEnabled")}),jsxRuntimeExports.jsx(Switch,{checked:!!this.state.approvalPrefs.soundEnabled,onChange:checked=>this.handleApprovalSoundToggle(checked)})]}),this.state.approvalPrefs&&this.state.approvalPrefs.soundEnabled&&jsxRuntimeExports.jsx(VoicePackSettings,{prefs:this.state.approvalPrefs.voicePack,onChange:this.handleVoicePackChange,embedded:!0}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.expandThinking")}),jsxRuntimeExports.jsx(Switch,{checked:prefs.expandThinking,onChange:this.handleExpandThinkingChange})]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.showFullToolContent")}),jsxRuntimeExports.jsx(Switch,{checked:prefs.showFullToolContent,onChange:this.handleShowFullToolContentChange})]}),prefs.showFullToolContent&&jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.collapseToolResults")}),jsxRuntimeExports.jsx(Switch,{checked:prefs.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),!mobileIsLocalLog&&jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsxs("span",{className:styles$3.mobileSettingsLabel,children:[t("ui.onlyCurrentSession"),jsxRuntimeExports.jsx(Tooltip,{title:t("ui.onlyCurrentSession.help"),trigger:"click",children:jsxRuntimeExports.jsx(RefIcon$6,{className:styles$3.mobileSettingsHelpIcon})})]}),jsxRuntimeExports.jsx(Switch,{checked:prefs.onlyCurrentSession,onChange:this.handleOnlyCurrentSessionChange})]})]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsGroup,children:[jsxRuntimeExports.jsx("div",{className:styles$3.mobileSettingsSectionTitle,children:t("ui.logSettings")}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.resumeAutoChoice")}),jsxRuntimeExports.jsx(Switch,{checked:!!this.state.resumeAutoChoice,onChange:this.handleResumeAutoChoiceToggle})]}),this.state.resumeAutoChoice&&jsxRuntimeExports.jsx("div",{className:styles$3.mobileSettingsRow,children:jsxRuntimeExports.jsxs(Radio.Group,{value:this.state.resumeAutoChoice,onChange:e=>this.handleResumeAutoChoiceChange(e.target.value),size:"small",children:[jsxRuntimeExports.jsx(Radio,{value:"continue",children:t("ui.resumeAutoChoice.continue")}),jsxRuntimeExports.jsx(Radio,{value:"new",children:t("ui.resumeAutoChoice.new")})]})})]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsGroup,children:[jsxRuntimeExports.jsx("div",{className:styles$3.mobileSettingsSectionTitle,children:t("ui.themeStyle")}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.themeColor")}),jsxRuntimeExports.jsx(Select,{size:"small",value:this.state.themeColor||"light",onChange:this.handleThemeColorChange,options:[{label:t("ui.themeColor.dark"),value:"dark"},{label:t("ui.themeColor.light"),value:"light"}],style:{width:140}})]}),jsxRuntimeExports.jsxs("div",{className:styles$3.mobileSettingsRow,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileSettingsLabel,children:t("ui.languageSettings")}),jsxRuntimeExports.jsx(Select,{size:"small",value:getLang(),onChange:value=>{setLang(value),this.handleLangChange()},options:LANG_OPTIONS.map(o=>({label:o.label,value:o.value})),style:{width:140}})]})]})]})]}),jsxRuntimeExports.jsxs("div",{className:`${styles$3.mobilePromptOverlay} ${this.state.mobilePromptVisible?styles$3.mobilePromptOverlayVisible:""}`,children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobileLogMgmtHeader,children:[jsxRuntimeExports.jsx("span",{className:styles$3.mobileLogMgmtTitle,children:t("ui.userPrompt")}),jsxRuntimeExports.jsx("button",{className:styles$3.mobileLogMgmtClose,onClick:()=>this.setState({mobilePromptVisible:!1}),children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[jsxRuntimeExports.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntimeExports.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),jsxRuntimeExports.jsx("div",{className:styles$3.mobilePromptBody,children:(()=>{const prompts=this.extractUserPrompts(filteredRequests);return 0===prompts.length?jsxRuntimeExports.jsx("div",{className:styles$3.mobilePromptEmpty,children:t("ui.noPrompt")}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:styles$3.mobilePromptHeader,children:[jsxRuntimeExports.jsxs("span",{className:styles$3.mobilePromptCount,children:[prompts.length," ",t("ui.promptCountUnit")]}),jsxRuntimeExports.jsx(Button,{size:"small",icon:jsxRuntimeExports.jsx(RefIcon$7,{}),onClick:()=>this.handleExportPromptsTxt(prompts),children:t("ui.exportPromptsTxt")})]}),jsxRuntimeExports.jsx("div",{className:styles$3.mobilePromptList,children:prompts.map((p,i)=>jsxRuntimeExports.jsxs("div",{className:styles$3.mobilePromptItem,children:[p.timestamp&&jsxRuntimeExports.jsx("div",{className:styles$3.mobilePromptTimestamp,children:new Date(p.timestamp).toLocaleString()}),this.renderOriginalPrompt(p)]},i))})]})})()})]})]}),this.state.globalPermission&&jsxRuntimeExports.jsx(ToolApprovalPanel,{toolName:this.state.globalPermission.permission.toolName,toolInput:this.state.globalPermission.permission.input,requestId:this.state.globalPermission.permission.id,onAllow:this.state.globalPermission.handlers.allow,onAllowSession:this.state.globalPermission.handlers.allowSession,onDeny:this.state.globalPermission.handlers.deny,visible:!0,global:!0,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange}),this.state.globalPlanApproval&&jsxRuntimeExports.jsx(ToolApprovalPanel,{toolName:"ExitPlanMode",toolInput:this.state.globalPlanApproval.plan.input,requestId:this.state.globalPlanApproval.plan.id,onAllow:this.state.globalPlanApproval.handlers.approve,onDeny:id=>this.state.globalPlanApproval.handlers.reject(id,""),visible:!0,global:!0})]})})})})}};__publicField(_Mobile,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Mobile=_Mobile;export{Mobile as default};
|