@tom2012/cc-web 2026.4.27-e → 2026.4.27-f

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.
Files changed (21) hide show
  1. package/README.md +1 -1
  2. package/backend/dist/terminal-manager.d.ts +8 -0
  3. package/backend/dist/terminal-manager.d.ts.map +1 -1
  4. package/backend/dist/terminal-manager.js +45 -3
  5. package/backend/dist/terminal-manager.js.map +1 -1
  6. package/frontend/dist/assets/{AssistantMessageContent-fk_C4oct.js → AssistantMessageContent-BiJL4SGC.js} +1 -1
  7. package/frontend/dist/assets/{GraphPreview-jBgcKX7j.js → GraphPreview-CRoeiBR8.js} +1 -1
  8. package/frontend/dist/assets/{MobilePage-Cy7KRgH_.js → MobilePage-TPNnMQ27.js} +3 -3
  9. package/frontend/dist/assets/{OfficePreview-DrS64ehu.js → OfficePreview-Bg2tz3fQ.js} +2 -2
  10. package/frontend/dist/assets/{ProjectPage-ByY_pKon.js → ProjectPage-C3ooYpFP.js} +3 -3
  11. package/frontend/dist/assets/{SettingsPage-DCsamoIN.js → SettingsPage-DroQY7ar.js} +1 -1
  12. package/frontend/dist/assets/{SkillHubPage-ChEG3UXF.js → SkillHubPage-B4txwD4F.js} +1 -1
  13. package/frontend/dist/assets/{chevron-down-CxkiZ1SD.js → chevron-down-CFYwGxZ7.js} +1 -1
  14. package/frontend/dist/assets/{chevron-up-BZkUJHec.js → chevron-up-D91KEb_P.js} +1 -1
  15. package/frontend/dist/assets/{index-DsCTP_lW.js → index-9M6XORRc.js} +1 -1
  16. package/frontend/dist/assets/{index-Bi0Lxaim.js → index-Bd6-XRQN.js} +2 -2
  17. package/frontend/dist/assets/{index-DupxITkq.js → index-FD2TeOOr.js} +1 -1
  18. package/frontend/dist/assets/{jszip.min-Cm3MH9ZY.js → jszip.min-DVUOeoIr.js} +1 -1
  19. package/frontend/dist/assets/{search-CSdU5BiW.js → search-D2ccvP_R.js} +1 -1
  20. package/frontend/dist/index.html +1 -1
  21. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A self-hosted web application (distributed as npm package) that provides a browser-based interface for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI sessions. Create projects, each with a persistent terminal running Claude Code, and interact with them through a real-time terminal UI.
4
4
 
5
- **Current version**: v2026.4.27-e | [GitHub](https://github.com/zbc0315/cc-web) | MIT License
5
+ **Current version**: v2026.4.27-f | [GitHub](https://github.com/zbc0315/cc-web) | MIT License
6
6
 
7
7
  ## Features
8
8
 
@@ -7,6 +7,14 @@ declare class TerminalManager extends EventEmitter {
7
7
  private restartTimers;
8
8
  /** Consecutive crash count per project for exponential backoff */
9
9
  private crashCounts;
10
+ /** Set of projects where the "no resumable session → drop --continue" one-shot
11
+ * fallback has already fired. Without this guard, the auto-restart timer
12
+ * unconditionally re-spawns with --continue + startTerminal resets
13
+ * crashCounts, so handleExit would see (crashes0=0, continueSession=true)
14
+ * again and fall back forever, never exhausting MAX_RESTART_RETRIES. Cleared
15
+ * on stop() / killForUpdate() / switchCliTool() — i.e. only when the project's
16
+ * PTY lifecycle restarts cleanly. */
17
+ private continueFallbackDone;
10
18
  /** Throttle activity emissions to max once per 500ms per project */
11
19
  private activityThrottles;
12
20
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-manager.d.ts","sourceRoot":"","sources":["../src/terminal-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,OAAO,EAAW,MAAM,SAAS,CAAC;AAY3C,KAAK,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAmB7C,cAAM,eAAgB,SAAQ,YAAY;IACxC,OAAO,CAAC,SAAS,CAAuC;IACxD,qGAAqG;IACrG,OAAO,CAAC,aAAa,CAAoD;IACzE,kEAAkE;IAClE,OAAO,CAAC,WAAW,CAA6B;IAChD,oEAAoE;IACpE,OAAO,CAAC,iB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IAIxC,iFAAiF;IACjF,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAKnD,qGAAqG;IACrG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS;IAMzE,oFAAoF;IACpF,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAUxC,4FAA4F;IAC5F,gBAAgB,IAAI,MAAM,EAAE;IAI5B,SAAS,IAAI,IAAI;IAkBjB,OAAO,CAAC,aAAa;IAoGrB,OAAO,CAAC,UAAU;CAqFnB;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
@@ -58,6 +58,14 @@ class TerminalManager extends events_1.EventEmitter {
58
58
  this.restartTimers = new Map();
59
59
  /** Consecutive crash count per project for exponential backoff */
60
60
  this.crashCounts = new Map();
61
+ /** Set of projects where the "no resumable session → drop --continue" one-shot
62
+ * fallback has already fired. Without this guard, the auto-restart timer
63
+ * unconditionally re-spawns with --continue + startTerminal resets
64
+ * crashCounts, so handleExit would see (crashes0=0, continueSession=true)
65
+ * again and fall back forever, never exhausting MAX_RESTART_RETRIES. Cleared
66
+ * on stop() / killForUpdate() / switchCliTool() — i.e. only when the project's
67
+ * PTY lifecycle restarts cleanly. */
68
+ this.continueFallbackDone = new Set();
61
69
  /** Throttle activity emissions to max once per 500ms per project */
62
70
  this.activityThrottles = new Map();
63
71
  }
@@ -100,6 +108,11 @@ class TerminalManager extends events_1.EventEmitter {
100
108
  clearTimeout(timer);
101
109
  this.restartTimers.delete(projectId);
102
110
  }
111
+ // Clear lifecycle-bound state BEFORE the early-return so that a project
112
+ // sitting in restartTimer-only state (no live PTY) still has its fallback
113
+ // gate reset on stop. Otherwise a subsequent /start would inherit a spent
114
+ // gate and skip the one-shot --continue fallback for the new lifecycle.
115
+ this.continueFallbackDone.delete(projectId);
103
116
  const instance = this.terminals.get(projectId);
104
117
  if (!instance)
105
118
  return;
@@ -145,6 +158,7 @@ class TerminalManager extends events_1.EventEmitter {
145
158
  session_manager_1.sessionManager.stopWatcherForProject(projectId);
146
159
  }
147
160
  this.crashCounts.delete(projectId);
161
+ this.continueFallbackDone.delete(projectId);
148
162
  this.emit('cli-tool-switched', { projectId, cliTool: updatedProject.cliTool });
149
163
  this.startTerminal(updatedProject, broadcast, continueSession);
150
164
  }
@@ -165,6 +179,7 @@ class TerminalManager extends events_1.EventEmitter {
165
179
  catch { /* ignore */ }
166
180
  this.terminals.delete(projectId);
167
181
  this.activityThrottles.delete(projectId);
182
+ this.continueFallbackDone.delete(projectId);
168
183
  session_manager_1.sessionManager.stopWatcherForProject(projectId);
169
184
  // Deliberately do NOT change project.status — keep it as 'running'
170
185
  }
@@ -256,6 +271,10 @@ class TerminalManager extends events_1.EventEmitter {
256
271
  log.error({ err, projectId: project.id, cliTool: project.cliTool }, 'pty spawn failed');
257
272
  project.status = 'stopped';
258
273
  (0, config_1.saveProject)(project);
274
+ // Clear the gate so the next /start can fall back again. Without this,
275
+ // a fallback-triggered startTerminal that fails at spawn() would leave
276
+ // continueFallbackDone set forever for this project.
277
+ this.continueFallbackDone.delete(project.id);
259
278
  return;
260
279
  }
261
280
  const instance = {
@@ -265,6 +284,7 @@ class TerminalManager extends events_1.EventEmitter {
265
284
  rawBroadcast,
266
285
  scrollback: '',
267
286
  lastActivityAt: null,
287
+ continueSession: effectiveContinue,
268
288
  };
269
289
  this.terminals.set(project.id, instance);
270
290
  this.crashCounts.delete(project.id);
@@ -304,10 +324,10 @@ class TerminalManager extends events_1.EventEmitter {
304
324
  if (project.cliTool === 'terminal') {
305
325
  instance.intentionalStop = true;
306
326
  }
307
- this.handleExit(project.id, instance);
327
+ this.handleExit(project.id, instance, exitCode);
308
328
  });
309
329
  }
310
- handleExit(projectId, exitingInstance) {
330
+ handleExit(projectId, exitingInstance, exitCode) {
311
331
  const instance = this.terminals.get(projectId);
312
332
  // If switchCliTool / stop already swapped the live instance, this onExit
313
333
  // belongs to the OLD pty — `instance` here is the new active one and must
@@ -321,8 +341,30 @@ class TerminalManager extends events_1.EventEmitter {
321
341
  }
322
342
  const { project, rawBroadcast } = instance;
323
343
  this.terminals.delete(projectId);
344
+ // First crash that came from a --continue / resume launch: re-spawn fresh
345
+ // without --continue, without burning a retry slot. Covers the common case
346
+ // where the project has no resumable session yet (claude prints
347
+ // "No conversation found to continue" and exits 1, leaving ccweb to spin
348
+ // forever in the auto-restart loop). If the fresh start also fails the
349
+ // normal backoff/give-up path takes over from there.
350
+ //
351
+ // continueFallbackDone gates this to one-shot per PTY lifecycle: the
352
+ // auto-restart timer always passes continueSession=true and startTerminal
353
+ // resets crashCounts, so without the gate (crashes0=0, continueSession=true)
354
+ // would re-trigger fallback forever and MAX_RESTART_RETRIES never bites.
355
+ const crashes0 = this.crashCounts.get(projectId) ?? 0;
356
+ if (crashes0 === 0 &&
357
+ exitingInstance?.continueSession &&
358
+ exitCode != null && exitCode !== 0 &&
359
+ !instance.intentionalStop &&
360
+ !this.continueFallbackDone.has(projectId)) {
361
+ this.continueFallbackDone.add(projectId);
362
+ log.info({ projectId, exitCode }, 'first crash on --continue spawn; falling back to fresh start');
363
+ this.startTerminal(project, rawBroadcast, false);
364
+ return;
365
+ }
324
366
  // Exponential backoff: 3s, 6s, 12s, 24s, 48s — then give up
325
- const crashes = (this.crashCounts.get(projectId) ?? 0) + 1;
367
+ const crashes = crashes0 + 1;
326
368
  this.crashCounts.set(projectId, crashes);
327
369
  if (crashes > MAX_RESTART_RETRIES) {
328
370
  log.error({ projectId, crashes, maxRetries: MAX_RESTART_RETRIES }, 'giving up auto-restart');
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-manager.js","sourceRoot":"","sources":["../src/terminal-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAChC,uCAAyB;AACzB,mCAAsC;AAEtC,qCAAoD;AACpD,uDAAmD;AACnD,yCAAwC;AACxC,qCAAqC;AAErC,6EAA6E;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AM,GAAG,YAAY,CAAC;QAC9B,IAAA,oBAAW,EAAC,OAAO,CAAC,CAAC;QACrB,YAAY,CAAC,4CAA4C,YAAY,OAAO,QAAQ,eAAe,OAAO,IAAI,mBAAmB,eAAe,CAAC,CAAC;QAElJ,GAAG,CAAC,IAAI,CACN;YACE,SAAS;YACT,QAAQ;YACR,OAAO;YACP,UAAU,EAAE,mBAAmB;YAC/B,WAAW,EAAE,OAAO,CAAC,gBAAgB,EAAE;SACxC,EACD,0BAA0B,CAC3B,CAAC;QACF,+EAA+E;QAC/E,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,QAAQ;YAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACrC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBACnC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QACV,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;CACF;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import{bE as e,bF as t,r as n,bG as r,c as a,f as i,bH as o,bI as s,j as l,R as c,d as u,aM as d,bJ as p,t as m,A as g,p as h,b4 as f,bK as b,a as y}from"./index-Bi0Lxaim.js";import{C as E}from"./chevron-down-CxkiZ1SD.js";import{C as S,a as v}from"./chevron-up-BZkUJHec.js";function w(){!e.current&&t();const[a]=n.useState(r.current);return a}
1
+ import{bE as e,bF as t,r as n,bG as r,c as a,f as i,bH as o,bI as s,j as l,R as c,d as u,aM as d,bJ as p,t as m,A as g,p as h,b4 as f,bK as b,a as y}from"./index-Bd6-XRQN.js";import{C as E}from"./chevron-down-CFYwGxZ7.js";import{C as S,a as v}from"./chevron-up-D91KEb_P.js";function w(){!e.current&&t();const[a]=n.useState(r.current);return a}
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *
@@ -1,4 +1,4 @@
1
- import{c as e,r as t,b as n,j as i,aM as r,B as o,l as a}from"./index-Bi0Lxaim.js";import{Z as s,a as l}from"./ProjectPage-ByY_pKon.js";import"./purify.es-CgRAQgUo.js";import"./AssistantMessageContent-fk_C4oct.js";import"./chevron-down-CxkiZ1SD.js";import"./chevron-up-BZkUJHec.js";import"./index-DsCTP_lW.js";import"./search-CSdU5BiW.js";
1
+ import{c as e,r as t,b as n,j as i,aM as r,B as o,l as a}from"./index-Bd6-XRQN.js";import{Z as s,a as l}from"./ProjectPage-C3ooYpFP.js";import"./purify.es-CgRAQgUo.js";import"./AssistantMessageContent-BiJL4SGC.js";import"./chevron-down-CFYwGxZ7.js";import"./chevron-up-D91KEb_P.js";import"./index-9M6XORRc.js";import"./search-D2ccvP_R.js";
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OfficePreview-DrS64ehu.js","assets/index-Bi0Lxaim.js","assets/index-BJDTvhqr.css","assets/purify.es-CgRAQgUo.js"])))=>i.map(i=>d[i]);
2
- import{c as e,aF as t,bt as s,aH as a,r as n,bu as r,bv as l,j as o,bw as c,l as i,d,bx as x,by as u,bz as m,bA as h,aV as p,aW as f,ab as g,aa as b,bB as j,t as v,a9 as y,aI as N,aM as w,b1 as k,a as C,b as S,g as I,D as M,f as z,R as P,_ as U,k as T,X as D,o as $,bC as A,bD as L,C as R,A as E,p as H}from"./index-Bi0Lxaim.js";import{A as _,f as F,T as O,G as q,M as B,r as W,a as V,b as K,c as G,e as J,h as Q,o as X,d as Y,I as Z,F as ee}from"./AssistantMessageContent-fk_C4oct.js";import{C as te}from"./chevron-up-BZkUJHec.js";import{C as se}from"./chevron-down-CxkiZ1SD.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OfficePreview-Bg2tz3fQ.js","assets/index-Bd6-XRQN.js","assets/index-BJDTvhqr.css","assets/purify.es-CgRAQgUo.js"])))=>i.map(i=>d[i]);
2
+ import{c as e,aF as t,bt as s,aH as a,r as n,bu as r,bv as l,j as o,bw as c,l as i,d,bx as x,by as u,bz as m,bA as h,aV as p,aW as f,ab as g,aa as b,bB as j,t as v,a9 as y,aI as N,aM as w,b1 as k,a as C,b as S,g as I,D as M,f as z,R as P,_ as U,k as T,X as D,o as $,bC as A,bD as L,C as R,A as E,p as H}from"./index-Bd6-XRQN.js";import{A as _,f as F,T as O,G as q,M as B,r as W,a as V,b as K,c as G,e as J,h as Q,o as X,d as Y,I as Z,F as ee}from"./AssistantMessageContent-BiJL4SGC.js";import{C as te}from"./chevron-up-D91KEb_P.js";import{C as se}from"./chevron-down-CFYwGxZ7.js";
3
3
  /**
4
4
  * @license lucide-react v0.309.0 - ISC
5
5
  *
@@ -11,4 +11,4 @@ import{c as e,aF as t,bt as s,aH as a,r as n,bu as r,bv as l,j as o,bw as c,l as
11
11
  *
12
12
  * This source code is licensed under the ISC license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
- */function ce({onSelectProject:e}){const h=t(),p=s(e=>e.clearToken),{projects:f,fetchProjects:g,hasFetched:b,loading:j}=a(),v=n.useCallback(()=>{a.getState().setProjects([]),p(),h("/login")},[p,h]),[y,N]=n.useState(new Map),[w,k]=n.useState(new Set),[C,S]=n.useState(!1);n.useEffect(()=>{g()},[g]);const I=n.useCallback(e=>{e.status&&N(t=>{const s=new Map(t);return s.set(e.projectId,e.status),s}),void 0!==e.active&&k(t=>{const s=new Set(t);return e.active?s.add(e.projectId):s.delete(e.projectId),s})},[]);r({onActivityUpdate:I});const{applyOrder:M}=l(),z=M(f.filter(e=>!e.archived));return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-3 px-4 h-12 border-b border-border shrink-0",children:[o.jsx("span",{className:"font-semibold text-base flex-1",children:"CC Web"}),o.jsx(c,{}),o.jsx("button",{onClick:()=>{(async()=>{S(!0);try{await g()}finally{S(!1)}})()},className:"text-muted-foreground active:text-foreground",disabled:C,"aria-label":"Refresh",children:o.jsx(i,{className:d("h-4 w-4",C&&"animate-spin")})}),o.jsx("button",{onClick:()=>h("/settings"),className:"text-muted-foreground active:text-foreground","aria-label":"Settings",children:o.jsx(x,{className:"h-4 w-4"})}),o.jsx("button",{onClick:v,className:"text-muted-foreground active:text-foreground","aria-label":"Logout",children:o.jsx(u,{className:"h-4 w-4"})}),!oe&&o.jsx("button",{onClick:()=>h("/"),className:"text-muted-foreground active:text-foreground","aria-label":"Desktop mode",children:o.jsx(m,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[j&&!b&&o.jsx("div",{className:"text-center text-muted-foreground text-sm py-12",children:"加载中..."}),b&&0===z.length&&o.jsx("div",{className:"text-center text-muted-foreground text-sm py-12",children:"暂无项目"}),o.jsx("div",{className:"grid grid-cols-2 gap-2",children:z.map(t=>{var s;const a="running"===(s=t,y.get(s.id)??s.status??"stopped"),n=w.has(t.id),r=o.jsxs("button",{onClick:()=>e(t.id),className:d("w-full text-left rounded-xl border bg-card p-2.5 active:bg-accent transition-colors",n?"border-transparent":"border-border"),children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[o.jsx("span",{className:d("w-2 h-2 rounded-full shrink-0",a?"bg-green-500":"bg-zinc-400")}),o.jsx("span",{className:"font-medium text-sm truncate flex-1",children:t.name})]}),o.jsx("div",{className:"text-[10px] text-muted-foreground font-mono truncate",children:t.cliTool??"claude"})]});return o.jsx("div",{className:n?"card-active-glow rounded-xl":void 0,children:r},t.id)})})]})]})}function ie(e){if(!e.phase)return null;if("thinking"===e.phase)return"思考中";if("tool_result"===e.phase)return"处理结果";if("tool_use"===e.phase){const t=(e.detail||"").toLowerCase();return"bash"===t?"执行命令":"read"===t?"读取文件":"edit"===t||"multiedit"===t?"编辑文件":"write"===t?"写入文件":"grep"===t?"搜索内容":"glob"===t?"匹配文件":"webfetch"===t||"websearch"===t?"访问网络":"task"===t?"调度子任务":"todowrite"===t?"更新任务列表":"notebookedit"===t?"编辑 Notebook":e.detail?`调用 ${e.detail}`:"调用工具"}return null}function de({project:e,onBack:t,onOpenPanel:s,onContextUpdate:a}){const[r,l]=n.useState(""),c=n.useRef(null),i=n.useRef(null),[x,u]=n.useState([]),m=n.useCallback(e=>{u(t=>{const s=[...t,e];return s.length>200?s.slice(-200):s})},[]),C=n.useRef(null),S=n.useCallback(e=>{var t;"stopped"===e&&(null==(t=C.current)||t.call(C,"stopped"))},[]),[I,M]=n.useState([]),z=n.useRef(new Set),P=n.useCallback(e=>{z.current.has(e.toolUseId)||M(t=>t.some(t=>t.toolUseId===e.toolUseId)?t:[...t,{projectId:e.projectId,toolUseId:e.toolUseId,toolName:e.toolName,toolInput:e.toolInput,sessionId:e.sessionId,createdAt:e.createdAt}])},[]),U=n.useCallback(e=>{z.current.add(e.toolUseId),M(t=>t.filter(t=>t.toolUseId!==e.toolUseId))},[]),T=n.useCallback(e=>{z.current.add(e),M(t=>t.filter(t=>t.toolUseId!==e))},[]),[D,$]=n.useState(null),A=n.useRef(0),L=n.useCallback(e=>{var t,s,a;if(!e.active)return void $(null);if("text"===(null==(t=e.semantic)?void 0:t.phase))return void $(null);const n=null==(s=e.semantic)?void 0:s.phase,r=null==(a=e.semantic)?void 0:a.detail;$(e=>e?e.phase===n&&e.detail===r?e:{...e,phase:n,detail:r}:{id:"mab"+ ++A.current,phase:n,detail:r})},[]),{sendInput:R,connected:E}=h({projectId:e.id,enabled:!0,onChatMessage:m,onStatusChange:S,onContextUpdate:a,onApprovalRequest:P,onApprovalResolved:U,onSemanticUpdate:L});n.useEffect(()=>{if(!E)return;if("claude"!==e.cliTool)return;let t=!1;return p(e.id).then(e=>{if(t)return;const s=e.pending.filter(e=>!z.current.has(e.toolUseId));M(e=>{const t=new Map;for(const a of s)t.set(a.toolUseId,a);for(const s of e)t.has(s.toolUseId)||z.current.has(s.toolUseId)||t.set(s.toolUseId,s);return[...t.values()]})}).catch(()=>{}),()=>{t=!0}},[e.id,e.cliTool,E]);const{state:H,setState:B,messages:W,hasMoreHistory:V,loadMoreHistory:K,sendMessage:G,isWaking:J}=f({project:e,liveMessages:x,ws:{send:R,connected:E},historyLimit:20});C.current=B;const Q=n.useRef(E);n.useEffect(()=>{!Q.current&&E&&u([]),Q.current=E},[E]);const X=(()=>{for(let e=W.length-1;e>=0;e--)if("assistant"===W[e].role)return e;return-1})(),[Y,Z]=n.useState([]),[ee,ne]=n.useState([]),[re,oe]=n.useState(null);n.useEffect(()=>{g().then(Z).catch(()=>{}),b(e.id).then(ne).catch(()=>{})},[e.id]);const ce=n.useCallback(async()=>{const e=c.current,t=(null==e?void 0:e.scrollHeight)??0;await K(),requestAnimationFrame(()=>{e&&(e.scrollTop+=e.scrollHeight-t)})},[K]),de=n.useRef(0);n.useEffect(()=>{const e=c.current;if(!e)return;const t=W.length>de.current,s=0===de.current&&W.length>0;de.current=W.length,s?e.scrollTo({top:e.scrollHeight}):t&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},[W,I.length]);const[xe,ue]=n.useState(!1),me=n.useCallback(async()=>{const e=r.trim();if(!e||xe)return;ue(!0);const t=await G(e);ue(!1),"delivered"===t&&(l(""),i.current&&(i.current.style.height="auto"))},[r,xe,G]),he=j(me,"shift"),pe=n.useCallback(async(t,s)=>{oe(null);try{"failed"===await G(t.command)?v.error("快捷命令未送达,请重试或检查会话"):"project"===s&&y(e.id,t.id,!0).catch(e=>{console.error("Failed to mark shortcut used:",e)})}catch(a){console.error("Shortcut send error:",a),v.error("快捷命令发送失败")}},[G,e.id]),fe="live"===H;return o.jsxs("div",{className:"flex flex-col h-full bg-background",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:t,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(N,{className:"h-5 w-5"})}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-1 min-w-0",children:[o.jsx("span",{className:"font-medium text-sm truncate",children:e.name}),o.jsx("span",{className:d("w-2 h-2 rounded-full shrink-0",fe?"bg-green-500":J?"bg-yellow-400 animate-pulse":"bg-zinc-400")})]}),o.jsx("button",{onClick:s,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(le,{className:"h-5 w-5"})})]}),o.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto px-3 py-3 space-y-3 min-h-0",children:[V&&o.jsx("div",{className:"flex justify-center pb-1",children:o.jsxs("button",{onClick:()=>{ce()},className:"flex items-center gap-1 px-3 py-1.5 rounded-full text-xs text-muted-foreground border border-border active:bg-accent transition-colors",children:[o.jsx(te,{className:"h-3 w-3"}),"加载更早消息"]})}),W.map((e,t)=>{const s="user"===e.role;return o.jsx("div",{className:d("flex",s?"justify-end":"justify-start"),children:o.jsx("div",{className:d("max-w-[85%] rounded-xl px-3 py-2 break-words text-sm leading-relaxed",s?"bg-blue-500/15 text-foreground border border-blue-500/20 rounded-br-sm whitespace-pre-wrap":"bg-secondary text-secondary-foreground border border-border rounded-bl-sm"),children:s?e.content:o.jsx(_,{content:e.content,blocks:e.blocks,isLatest:t===X})})},e.id)}),I.map(e=>o.jsx(F,{approval:e,onResolved:T},e.toolUseId)),D&&0===I.length&&o.jsx("div",{className:"flex justify-start",children:o.jsxs("div",{className:"rounded-2xl rounded-bl-md px-3 py-1.5 bg-black/5 dark:bg-white/10 border border-black/10 dark:border-white/15 flex items-center gap-2 text-xs text-muted-foreground",children:[o.jsx(O,{}),ie(D)&&o.jsx("span",{children:ie(D)})]})},D.id),0===W.length&&0===I.length&&!D&&"stopped"===H&&o.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/40 text-sm",children:"暂无对话记录"}),J&&o.jsx("div",{className:"flex items-center justify-center py-4 text-yellow-400 text-sm animate-pulse",children:"启动中..."})]}),re&&o.jsx("div",{className:"border-t border-border max-h-48 overflow-y-auto shrink-0",children:o.jsxs("div",{className:"px-3 py-2 space-y-1",children:[("global"===re?Y:ee).map(e=>o.jsxs("button",{onClick:()=>pe(e,re),disabled:J,className:d("w-full text-left rounded-md px-2.5 py-2 text-sm active:bg-accent transition-colors border border-border/50",J&&"opacity-50 cursor-not-allowed"),children:[o.jsx("div",{className:"font-medium text-xs",children:e.label}),o.jsx("div",{className:"text-[11px] text-muted-foreground font-mono truncate",children:e.command})]},e.id)),0===("global"===re?Y:ee).length&&o.jsx("div",{className:"text-center text-muted-foreground text-xs py-3",children:"暂无快捷 Prompts"})]})}),(Y.length>0||ee.length>0)&&o.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-t border-border shrink-0",children:[o.jsxs("button",{onClick:()=>oe(e=>"global"===e?null:"global"),className:d("flex items-center gap-1 px-2 py-1 rounded-md text-xs transition-colors","global"===re?"bg-blue-500/15 text-blue-500":"text-muted-foreground active:bg-accent"),children:[o.jsx(q,{className:"h-3 w-3"}),"全局","global"===re&&o.jsx(se,{className:"h-3 w-3"})]}),o.jsxs("button",{onClick:()=>oe(e=>"project"===e?null:"project"),className:d("flex items-center gap-1 px-2 py-1 rounded-md text-xs transition-colors","project"===re?"bg-blue-500/15 text-blue-500":"text-muted-foreground active:bg-accent"),children:[o.jsx(ae,{className:"h-3 w-3"}),"项目","project"===re&&o.jsx(se,{className:"h-3 w-3"})]})]}),o.jsx("div",{className:"border-t border-border px-3 py-2 shrink-0",style:{paddingBottom:"max(0.5rem, env(safe-area-inset-bottom))"},children:o.jsxs("div",{className:"flex items-end gap-2",children:[o.jsx("textarea",{ref:i,value:r,onChange:e=>l(e.target.value),onKeyDown:he,disabled:J||xe,placeholder:J?"启动中...":xe?"发送中…":"stopped"===H?"输入消息(自动启动)...":"输入消息...",rows:1,className:d("flex-1 resize-none rounded-md border border-input bg-transparent px-3 py-2 text-sm outline-none","focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50","max-h-32 overflow-y-auto",(J||xe)&&"opacity-50 cursor-not-allowed"),style:{minHeight:"2.5rem"},onInput:e=>{const t=e.currentTarget;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,128)+"px"}}),o.jsx("button",{onClick:me,disabled:J||xe||!r.trim(),className:d("shrink-0 p-2 rounded-md transition-colors",r.trim()&&!xe?"text-blue-500 active:bg-blue-500/10":"text-muted-foreground/30"),children:xe?o.jsx(w,{className:"h-5 w-5 animate-spin"}):o.jsx(k,{className:"h-5 w-5"})})]})})]})}const xe=P.lazy(()=>U(()=>import("./OfficePreview-DrS64ehu.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.OfficePreview}))),ue=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]),me=new Set(["docx","xlsx","xls","pptx"]),he={js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",cs:"csharp",php:"php",sh:"bash",bash:"bash",zsh:"bash",yaml:"yaml",yml:"yaml",json:"json",toml:"toml",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",less:"less",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"docker",makefile:"makefile",r:"r",lua:"lua",dart:"dart",zig:"zig"};function pe(e){return e.split("/").pop()??e}function fe({filePath:e,onBack:t}){const[s,a]=n.useState(null),[r,l]=n.useState(!0),[c,i]=n.useState(null),{resolved:d}=C(),x=function(e){const t=e.split("/").pop()??"",s=t.toLowerCase();if("dockerfile"===s)return"dockerfile";if("makefile"===s)return"makefile";const a=t.lastIndexOf(".");return a>=0?t.slice(a+1).toLowerCase():""}(e),u=ue.has(x),m=me.has(x),h=he[x],p="dark"===d;n.useEffect(()=>{u||m?l(!1):(l(!0),i(null),S(e).then(a).catch(e=>i(e instanceof Error?e.message:"Failed to load")).finally(()=>l(!1)))},[e,u,m]);const f=z(e),g=n.useMemo(()=>{const e=I();return e?`${f}&token=${encodeURIComponent(e)}`:f},[f]),b=n.useMemo(()=>u?`${g}&t=${Date.now()}`:"",[g,u]);return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:t,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(N,{className:"h-5 w-5"})}),o.jsx("span",{className:"flex-1 text-sm font-medium truncate",children:pe(e)}),o.jsx("a",{href:g,download:!0,className:"text-muted-foreground active:text-foreground p-1",onClick:e=>e.stopPropagation(),children:o.jsx(M,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-auto min-h-0",children:[r&&o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx(w,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),c&&o.jsx("div",{className:"text-center text-destructive text-sm py-12 px-4",children:c}),u&&o.jsx("div",{className:"flex items-center justify-center p-4 h-full",children:o.jsx("img",{src:b,alt:pe(e),className:"max-w-full max-h-full object-contain rounded",style:{touchAction:"pinch-zoom"}})}),m&&o.jsx(n.Suspense,{fallback:o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx(w,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),children:o.jsx(xe,{filePath:e,ext:x,zoom:100})}),s&&(s.binary||s.tooLarge)&&o.jsxs("div",{className:"text-center py-12 px-4 space-y-3",children:[o.jsxs("p",{className:"text-muted-foreground text-sm",children:[s.binary?"二进制文件":"文件过大",s.size>0&&` (${j=s.size,j<1024?`${j} B`:j<1048576?`${(j/1024).toFixed(1)} KB`:`${(j/1048576).toFixed(1)} MB`})`]}),o.jsxs("a",{href:g,download:!0,className:"inline-flex items-center gap-1.5 text-sm text-blue-500 active:text-blue-400",children:[o.jsx(M,{className:"h-4 w-4"}),"下载文件"]})]}),s&&!s.binary&&!s.tooLarge&&null!=s.content&&o.jsxs(o.Fragment,{children:["md"===x&&o.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none px-4 py-3",children:o.jsx(B,{remarkPlugins:[V,K],rehypePlugins:[W],urlTransform:(e,t,s)=>"src"===t&&"img"===s.tagName?e:J(e),components:{img:({src:t,alt:s,...a})=>o.jsx("img",{...a,src:G(e,t,I()),alt:s??"",loading:"lazy",style:{maxWidth:"100%",height:"auto"}})},children:s.content})}),"md"!==x&&h&&o.jsx(Q,{language:h,style:p?X:Y,customStyle:{margin:0,fontSize:"12px",borderRadius:0},showLineNumbers:!0,children:s.content}),"md"!==x&&!h&&o.jsx("pre",{className:"p-4 text-xs font-mono whitespace-pre-wrap break-words",children:s.content})]})]})]});var j}const ge=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]),be=new Set(["js","jsx","ts","tsx","py","rb","go","rs","java","c","cpp","h","swift","kt","cs","php","sh","bash","zsh","r","lua","dart","zig","css","scss","less","html","htm","xml","sql"]),je=new Set(["json","yaml","yml","toml","csv","tsv"]);function ve({entry:e}){if("dir"===e.type)return o.jsx($,{className:"h-8 w-8 text-blue-400"});const t=function(e){const t=e.lastIndexOf(".");return t>=0?e.slice(t+1).toLowerCase():""}(e.name);return ge.has(t)?o.jsx(Z,{className:"h-8 w-8 text-emerald-400"}):be.has(t)?o.jsx(ne,{className:"h-8 w-8 text-orange-400"}):je.has(t)?o.jsx(re,{className:"h-8 w-8 text-yellow-400"}):"md"===t?o.jsx(ee,{className:"h-8 w-8 text-sky-400"}):o.jsx(A,{className:"h-8 w-8 text-muted-foreground"})}function ye({rootPath:e,onClose:t}){const[s,a]=n.useState(e),[r,l]=n.useState([]),[c,i]=n.useState(!0),[d,x]=n.useState(null),u=n.useCallback(async e=>{i(!0);try{const t=[...(await T(e)).entries].sort((e,t)=>e.type!==t.type?"dir"===e.type?-1:1:e.name.localeCompare(t.name));l(t),a(e)}catch{l([])}finally{i(!1)}},[]);n.useEffect(()=>{u(e)},[e,u]);const m=s!==e,h=s.startsWith(e)?s.slice(e.length)||"/":s;return d?o.jsx(fe,{filePath:d,onBack:()=>x(null)}):o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:t,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(D,{className:"h-5 w-5"})}),o.jsxs("div",{className:"flex items-center gap-1 flex-1 min-w-0 text-sm",children:[m&&o.jsx("button",{onClick:()=>{if(s===e)return;const t=s.replace(/\/[^/]+$/,"")||"/";t.startsWith(e)&&u(t)},className:"text-muted-foreground active:text-foreground p-0.5 shrink-0",children:o.jsx(N,{className:"h-4 w-4"})}),o.jsx("span",{className:"truncate text-muted-foreground font-mono text-xs",children:h})]})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[c&&o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx(w,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),!c&&0===r.length&&o.jsx("div",{className:"text-center text-muted-foreground text-sm py-12",children:"空目录"}),!c&&o.jsx("div",{className:"grid grid-cols-3 gap-1",children:r.map(e=>o.jsxs("button",{onClick:()=>(e=>{"dir"===e.type?u(e.path):x(e.path)})(e),className:"flex flex-col items-center gap-1 p-2 rounded-md active:bg-accent transition-colors",children:[o.jsx(ve,{entry:e}),o.jsx("span",{className:"text-[11px] text-center leading-tight w-full line-clamp-2 break-all",children:e.name})]},e.path))})]})]})}function Ne(e){return e<50?"text-green-400":e<80?"text-yellow-400":"text-red-400"}function we(e){return e<50?"bg-green-500":e<80?"bg-yellow-500":"bg-red-500"}function ke({projectName:e,cliTool:t,folderPath:s,contextData:a,onClose:r}){const[l,c]=n.useState(new Set(["context","usage","files"])),[x,u]=n.useState(null),[m,h]=n.useState(!1),p=e=>{c(t=>{const s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})};n.useEffect(()=>{h(!0),L(t).then(u).catch(()=>u(null)).finally(()=>h(!1))},[t]);const f=a?Math.round(a.usedPercentage):null;return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:r,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(D,{className:"h-5 w-5"})}),o.jsx("span",{className:"flex-1 font-medium text-sm truncate",children:e})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[o.jsxs("button",{onClick:()=>p("context"),className:"w-full flex items-center gap-2 px-4 py-2.5 border-b border-border/50 active:bg-accent",children:[l.has("context")?o.jsx(se,{className:"h-3.5 w-3.5 text-muted-foreground"}):o.jsx(R,{className:"h-3.5 w-3.5 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:"上下文"}),null!==f&&o.jsxs("span",{className:d("text-xs font-mono ml-auto",Ne(f)),children:[f,"%"]})]}),l.has("context")&&o.jsx("div",{className:"px-4 py-3 border-b border-border/50",children:null!==f&&a?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex-1 h-2 bg-secondary rounded-full overflow-hidden",children:o.jsx("div",{className:d("h-full rounded-full transition-all",we(f)),style:{width:`${Math.min(f,100)}%`}})}),o.jsxs("span",{className:d("text-xs font-mono w-10 text-right",Ne(f)),children:[f,"%"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[o.jsx("span",{children:"窗口大小"}),o.jsx("span",{className:"text-right font-mono",children:a.contextWindowSize>=1e6?`${(a.contextWindowSize/1e6).toFixed(1)}M`:`${Math.round(a.contextWindowSize/1e3)}K`}),o.jsx("span",{children:"输入 tokens"}),o.jsx("span",{className:"text-right font-mono",children:a.inputTokens.toLocaleString()}),o.jsx("span",{children:"输出 tokens"}),o.jsx("span",{className:"text-right font-mono",children:a.outputTokens.toLocaleString()})]})]}):o.jsx("div",{className:"text-xs text-muted-foreground/50 text-center py-2",children:"暂无数据"})}),o.jsxs("div",{className:"w-full flex items-center gap-2 px-4 py-2.5 border-b border-border/50 cursor-pointer",role:"button",tabIndex:0,onClick:()=>p("usage"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||p("usage")},children:[l.has("usage")?o.jsx(se,{className:"h-3.5 w-3.5 text-muted-foreground"}):o.jsx(R,{className:"h-3.5 w-3.5 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:"用量"}),o.jsx("button",{onClick:e=>{e.stopPropagation(),(async()=>{h(!0);try{const{refreshUsage:e}=await U(async()=>{const{refreshUsage:e}=await import("./index-Bi0Lxaim.js").then(e=>e.bM);return{refreshUsage:e}},__vite__mapDeps([1,2]));u(await e(t))}catch{}finally{h(!1)}})()},className:"ml-auto text-muted-foreground active:text-foreground",children:o.jsx(i,{className:d("h-3 w-3",m&&"animate-spin")})})]}),l.has("usage")&&o.jsx("div",{className:"px-4 py-3 border-b border-border/50",children:x?o.jsxs("div",{className:"space-y-2",children:[x.planName&&o.jsxs("div",{className:"text-[11px] text-muted-foreground",children:["Plan: ",o.jsx("span",{className:"font-medium text-foreground",children:x.planName})]}),o.jsx(Ce,{label:"5h",bucket:x.fiveHour}),o.jsx(Ce,{label:"7d",bucket:x.sevenDay}),x.sevenDaySonnet&&o.jsx(Ce,{label:"7d Sonnet",bucket:x.sevenDaySonnet}),x.sevenDayOpus&&o.jsx(Ce,{label:"7d Opus",bucket:x.sevenDayOpus}),!x.fiveHour&&!x.sevenDay&&o.jsx("div",{className:"text-xs text-muted-foreground/50 text-center",children:"暂无数据"})]}):o.jsx("div",{className:"text-xs text-muted-foreground/50 text-center py-2",children:m?"加载中...":"暂无数据"})}),o.jsxs("button",{onClick:()=>p("files"),className:"w-full flex items-center gap-2 px-4 py-2.5 border-b border-border/50 active:bg-accent",children:[l.has("files")?o.jsx(se,{className:"h-3.5 w-3.5 text-muted-foreground"}):o.jsx(R,{className:"h-3.5 w-3.5 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:"文件"})]}),l.has("files")&&o.jsx("div",{className:"h-[60vh]",children:o.jsx(ye,{rootPath:s,onClose:()=>p("files")})})]})]})}function Ce({label:e,bucket:t}){if(!t||void 0===t.utilization)return null;const s=t.utilization,a=function(e){if(!e)return"";const t=new Date(e).getTime()-Date.now();if(t<=0)return"即将重置";const s=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4);return s>0?`${s}h${a}m`:`${a}m`}(t.resetAt);return o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-muted-foreground w-16",children:e}),o.jsx("div",{className:"flex-1 h-1.5 bg-secondary rounded-full overflow-hidden",children:o.jsx("div",{className:d("h-full rounded-full",we(s)),style:{width:`${Math.min(s,100)}%`}})}),o.jsxs("span",{className:d("text-xs font-mono w-8 text-right",Ne(s)),children:[s,"%"]}),a&&o.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:a})]})}function Se(){n.useEffect(()=>{const e=document.querySelector('meta[name="viewport"]');if(!e)return;const t=e.getAttribute("content")??"";return e.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"),()=>{e.setAttribute("content",t)}},[]);const[e,t]=n.useState({screen:"list"}),[s,r]=n.useState(null),l=a(e=>e.projects),c=n.useCallback(e=>{t({screen:"chat",projectId:e}),r(null)},[]),i=n.useCallback(e=>{t({screen:"panel",projectId:e})},[]),d=n.useCallback(()=>{t(e=>"panel"===e.screen?{screen:"chat",projectId:e.projectId}:{screen:"list"})},[]),x="list"!==e.screen?l.find(t=>t.id===e.projectId):void 0;return o.jsxs("div",{className:"fixed inset-0 bg-background overflow-hidden",children:[o.jsxs(E,{mode:"wait",children:["list"===e.screen&&o.jsx(H.div,{className:"absolute inset-0",initial:{opacity:0},animate:{opacity:1},exit:{x:"-30%",opacity:0},transition:{duration:.2},style:{paddingTop:"env(safe-area-inset-top)"},children:o.jsx(ce,{onSelectProject:c})},"list"),"chat"===e.screen&&x&&o.jsx(H.div,{className:"absolute inset-0",initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.25},style:{paddingTop:"env(safe-area-inset-top)"},children:o.jsx(de,{project:x,onBack:d,onOpenPanel:()=>i(e.projectId),onContextUpdate:r})},`chat-${e.projectId}`)]}),o.jsx(E,{children:"panel"===e.screen&&x&&o.jsx(H.div,{className:"absolute inset-0 z-50 bg-background",initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.25},style:{paddingTop:"env(safe-area-inset-top)"},children:o.jsx(ke,{projectName:x.name,cliTool:x.cliTool??"claude",folderPath:x.folderPath,contextData:s,onClose:d})},"panel")})]})}export{Se as MobilePage};
14
+ */function ce({onSelectProject:e}){const h=t(),p=s(e=>e.clearToken),{projects:f,fetchProjects:g,hasFetched:b,loading:j}=a(),v=n.useCallback(()=>{a.getState().setProjects([]),p(),h("/login")},[p,h]),[y,N]=n.useState(new Map),[w,k]=n.useState(new Set),[C,S]=n.useState(!1);n.useEffect(()=>{g()},[g]);const I=n.useCallback(e=>{e.status&&N(t=>{const s=new Map(t);return s.set(e.projectId,e.status),s}),void 0!==e.active&&k(t=>{const s=new Set(t);return e.active?s.add(e.projectId):s.delete(e.projectId),s})},[]);r({onActivityUpdate:I});const{applyOrder:M}=l(),z=M(f.filter(e=>!e.archived));return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-3 px-4 h-12 border-b border-border shrink-0",children:[o.jsx("span",{className:"font-semibold text-base flex-1",children:"CC Web"}),o.jsx(c,{}),o.jsx("button",{onClick:()=>{(async()=>{S(!0);try{await g()}finally{S(!1)}})()},className:"text-muted-foreground active:text-foreground",disabled:C,"aria-label":"Refresh",children:o.jsx(i,{className:d("h-4 w-4",C&&"animate-spin")})}),o.jsx("button",{onClick:()=>h("/settings"),className:"text-muted-foreground active:text-foreground","aria-label":"Settings",children:o.jsx(x,{className:"h-4 w-4"})}),o.jsx("button",{onClick:v,className:"text-muted-foreground active:text-foreground","aria-label":"Logout",children:o.jsx(u,{className:"h-4 w-4"})}),!oe&&o.jsx("button",{onClick:()=>h("/"),className:"text-muted-foreground active:text-foreground","aria-label":"Desktop mode",children:o.jsx(m,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[j&&!b&&o.jsx("div",{className:"text-center text-muted-foreground text-sm py-12",children:"加载中..."}),b&&0===z.length&&o.jsx("div",{className:"text-center text-muted-foreground text-sm py-12",children:"暂无项目"}),o.jsx("div",{className:"grid grid-cols-2 gap-2",children:z.map(t=>{var s;const a="running"===(s=t,y.get(s.id)??s.status??"stopped"),n=w.has(t.id),r=o.jsxs("button",{onClick:()=>e(t.id),className:d("w-full text-left rounded-xl border bg-card p-2.5 active:bg-accent transition-colors",n?"border-transparent":"border-border"),children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[o.jsx("span",{className:d("w-2 h-2 rounded-full shrink-0",a?"bg-green-500":"bg-zinc-400")}),o.jsx("span",{className:"font-medium text-sm truncate flex-1",children:t.name})]}),o.jsx("div",{className:"text-[10px] text-muted-foreground font-mono truncate",children:t.cliTool??"claude"})]});return o.jsx("div",{className:n?"card-active-glow rounded-xl":void 0,children:r},t.id)})})]})]})}function ie(e){if(!e.phase)return null;if("thinking"===e.phase)return"思考中";if("tool_result"===e.phase)return"处理结果";if("tool_use"===e.phase){const t=(e.detail||"").toLowerCase();return"bash"===t?"执行命令":"read"===t?"读取文件":"edit"===t||"multiedit"===t?"编辑文件":"write"===t?"写入文件":"grep"===t?"搜索内容":"glob"===t?"匹配文件":"webfetch"===t||"websearch"===t?"访问网络":"task"===t?"调度子任务":"todowrite"===t?"更新任务列表":"notebookedit"===t?"编辑 Notebook":e.detail?`调用 ${e.detail}`:"调用工具"}return null}function de({project:e,onBack:t,onOpenPanel:s,onContextUpdate:a}){const[r,l]=n.useState(""),c=n.useRef(null),i=n.useRef(null),[x,u]=n.useState([]),m=n.useCallback(e=>{u(t=>{const s=[...t,e];return s.length>200?s.slice(-200):s})},[]),C=n.useRef(null),S=n.useCallback(e=>{var t;"stopped"===e&&(null==(t=C.current)||t.call(C,"stopped"))},[]),[I,M]=n.useState([]),z=n.useRef(new Set),P=n.useCallback(e=>{z.current.has(e.toolUseId)||M(t=>t.some(t=>t.toolUseId===e.toolUseId)?t:[...t,{projectId:e.projectId,toolUseId:e.toolUseId,toolName:e.toolName,toolInput:e.toolInput,sessionId:e.sessionId,createdAt:e.createdAt}])},[]),U=n.useCallback(e=>{z.current.add(e.toolUseId),M(t=>t.filter(t=>t.toolUseId!==e.toolUseId))},[]),T=n.useCallback(e=>{z.current.add(e),M(t=>t.filter(t=>t.toolUseId!==e))},[]),[D,$]=n.useState(null),A=n.useRef(0),L=n.useCallback(e=>{var t,s,a;if(!e.active)return void $(null);if("text"===(null==(t=e.semantic)?void 0:t.phase))return void $(null);const n=null==(s=e.semantic)?void 0:s.phase,r=null==(a=e.semantic)?void 0:a.detail;$(e=>e?e.phase===n&&e.detail===r?e:{...e,phase:n,detail:r}:{id:"mab"+ ++A.current,phase:n,detail:r})},[]),{sendInput:R,connected:E}=h({projectId:e.id,enabled:!0,onChatMessage:m,onStatusChange:S,onContextUpdate:a,onApprovalRequest:P,onApprovalResolved:U,onSemanticUpdate:L});n.useEffect(()=>{if(!E)return;if("claude"!==e.cliTool)return;let t=!1;return p(e.id).then(e=>{if(t)return;const s=e.pending.filter(e=>!z.current.has(e.toolUseId));M(e=>{const t=new Map;for(const a of s)t.set(a.toolUseId,a);for(const s of e)t.has(s.toolUseId)||z.current.has(s.toolUseId)||t.set(s.toolUseId,s);return[...t.values()]})}).catch(()=>{}),()=>{t=!0}},[e.id,e.cliTool,E]);const{state:H,setState:B,messages:W,hasMoreHistory:V,loadMoreHistory:K,sendMessage:G,isWaking:J}=f({project:e,liveMessages:x,ws:{send:R,connected:E},historyLimit:20});C.current=B;const Q=n.useRef(E);n.useEffect(()=>{!Q.current&&E&&u([]),Q.current=E},[E]);const X=(()=>{for(let e=W.length-1;e>=0;e--)if("assistant"===W[e].role)return e;return-1})(),[Y,Z]=n.useState([]),[ee,ne]=n.useState([]),[re,oe]=n.useState(null);n.useEffect(()=>{g().then(Z).catch(()=>{}),b(e.id).then(ne).catch(()=>{})},[e.id]);const ce=n.useCallback(async()=>{const e=c.current,t=(null==e?void 0:e.scrollHeight)??0;await K(),requestAnimationFrame(()=>{e&&(e.scrollTop+=e.scrollHeight-t)})},[K]),de=n.useRef(0);n.useEffect(()=>{const e=c.current;if(!e)return;const t=W.length>de.current,s=0===de.current&&W.length>0;de.current=W.length,s?e.scrollTo({top:e.scrollHeight}):t&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},[W,I.length]);const[xe,ue]=n.useState(!1),me=n.useCallback(async()=>{const e=r.trim();if(!e||xe)return;ue(!0);const t=await G(e);ue(!1),"delivered"===t&&(l(""),i.current&&(i.current.style.height="auto"))},[r,xe,G]),he=j(me,"shift"),pe=n.useCallback(async(t,s)=>{oe(null);try{"failed"===await G(t.command)?v.error("快捷命令未送达,请重试或检查会话"):"project"===s&&y(e.id,t.id,!0).catch(e=>{console.error("Failed to mark shortcut used:",e)})}catch(a){console.error("Shortcut send error:",a),v.error("快捷命令发送失败")}},[G,e.id]),fe="live"===H;return o.jsxs("div",{className:"flex flex-col h-full bg-background",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:t,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(N,{className:"h-5 w-5"})}),o.jsxs("div",{className:"flex items-center gap-1.5 flex-1 min-w-0",children:[o.jsx("span",{className:"font-medium text-sm truncate",children:e.name}),o.jsx("span",{className:d("w-2 h-2 rounded-full shrink-0",fe?"bg-green-500":J?"bg-yellow-400 animate-pulse":"bg-zinc-400")})]}),o.jsx("button",{onClick:s,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(le,{className:"h-5 w-5"})})]}),o.jsxs("div",{ref:c,className:"flex-1 overflow-y-auto px-3 py-3 space-y-3 min-h-0",children:[V&&o.jsx("div",{className:"flex justify-center pb-1",children:o.jsxs("button",{onClick:()=>{ce()},className:"flex items-center gap-1 px-3 py-1.5 rounded-full text-xs text-muted-foreground border border-border active:bg-accent transition-colors",children:[o.jsx(te,{className:"h-3 w-3"}),"加载更早消息"]})}),W.map((e,t)=>{const s="user"===e.role;return o.jsx("div",{className:d("flex",s?"justify-end":"justify-start"),children:o.jsx("div",{className:d("max-w-[85%] rounded-xl px-3 py-2 break-words text-sm leading-relaxed",s?"bg-blue-500/15 text-foreground border border-blue-500/20 rounded-br-sm whitespace-pre-wrap":"bg-secondary text-secondary-foreground border border-border rounded-bl-sm"),children:s?e.content:o.jsx(_,{content:e.content,blocks:e.blocks,isLatest:t===X})})},e.id)}),I.map(e=>o.jsx(F,{approval:e,onResolved:T},e.toolUseId)),D&&0===I.length&&o.jsx("div",{className:"flex justify-start",children:o.jsxs("div",{className:"rounded-2xl rounded-bl-md px-3 py-1.5 bg-black/5 dark:bg-white/10 border border-black/10 dark:border-white/15 flex items-center gap-2 text-xs text-muted-foreground",children:[o.jsx(O,{}),ie(D)&&o.jsx("span",{children:ie(D)})]})},D.id),0===W.length&&0===I.length&&!D&&"stopped"===H&&o.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/40 text-sm",children:"暂无对话记录"}),J&&o.jsx("div",{className:"flex items-center justify-center py-4 text-yellow-400 text-sm animate-pulse",children:"启动中..."})]}),re&&o.jsx("div",{className:"border-t border-border max-h-48 overflow-y-auto shrink-0",children:o.jsxs("div",{className:"px-3 py-2 space-y-1",children:[("global"===re?Y:ee).map(e=>o.jsxs("button",{onClick:()=>pe(e,re),disabled:J,className:d("w-full text-left rounded-md px-2.5 py-2 text-sm active:bg-accent transition-colors border border-border/50",J&&"opacity-50 cursor-not-allowed"),children:[o.jsx("div",{className:"font-medium text-xs",children:e.label}),o.jsx("div",{className:"text-[11px] text-muted-foreground font-mono truncate",children:e.command})]},e.id)),0===("global"===re?Y:ee).length&&o.jsx("div",{className:"text-center text-muted-foreground text-xs py-3",children:"暂无快捷 Prompts"})]})}),(Y.length>0||ee.length>0)&&o.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-t border-border shrink-0",children:[o.jsxs("button",{onClick:()=>oe(e=>"global"===e?null:"global"),className:d("flex items-center gap-1 px-2 py-1 rounded-md text-xs transition-colors","global"===re?"bg-blue-500/15 text-blue-500":"text-muted-foreground active:bg-accent"),children:[o.jsx(q,{className:"h-3 w-3"}),"全局","global"===re&&o.jsx(se,{className:"h-3 w-3"})]}),o.jsxs("button",{onClick:()=>oe(e=>"project"===e?null:"project"),className:d("flex items-center gap-1 px-2 py-1 rounded-md text-xs transition-colors","project"===re?"bg-blue-500/15 text-blue-500":"text-muted-foreground active:bg-accent"),children:[o.jsx(ae,{className:"h-3 w-3"}),"项目","project"===re&&o.jsx(se,{className:"h-3 w-3"})]})]}),o.jsx("div",{className:"border-t border-border px-3 py-2 shrink-0",style:{paddingBottom:"max(0.5rem, env(safe-area-inset-bottom))"},children:o.jsxs("div",{className:"flex items-end gap-2",children:[o.jsx("textarea",{ref:i,value:r,onChange:e=>l(e.target.value),onKeyDown:he,disabled:J||xe,placeholder:J?"启动中...":xe?"发送中…":"stopped"===H?"输入消息(自动启动)...":"输入消息...",rows:1,className:d("flex-1 resize-none rounded-md border border-input bg-transparent px-3 py-2 text-sm outline-none","focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50","max-h-32 overflow-y-auto",(J||xe)&&"opacity-50 cursor-not-allowed"),style:{minHeight:"2.5rem"},onInput:e=>{const t=e.currentTarget;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,128)+"px"}}),o.jsx("button",{onClick:me,disabled:J||xe||!r.trim(),className:d("shrink-0 p-2 rounded-md transition-colors",r.trim()&&!xe?"text-blue-500 active:bg-blue-500/10":"text-muted-foreground/30"),children:xe?o.jsx(w,{className:"h-5 w-5 animate-spin"}):o.jsx(k,{className:"h-5 w-5"})})]})})]})}const xe=P.lazy(()=>U(()=>import("./OfficePreview-Bg2tz3fQ.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.OfficePreview}))),ue=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]),me=new Set(["docx","xlsx","xls","pptx"]),he={js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",cs:"csharp",php:"php",sh:"bash",bash:"bash",zsh:"bash",yaml:"yaml",yml:"yaml",json:"json",toml:"toml",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",less:"less",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"docker",makefile:"makefile",r:"r",lua:"lua",dart:"dart",zig:"zig"};function pe(e){return e.split("/").pop()??e}function fe({filePath:e,onBack:t}){const[s,a]=n.useState(null),[r,l]=n.useState(!0),[c,i]=n.useState(null),{resolved:d}=C(),x=function(e){const t=e.split("/").pop()??"",s=t.toLowerCase();if("dockerfile"===s)return"dockerfile";if("makefile"===s)return"makefile";const a=t.lastIndexOf(".");return a>=0?t.slice(a+1).toLowerCase():""}(e),u=ue.has(x),m=me.has(x),h=he[x],p="dark"===d;n.useEffect(()=>{u||m?l(!1):(l(!0),i(null),S(e).then(a).catch(e=>i(e instanceof Error?e.message:"Failed to load")).finally(()=>l(!1)))},[e,u,m]);const f=z(e),g=n.useMemo(()=>{const e=I();return e?`${f}&token=${encodeURIComponent(e)}`:f},[f]),b=n.useMemo(()=>u?`${g}&t=${Date.now()}`:"",[g,u]);return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:t,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(N,{className:"h-5 w-5"})}),o.jsx("span",{className:"flex-1 text-sm font-medium truncate",children:pe(e)}),o.jsx("a",{href:g,download:!0,className:"text-muted-foreground active:text-foreground p-1",onClick:e=>e.stopPropagation(),children:o.jsx(M,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-auto min-h-0",children:[r&&o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx(w,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),c&&o.jsx("div",{className:"text-center text-destructive text-sm py-12 px-4",children:c}),u&&o.jsx("div",{className:"flex items-center justify-center p-4 h-full",children:o.jsx("img",{src:b,alt:pe(e),className:"max-w-full max-h-full object-contain rounded",style:{touchAction:"pinch-zoom"}})}),m&&o.jsx(n.Suspense,{fallback:o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx(w,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),children:o.jsx(xe,{filePath:e,ext:x,zoom:100})}),s&&(s.binary||s.tooLarge)&&o.jsxs("div",{className:"text-center py-12 px-4 space-y-3",children:[o.jsxs("p",{className:"text-muted-foreground text-sm",children:[s.binary?"二进制文件":"文件过大",s.size>0&&` (${j=s.size,j<1024?`${j} B`:j<1048576?`${(j/1024).toFixed(1)} KB`:`${(j/1048576).toFixed(1)} MB`})`]}),o.jsxs("a",{href:g,download:!0,className:"inline-flex items-center gap-1.5 text-sm text-blue-500 active:text-blue-400",children:[o.jsx(M,{className:"h-4 w-4"}),"下载文件"]})]}),s&&!s.binary&&!s.tooLarge&&null!=s.content&&o.jsxs(o.Fragment,{children:["md"===x&&o.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none px-4 py-3",children:o.jsx(B,{remarkPlugins:[V,K],rehypePlugins:[W],urlTransform:(e,t,s)=>"src"===t&&"img"===s.tagName?e:J(e),components:{img:({src:t,alt:s,...a})=>o.jsx("img",{...a,src:G(e,t,I()),alt:s??"",loading:"lazy",style:{maxWidth:"100%",height:"auto"}})},children:s.content})}),"md"!==x&&h&&o.jsx(Q,{language:h,style:p?X:Y,customStyle:{margin:0,fontSize:"12px",borderRadius:0},showLineNumbers:!0,children:s.content}),"md"!==x&&!h&&o.jsx("pre",{className:"p-4 text-xs font-mono whitespace-pre-wrap break-words",children:s.content})]})]})]});var j}const ge=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]),be=new Set(["js","jsx","ts","tsx","py","rb","go","rs","java","c","cpp","h","swift","kt","cs","php","sh","bash","zsh","r","lua","dart","zig","css","scss","less","html","htm","xml","sql"]),je=new Set(["json","yaml","yml","toml","csv","tsv"]);function ve({entry:e}){if("dir"===e.type)return o.jsx($,{className:"h-8 w-8 text-blue-400"});const t=function(e){const t=e.lastIndexOf(".");return t>=0?e.slice(t+1).toLowerCase():""}(e.name);return ge.has(t)?o.jsx(Z,{className:"h-8 w-8 text-emerald-400"}):be.has(t)?o.jsx(ne,{className:"h-8 w-8 text-orange-400"}):je.has(t)?o.jsx(re,{className:"h-8 w-8 text-yellow-400"}):"md"===t?o.jsx(ee,{className:"h-8 w-8 text-sky-400"}):o.jsx(A,{className:"h-8 w-8 text-muted-foreground"})}function ye({rootPath:e,onClose:t}){const[s,a]=n.useState(e),[r,l]=n.useState([]),[c,i]=n.useState(!0),[d,x]=n.useState(null),u=n.useCallback(async e=>{i(!0);try{const t=[...(await T(e)).entries].sort((e,t)=>e.type!==t.type?"dir"===e.type?-1:1:e.name.localeCompare(t.name));l(t),a(e)}catch{l([])}finally{i(!1)}},[]);n.useEffect(()=>{u(e)},[e,u]);const m=s!==e,h=s.startsWith(e)?s.slice(e.length)||"/":s;return d?o.jsx(fe,{filePath:d,onBack:()=>x(null)}):o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:t,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(D,{className:"h-5 w-5"})}),o.jsxs("div",{className:"flex items-center gap-1 flex-1 min-w-0 text-sm",children:[m&&o.jsx("button",{onClick:()=>{if(s===e)return;const t=s.replace(/\/[^/]+$/,"")||"/";t.startsWith(e)&&u(t)},className:"text-muted-foreground active:text-foreground p-0.5 shrink-0",children:o.jsx(N,{className:"h-4 w-4"})}),o.jsx("span",{className:"truncate text-muted-foreground font-mono text-xs",children:h})]})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[c&&o.jsx("div",{className:"flex items-center justify-center py-12",children:o.jsx(w,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),!c&&0===r.length&&o.jsx("div",{className:"text-center text-muted-foreground text-sm py-12",children:"空目录"}),!c&&o.jsx("div",{className:"grid grid-cols-3 gap-1",children:r.map(e=>o.jsxs("button",{onClick:()=>(e=>{"dir"===e.type?u(e.path):x(e.path)})(e),className:"flex flex-col items-center gap-1 p-2 rounded-md active:bg-accent transition-colors",children:[o.jsx(ve,{entry:e}),o.jsx("span",{className:"text-[11px] text-center leading-tight w-full line-clamp-2 break-all",children:e.name})]},e.path))})]})]})}function Ne(e){return e<50?"text-green-400":e<80?"text-yellow-400":"text-red-400"}function we(e){return e<50?"bg-green-500":e<80?"bg-yellow-500":"bg-red-500"}function ke({projectName:e,cliTool:t,folderPath:s,contextData:a,onClose:r}){const[l,c]=n.useState(new Set(["context","usage","files"])),[x,u]=n.useState(null),[m,h]=n.useState(!1),p=e=>{c(t=>{const s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})};n.useEffect(()=>{h(!0),L(t).then(u).catch(()=>u(null)).finally(()=>h(!1))},[t]);const f=a?Math.round(a.usedPercentage):null;return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 h-12 border-b border-border shrink-0",children:[o.jsx("button",{onClick:r,className:"text-muted-foreground active:text-foreground p-1",children:o.jsx(D,{className:"h-5 w-5"})}),o.jsx("span",{className:"flex-1 font-medium text-sm truncate",children:e})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[o.jsxs("button",{onClick:()=>p("context"),className:"w-full flex items-center gap-2 px-4 py-2.5 border-b border-border/50 active:bg-accent",children:[l.has("context")?o.jsx(se,{className:"h-3.5 w-3.5 text-muted-foreground"}):o.jsx(R,{className:"h-3.5 w-3.5 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:"上下文"}),null!==f&&o.jsxs("span",{className:d("text-xs font-mono ml-auto",Ne(f)),children:[f,"%"]})]}),l.has("context")&&o.jsx("div",{className:"px-4 py-3 border-b border-border/50",children:null!==f&&a?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex-1 h-2 bg-secondary rounded-full overflow-hidden",children:o.jsx("div",{className:d("h-full rounded-full transition-all",we(f)),style:{width:`${Math.min(f,100)}%`}})}),o.jsxs("span",{className:d("text-xs font-mono w-10 text-right",Ne(f)),children:[f,"%"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[o.jsx("span",{children:"窗口大小"}),o.jsx("span",{className:"text-right font-mono",children:a.contextWindowSize>=1e6?`${(a.contextWindowSize/1e6).toFixed(1)}M`:`${Math.round(a.contextWindowSize/1e3)}K`}),o.jsx("span",{children:"输入 tokens"}),o.jsx("span",{className:"text-right font-mono",children:a.inputTokens.toLocaleString()}),o.jsx("span",{children:"输出 tokens"}),o.jsx("span",{className:"text-right font-mono",children:a.outputTokens.toLocaleString()})]})]}):o.jsx("div",{className:"text-xs text-muted-foreground/50 text-center py-2",children:"暂无数据"})}),o.jsxs("div",{className:"w-full flex items-center gap-2 px-4 py-2.5 border-b border-border/50 cursor-pointer",role:"button",tabIndex:0,onClick:()=>p("usage"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||p("usage")},children:[l.has("usage")?o.jsx(se,{className:"h-3.5 w-3.5 text-muted-foreground"}):o.jsx(R,{className:"h-3.5 w-3.5 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:"用量"}),o.jsx("button",{onClick:e=>{e.stopPropagation(),(async()=>{h(!0);try{const{refreshUsage:e}=await U(async()=>{const{refreshUsage:e}=await import("./index-Bd6-XRQN.js").then(e=>e.bM);return{refreshUsage:e}},__vite__mapDeps([1,2]));u(await e(t))}catch{}finally{h(!1)}})()},className:"ml-auto text-muted-foreground active:text-foreground",children:o.jsx(i,{className:d("h-3 w-3",m&&"animate-spin")})})]}),l.has("usage")&&o.jsx("div",{className:"px-4 py-3 border-b border-border/50",children:x?o.jsxs("div",{className:"space-y-2",children:[x.planName&&o.jsxs("div",{className:"text-[11px] text-muted-foreground",children:["Plan: ",o.jsx("span",{className:"font-medium text-foreground",children:x.planName})]}),o.jsx(Ce,{label:"5h",bucket:x.fiveHour}),o.jsx(Ce,{label:"7d",bucket:x.sevenDay}),x.sevenDaySonnet&&o.jsx(Ce,{label:"7d Sonnet",bucket:x.sevenDaySonnet}),x.sevenDayOpus&&o.jsx(Ce,{label:"7d Opus",bucket:x.sevenDayOpus}),!x.fiveHour&&!x.sevenDay&&o.jsx("div",{className:"text-xs text-muted-foreground/50 text-center",children:"暂无数据"})]}):o.jsx("div",{className:"text-xs text-muted-foreground/50 text-center py-2",children:m?"加载中...":"暂无数据"})}),o.jsxs("button",{onClick:()=>p("files"),className:"w-full flex items-center gap-2 px-4 py-2.5 border-b border-border/50 active:bg-accent",children:[l.has("files")?o.jsx(se,{className:"h-3.5 w-3.5 text-muted-foreground"}):o.jsx(R,{className:"h-3.5 w-3.5 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:"文件"})]}),l.has("files")&&o.jsx("div",{className:"h-[60vh]",children:o.jsx(ye,{rootPath:s,onClose:()=>p("files")})})]})]})}function Ce({label:e,bucket:t}){if(!t||void 0===t.utilization)return null;const s=t.utilization,a=function(e){if(!e)return"";const t=new Date(e).getTime()-Date.now();if(t<=0)return"即将重置";const s=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4);return s>0?`${s}h${a}m`:`${a}m`}(t.resetAt);return o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-muted-foreground w-16",children:e}),o.jsx("div",{className:"flex-1 h-1.5 bg-secondary rounded-full overflow-hidden",children:o.jsx("div",{className:d("h-full rounded-full",we(s)),style:{width:`${Math.min(s,100)}%`}})}),o.jsxs("span",{className:d("text-xs font-mono w-8 text-right",Ne(s)),children:[s,"%"]}),a&&o.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:a})]})}function Se(){n.useEffect(()=>{const e=document.querySelector('meta[name="viewport"]');if(!e)return;const t=e.getAttribute("content")??"";return e.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"),()=>{e.setAttribute("content",t)}},[]);const[e,t]=n.useState({screen:"list"}),[s,r]=n.useState(null),l=a(e=>e.projects),c=n.useCallback(e=>{t({screen:"chat",projectId:e}),r(null)},[]),i=n.useCallback(e=>{t({screen:"panel",projectId:e})},[]),d=n.useCallback(()=>{t(e=>"panel"===e.screen?{screen:"chat",projectId:e.projectId}:{screen:"list"})},[]),x="list"!==e.screen?l.find(t=>t.id===e.projectId):void 0;return o.jsxs("div",{className:"fixed inset-0 bg-background overflow-hidden",children:[o.jsxs(E,{mode:"wait",children:["list"===e.screen&&o.jsx(H.div,{className:"absolute inset-0",initial:{opacity:0},animate:{opacity:1},exit:{x:"-30%",opacity:0},transition:{duration:.2},style:{paddingTop:"env(safe-area-inset-top)"},children:o.jsx(ce,{onSelectProject:c})},"list"),"chat"===e.screen&&x&&o.jsx(H.div,{className:"absolute inset-0",initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.25},style:{paddingTop:"env(safe-area-inset-top)"},children:o.jsx(de,{project:x,onBack:d,onOpenPanel:()=>i(e.projectId),onContextUpdate:r})},`chat-${e.projectId}`)]}),o.jsx(E,{children:"panel"===e.screen&&x&&o.jsx(H.div,{className:"absolute inset-0 z-50 bg-background",initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.25},style:{paddingTop:"env(safe-area-inset-top)"},children:o.jsx(ke,{projectName:x.name,cliTool:x.cliTool??"claude",folderPath:x.folderPath,contextData:s,onClose:d})},"panel")})]})}export{Se as MobilePage};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DupxITkq.js","assets/index-Bi0Lxaim.js","assets/index-BJDTvhqr.css","assets/jszip.min-Cm3MH9ZY.js"])))=>i.map(i=>d[i]);
2
- import{j as e,r as t,_ as s,g as r,f as a}from"./index-Bi0Lxaim.js";import{p as n}from"./purify.es-CgRAQgUo.js";async function l(e){let t=a(e);const s=r();s&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(s)}`);const n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch file: ${n.status}`);return n.arrayBuffer()}function o({filePath:r,zoom:a}){const[o,i]=t.useState(""),[d,c]=t.useState(null),[x,u]=t.useState(!0);return t.useEffect(()=>{let e=!1;return u(!0),c(null),(async()=>{try{const t=await s(()=>import("./index-DupxITkq.js").then(e=>e.i),__vite__mapDeps([0,1,2,3])),a=await l(r),n=await t.convertToHtml({arrayBuffer:a});e||i(n.value)}catch(t){e||c(t instanceof Error?t.message:"Failed to render docx")}finally{e||u(!1)}})(),()=>{e=!0}},[r]),x?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Word 文档中..."}):d?e.jsx("p",{className:"text-sm text-destructive p-4",children:d}):e.jsx("div",{className:"p-6 prose dark:prose-invert max-w-none",style:{fontSize:12*a/100+"px"},dangerouslySetInnerHTML:{__html:n.sanitize(o)}})}function i({filePath:r,zoom:a}){var o;const[i,d]=t.useState([]),[c,x]=t.useState(0),[u,p]=t.useState(null),[m,f]=t.useState(!0);return t.useEffect(()=>{let e=!1;return f(!0),p(null),(async()=>{try{const t=await s(()=>import("./xlsx-DfDjAMCE.js"),[]),a=await l(r),n=t.read(a,{type:"array"}),o=n.SheetNames.map(e=>({name:e,html:t.utils.sheet_to_html(n.Sheets[e],{editable:!1})}));e||(d(o),x(0))}catch(t){e||p(t instanceof Error?t.message:"Failed to render xlsx")}finally{e||f(!1)}})(),()=>{e=!0}},[r]),m?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Excel 文件中..."}):u?e.jsx("p",{className:"text-sm text-destructive p-4",children:u}):0===i.length?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsxs("div",{className:"flex flex-col h-full",children:[i.length>1&&e.jsx("div",{className:"flex gap-0.5 px-3 py-1.5 border-b border-border bg-muted/30 flex-shrink-0 overflow-x-auto",children:i.map((t,s)=>e.jsx("button",{onClick:()=>x(s),className:"px-3 py-1 text-xs rounded-t transition-colors whitespace-nowrap "+(s===c?"bg-background text-foreground border border-b-0 border-border":"text-muted-foreground hover:text-foreground"),children:t.name},s))}),e.jsx("div",{className:"flex-1 overflow-auto p-2 xlsx-preview",style:{fontSize:12*a/100+"px"},dangerouslySetInnerHTML:{__html:n.sanitize((null==(o=i[c])?void 0:o.html)??"")}}),e.jsx("style",{children:"\n .xlsx-preview table { border-collapse: collapse; width: auto; min-width: 100%; }\n .xlsx-preview td, .xlsx-preview th {\n border: 1px solid hsl(var(--border));\n padding: 4px 8px;\n text-align: left;\n white-space: nowrap;\n font-size: inherit;\n }\n .xlsx-preview th { background: hsl(var(--muted)); font-weight: 600; }\n .xlsx-preview tr:hover td { background: hsl(var(--accent) / 0.3); }\n "})]})}function d({filePath:r,zoom:a}){const[n,o]=t.useState([]),[i,d]=t.useState(null),[c,x]=t.useState(!0);return t.useEffect(()=>{let e=!1;return x(!0),d(null),(async()=>{try{const t=await l(r),a=await async function(e){const{default:t}=await s(async()=>{const{default:e}=await import("./jszip.min-Cm3MH9ZY.js").then(e=>e.j);return{default:e}},__vite__mapDeps([3,1,2])),r=await t.loadAsync(e),a=[],n=Object.keys(r.files).filter(e=>/^ppt\/slides\/slide\d+\.xml$/i.test(e)).sort((e,t)=>{var s,r;return parseInt((null==(s=e.match(/slide(\d+)/))?void 0:s[1])??"0")-parseInt((null==(r=t.match(/slide(\d+)/))?void 0:r[1])??"0")});for(let s=0;s<n.length;s++){const e=await r.file(n[s]).async("text"),t=[],l=/<a:t[^>]*>([\s\S]*?)<\/a:t>/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').trim();e&&t.push(e)}a.push({index:s+1,texts:t})}return a}(t);e||o(a)}catch(t){e||d(t instanceof Error?t.message:"Failed to render pptx")}finally{e||x(!1)}})(),()=>{e=!0}},[r]),c?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 PPT 文件中..."}):i?e.jsx("p",{className:"text-sm text-destructive p-4",children:i}):0===n.length?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsx("div",{className:"p-4 space-y-4",style:{fontSize:12*a/100+"px"},children:n.map(t=>e.jsxs("div",{className:"border border-border rounded-xl p-5 bg-muted/20",children:[e.jsxs("div",{className:"text-xs text-muted-foreground mb-2 font-medium",children:["Slide ",t.index]}),t.texts.length>0?e.jsx("div",{className:"space-y-1.5",children:t.texts.map((t,s)=>e.jsx("p",{className:"text-foreground leading-relaxed",style:{fontSize:"inherit"},children:t},s))}):e.jsx("p",{className:"text-muted-foreground text-sm italic",children:"(无文本内容)"})]},t.index))})}const c=new Set(["docx","xlsx","xls","pptx"]);function x({filePath:t,ext:s,zoom:r}){return"docx"===s?e.jsx(o,{filePath:t,zoom:r}):"xlsx"===s||"xls"===s?e.jsx(i,{filePath:t,zoom:r}):"pptx"===s?e.jsx(d,{filePath:t,zoom:r}):null}export{c as OFFICE_EXTS,x as OfficePreview};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-FD2TeOOr.js","assets/index-Bd6-XRQN.js","assets/index-BJDTvhqr.css","assets/jszip.min-DVUOeoIr.js"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as t,_ as s,g as r,f as a}from"./index-Bd6-XRQN.js";import{p as n}from"./purify.es-CgRAQgUo.js";async function l(e){let t=a(e);const s=r();s&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(s)}`);const n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch file: ${n.status}`);return n.arrayBuffer()}function o({filePath:r,zoom:a}){const[o,i]=t.useState(""),[d,c]=t.useState(null),[x,u]=t.useState(!0);return t.useEffect(()=>{let e=!1;return u(!0),c(null),(async()=>{try{const t=await s(()=>import("./index-FD2TeOOr.js").then(e=>e.i),__vite__mapDeps([0,1,2,3])),a=await l(r),n=await t.convertToHtml({arrayBuffer:a});e||i(n.value)}catch(t){e||c(t instanceof Error?t.message:"Failed to render docx")}finally{e||u(!1)}})(),()=>{e=!0}},[r]),x?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Word 文档中..."}):d?e.jsx("p",{className:"text-sm text-destructive p-4",children:d}):e.jsx("div",{className:"p-6 prose dark:prose-invert max-w-none",style:{fontSize:12*a/100+"px"},dangerouslySetInnerHTML:{__html:n.sanitize(o)}})}function i({filePath:r,zoom:a}){var o;const[i,d]=t.useState([]),[c,x]=t.useState(0),[u,p]=t.useState(null),[m,f]=t.useState(!0);return t.useEffect(()=>{let e=!1;return f(!0),p(null),(async()=>{try{const t=await s(()=>import("./xlsx-DfDjAMCE.js"),[]),a=await l(r),n=t.read(a,{type:"array"}),o=n.SheetNames.map(e=>({name:e,html:t.utils.sheet_to_html(n.Sheets[e],{editable:!1})}));e||(d(o),x(0))}catch(t){e||p(t instanceof Error?t.message:"Failed to render xlsx")}finally{e||f(!1)}})(),()=>{e=!0}},[r]),m?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Excel 文件中..."}):u?e.jsx("p",{className:"text-sm text-destructive p-4",children:u}):0===i.length?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsxs("div",{className:"flex flex-col h-full",children:[i.length>1&&e.jsx("div",{className:"flex gap-0.5 px-3 py-1.5 border-b border-border bg-muted/30 flex-shrink-0 overflow-x-auto",children:i.map((t,s)=>e.jsx("button",{onClick:()=>x(s),className:"px-3 py-1 text-xs rounded-t transition-colors whitespace-nowrap "+(s===c?"bg-background text-foreground border border-b-0 border-border":"text-muted-foreground hover:text-foreground"),children:t.name},s))}),e.jsx("div",{className:"flex-1 overflow-auto p-2 xlsx-preview",style:{fontSize:12*a/100+"px"},dangerouslySetInnerHTML:{__html:n.sanitize((null==(o=i[c])?void 0:o.html)??"")}}),e.jsx("style",{children:"\n .xlsx-preview table { border-collapse: collapse; width: auto; min-width: 100%; }\n .xlsx-preview td, .xlsx-preview th {\n border: 1px solid hsl(var(--border));\n padding: 4px 8px;\n text-align: left;\n white-space: nowrap;\n font-size: inherit;\n }\n .xlsx-preview th { background: hsl(var(--muted)); font-weight: 600; }\n .xlsx-preview tr:hover td { background: hsl(var(--accent) / 0.3); }\n "})]})}function d({filePath:r,zoom:a}){const[n,o]=t.useState([]),[i,d]=t.useState(null),[c,x]=t.useState(!0);return t.useEffect(()=>{let e=!1;return x(!0),d(null),(async()=>{try{const t=await l(r),a=await async function(e){const{default:t}=await s(async()=>{const{default:e}=await import("./jszip.min-DVUOeoIr.js").then(e=>e.j);return{default:e}},__vite__mapDeps([3,1,2])),r=await t.loadAsync(e),a=[],n=Object.keys(r.files).filter(e=>/^ppt\/slides\/slide\d+\.xml$/i.test(e)).sort((e,t)=>{var s,r;return parseInt((null==(s=e.match(/slide(\d+)/))?void 0:s[1])??"0")-parseInt((null==(r=t.match(/slide(\d+)/))?void 0:r[1])??"0")});for(let s=0;s<n.length;s++){const e=await r.file(n[s]).async("text"),t=[],l=/<a:t[^>]*>([\s\S]*?)<\/a:t>/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').trim();e&&t.push(e)}a.push({index:s+1,texts:t})}return a}(t);e||o(a)}catch(t){e||d(t instanceof Error?t.message:"Failed to render pptx")}finally{e||x(!1)}})(),()=>{e=!0}},[r]),c?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 PPT 文件中..."}):i?e.jsx("p",{className:"text-sm text-destructive p-4",children:i}):0===n.length?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsx("div",{className:"p-4 space-y-4",style:{fontSize:12*a/100+"px"},children:n.map(t=>e.jsxs("div",{className:"border border-border rounded-xl p-5 bg-muted/20",children:[e.jsxs("div",{className:"text-xs text-muted-foreground mb-2 font-medium",children:["Slide ",t.index]}),t.texts.length>0?e.jsx("div",{className:"space-y-1.5",children:t.texts.map((t,s)=>e.jsx("p",{className:"text-foreground leading-relaxed",style:{fontSize:"inherit"},children:t},s))}):e.jsx("p",{className:"text-muted-foreground text-sm italic",children:"(无文本内容)"})]},t.index))})}const c=new Set(["docx","xlsx","xls","pptx"]);function x({filePath:t,ext:s,zoom:r}){return"docx"===s?e.jsx(o,{filePath:t,zoom:r}):"xlsx"===s||"xls"===s?e.jsx(i,{filePath:t,zoom:r}):"pptx"===s?e.jsx(d,{filePath:t,zoom:r}):null}export{c as OFFICE_EXTS,x as OfficePreview};
@@ -1,11 +1,11 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphPreview-jBgcKX7j.js","assets/index-Bi0Lxaim.js","assets/index-BJDTvhqr.css","assets/purify.es-CgRAQgUo.js","assets/AssistantMessageContent-fk_C4oct.js","assets/chevron-down-CxkiZ1SD.js","assets/chevron-up-BZkUJHec.js","assets/AssistantMessageContent-wklAmtGL.css","assets/index-DsCTP_lW.js","assets/search-CSdU5BiW.js","assets/OfficePreview-DrS64ehu.js"])))=>i.map(i=>d[i]);
2
- var e,t,i,s,r,n;import{c as o,u as a,r as l,a as h,g as c,b as d,w as u,t as f,j as _,d as p,E as m,P as g,M as v,e as b,X as S,f as w,h as x,S as y,R as C,_ as k,s as E,i as N,k as R,D as M,T as D,l as L,F as P,m as j,n as T,C as B,o as A,A as O,p as I,q as z,v as W,B as H,x as F,y as $,I as U,z as K,G as q,H as V,J as Y,K as X,L as G,N as J,O as Z,Q,U as ee,V as te,W as ie,Y as se,Z as re,$ as ne,a0 as oe,a1 as ae,a2 as le,a3 as he,a4 as ce,a5 as de,a6 as ue,a7 as fe,a8 as _e,a9 as pe,aa as me,ab as ge,ac as ve,ad as be,ae as Se,af as we,ag as xe,ah as ye,ai as Ce,aj as ke,ak as Ee,al as Ne,am as Re,an as Me,ao as De,ap as Le,aq as Pe,ar as je,as as Te,at as Be,au as Ae,av as Oe,aw as Ie,ax as ze,ay as We,az as He,aA as Fe,aB as $e,aC as Ue,aD as Ke,aE as qe,aF as Ve,aG as Ye,aH as Xe,aI as Ge,aJ as Je,aK as Ze,aL as Qe,aM as et,aN as tt,aO as it,aP as st,aQ as rt,aR as nt,aS as ot,aT as at,aU as lt,aV as ht,aW as ct,aX as dt,aY as ut,aZ as ft,a_ as _t,a$ as pt,b0 as mt,b1 as gt,b2 as vt,b3 as bt,b4 as St}from"./index-Bi0Lxaim.js";import{p as wt}from"./purify.es-CgRAQgUo.js";import{F as xt,M as yt,r as Ct,a as kt,b as Et,c as Nt,h as Rt,o as Mt,d as Dt,e as Lt,I as Pt,C as jt,u as Tt,A as Bt,T as At,f as Ot}from"./AssistantMessageContent-fk_C4oct.js";import{S as It,U as zt,T as Wt,a as Ht,b as Ft,c as $t,u as Ut,R as Kt,A as qt,d as Vt,e as Yt,f as Xt,I as Gt,g as Jt,C as Zt,h as Qt,i as ei}from"./index-DsCTP_lW.js";import{C as ti}from"./chevron-down-CxkiZ1SD.js";import{S as ii}from"./search-CSdU5BiW.js";import{C as si}from"./chevron-up-BZkUJHec.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphPreview-CRoeiBR8.js","assets/index-Bd6-XRQN.js","assets/index-BJDTvhqr.css","assets/purify.es-CgRAQgUo.js","assets/AssistantMessageContent-BiJL4SGC.js","assets/chevron-down-CFYwGxZ7.js","assets/chevron-up-D91KEb_P.js","assets/AssistantMessageContent-wklAmtGL.css","assets/index-9M6XORRc.js","assets/search-D2ccvP_R.js","assets/OfficePreview-Bg2tz3fQ.js"])))=>i.map(i=>d[i]);
2
+ var e,t,i,s,r,n;import{c as o,u as a,r as l,a as h,g as c,b as d,w as u,t as f,j as _,d as p,E as m,P as g,M as v,e as b,X as S,f as w,h as x,S as y,R as C,_ as k,s as E,i as N,k as R,D as M,T as D,l as L,F as P,m as j,n as T,C as B,o as A,A as O,p as I,q as z,v as W,B as H,x as F,y as $,I as U,z as K,G as q,H as V,J as Y,K as X,L as G,N as J,O as Z,Q,U as ee,V as te,W as ie,Y as se,Z as re,$ as ne,a0 as oe,a1 as ae,a2 as le,a3 as he,a4 as ce,a5 as de,a6 as ue,a7 as fe,a8 as _e,a9 as pe,aa as me,ab as ge,ac as ve,ad as be,ae as Se,af as we,ag as xe,ah as ye,ai as Ce,aj as ke,ak as Ee,al as Ne,am as Re,an as Me,ao as De,ap as Le,aq as Pe,ar as je,as as Te,at as Be,au as Ae,av as Oe,aw as Ie,ax as ze,ay as We,az as He,aA as Fe,aB as $e,aC as Ue,aD as Ke,aE as qe,aF as Ve,aG as Ye,aH as Xe,aI as Ge,aJ as Je,aK as Ze,aL as Qe,aM as et,aN as tt,aO as it,aP as st,aQ as rt,aR as nt,aS as ot,aT as at,aU as lt,aV as ht,aW as ct,aX as dt,aY as ut,aZ as ft,a_ as _t,a$ as pt,b0 as mt,b1 as gt,b2 as vt,b3 as bt,b4 as St}from"./index-Bd6-XRQN.js";import{p as wt}from"./purify.es-CgRAQgUo.js";import{F as xt,M as yt,r as Ct,a as kt,b as Et,c as Nt,h as Rt,o as Mt,d as Dt,e as Lt,I as Pt,C as jt,u as Tt,A as Bt,T as At,f as Ot}from"./AssistantMessageContent-BiJL4SGC.js";import{S as It,U as zt,T as Wt,a as Ht,b as Ft,c as $t,u as Ut,R as Kt,A as qt,d as Vt,e as Yt,f as Xt,I as Gt,g as Jt,C as Zt,h as Qt,i as ei}from"./index-9M6XORRc.js";import{C as ti}from"./chevron-down-CFYwGxZ7.js";import{S as ii}from"./search-D2ccvP_R.js";import{C as si}from"./chevron-up-D91KEb_P.js";
3
3
  /**
4
4
  * @license lucide-react v0.309.0 - ISC
5
5
  *
6
6
  * This source code is licensed under the ISC license.
7
7
  * See the LICENSE file in the root directory of this source tree.
8
- */const ri=o("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),ni=o("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),oi=o("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),ai=o("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]),li=o("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),hi=o("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),ci=o("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),di=o("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]),ui=o("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),fi=o("ListRestart",[["path",{d:"M21 6H3",key:"1jwq7v"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 18H3",key:"1sijw9"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]]),_i=o("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),pi=o("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),mi=o("MoreVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]),gi=o("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),vi=o("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),bi=o("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),Si=o("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),wi=o("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]),xi=o("StopCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{width:"6",height:"6",x:"9",y:"9",key:"1wrtvo"}]]),yi=o("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Ci=o("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),ki=C.lazy(()=>k(()=>import("./GraphPreview-jBgcKX7j.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.GraphPreview}))),Ei=C.lazy(()=>k(()=>import("./OfficePreview-DrS64ehu.js"),__vite__mapDeps([10,1,2,3])).then(e=>({default:e.OfficePreview}))),Ni=new Set(["docx","xlsx","xls","pptx"]),Ri={js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",cs:"csharp",php:"php",sh:"bash",bash:"bash",zsh:"bash",yaml:"yaml",yml:"yaml",json:"json",toml:"toml",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",less:"less",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"docker",makefile:"makefile",r:"r",lua:"lua",dart:"dart",zig:"zig"};
8
+ */const ri=o("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),ni=o("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),oi=o("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),ai=o("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]),li=o("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),hi=o("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),ci=o("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),di=o("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]),ui=o("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),fi=o("ListRestart",[["path",{d:"M21 6H3",key:"1jwq7v"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 18H3",key:"1sijw9"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]]),_i=o("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),pi=o("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]),mi=o("MoreVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]),gi=o("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),vi=o("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),bi=o("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),Si=o("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),wi=o("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]),xi=o("StopCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{width:"6",height:"6",x:"9",y:"9",key:"1wrtvo"}]]),yi=o("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Ci=o("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),ki=C.lazy(()=>k(()=>import("./GraphPreview-CRoeiBR8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.GraphPreview}))),Ei=C.lazy(()=>k(()=>import("./OfficePreview-Bg2tz3fQ.js"),__vite__mapDeps([10,1,2,3])).then(e=>({default:e.OfficePreview}))),Ni=new Set(["docx","xlsx","xls","pptx"]),Ri={js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",cs:"csharp",php:"php",sh:"bash",bash:"bash",zsh:"bash",yaml:"yaml",yml:"yaml",json:"json",toml:"toml",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",less:"less",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"docker",makefile:"makefile",r:"r",lua:"lua",dart:"dart",zig:"zig"};
9
9
  /**
10
10
  * @license lucide-react v0.309.0 - ISC
11
11
  *
@@ -1,4 +1,4 @@
1
- import{c as e,r as s,$ as t,b5 as n,j as a,a1 as r,a0 as o,W as l,d as i,U as c,b6 as d,aU as u,Z as h,b7 as m,V as p,a2 as x,a4 as f,a5 as g,a6 as v,a7 as y,x as b,aE as j,aG as w,b8 as _,t as N,al as k,I as S,B as C,aM as R,X as P,D as T,b9 as I,ba as E,bb as M,bc as D,u as H,bd as L,T as O,be as A,bf as V,bg as F,bh as B,bi as z,aF as W,bj as U,bk as q,h as K,S as G,bl as $,aI as Z,K as X,s as Q,bm as Y}from"./index-Bi0Lxaim.js";import{j as J,u as ee,R as se,d as te,f as ne,A as ae,C as re,i as oe,h as le,S as ie,U as ce,T as de,a as ue,b as he,c as me}from"./index-DsCTP_lW.js";import{C as pe}from"./chevron-down-CxkiZ1SD.js";import{C as xe,a as fe}from"./chevron-up-BZkUJHec.js";
1
+ import{c as e,r as s,$ as t,b5 as n,j as a,a1 as r,a0 as o,W as l,d as i,U as c,b6 as d,aU as u,Z as h,b7 as m,V as p,a2 as x,a4 as f,a5 as g,a6 as v,a7 as y,x as b,aE as j,aG as w,b8 as _,t as N,al as k,I as S,B as C,aM as R,X as P,D as T,b9 as I,ba as E,bb as M,bc as D,u as H,bd as L,T as O,be as A,bf as V,bg as F,bh as B,bi as z,aF as W,bj as U,bk as q,h as K,S as G,bl as $,aI as Z,K as X,s as Q,bm as Y}from"./index-Bd6-XRQN.js";import{j as J,u as ee,R as se,d as te,f as ne,A as ae,C as re,i as oe,h as le,S as ie,U as ce,T as de,a as ue,b as he,c as me}from"./index-9M6XORRc.js";import{C as pe}from"./chevron-down-CFYwGxZ7.js";import{C as xe,a as fe}from"./chevron-up-D91KEb_P.js";
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *
@@ -1,4 +1,4 @@
1
- import{c as e,aF as s,r as t,bn as a,bo as r,t as n,bp as l,bq as i,br as c,ab as d,bs as o,j as m,B as x,aI as u,d as p,I as h,T as g,p as f,D as b,aB as j,aC as N,A as y,an as v,at as k}from"./index-Bi0Lxaim.js";import{S as w}from"./search-CSdU5BiW.js";import{C}from"./chevron-down-CxkiZ1SD.js";
1
+ import{c as e,aF as s,r as t,bn as a,bo as r,t as n,bp as l,bq as i,br as c,ab as d,bs as o,j as m,B as x,aI as u,d as p,I as h,T as g,p as f,D as b,aB as j,aC as N,A as y,an as v,at as k}from"./index-Bd6-XRQN.js";import{S as w}from"./search-D2ccvP_R.js";import{C}from"./chevron-down-CFYwGxZ7.js";
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-Bi0Lxaim.js";
1
+ import{c as o}from"./index-Bd6-XRQN.js";
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-Bi0Lxaim.js";
1
+ import{c as e}from"./index-Bd6-XRQN.js";
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *
@@ -1,4 +1,4 @@
1
- import{c as e,r as t,j as n,U as r,W as o,R as i,$ as a,b6 as l,a1 as s,a0 as c,b5 as f,V as u,Y as d,d as p,b7 as m,aU as h}from"./index-Bi0Lxaim.js";
1
+ import{c as e,r as t,j as n,U as r,W as o,R as i,$ as a,b6 as l,a1 as s,a0 as c,b5 as f,V as u,Y as d,d as p,b7 as m,aU as h}from"./index-Bd6-XRQN.js";
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *