@wrongstack/webui 0.309.0 → 0.310.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AgentRosterView-CbgKjnxJ.js → AgentRosterView-D65_58jj.js} +1 -1
- package/dist/assets/{AnalyticsDashboard-BXnPG2xB.js → AnalyticsDashboard-DOc43lwL.js} +1 -1
- package/dist/assets/{AudienceMemoryPanel-Ch-jf06O.js → AudienceMemoryPanel-BLpp2tHi.js} +1 -1
- package/dist/assets/{ChangesView-5lcal8q4.js → ChangesView-DgBKkM9W.js} +1 -1
- package/dist/assets/ChronicleDashboard-DTQBK3sz.js +1 -0
- package/dist/assets/CodeEditor-C_i1OpFY.js +2 -0
- package/dist/assets/CodeMap-DAiZc6KR.js +1 -0
- package/dist/assets/{ConfirmModal-KzK0LoJw.js → ConfirmModal-e_pAJNXI.js} +1 -1
- package/dist/assets/{CronJobsPanel-aLru0Rd_.js → CronJobsPanel-Bd9yYc54.js} +1 -1
- package/dist/assets/{DeadCodeScanPanel-BXpB_M2Z.js → DeadCodeScanPanel-DX6kTHMe.js} +1 -1
- package/dist/assets/{DebugDashboard-hnhGaWr-.js → DebugDashboard-DzZ2VgUh.js} +1 -1
- package/dist/assets/{DesignGalleryView-CXHgaI2Q.js → DesignGalleryView-C6V81Ve6.js} +1 -1
- package/dist/assets/{GoalView-BB5t68cb.js → GoalView-D8IvL8gu.js} +1 -1
- package/dist/assets/KanbanView-CgAYUWMt.js +3 -0
- package/dist/assets/{MailboxDetailView-jPxF6ia3.js → MailboxDetailView-DVhX5QJL.js} +1 -1
- package/dist/assets/{MemoryDrawer-e8UxQq-s.js → MemoryDrawer-8sFKIDFT.js} +1 -1
- package/dist/assets/MemoryManager-UVJcZ8F1.js +1 -0
- package/dist/assets/{ModelPicker-nyXP3xsj.js → ModelPicker-BX3TyLGh.js} +1 -1
- package/dist/assets/OfficeMapPanel-CGquZdpA.js +4 -0
- package/dist/assets/OfficeMapPanel-Ce7myLNH.css +1 -0
- package/dist/assets/{ProcessMonitor-Epj6RrOA.js → ProcessMonitor-DWRyMBcK.js} +1 -1
- package/dist/assets/{PromptJournalView-CMlGmjig.js → PromptJournalView-D7cxTV4b.js} +1 -1
- package/dist/assets/{QueuePanel-D67eiPuQ.js → QueuePanel-BHC0oZuW.js} +1 -1
- package/dist/assets/{RefreshDebugView-CWAwHE9i.js → RefreshDebugView-CYtfPKpz.js} +1 -1
- package/dist/assets/{RequirementIntakeView-DPj065HL.js → RequirementIntakeView-CqK3EO7I.js} +1 -1
- package/dist/assets/{SageTabs-BtRa8OZC.js → SageTabs-twWj7FY5.js} +2 -2
- package/dist/assets/{SddFlowGraph-DMSN4LTZ.js → SddFlowGraph-DRoJjwE7.js} +1 -1
- package/dist/assets/SddHub-GEtMx-VT.js +2 -0
- package/dist/assets/{SessionInspectView-BdlOiPzO.js → SessionInspectView-Bj3lSgGC.js} +1 -1
- package/dist/assets/SessionList-Q2e5-_66.js +1 -0
- package/dist/assets/{SessionsDashboard-BiR0zh-a.js → SessionsDashboard-zMKgGHVE.js} +1 -1
- package/dist/assets/SetupScreen-OTuQXHs_.js +1 -0
- package/dist/assets/SkillDetailView-DOuDqdnT.js +3 -0
- package/dist/assets/{SpecsView-2PqHEXH9.js → SpecsView-DCXc8NKW.js} +1 -1
- package/dist/assets/TechStackView-DBYyTF6H.js +2 -0
- package/dist/assets/{TerminalPanel-CLUB8F2H.js → TerminalPanel-D8ZfgplP.js} +1 -1
- package/dist/assets/{Toaster-BlD1m8P2.js → Toaster-tBe1ZrKx.js} +1 -1
- package/dist/assets/{activity-l8lDAw8a.js → activity-BA8C9ueU.js} +3 -3
- package/dist/assets/{activity-DYwBIByU.js → activity-BYnOci5N.js} +3 -3
- package/dist/assets/{activity-CezOSNBd.js → activity-COQ9xSFu.js} +3 -3
- package/dist/assets/{activity-CA5G03Kw.js → activity-CuJqhGz7.js} +3 -3
- package/dist/assets/{activity-CkGBp_I-.js → activity-D3ZccGOh.js} +3 -3
- package/dist/assets/{activity-C6pIBHte.js → activity-YMES6OPI.js} +3 -3
- package/dist/assets/{activity-CxnlCaZu.js → activity-zlMMaNE1.js} +3 -3
- package/dist/assets/{button-DvpRpKkt.js → button-Dhmop_yM.js} +1 -1
- package/dist/assets/{chat-store-c0pGYczr.js → chat-store-BiEXyguk.js} +1 -1
- package/dist/assets/{codemap-activity-store-BH7Mh4k9.js → codemap-activity-store-BWt_a7Gs.js} +1 -1
- package/dist/assets/codemap-index-store-CDhApwWQ.js +1 -0
- package/dist/assets/{dialog-BJjDUqb3.js → dialog-DPl7DolS.js} +1 -1
- package/dist/assets/{empty-state-Cefmzojx.js → empty-state-IT10GzRA.js} +1 -1
- package/dist/assets/{i18n-DbJfY4tY.js → i18n-dLvHUYek.js} +2 -2
- package/dist/assets/index-B8J_xxU5.css +1 -0
- package/dist/assets/index-Cyhuj8ku.js +134 -0
- package/dist/assets/{input-BtoHcCl9.js → input-C3rIQ26u.js} +1 -1
- package/dist/assets/{mailbox-store-bF96Ih2G.js → mailbox-store-DhAVkVJQ.js} +1 -1
- package/dist/assets/{markdown-CIRD7kOg.js → markdown-Kp5uSgOw.js} +23 -23
- package/dist/assets/{roster-ws-DycHs92J.js → roster-ws-Vj_HH49O.js} +1 -1
- package/dist/assets/session-store-CKpAwNIm.js +1 -0
- package/dist/assets/{shared-B3czc2Dj.js → shared-BUXBOqyO.js} +1 -1
- package/dist/assets/stores-D9Ng0JyF.js +7 -0
- package/dist/assets/ui-store-3HoYrTu5.js +1 -0
- package/dist/assets/useWebSocket-B2jKc_G4.js +29 -0
- package/dist/assets/{utils-tsZEnrBH.js → utils-BecmXwgG.js} +1 -1
- package/dist/assets/{vector-memory-panel-C6iWDhkJ.js → vector-memory-panel-CBA4CK6N.js} +1 -1
- package/dist/assets/{vendor-C_zEzV4N.js → vendor-DZ9_OO6N.js} +21 -21
- package/dist/assets/{view-navigation-CZKugncK.js → view-navigation-C1UDTk5R.js} +1 -1
- package/dist/assets/ws-client-DXT4gi-N.js +1 -0
- package/dist/components/AgentOfficeView/model.d.ts +20 -0
- package/dist/components/AgentOfficeView.d.ts +10 -0
- package/dist/components/ChatView/AgentTabs.d.ts +16 -0
- package/dist/components/ChatView/SubagentTranscriptView.d.ts +16 -0
- package/dist/components/ChatView/useChatViewState.d.ts +7 -0
- package/dist/components/SettingsPanel/LogsSettingsTab.d.ts +1 -1
- package/dist/components/SettingsPanel/MCPSection.d.ts +2 -12
- package/dist/components/SettingsPanel/ModelSchemaEditor.d.ts +7 -0
- package/dist/components/SettingsPanel/contracts.d.ts +29 -0
- package/dist/components/SettingsPanel/official-servers.d.ts +1 -1
- package/dist/hooks/useLiveContextDebug.d.ts +97 -0
- package/dist/index.css +114 -7
- package/dist/index.html +23 -23
- package/dist/index.js +11198 -10263
- package/dist/protocol-compatibility.d.ts +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/office-map-store.d.ts +6 -0
- package/dist/stores/session-store.d.ts +9 -1
- package/dist/stores/ui-store.d.ts +12 -0
- package/dist/types/system.d.ts +12 -0
- package/package.json +18 -17
- package/dist/assets/ChronicleDashboard-BH9k5NjB.js +0 -1
- package/dist/assets/CodeEditor-BrQMwzOp.js +0 -2
- package/dist/assets/CodeMap-B5e0v0jn.js +0 -1
- package/dist/assets/KanbanView-bZtgy3zZ.js +0 -3
- package/dist/assets/MemoryManager-BXYIA9wG.js +0 -1
- package/dist/assets/OfficeMapPanel-CBfE7Kli.js +0 -4
- package/dist/assets/OfficeMapPanel-D6yTfGIT.css +0 -1
- package/dist/assets/SddHub-CuqWpqSd.js +0 -2
- package/dist/assets/SessionList-CvvH8SI2.js +0 -1
- package/dist/assets/SetupScreen-B8s5fvr8.js +0 -1
- package/dist/assets/SkillDetailView-DbXp7-E5.js +0 -3
- package/dist/assets/TechStackView-Dnws9pc9.js +0 -2
- package/dist/assets/codemap-index-store-BFm1TzVW.js +0 -1
- package/dist/assets/index-D2tx76V0.css +0 -1
- package/dist/assets/index-DQn-Lz9q.js +0 -133
- package/dist/assets/session-store-CKdsROPD.js +0 -1
- package/dist/assets/stores-C0xX0jn4.js +0 -7
- package/dist/assets/ui-store-xx1NssJI.js +0 -1
- package/dist/assets/useWebSocket-D9Dy4-9x.js +0 -29
- package/dist/assets/ws-client-CBfMQmW9.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.agent-office{--office-line:hsl(var(--border) / .72);--office-soft:hsl(var(--surface-2) / .78);--office-panel:hsl(var(--card) / .94);height:100%;min-height:0;color:hsl(var(--foreground));background:radial-gradient(circle at 9% 0%, hsl(var(--primary) / .08), transparent 24rem), linear-gradient(135deg, hsl(var(--background)), hsl(var(--surface-2) / .62));grid-template-rows:auto auto minmax(0,1fr) auto;display:grid;position:relative;overflow:hidden}.agent-office:before{pointer-events:none;content:"";opacity:.18;background-image:linear-gradient(hsl(var(--border) / .34) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--border) / .34) 1px, transparent 1px);background-size:28px 28px;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#0000,#000 16% 92%,#0000);mask-image:linear-gradient(#0000,#000 16% 92%,#0000)}.agent-office__header{z-index:4;border-bottom:1px solid var(--office-line);background:hsl(var(--card) / .9);min-height:68px;box-shadow:0 8px 30px hsl(var(--shadow-color) / .08);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);align-items:center;gap:18px;padding:10px 16px;display:flex;position:relative}.agent-office__title{align-items:center;gap:10px;min-width:210px;display:flex}.agent-office__brand-mark{border:1px solid hsl(var(--primary) / .34);width:38px;height:38px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:10px;flex:none;place-items:center;display:grid}.agent-office__brand-mark svg{width:19px;height:19px}.agent-office__title>div>span,.agent-office__detail-header>div>span{color:hsl(var(--muted-foreground));font:500 11px / 1.2 var(--font-mono);letter-spacing:.13em;display:block}.agent-office__title h1{max-width:280px;font:500 15px / 1.2 var(--font-display);text-overflow:ellipsis;white-space:nowrap;margin:3px 0 0;overflow:hidden}.agent-office__live-pill{border:1px solid hsl(var(--success) / .3);color:hsl(var(--success));background:hsl(var(--success) / .08);font:500 11px / 1 var(--font-mono);letter-spacing:.1em;border-radius:999px;align-items:center;gap:6px;padding:5px 8px;display:flex}.agent-office__live-pill>span,.agent-office__pulse-dot{width:6px;height:6px;box-shadow:0 0 0 4px hsl(var(--success) / .12);background:currentColor;border-radius:999px;animation:1.6s ease-in-out infinite agent-office-pulse}.agent-office__summary{flex:auto;justify-content:center;gap:6px;min-width:0;display:flex}.agent-office__summary>div{border-left:1px solid var(--office-line);grid-template-columns:auto auto;align-items:center;gap:0 6px;min-width:92px;padding:6px 9px;display:grid}.agent-office__summary svg{width:13px;height:13px;color:hsl(var(--muted-foreground))}.agent-office__summary strong{font:500 13px / 1 var(--font-mono)}.agent-office__summary span{color:hsl(var(--muted-foreground));grid-column:1/-1;font-size:11px}.agent-office__column-headings,.agent-office__lane{grid-template-columns:180px minmax(430px,1fr) 270px;display:grid}.agent-office__column-headings{z-index:3;border-bottom:1px solid var(--office-line);min-height:28px;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .84);font:500 10px / 1 var(--font-mono);letter-spacing:.14em;align-items:center;padding:0 12px;position:relative}.agent-office__column-headings span{padding:0 12px}.agent-office__column-headings span:last-child{padding-left:16px}.agent-office__client-office{border:1px solid hsl(var(--border));background:hsl(var(--card) / .42);box-shadow:0 14px 38px hsl(var(--shadow-color) / .08);border-radius:16px;margin-bottom:14px;overflow:hidden}.agent-office__client-header{border-bottom:1px solid hsl(var(--border));background:linear-gradient(90deg, hsl(var(--primary) / .07), transparent 42%), hsl(var(--card) / .82);justify-content:space-between;align-items:center;gap:14px;min-height:62px;padding:9px 12px;display:flex}.agent-office__client-title{flex-wrap:wrap;flex:420px;align-items:center;gap:9px;min-width:210px;display:flex}.agent-office__client-copy{flex-direction:column;flex:150px;gap:2px;min-width:0;display:flex}.agent-office__client-copy strong{font:500 12px / 1.2 var(--font-display);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__client-copy>span{max-width:310px;color:hsl(var(--muted-foreground));font:400 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__client-icon{width:32px;height:32px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:9px;flex:none;place-items:center;display:grid}.agent-office__client-icon svg{width:16px;height:16px}.agent-office__client-agent-count{color:hsl(var(--primary));background:hsl(var(--primary) / .09);font:500 10px / 1 var(--font-mono);border-radius:999px;flex:none;padding:3px 6px}.agent-office__client-presence{flex-wrap:wrap;align-items:center;gap:4px;min-width:0;display:flex}.agent-office__presence-chip{border:1px solid hsl(var(--border));min-height:20px;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .5);font:500 9px / 1 var(--font-mono);letter-spacing:.04em;border-radius:999px;flex:none;align-items:center;gap:3px;padding:3px 5px;display:inline-flex}.agent-office__presence-chip svg{width:9px;height:9px}.agent-office__presence-chip.is-live,.agent-office__presence-chip.is-telemetry{border-color:hsl(var(--success) / .25);color:hsl(var(--success));background:hsl(var(--success) / .07)}.agent-office__presence-chip.is-legacy{border-color:hsl(var(--warning) / .28);color:hsl(var(--warning));background:hsl(var(--warning) / .08)}.agent-office__agent-verified{min-height:16px;color:hsl(var(--success));background:hsl(var(--success) / .08);font:500 8px / 1 var(--font-mono);letter-spacing:.04em;border-radius:999px;flex:none;align-items:center;gap:2px;padding:2px 4px;display:inline-flex}.agent-office__agent-verified svg{width:8px;height:8px}.agent-office__client-stats{border:0;flex-wrap:wrap;justify-content:flex-end;gap:5px;min-width:0;margin:0;padding:0;display:flex}.agent-office__client-stats>span{border:1px solid hsl(var(--border));min-height:25px;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .58);font:400 9px / 1 var(--font-mono);letter-spacing:.05em;border-radius:6px;align-items:center;gap:4px;padding:4px 6px;display:inline-flex}.agent-office__client-stats svg{width:11px;height:11px}.agent-office__client-stats strong{color:hsl(var(--foreground));font-size:11px}.agent-office__client-delta strong{color:hsl(var(--success))}.agent-office__client-delta b{color:hsl(var(--destructive));font-weight:500}.agent-office__client-desks{padding:9px 9px 1px}.agent-office__briefing{border-bottom:1px solid hsl(var(--border));background:hsl(var(--background) / .34);grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:8px;padding:8px 9px;display:grid}.agent-office__prompt-card,.agent-office__todo-board{border:1px solid hsl(var(--border));min-width:0;min-height:68px;color:hsl(var(--foreground));background:hsl(var(--card) / .7);text-align:left;box-shadow:0 6px 18px hsl(var(--shadow-color) / .045);border-radius:10px;align-items:center;gap:9px;padding:9px 10px;transition:border-color .16s,background .16s,transform .16s;display:flex;position:relative}.agent-office__prompt-card{overflow:hidden}.agent-office__prompt-card.is-active{border-color:hsl(var(--success) / .38);background:linear-gradient(90deg, hsl(var(--success) / .07), transparent 62%), hsl(var(--card) / .78);box-shadow:0 8px 24px hsl(var(--success) / .08)}.agent-office__prompt-card.is-fresh:after{pointer-events:none;content:"";background:linear-gradient(90deg, transparent, hsl(var(--primary) / .14), transparent);width:24%;animation:1.1s ease-out agent-office-brief-arrive;position:absolute;inset:0 auto 0 -30%;transform:skew(-18deg)}.agent-office__prompt-card.is-waiting,.agent-office__todo-board.is-waiting{background:hsl(var(--muted) / .28);border-style:dashed}.agent-office__prompt-card:hover,.agent-office__todo-board:hover{border-color:hsl(var(--primary) / .34);background:hsl(var(--card));transform:translateY(-1px)}.agent-office__briefing-icon{width:34px;height:34px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:9px;flex:none;place-items:center;display:grid}.agent-office__briefing-icon svg{width:16px;height:16px}.agent-office__briefing-copy{flex-direction:column;flex:auto;gap:4px;min-width:0;display:flex}.agent-office__briefing-copy>span,.agent-office__todo-heading>span{color:hsl(var(--muted-foreground));font:500 9px / 1 var(--font-mono);letter-spacing:.11em;text-transform:uppercase}.agent-office__briefing-copy strong{font:500 12px / 1.35 var(--font-display);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.agent-office__prompt-card time{color:hsl(var(--muted-foreground));font:400 9px / 1 var(--font-mono);flex:none;align-self:flex-start}.agent-office__instruction-live{color:hsl(var(--success));background:hsl(var(--success) / .09);font:500 9px / 1 var(--font-mono);letter-spacing:.08em;border-radius:999px;flex:none;align-items:center;gap:4px;padding:3px 5px;display:inline-flex}.agent-office__instruction-live i{width:5px;height:5px;box-shadow:0 0 0 3px hsl(var(--success) / .1);background:currentColor;border-radius:50%;animation:1.6s ease-in-out infinite agent-office-pulse}.agent-office__todo-board{flex-direction:column;align-items:stretch;gap:7px}.agent-office__todo-board.has-active{border-color:hsl(var(--primary) / .26)}.agent-office__todo-board.has-active:after{content:"";background:linear-gradient(90deg, hsl(var(--primary) / .16), hsl(var(--primary)), hsl(var(--primary) / .16));background-size:200% 100%;border-radius:999px;width:38px;height:2px;animation:2.4s linear infinite agent-office-sync-line;position:absolute;bottom:7px;right:8px;overflow:hidden}.agent-office__todo-heading{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}.agent-office__todo-heading>span{align-items:center;gap:5px;display:inline-flex}.agent-office__todo-heading svg{width:12px;height:12px;color:hsl(var(--primary))}.agent-office__todo-heading strong,.agent-office__todo-more{color:hsl(var(--muted-foreground));font:500 9px / 1 var(--font-mono)}.agent-office__todo-preview{flex-direction:column;gap:4px;min-width:0;display:flex}.agent-office__todo-line{min-width:0;font:400 10px / 1.2 var(--font-mono);align-items:center;gap:6px;display:flex}.agent-office__todo-line i{border:1px solid hsl(var(--muted-foreground) / .62);border-radius:50%;flex:none;width:6px;height:6px}.agent-office__todo-line.is-in_progress i{border-color:hsl(var(--success));background:hsl(var(--success));box-shadow:0 0 0 3px hsl(var(--success) / .1);animation:1.6s ease-in-out infinite agent-office-pulse}.agent-office__todo-line>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__todo-empty{color:hsl(var(--muted-foreground));font:400 10px / 1.2 var(--font-mono);align-items:center;gap:6px;display:flex}.agent-office__todo-empty svg{width:13px;height:13px;color:hsl(var(--success))}.agent-office__todo-empty.is-waiting svg{color:hsl(var(--warning));animation:1.8s ease-in-out infinite agent-office-telemetry-wait}.agent-office__floor{z-index:2;overscroll-behavior:contain;scrollbar-color:hsl(var(--border)) transparent;min-height:0;padding:10px 12px 20px;position:relative;overflow-y:auto}.agent-office__lane{--desk-top:hsl(var(--warning) / .72);--desk-edge:hsl(var(--warning) / .3);--desk-leg:hsl(var(--muted-foreground) / .62);--desk-chair:hsl(var(--muted-foreground) / .28);--desk-screen:hsl(var(--primary));--desk-decor:hsl(var(--warning) / .68);--desk-wall:hsl(var(--info) / .055);--desk-floor:hsl(var(--warning) / .055);--desk-aura:hsl(var(--warning) / .045);border:1px solid var(--office-line);background:var(--office-panel);min-height:172px;box-shadow:0 10px 30px hsl(var(--shadow-color) / .06);border-radius:14px;margin-bottom:9px;transition:border-color .18s,box-shadow .18s,transform .18s;animation:.42s cubic-bezier(.16,.82,.28,1) agent-office-lane-arrive;position:relative;overflow:hidden}.agent-office__lane.is-desk-mint{--desk-top:hsl(var(--success) / .58);--desk-edge:hsl(var(--success) / .22);--desk-leg:hsl(var(--foreground) / .5);--desk-chair:hsl(var(--success) / .2);--desk-screen:hsl(var(--success));--desk-decor:hsl(var(--info) / .7);--desk-wall:hsl(var(--success) / .07);--desk-floor:hsl(var(--info) / .045);--desk-aura:hsl(var(--success) / .055)}.agent-office__lane.is-desk-ocean{--desk-top:hsl(var(--info) / .62);--desk-edge:hsl(var(--info) / .24);--desk-leg:hsl(var(--foreground) / .58);--desk-chair:hsl(var(--info) / .2);--desk-screen:hsl(var(--info));--desk-decor:hsl(var(--primary) / .72);--desk-wall:hsl(var(--info) / .09);--desk-floor:hsl(var(--primary) / .04);--desk-aura:hsl(var(--info) / .052)}.agent-office__lane.is-desk-plum{--desk-top:hsl(var(--primary) / .58);--desk-edge:hsl(var(--primary) / .24);--desk-leg:hsl(var(--foreground) / .54);--desk-chair:hsl(var(--primary) / .2);--desk-screen:hsl(var(--primary));--desk-decor:hsl(var(--warning) / .75);--desk-wall:hsl(var(--primary) / .075);--desk-floor:hsl(var(--warning) / .04);--desk-aura:hsl(var(--primary) / .052)}.agent-office__lane.is-desk-rose{--desk-top:hsl(var(--destructive) / .5);--desk-edge:hsl(var(--destructive) / .2);--desk-leg:hsl(var(--foreground) / .52);--desk-chair:hsl(var(--destructive) / .18);--desk-screen:hsl(var(--destructive));--desk-decor:hsl(var(--warning) / .72);--desk-wall:hsl(var(--destructive) / .06);--desk-floor:hsl(var(--warning) / .04);--desk-aura:hsl(var(--destructive) / .048)}.agent-office__lane.is-desk-graphite{--desk-top:hsl(var(--muted-foreground) / .58);--desk-edge:hsl(var(--foreground) / .18);--desk-leg:hsl(var(--foreground) / .66);--desk-chair:hsl(var(--foreground) / .16);--desk-screen:hsl(var(--success));--desk-decor:hsl(var(--info) / .7);--desk-wall:hsl(var(--muted-foreground) / .055);--desk-floor:hsl(var(--foreground) / .035);--desk-aura:hsl(var(--muted-foreground) / .044)}.dark .agent-office__lane{--desk-wall:hsl(var(--info) / .16);--desk-floor:hsl(var(--warning) / .16);--desk-aura:hsl(var(--warning) / .14)}.dark .agent-office__lane.is-desk-mint{--desk-wall:hsl(var(--success) / .18);--desk-floor:hsl(var(--info) / .14);--desk-aura:hsl(var(--success) / .16)}.dark .agent-office__lane.is-desk-ocean{--desk-wall:hsl(var(--info) / .2);--desk-floor:hsl(var(--primary) / .14);--desk-aura:hsl(var(--info) / .16)}.dark .agent-office__lane.is-desk-plum{--desk-wall:hsl(var(--primary) / .18);--desk-floor:hsl(var(--warning) / .14);--desk-aura:hsl(var(--primary) / .16)}.dark .agent-office__lane.is-desk-rose{--desk-wall:hsl(var(--destructive) / .16);--desk-floor:hsl(var(--warning) / .14);--desk-aura:hsl(var(--destructive) / .14)}.dark .agent-office__lane.is-desk-graphite{--desk-wall:hsl(var(--muted-foreground) / .14);--desk-floor:hsl(var(--foreground) / .1);--desk-aura:hsl(var(--muted-foreground) / .12)}.agent-office__lane:hover{box-shadow:0 13px 34px hsl(var(--shadow-color) / .1);transform:translateY(-1px)}.agent-office__lane.is-active{border-color:hsl(var(--primary) / .38);box-shadow:0 12px 34px hsl(var(--primary) / .09)}.agent-office__lane.is-failed{border-color:hsl(var(--destructive) / .42)}.agent-office__identity{border-right:1px solid var(--office-line);background:linear-gradient(145deg, var(--desk-aura), transparent 68%);flex-direction:column;justify-content:center;min-width:0;padding:16px;display:flex}.agent-office__identity-line{align-items:center;gap:8px;min-width:0;display:flex}.agent-office__identity-line strong{font:500 13px / 1.25 var(--font-display);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__status-dot{background:hsl(var(--muted-foreground) / .52);border-radius:999px;flex:none;width:7px;height:7px}.agent-office__status-dot.is-active{background:hsl(var(--success));box-shadow:0 0 0 4px hsl(var(--success) / .1)}.agent-office__status-dot.is-failed{background:hsl(var(--destructive));box-shadow:0 0 0 4px hsl(var(--destructive) / .1)}.agent-office__role{color:hsl(var(--primary));font:500 10px / 1 var(--font-mono);letter-spacing:.12em;margin:6px 0 16px 15px}.agent-office__agent-meta{flex-wrap:wrap;gap:5px;display:flex}.agent-office__agent-meta span{max-width:100%;color:hsl(var(--muted-foreground));background:hsl(var(--muted) / .75);font:400 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;border-radius:5px;padding:3px 6px;overflow:hidden}.agent-office__agent-task{border:1px solid hsl(var(--primary) / .2);width:100%;min-width:0;color:hsl(var(--foreground));background:hsl(var(--primary) / .055);text-align:left;border-radius:7px;align-items:center;gap:6px;margin-top:8px;padding:5px 6px;display:flex}.agent-office__agent-task:hover{border-color:hsl(var(--primary) / .4);background:hsl(var(--primary) / .09)}.agent-office__agent-task:not(.is-missing){animation:.46s cubic-bezier(.16,.82,.28,1) agent-office-task-assigned}.agent-office__agent-task.is-missing{color:hsl(var(--muted-foreground));background:hsl(var(--muted) / .3);border-style:dashed}.agent-office__agent-task.is-missing>svg{color:hsl(var(--warning));animation:1.8s ease-in-out infinite agent-office-telemetry-wait}.agent-office__agent-task>svg{width:13px;height:13px;color:hsl(var(--primary));flex:none}.agent-office__agent-task>span{flex-direction:column;gap:2px;min-width:0;display:flex}.agent-office__agent-task strong{color:hsl(var(--primary));font:500 8px / 1 var(--font-mono);letter-spacing:.09em}.agent-office__agent-task small{font:400 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__wait-badge{border:1px solid hsl(var(--warning) / .35);width:fit-content;color:hsl(var(--warning));background:hsl(var(--warning) / .08);cursor:pointer;font:500 9px / 1.3 var(--font-mono);letter-spacing:.04em;border-radius:999px;align-items:center;gap:5px;margin-top:6px;padding:3px 7px;display:inline-flex}.agent-office__wait-badge svg{width:11px;height:11px}.agent-office__wait-badge:hover{border-color:hsl(var(--warning) / .6);background:hsl(var(--warning) / .14)}.agent-office__wait-badge.is-mail-reply{border-color:hsl(var(--info) / .4);color:hsl(var(--info));background:hsl(var(--info) / .08)}.agent-office__wait-badge.is-mail-reply:hover{border-color:hsl(var(--info) / .65);background:hsl(var(--info) / .14)}.agent-office__wait-badge.is-telemetry{border-style:dashed}.agent-office__lane.is-waiting .agent-office__status-dot{background:hsl(var(--warning))}.agent-office__lane.is-waiting .agent-office__window span{opacity:.6;animation-play-state:paused}.agent-office__desk-metrics{border-top:1px solid var(--office-line);color:hsl(var(--muted-foreground));font:500 9.5px / 1.2 var(--font-mono);grid-column:1/-1;align-items:center;gap:0;margin:0 9px 8px;padding:4px 2px 0;display:flex}.agent-office__metric{border-right:1px solid var(--office-line);white-space:nowrap;flex:none;align-items:center;gap:5px;margin-right:12px;padding:3px 12px 3px 0;display:inline-flex}.agent-office__metric:last-child{border-right:none}.agent-office__metric strong{color:hsl(var(--foreground));font-weight:600}.agent-office__metric small{letter-spacing:.08em;font-size:8.5px}.agent-office__metric svg{flex:none;width:11px;height:11px}.agent-office__ctx-bar{background:hsl(var(--border) / .6);border-radius:999px;width:34px;height:3px;position:relative;overflow:hidden}.agent-office__ctx-bar b{border-radius:inherit;background:hsl(var(--primary) / .55);transition:width .4s;position:absolute;inset:0 auto 0 0}.agent-office__ctx-bar.is-high b{background:hsl(var(--destructive) / .7)}.agent-office__metric-action{flex:auto;min-width:0;padding-right:0;overflow:hidden}.agent-office__metric-action small{text-overflow:ellipsis;letter-spacing:.02em;color:hsl(var(--foreground) / .72);overflow:hidden}.agent-office__identity-mail{border:1px solid hsl(var(--info) / .18);width:100%;min-width:0;color:hsl(var(--muted-foreground));background:hsl(var(--info) / .055);text-align:left;border-radius:7px;align-items:center;gap:6px;margin-top:8px;padding:5px 6px;display:flex}.agent-office__identity-mail:hover{border-color:hsl(var(--info) / .34);background:hsl(var(--info) / .09)}.agent-office__identity-mail.is-unread{border-color:hsl(var(--info) / .38);color:hsl(var(--foreground))}.agent-office__identity-mail>svg{width:13px;height:13px;color:hsl(var(--info));flex:none}.agent-office__identity-mail>span{flex-direction:column;gap:2px;min-width:0;display:flex}.agent-office__identity-mail strong{font:500 9px / 1 var(--font-mono);letter-spacing:.08em}.agent-office__identity-mail small{max-width:100%;font:400 10px / 1.15 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__scene{background:linear-gradient(to bottom, var(--desk-wall) 0 68%, transparent 68%), linear-gradient(165deg, transparent 0 72%, var(--desk-floor) 72% 100%);min-width:0;position:relative;overflow:hidden}.agent-office__scene:after{pointer-events:none;content:"";border-top:1px solid hsl(var(--border) / .55);background-image:repeating-linear-gradient(90deg, transparent 0 54px, hsl(var(--border) / .26) 54px 55px);transform-origin:bottom;height:29%;position:absolute;bottom:0;left:0;right:0;transform:perspective(170px)rotateX(4deg)}.agent-office__window{border:1px solid hsl(var(--border));background:hsl(var(--card));width:70px;height:37px;box-shadow:inset 0 -10px 18px hsl(var(--info) / .08);border-radius:5px;gap:3px;padding:4px;display:flex;position:absolute;top:14px;left:15px}.agent-office__window span{background:linear-gradient(160deg, color-mix(in srgb, var(--desk-screen) 23%, transparent), hsl(var(--primary) / .04));box-shadow:inset 0 0 8px hsl(var(--info) / .14);border-radius:2px;flex:1;animation:8s ease-in-out infinite alternate agent-office-window-glow}.agent-office__window span:nth-child(2){animation-delay:-2.4s}.agent-office__window span:nth-child(3){animation-delay:-4.8s}.agent-office__plant{z-index:3;width:25px;height:41px;position:absolute;bottom:29px;left:9px}.agent-office__plant:after{content:"";background:var(--desk-decor);border-radius:3px 3px 8px 8px;width:18px;height:16px;position:absolute;bottom:0;left:4px}.agent-office__plant span,.agent-office__plant i,.agent-office__plant b{--plant-angle:0deg;--plant-scale:1;background:hsl(var(--success) / .72);width:8px;height:23px;transform:rotate(var(--plant-angle)) scale(var(--plant-scale));transform-origin:bottom;border-radius:100% 0;position:absolute;bottom:14px;left:10px}.agent-office__plant i{--plant-angle:-40deg}.agent-office__plant b{--plant-angle:43deg;--plant-scale:.86}.agent-office__plant span,.agent-office__plant i,.agent-office__plant b{animation:4.8s ease-in-out infinite alternate agent-office-plant-sway}.agent-office__plant i{animation-delay:-1.3s}.agent-office__plant b{animation-delay:-2.6s}.agent-office__desk-zone{z-index:4;width:128px;position:absolute;top:18px;bottom:19px;left:30px}.agent-office__desk{z-index:5;background:var(--desk-top);width:84px;height:9px;box-shadow:0 25px 0 -3px var(--desk-edge);border-radius:3px;position:absolute;bottom:29px;right:0}.agent-office__desk:before,.agent-office__desk:after{content:"";background:var(--desk-leg);width:5px;height:38px;position:absolute;top:7px}.agent-office__desk:before{left:7px}.agent-office__desk:after{right:7px}.agent-office__monitor{z-index:7;border:3px solid hsl(var(--foreground) / .8);width:48px;height:34px;color:var(--desk-screen);background:hsl(var(--background));box-shadow:inset 0 0 12px color-mix(in srgb, var(--desk-screen) 18%, transparent);border-radius:5px;place-items:center;display:grid;position:absolute;bottom:38px;right:22px}.agent-office__lane.is-active .agent-office__monitor:before{pointer-events:none;content:"";opacity:.46;background:linear-gradient(to bottom, transparent 0 42%, color-mix(in srgb, var(--desk-screen) 28%, transparent) 48% 54%, transparent 60% 100%);background-size:100% 220%;border-radius:2px;animation:2.2s linear infinite agent-office-monitor-scan;position:absolute;inset:3px}.agent-office__monitor:after{content:"";background:hsl(var(--foreground) / .72);width:4px;height:8px;position:absolute;bottom:-10px;left:20px}.agent-office__monitor>svg{width:15px;height:15px}.agent-office__monitor .agent-office__tool-glyph{width:23px;height:23px;box-shadow:none;background:0 0;border:0}.agent-office__monitor .agent-office__tool-glyph>svg{width:14px;height:14px}.agent-office__monitor .agent-office__file-underlay{display:none}.agent-office__activity-fx{z-index:9;pointer-events:none;opacity:0;width:58px;height:42px;position:absolute;bottom:35px;right:16px}.agent-office__activity-fx>span,.agent-office__activity-fx>i,.agent-office__activity-fx>b{display:block;position:absolute}.agent-office__scene.is-tool-terminal .agent-office__activity-fx{opacity:.8}.agent-office__scene.is-tool-terminal .agent-office__activity-fx>span,.agent-office__scene.is-tool-terminal .agent-office__activity-fx>i,.agent-office__scene.is-tool-terminal .agent-office__activity-fx>b{background:var(--desk-screen);border-radius:2px;width:2px;height:5px;animation:.85s ease-in-out infinite alternate agent-office-terminal-bars;bottom:10px;left:17px}.agent-office__scene.is-tool-terminal .agent-office__activity-fx>i{height:10px;animation-delay:-.42s;left:25px}.agent-office__scene.is-tool-terminal .agent-office__activity-fx>b{height:7px;animation-delay:-.7s;left:33px}.agent-office__scene.is-tool-web .agent-office__activity-fx{opacity:.7}.agent-office__scene.is-tool-web .agent-office__activity-fx>span,.agent-office__scene.is-tool-web .agent-office__activity-fx>i,.agent-office__scene.is-tool-web .agent-office__activity-fx>b{border:1px solid var(--desk-screen);border-bottom-color:#0000;border-left-color:#0000;border-radius:50%;width:12px;height:12px;animation:1.8s ease-out infinite agent-office-web-signal;top:1px;right:-2px;transform:rotate(-38deg)}.agent-office__scene.is-tool-web .agent-office__activity-fx>i{width:20px;height:20px;animation-delay:-.6s;top:-3px;right:-6px}.agent-office__scene.is-tool-web .agent-office__activity-fx>b{width:28px;height:28px;animation-delay:-1.2s;top:-7px;right:-10px}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx{opacity:.78}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx>span{border:2px solid var(--desk-screen);border-radius:50%;width:14px;height:14px;animation:1.65s ease-in-out infinite alternate agent-office-inspect;top:-3px;left:4px}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx>i{background:var(--desk-screen);border-radius:2px;width:9px;height:2px;animation:1.65s ease-in-out infinite alternate agent-office-inspect-handle;top:10px;left:16px;transform:rotate(42deg)}.agent-office__scene:is(.is-tool-read,.is-tool-search) .agent-office__activity-fx>b{border:1px solid color-mix(in srgb, var(--desk-screen) 58%, transparent);background:repeating-linear-gradient(to bottom, transparent 0 3px, color-mix(in srgb, var(--desk-screen) 32%, transparent) 3px 4px);border-radius:2px;width:12px;height:16px;top:1px;left:31px}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx{opacity:.78}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx>span{border-bottom:1px solid color-mix(in srgb, var(--desk-screen) 62%, transparent);background:repeating-linear-gradient(to bottom, transparent 0 3px, color-mix(in srgb, var(--desk-screen) 24%, transparent) 3px 4px);width:22px;height:8px;bottom:-2px;right:5px}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx>i{background:var(--desk-screen);transform-origin:100%;border-radius:4px 1px 1px 4px;width:17px;height:3px;animation:.72s ease-in-out infinite alternate agent-office-write-stroke;bottom:3px;right:12px;transform:rotate(-27deg)}.agent-office__scene:is(.is-tool-write,.is-tool-edit) .agent-office__activity-fx>b{background:var(--desk-screen);border-radius:50%;width:3px;height:3px;bottom:1px;right:27px}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx{opacity:.72}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>span,.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>i,.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>b{border:1px solid var(--desk-screen);background:color-mix(in srgb, var(--desk-screen) 15%, transparent);border-radius:2px;width:6px;height:6px;animation:1.8s ease-in-out infinite agent-office-memory-pulse;top:-1px;right:0}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>i{animation-delay:-.6s;top:8px;right:-5px}.agent-office__scene:is(.is-tool-memory,.is-tool-other) .agent-office__activity-fx>b{animation-delay:-1.2s;top:14px;right:4px}.agent-office__desk-lamp{z-index:8;background:var(--desk-leg);transform-origin:bottom;border-radius:3px;width:3px;height:25px;position:absolute;bottom:39px;right:76px;transform:rotate(8deg)}.agent-office__desk-lamp:before{content:"";background:var(--desk-decor);width:16px;height:10px;box-shadow:0 7px 11px color-mix(in srgb, var(--desk-decor) 20%, transparent);border-radius:8px 8px 3px 3px;position:absolute;top:-4px;left:-7px;transform:rotate(-12deg)}.agent-office__desk-lamp:after{content:"";background:var(--desk-leg);border-radius:4px;width:13px;height:3px;position:absolute;bottom:-2px;right:-5px}.agent-office__desk-clutter{z-index:8;background:hsl(var(--card));width:18px;height:7px;box-shadow:0 -3px 0 -1px var(--desk-decor), 0 1px 2px hsl(var(--shadow-color) / .12);border-radius:2px;position:absolute;bottom:39px;right:61px;transform:rotate(-3deg)}.agent-office__desk-clutter>i,.agent-office__desk-clutter>b{background:var(--desk-decor);border-radius:2px;width:2px;height:10px;position:absolute;bottom:8px;right:2px;transform:rotate(12deg)}.agent-office__desk-clutter>b{background:var(--desk-screen);height:8px;right:6px;transform:rotate(-5deg)}.agent-office__desk-charm{z-index:8;width:15px;height:14px;color:var(--desk-decor);display:block;position:absolute;bottom:11px;right:-6px}.agent-office__desk-charm.is-bot{background:color-mix(in srgb, var(--desk-decor) 18%, hsl(var(--card)));border:1px solid;border-radius:4px}.agent-office__desk-charm.is-bot:before,.agent-office__desk-charm.is-bot:after{content:"";background:currentColor;border-radius:50%;width:2px;height:2px;animation:4.1s ease-in-out infinite agent-office-charm-blink;position:absolute;top:4px}.agent-office__desk-charm.is-bot:before{left:3px}.agent-office__desk-charm.is-bot:after{right:3px}.agent-office__desk-charm.is-bot>i{background:currentColor;width:1px;height:5px;position:absolute;top:-5px;left:6px}.agent-office__desk-charm.is-cactus:before{content:"";background:hsl(var(--success) / .74);width:7px;height:12px;box-shadow:-4px 4px 0 -2px hsl(var(--success) / .74);border-radius:6px 6px 2px 2px;position:absolute;bottom:4px;right:4px}.agent-office__desk-charm.is-cactus:after{content:"";background:var(--desk-decor);border-radius:2px 2px 5px 5px;width:13px;height:5px;position:absolute;bottom:0;right:1px}.agent-office__desk-charm.is-duck:before{content:"";background:hsl(var(--warning) / .82);border-radius:65% 48% 48% 55%;width:14px;height:9px;animation:3.6s ease-in-out infinite agent-office-charm-bob;position:absolute;bottom:0;right:0}.agent-office__desk-charm.is-duck:after{content:"";background:hsl(var(--warning) / .82);width:8px;height:8px;box-shadow:-3px 4px 0 -2px hsl(var(--destructive) / .72);border-radius:50%;animation:3.6s ease-in-out infinite agent-office-charm-bob;position:absolute;top:0;left:1px}.agent-office__desk-charm.is-radio{background:hsl(var(--card));box-shadow:inset 5px 0 0 color-mix(in srgb, var(--desk-decor) 18%, transparent);border:1px solid;border-radius:3px}.agent-office__desk-charm.is-radio:before{content:"";border:1px dotted;border-radius:50%;width:5px;height:5px;position:absolute;top:3px;right:2px}.agent-office__desk-charm.is-radio:after{content:"";transform-origin:bottom;background:currentColor;width:1px;height:7px;position:absolute;top:-6px;left:3px;transform:rotate(-20deg)}.agent-office__lane.is-clutter-0 .agent-office__desk-lamp,.agent-office__lane.is-clutter-1 .agent-office__desk-clutter{display:none}.agent-office__lane.is-layout-1 .agent-office__desk-zone{left:39px}.agent-office__lane.is-layout-1 .agent-office__window{border-radius:14px 14px 5px 5px;width:49px}.agent-office__lane.is-layout-1 .agent-office__desk{border-radius:8px 3px 3px 8px;width:91px;transform:rotate(.7deg)}.agent-office__lane.is-layout-2 .agent-office__desk-zone{left:22px}.agent-office__lane.is-layout-2 .agent-office__desk{border-radius:2px 9px 2px 2px;height:11px;bottom:31px}.agent-office__lane.is-layout-2 .agent-office__desk:before{width:3px;left:17px}.agent-office__lane.is-layout-2 .agent-office__desk:after{width:3px;right:16px}.agent-office__lane.is-layout-2 .agent-office__plant{transform-origin:bottom;transform:scale(.78)}.agent-office__lane.is-layout-3 .agent-office__window{border-radius:3px;width:78px;height:29px;transform:rotate(-1deg)}.agent-office__lane.is-layout-3 .agent-office__window span:nth-child(2){flex:1.8}.agent-office__lane.is-layout-3 .agent-office__desk{border-radius:10px 2px 6px;width:78px;height:12px}.agent-office__lane.is-layout-3 .agent-office__plant{left:139px}.agent-office__mug{z-index:8;background:hsl(var(--primary) / .55);border-radius:2px 2px 4px 4px;width:11px;height:13px;position:absolute;bottom:39px;right:4px}.agent-office__mug:after{content:"";border:2px solid hsl(var(--primary) / .55);border-left:0;border-radius:0 5px 5px 0;width:6px;height:7px;position:absolute;top:3px;right:-5px}.agent-office__mug>i,.agent-office__mug>b{content:"";border-left:1px solid hsl(var(--muted-foreground) / .42);opacity:0;border-radius:50%;width:5px;height:8px;animation:3.4s ease-in-out infinite agent-office-mug-steam;position:absolute;top:-9px;left:2px}.agent-office__mug>b{animation-delay:-1.55s;left:6px}.agent-office__mug.is-leader{background:hsl(var(--warning) / .82);width:14px;box-shadow:inset 0 3px 0 hsl(var(--background) / .22)}.agent-office__mug.is-leader:before{content:"";background:hsl(var(--warning));clip-path:polygon(0 100%,0 0,30% 65%,50% 0,70% 65%,100% 0,100% 100%);width:10px;height:5px;position:absolute;top:-5px;left:2px}.agent-office__mug.is-leader:after{border-color:hsl(var(--warning) / .82)}.agent-office__mug.is-builder{background:hsl(var(--success) / .72);border-radius:3px;width:10px;height:18px}.agent-office__mug.is-builder:after{display:none}.agent-office__mug.is-researcher{background:hsl(var(--info) / .66);border-radius:3px 3px 7px 7px;width:15px;height:14px}.agent-office__mug.is-researcher:after{border-color:hsl(var(--info) / .66)}.agent-office__mug.is-reviewer{background:hsl(var(--warning) / .68);border-radius:2px 2px 5px 5px;width:10px;height:8px;bottom:39px;right:7px}.agent-office__mug.is-reviewer:after{border-color:hsl(var(--warning) / .68);width:5px;height:5px;top:1px;right:-4px}.agent-office__mug.is-planner{background:hsl(var(--primary) / .64);box-shadow:-8px -3px 0 -3px hsl(var(--foreground) / .72)}.agent-office__mug.is-operator{background:hsl(var(--muted-foreground) / .62)}.agent-office__mug.is-operator:after{border-color:hsl(var(--muted-foreground) / .62)}.agent-office__avatar{--avatar-shirt:hsl(var(--primary) / .72);--avatar-accent:hsl(var(--primary));--avatar-skin:hsl(var(--warning) / .42);--avatar-skin-shadow:hsl(var(--warning) / .14);--avatar-hair:hsl(var(--foreground) / .78);--avatar-cycle:7.2s;--avatar-delay:-.4s;--avatar-type-speed:.72s;z-index:6;width:58px;height:78px;position:absolute;bottom:25px;left:0}.agent-office__avatar-chair{background:var(--desk-chair);border-radius:15px 15px 8px 8px;width:41px;height:49px;position:absolute;bottom:2px;left:5px;transform:rotate(-3deg)}.agent-office__avatar-body{background:var(--avatar-shirt);border-radius:12px 12px 8px 8px;width:34px;height:35px;position:absolute;bottom:15px;left:14px}.agent-office__avatar-head{background:var(--avatar-skin);width:31px;height:32px;box-shadow:inset 0 -3px 0 var(--avatar-skin-shadow);border-radius:48% 48% 44% 44%;position:absolute;top:4px;left:15px}.agent-office__avatar-hair{background:var(--avatar-hair);border-radius:15px 14px 4px 7px;height:13px;position:absolute;inset:-2px 2px auto 0}.agent-office__avatar.is-avatar-1{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 72%, hsl(var(--foreground)));--avatar-skin-shadow:color-mix(in srgb, var(--avatar-skin) 72%, transparent);--avatar-hair:hsl(var(--primary) / .76)}.agent-office__avatar.is-avatar-1 .agent-office__avatar-hair{clip-path:polygon(0 0,100% 0,100% 68%,70% 42%,48% 100%,31% 43%,0 72%);border-radius:17px 15px 8px 3px;height:17px;inset:-3px -1px auto}.agent-office__avatar.is-avatar-2{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 63%, hsl(var(--background)));--avatar-skin-shadow:hsl(var(--warning) / .12);--avatar-hair:hsl(var(--foreground) / .7)}.agent-office__avatar.is-avatar-2 .agent-office__avatar-hair{background:radial-gradient(circle at 15% 58%, var(--avatar-hair) 0 4px, transparent 4.5px), radial-gradient(circle at 38% 34%, var(--avatar-hair) 0 5px, transparent 5.5px), radial-gradient(circle at 64% 38%, var(--avatar-hair) 0 5px, transparent 5.5px), radial-gradient(circle at 87% 62%, var(--avatar-hair) 0 4px, transparent 4.5px);border-radius:11px 13px 4px 7px;width:32px;height:15px;inset:-4px -1px auto}.agent-office__avatar.is-avatar-3{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 58%, hsl(var(--primary)));--avatar-skin-shadow:hsl(var(--primary) / .13);--avatar-hair:hsl(var(--muted-foreground) / .84)}.agent-office__avatar.is-avatar-3 .agent-office__avatar-hair{border-radius:14px 14px 3px 7px;height:9px;inset:-1px 3px auto 0}.agent-office__avatar.is-avatar-3 .agent-office__avatar-hair:after{content:"";background:var(--avatar-hair);border-radius:50%;width:11px;height:11px;position:absolute;top:-7px;right:-3px}.agent-office__avatar.is-avatar-4{--avatar-skin:color-mix(in srgb, hsl(var(--warning)) 78%, hsl(var(--background)));--avatar-skin-shadow:hsl(var(--warning) / .1);--avatar-hair:hsl(var(--foreground) / .66)}.agent-office__avatar.is-avatar-4 .agent-office__avatar-hair{background:repeating-linear-gradient(90deg, var(--avatar-hair) 0 2px, transparent 2px 4px);border-radius:50% 50% 2px 2px;height:5px;inset:0 2px auto 1px}.agent-office__avatar.is-avatar-5{--avatar-skin:hsl(var(--info) / .46);--avatar-skin-shadow:hsl(var(--info) / .31);--avatar-hair:hsl(var(--info) / .78)}.agent-office__avatar.is-avatar-5 .agent-office__avatar-hair{clip-path:polygon(0 0,100% 0,100% 100%,83% 55%,66% 100%,50% 55%,33% 100%,16% 55%,0 100%);border-radius:3px 3px 1px 1px;height:8px;inset:-2px 1px auto}.agent-office__avatar.is-motion-1{--avatar-cycle:8.6s;--avatar-delay:-3.1s;--avatar-type-speed:.58s}.agent-office__avatar.is-motion-2{--avatar-cycle:6.8s;--avatar-delay:-5.2s;--avatar-type-speed:.84s}.agent-office__avatar.is-motion-3{--avatar-cycle:9.4s;--avatar-delay:-1.7s;--avatar-type-speed:.66s}.agent-office__avatar-face:before,.agent-office__avatar-face:after{content:"";background:hsl(var(--foreground) / .7);width:2px;height:2px;animation:5.2s ease-in-out infinite agent-office-blink;animation-delay:var(--avatar-delay);border-radius:50%;position:absolute;top:17px}.agent-office__avatar-face:before{left:9px}.agent-office__avatar-face:after{right:9px}.agent-office__avatar-mouth{background:hsl(var(--foreground) / .58);transform-origin:50%;border-radius:50%;width:6px;height:2px;position:absolute;bottom:6px;left:13px}.agent-office__avatar-headset{border:2px solid hsl(var(--foreground) / .72);border-bottom:0;border-radius:15px 15px 0 0;height:20px;position:absolute;inset:5px -4px auto}.agent-office__avatar-headset:after{content:"";background:hsl(var(--foreground) / .72);border-radius:3px;width:5px;height:9px;position:absolute;bottom:-3px;right:-3px}.agent-office__avatar-arm{z-index:8;background:var(--avatar-shirt);transform-origin:0;border-radius:8px;width:29px;height:8px;position:absolute;bottom:29px;right:0;transform:rotate(-11deg)}.agent-office__avatar-role-badge{z-index:10;border:2px solid hsl(var(--card));width:18px;height:18px;color:hsl(var(--primary-foreground));background:var(--avatar-accent);box-shadow:0 2px 6px hsl(var(--shadow-color) / .18);border-radius:50%;place-items:center;display:grid;position:absolute;bottom:4px;left:18px}.agent-office__avatar-role-badge svg{width:9px;height:9px}.agent-office__avatar-prop{z-index:11;pointer-events:none;position:absolute}.agent-office__avatar.is-leader{--avatar-shirt:hsl(var(--primary) / .86);--avatar-accent:hsl(var(--warning))}.agent-office__avatar.is-leader .agent-office__avatar-prop{background:hsl(var(--warning));clip-path:polygon(0 100%,0 25%,25% 65%,50% 0,75% 65%,100% 25%,100% 100%);width:23px;height:11px;filter:drop-shadow(0 2px 2px hsl(var(--shadow-color) / .16));top:-3px;left:19px}.agent-office__avatar.is-builder{--avatar-shirt:hsl(var(--success) / .7);--avatar-accent:hsl(var(--success))}.agent-office__avatar.is-builder .agent-office__avatar-body{box-shadow:inset 0 4px 0 hsl(var(--background) / .18);border-radius:16px 16px 7px 7px}.agent-office__avatar.is-builder .agent-office__avatar-prop{background:hsl(var(--warning));border-radius:4px;width:23px;height:4px;bottom:20px;right:0;transform:rotate(-38deg)}.agent-office__avatar.is-researcher{--avatar-shirt:hsl(var(--info) / .68);--avatar-accent:hsl(var(--info))}.agent-office__avatar.is-researcher .agent-office__avatar-prop{border:3px solid hsl(var(--info));border-radius:50%;width:14px;height:14px;top:14px;right:2px}.agent-office__avatar.is-researcher .agent-office__avatar-prop:after{content:"";background:hsl(var(--info));border-radius:3px;width:9px;height:3px;position:absolute;bottom:-5px;right:-7px;transform:rotate(48deg)}.agent-office__avatar.is-reviewer{--avatar-shirt:hsl(var(--warning) / .64);--avatar-accent:hsl(var(--warning))}.agent-office__avatar.is-reviewer .agent-office__avatar-prop{border:2px solid hsl(var(--foreground) / .76);width:11px;height:7px;box-shadow:12px 0 0 -2px hsl(var(--warning) / .35), 12px 0 0 0 hsl(var(--foreground) / .76);border-radius:5px;top:18px;left:17px}.agent-office__avatar.is-planner{--avatar-shirt:hsl(var(--primary) / .56);--avatar-accent:hsl(var(--primary))}.agent-office__avatar.is-planner .agent-office__avatar-hair{border-radius:4px 15px 10px 4px;transform:rotate(-5deg)}.agent-office__avatar.is-planner .agent-office__avatar-prop{border:2px solid hsl(var(--primary));background:hsl(var(--card));width:18px;height:24px;box-shadow:inset 0 5px 0 hsl(var(--primary) / .15);border-radius:3px;bottom:16px;right:-1px;transform:rotate(8deg)}.agent-office__avatar.is-operator{--avatar-shirt:hsl(var(--muted-foreground) / .62);--avatar-accent:hsl(var(--muted-foreground))}.agent-office__avatar.is-active .agent-office__avatar-arm{animation:agent-office-type var(--avatar-type-speed) ease-in-out infinite alternate;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-active .agent-office__avatar-head{animation:2.6s ease-in-out infinite agent-office-nod;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-idle .agent-office__avatar-head{animation:agent-office-yawn-head var(--avatar-cycle) ease-in-out infinite;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-idle .agent-office__avatar-mouth{animation:agent-office-yawn-mouth var(--avatar-cycle) ease-in-out infinite;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-idle .agent-office__avatar-arm{animation:agent-office-idle-stretch var(--avatar-cycle) ease-in-out infinite;animation-delay:var(--avatar-delay)}.agent-office__avatar.is-failed .agent-office__avatar-body{background:hsl(var(--destructive) / .72)}.agent-office__conveyor{z-index:5;place-items:center;min-width:0;display:grid;position:absolute;inset:24px 16px 22px 168px}.agent-office__belt{border:1px solid hsl(var(--border));background:repeating-linear-gradient(115deg, hsl(var(--muted)) 0 18px, hsl(var(--surface-3) / .62) 18px 35px);height:30px;box-shadow:inset 0 4px 8px hsl(var(--shadow-color) / .06);border-radius:8px;justify-content:space-around;align-items:center;display:flex;position:absolute;bottom:15px;left:0;right:0;overflow:hidden}.agent-office__belt span{border:3px solid hsl(var(--muted-foreground) / .3);background:hsl(var(--card));border-radius:50%;flex:none;width:18px;height:18px}.agent-office__conveyor.is-moving .agent-office__belt{animation:1.8s linear infinite agent-office-belt}.agent-office__current-action{z-index:3;width:min(340px,90%);margin-bottom:25px;position:relative}.agent-office__current-action>.agent-office__parcel{animation:.52s cubic-bezier(.2,.8,.2,1) agent-office-arrive}.agent-office__parcel{border:1px solid hsl(var(--border));width:100%;min-width:0;color:hsl(var(--foreground));text-align:left;background:hsl(var(--card));box-shadow:0 9px 22px hsl(var(--shadow-color) / .12);cursor:pointer;border-radius:10px;align-items:center;gap:10px;padding:10px;transition:transform .15s,border-color .15s,box-shadow .15s;display:flex;position:relative}button.agent-office__parcel:hover{border-color:hsl(var(--primary) / .45);box-shadow:0 12px 26px hsl(var(--shadow-color) / .16);transform:translateY(-2px)}.agent-office__parcel.is-running{border-color:hsl(var(--primary) / .52);box-shadow:0 10px 26px hsl(var(--primary) / .14)}.agent-office__parcel.is-failed{border-color:hsl(var(--destructive) / .48)}.agent-office__parcel.is-compact{min-height:38px;box-shadow:none;border-radius:7px;gap:7px;padding:6px 7px}.agent-office__parcel--empty{cursor:default;color:hsl(var(--muted-foreground));background:hsl(var(--card) / .65);box-shadow:none;border-style:dashed}.agent-office__mail-parcel{border:1px solid hsl(var(--info) / .34);width:100%;min-width:0;color:hsl(var(--foreground));text-align:left;background:hsl(var(--card));box-shadow:0 8px 22px hsl(var(--info) / .12);cursor:pointer;border-radius:8px;align-items:center;gap:8px;padding:7px 8px;display:flex;position:relative}.agent-office__mail-parcel:hover{border-color:hsl(var(--info) / .58)}.agent-office__mail-parcel.is-outgoing{border-color:hsl(var(--success) / .36)}.agent-office__mail-parcel.is-unread:after{content:"";background:hsl(var(--info));width:5px;height:5px;box-shadow:0 0 0 3px hsl(var(--info) / .12);border-radius:50%;position:absolute;top:5px;right:5px}.agent-office__mail-parcel>svg{width:12px;height:12px;color:hsl(var(--info));flex:none}.agent-office__mail-icon{width:27px;height:27px;color:hsl(var(--info));background:hsl(var(--info) / .1);border-radius:6px;flex:none;place-items:center;display:grid}.agent-office__mail-icon svg{width:13px;height:13px}.agent-office__mail-parcel.is-outgoing .agent-office__mail-icon{color:hsl(var(--success));background:hsl(var(--success) / .1)}.agent-office__mail-flyby{z-index:12;width:min(190px,42%);position:absolute;top:8px;right:9px}.agent-office__mail-flyby.is-incoming{animation:.65s cubic-bezier(.16,.82,.28,1) agent-office-mail-in}.agent-office__mail-flyby.is-outgoing{animation:.65s cubic-bezier(.16,.82,.28,1) agent-office-mail-out}.agent-office__tool-glyph{border:1px solid hsl(var(--border));width:36px;height:36px;color:hsl(var(--muted-foreground));background:hsl(var(--muted));border-radius:9px;flex:none;place-items:center;display:grid;position:relative}.agent-office__tool-glyph>svg{z-index:2;width:17px;height:17px;position:relative}.agent-office__tool-glyph.is-read{color:hsl(var(--info));background:hsl(var(--info) / .1);border-color:hsl(var(--info) / .25)}.agent-office__tool-glyph.is-read>svg:not(.agent-office__file-underlay){width:13px;height:13px;transform:translate(5px,5px)}.agent-office__tool-glyph>.agent-office__file-underlay{z-index:1;opacity:.72;width:18px;height:18px;position:absolute;transform:translate(-3px,-3px)}.agent-office__tool-glyph.is-write,.agent-office__tool-glyph.is-edit{color:hsl(var(--warning));background:hsl(var(--warning) / .1);border-color:hsl(var(--warning) / .25)}.agent-office__tool-glyph.is-terminal{color:hsl(var(--success));background:hsl(var(--success) / .1);border-color:hsl(var(--success) / .25)}.agent-office__tool-glyph.is-web{color:hsl(var(--info));background:hsl(var(--info) / .1);border-color:hsl(var(--info) / .25)}.agent-office__tool-glyph.is-search,.agent-office__tool-glyph.is-memory{color:hsl(var(--primary));background:hsl(var(--primary) / .09);border-color:hsl(var(--primary) / .24)}.dark .agent-office__tool-glyph{border-color:hsl(var(--border));color:hsl(var(--muted-foreground));background:hsl(var(--muted) / .82)}.dark .agent-office__tool-glyph.is-read,.dark .agent-office__tool-glyph.is-web{border-color:hsl(var(--info) / .38);color:hsl(var(--info));background:hsl(var(--info) / .18)}.dark .agent-office__tool-glyph.is-write,.dark .agent-office__tool-glyph.is-edit{border-color:hsl(var(--warning) / .38);color:hsl(var(--warning));background:hsl(var(--warning) / .18)}.dark .agent-office__tool-glyph.is-terminal{border-color:hsl(var(--success) / .38);color:hsl(var(--success));background:hsl(var(--success) / .18)}.dark .agent-office__tool-glyph.is-search,.dark .agent-office__tool-glyph.is-memory{border-color:hsl(var(--primary) / .38);color:hsl(var(--primary));background:hsl(var(--primary) / .17)}.dark .agent-office__monitor .agent-office__tool-glyph{background:0 0;border:0}.agent-office__tool-glyph.is-active:after{z-index:0;content:"";opacity:.25;border:1px solid;border-radius:11px;animation:1.3s ease-out infinite agent-office-ring;position:absolute;inset:-4px}.agent-office__parcel.is-compact .agent-office__tool-glyph{border-radius:6px;width:27px;height:27px}.agent-office__parcel.is-compact .agent-office__tool-glyph>svg{width:13px;height:13px}.agent-office__parcel-copy{flex-direction:column;flex:auto;gap:2px;min-width:0;display:flex}.agent-office__parcel-topline{align-items:center;gap:6px;min-width:0;display:flex}.agent-office__parcel-copy strong{font:500 10px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__parcel-target{color:hsl(var(--muted-foreground));font:400 9px / 1.25 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__parcel-summary{color:hsl(var(--foreground) / .82);text-overflow:ellipsis;white-space:nowrap;font-size:10px;overflow:hidden}.agent-office__parcel.is-compact .agent-office__parcel-target,.agent-office__parcel.is-compact .agent-office__line-chip{display:none}.agent-office__parcel.is-compact .agent-office__parcel-summary{color:hsl(var(--muted-foreground));font-size:11px}.agent-office__line-chip{color:hsl(var(--info));background:hsl(var(--info) / .09);font:500 10px / 1 var(--font-mono);border-radius:4px;flex:none;padding:2px 4px}.agent-office__parcel-state{width:18px;height:18px;color:hsl(var(--success));flex:none;place-items:center;display:grid}.agent-office__parcel-state>svg{width:12px;height:12px}.agent-office__parcel-state .agent-office__pulse-dot{color:hsl(var(--primary));background:hsl(var(--primary));box-shadow:0 0 0 4px hsl(var(--primary) / .12)}.agent-office__parcel.is-failed .agent-office__parcel-state{color:hsl(var(--destructive))}.agent-office__history{border-left:1px solid var(--office-line);background:hsl(var(--background) / .24);min-width:0;padding:11px 12px}.agent-office__history-heading{color:hsl(var(--muted-foreground));font:500 10px / 1 var(--font-mono);letter-spacing:.1em;justify-content:space-between;align-items:center;margin-bottom:7px;display:flex}.agent-office__history-heading span:last-child{letter-spacing:0}.agent-office__history-list{scrollbar-color:hsl(var(--border)) transparent;scrollbar-width:thin;flex-direction:column;gap:5px;max-height:146px;padding-right:3px;display:flex;overflow-y:auto}.agent-office__history-empty{min-height:88px;color:hsl(var(--muted-foreground));place-items:center;font-size:10px;font-style:italic;display:grid}.agent-office__footer{z-index:4;border-top:1px solid var(--office-line);min-height:31px;color:hsl(var(--muted-foreground));background:hsl(var(--card) / .9);font:400 9px / 1 var(--font-mono);align-items:center;gap:18px;padding:5px 15px;display:flex;position:relative}.agent-office__footer>span{align-items:center;gap:6px;display:flex}.agent-office__footer svg{width:12px;height:12px}.agent-office__empty-state{text-align:center;place-content:center;justify-items:center;min-height:360px;display:grid}.agent-office__empty-state>span{border:1px dashed hsl(var(--border));width:64px;height:64px;color:hsl(var(--primary));background:hsl(var(--primary) / .06);border-radius:18px;place-items:center;margin-bottom:15px;display:grid}.agent-office__empty-state h2{font:500 16px / 1.3 var(--font-display);margin:0 0 5px}.agent-office__empty-state p{color:hsl(var(--muted-foreground));margin:0;font-size:11px}.agent-office__detail-backdrop{z-index:39;background:hsl(var(--background) / .44);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);cursor:default;border:0;position:absolute;inset:0}.agent-office__detail{z-index:40;border-left:1px solid hsl(var(--border));width:min(410px,94%);color:hsl(var(--foreground));background:hsl(var(--background));box-shadow:-20px 0 55px hsl(var(--shadow-color) / .24);animation:.22s ease-out agent-office-drawer;position:absolute;top:0;bottom:0;right:0;overflow-y:auto}.agent-office__detail-header{z-index:2;border-bottom:1px solid hsl(var(--border));background:hsl(var(--card) / .95);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);align-items:center;gap:10px;padding:14px;display:flex;position:sticky;top:0}.agent-office__detail-header h2{font:500 15px / 1.2 var(--font-display);margin:3px 0 0}.agent-office__detail-header>button{border:1px solid hsl(var(--border));width:30px;height:30px;color:hsl(var(--muted-foreground));background:hsl(var(--background));cursor:pointer;border-radius:7px;place-items:center;margin-left:auto;display:grid}.agent-office__detail-header>button:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.agent-office__detail-header>button svg{width:14px;height:14px}.agent-office__detail-icon{width:38px;height:38px;color:hsl(var(--primary));background:hsl(var(--primary) / .1);border-radius:10px;place-items:center;display:grid}.agent-office__detail-icon.is-terminal{color:hsl(var(--success));background:hsl(var(--success) / .1)}.agent-office__detail-icon.is-read,.agent-office__detail-icon.is-web{color:hsl(var(--info));background:hsl(var(--info) / .1)}.agent-office__detail-icon.is-edit,.agent-office__detail-icon.is-write{color:hsl(var(--warning));background:hsl(var(--warning) / .1)}.agent-office__detail-icon.is-mail{color:hsl(var(--info));background:hsl(var(--info) / .1)}.agent-office__detail-icon.is-task,.agent-office__detail-icon.is-briefing{color:hsl(var(--primary));background:hsl(var(--primary) / .1)}.agent-office__detail-icon svg{width:18px;height:18px}.agent-office__detail-status{border:1px solid hsl(var(--border));background:hsl(var(--card));border-radius:9px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;margin:14px;padding:11px;display:grid}.agent-office__detail-status strong{text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.agent-office__detail-status>span:last-child{color:hsl(var(--muted-foreground));background:hsl(var(--muted));font:500 10px / 1 var(--font-mono);text-transform:uppercase;border-radius:4px;padding:3px 5px}.agent-office__detail-section{border-top:1px solid hsl(var(--border) / .72);padding:12px 14px}.agent-office__detail-section h3{color:hsl(var(--muted-foreground));font:500 11px / 1 var(--font-mono);letter-spacing:.11em;text-transform:uppercase;margin:0 0 9px}.agent-office__detail-row{justify-content:space-between;align-items:baseline;gap:14px;padding:4px 0;font-size:10px;display:flex}.agent-office__detail-row>span{color:hsl(var(--muted-foreground))}.agent-office__detail-row>strong{min-width:0;font:500 10px / 1.3 var(--font-mono);text-align:right;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__target-code{overflow-wrap:anywhere;color:hsl(var(--foreground));background:hsl(var(--muted) / .7);font:400 10px / 1.45 var(--font-mono);border-radius:7px;padding:9px;display:block}.agent-office__file-target{border:1px solid hsl(var(--border) / .68);border-radius:6px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;margin-top:6px;padding:7px;display:grid}.agent-office__file-target svg{width:13px;height:13px;color:hsl(var(--info))}.agent-office__file-target span{font:400 9px / 1.2 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__file-target strong{color:hsl(var(--info));font:500 10px / 1 var(--font-mono)}.agent-office__metric-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;display:grid}.agent-office__metric-grid>div{background:hsl(var(--muted) / .62);border-radius:7px;flex-direction:column;min-width:0;padding:9px;display:flex}.agent-office__metric-grid strong{font:500 12px / 1.2 var(--font-mono);text-overflow:ellipsis;overflow:hidden}.agent-office__metric-grid span{color:hsl(var(--muted-foreground));margin-top:3px;font-size:10px}.agent-office__detail-section pre{border:1px solid hsl(var(--border));max-height:260px;color:hsl(var(--foreground) / .9);background:hsl(var(--popover));font:400 9px / 1.55 var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:7px;margin:0;padding:10px;overflow:auto}.agent-office__mail-body{border:1px solid hsl(var(--border));color:hsl(var(--foreground) / .88);background:hsl(var(--muted) / .45);font:400 11px / 1.55 var(--font-sans);white-space:pre-wrap;border-radius:8px;padding:10px}.agent-office__task-body{border:1px solid hsl(var(--border));color:hsl(var(--foreground) / .9);background:hsl(var(--muted) / .42);font:400 11px / 1.55 var(--font-sans);white-space:pre-wrap;border-radius:8px;padding:10px}.agent-office__todo-detail-list{flex-direction:column;gap:6px;display:flex}.agent-office__todo-detail{border:1px solid hsl(var(--border));background:hsl(var(--muted) / .3);border-radius:8px;align-items:flex-start;gap:8px;padding:7px 8px;display:flex}.agent-office__todo-detail>span{border:1px solid hsl(var(--muted-foreground));border-radius:50%;flex:none;width:7px;height:7px;margin-top:3px}.agent-office__todo-detail.is-in_progress>span{border-color:hsl(var(--success));background:hsl(var(--success));box-shadow:0 0 0 3px hsl(var(--success) / .1)}.agent-office__todo-detail.is-completed{opacity:.68}.agent-office__todo-detail.is-completed>span{border-color:hsl(var(--success));background:hsl(var(--success))}.agent-office__todo-detail>div{flex-direction:column;gap:3px;min-width:0;display:flex}.agent-office__todo-detail strong{font:500 10px / 1.35 var(--font-sans)}.agent-office__todo-detail small{color:hsl(var(--muted-foreground));font:400 9px / 1 var(--font-mono);text-transform:uppercase}@keyframes agent-office-arrive{0%{opacity:.4;transform:translate(42px)rotate(1deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-mail-in{0%{opacity:0;transform:translate(72px)rotate(4deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-mail-out{0%{opacity:0;transform:translate(-42px)rotate(-3deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-belt{to{background-position:70px 0}}@keyframes agent-office-brief-arrive{0%{transform:skew(-18deg)translate(0)}to{transform:skew(-18deg)translate(617%)}}@keyframes agent-office-sync-line{to{background-position:-200% 0}}@keyframes agent-office-telemetry-wait{0%,to{opacity:.42}50%{opacity:1}}@keyframes agent-office-task-assigned{0%{opacity:0;transform:translate(-12px)rotate(-1deg)}to{opacity:1;transform:translate(0)rotate(0)}}@keyframes agent-office-window-glow{0%{opacity:.58}to{opacity:1}}@keyframes agent-office-plant-sway{0%{transform:rotate(calc(var(--plant-angle) - 3deg)) scale(var(--plant-scale))}to{transform:rotate(calc(var(--plant-angle) + 3deg)) scale(var(--plant-scale))}}@keyframes agent-office-monitor-scan{0%{background-position:0 -110%}to{background-position:0 110%}}@keyframes agent-office-mug-steam{0%,18%{opacity:0;transform:translateY(3px)translate(0)}42%{opacity:.55}78%,to{opacity:0;transform:translateY(-6px)translate(2px)}}@keyframes agent-office-blink{0%,44%,48%,to{transform:scaleY(1)}46%{transform:scaleY(.12)}}@keyframes agent-office-terminal-bars{0%{opacity:.42;transform:scaleY(.45)}to{opacity:1;transform:scaleY(1.15)}}@keyframes agent-office-lane-arrive{0%{opacity:0;transform:translateY(8px)scale(.992)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes agent-office-memory-pulse{0%,to{opacity:.35;transform:scale(.72)rotate(0)}50%{opacity:1;transform:scale(1.08)rotate(8deg)}}@keyframes agent-office-web-signal{0%{opacity:0;transform:rotate(-38deg)scale(.72)}45%{opacity:.82}to{opacity:0;transform:rotate(-38deg)scale(1.08)}}@keyframes agent-office-inspect{0%{transform:translate(0)rotate(-4deg)}to{transform:translate(13px,3px)rotate(5deg)}}@keyframes agent-office-inspect-handle{0%{transform:translate(0)rotate(42deg)}to{transform:translate(13px,3px)rotate(51deg)}}@keyframes agent-office-write-stroke{0%{transform:translate(-4px)rotate(-27deg)}to{transform:translate(5px)rotate(-18deg)}}@keyframes agent-office-charm-blink{0%,45%,49%,to{transform:scaleY(1)}47%{transform:scaleY(.12)}}@keyframes agent-office-charm-bob{0%,76%,to{transform:translateY(0)rotate(0)}84%,91%{transform:translateY(-2px)rotate(-5deg)}}@keyframes agent-office-yawn-head{0%,72%,to{transform:translateY(0)rotate(0)}78%,90%{transform:translateY(-2px)rotate(-7deg)}}@keyframes agent-office-yawn-mouth{0%,72%,to{transform:scaleY(1)}80%,88%{transform:scaleY(3.5)}}@keyframes agent-office-idle-stretch{0%,72%,to{transform:rotate(-11deg)}80%,90%{transform:translate(2px,-7px)rotate(-34deg)}}@keyframes agent-office-type{to{transform:rotate(-4deg)translateY(2px)}}@keyframes agent-office-nod{0%,70%,to{transform:rotate(0)}82%{transform:rotate(3deg)}}@keyframes agent-office-ring{0%{opacity:.42;transform:scale(.82)}to{opacity:0;transform:scale(1.18)}}@keyframes agent-office-pulse{0%,to{opacity:.55;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}@keyframes agent-office-drawer{0%{opacity:.5;transform:translate(35px)}to{opacity:1;transform:translate(0)}}.agent-office__model-chip{border:1px solid hsl(var(--primary) / .3);background:hsl(var(--primary) / .08);max-width:100%;color:hsl(var(--primary));font:600 9px / 1.5 var(--font-mono);letter-spacing:.02em;text-overflow:ellipsis;white-space:nowrap;border-radius:999px;align-items:center;padding:1px 7px;display:inline-flex;overflow:hidden}.agent-office__client-desks{position:relative}.agent-office__mail-routes{z-index:6;pointer-events:none;width:44px;position:absolute;top:9px;bottom:1px;left:206px}.agent-office__mail-route{position:absolute;inset:0}.agent-office__mail-route-parcel{top:var(--from);border:1px solid hsl(var(--info) / .55);background:hsl(var(--card) / .94);width:30px;height:30px;box-shadow:0 4px 14px hsl(var(--info) / .3), 0 0 0 3px hsl(var(--info) / .08);color:hsl(var(--info));border-radius:9px;place-items:center;animation:3.8s ease-in-out infinite agent-office-mail-travel;display:grid;position:absolute;left:0}.agent-office__mail-route-parcel svg{width:15px;height:15px}@keyframes agent-office-mail-travel{0%{top:var(--from);opacity:0;transform:translateY(-50%)scale(.7)}12%{opacity:1;transform:translateY(-50%)scale(1)}86%{opacity:1}to{top:var(--to);opacity:0;transform:translateY(-50%)scale(.7)}}.agent-office__desks-empty{border:1px dashed var(--office-line);color:hsl(var(--muted-foreground));font:500 10.5px / 1.4 var(--font-mono);border-radius:12px;align-items:center;gap:8px;margin:0 9px 9px;padding:13px 14px;display:flex}.agent-office__desks-empty svg{width:14px;height:14px;color:hsl(var(--warning))}.agent-office__lounge{border:1px dashed hsl(var(--border));background:linear-gradient(160deg, hsl(var(--warning) / .05), transparent 62%), var(--office-panel);border-radius:14px;margin:2px 9px 10px;padding:10px 12px 12px}.agent-office__lounge-heading{color:hsl(var(--muted-foreground));font:600 10px / 1 var(--font-mono);letter-spacing:.09em;text-transform:uppercase;align-items:center;gap:8px;margin-bottom:9px;display:flex}.agent-office__lounge-heading svg{width:14px;height:14px;color:hsl(var(--warning))}.agent-office__lounge-heading>span{letter-spacing:0;text-transform:none;margin-left:auto;font-weight:500}.agent-office__lounge-seats{flex-wrap:wrap;gap:8px;display:flex}.agent-office__lounge-seat{border:1px solid var(--office-line);background:hsl(var(--card) / .7);cursor:pointer;text-align:left;border-radius:11px;flex:0 auto;align-items:center;gap:9px;min-width:190px;padding:7px 10px;transition:border-color .16s,box-shadow .16s,transform .16s;display:flex}.agent-office__lounge-seat:disabled{cursor:default;opacity:.72}.agent-office__lounge-seat:not(:disabled):hover{border-color:hsl(var(--primary) / .4);box-shadow:0 6px 16px hsl(var(--shadow-color) / .1);transform:translateY(-1px)}.agent-office__lounge-avatar{border:1px solid hsl(var(--border));background:hsl(var(--accent) / .5);width:28px;height:28px;color:hsl(var(--muted-foreground));border-radius:9px;flex:none;place-items:center;display:grid}.agent-office__lounge-avatar svg{width:14px;height:14px}.agent-office__lounge-seat.is-leader .agent-office__lounge-avatar{border-color:hsl(var(--primary) / .35);background:hsl(var(--primary) / .12);color:hsl(var(--primary))}.agent-office__lounge-seat.is-builder .agent-office__lounge-avatar{border-color:hsl(var(--info) / .35);background:hsl(var(--info) / .12);color:hsl(var(--info))}.agent-office__lounge-seat.is-researcher .agent-office__lounge-avatar{border-color:hsl(var(--success) / .35);background:hsl(var(--success) / .12);color:hsl(var(--success))}.agent-office__lounge-seat.is-reviewer .agent-office__lounge-avatar{border-color:hsl(var(--destructive) / .32);background:hsl(var(--destructive) / .1);color:hsl(var(--destructive))}.agent-office__lounge-seat.is-planner .agent-office__lounge-avatar{border-color:hsl(var(--warning) / .38);background:hsl(var(--warning) / .12);color:hsl(var(--warning))}.agent-office__lounge-seat.is-operator .agent-office__lounge-avatar{border-color:hsl(var(--muted-foreground) / .34);background:hsl(var(--muted-foreground) / .1);color:hsl(var(--muted-foreground))}.agent-office__lounge-copy{flex-direction:column;gap:1px;min-width:0;display:flex}.agent-office__lounge-copy strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;font-weight:600;line-height:1.25;overflow:hidden}.agent-office__lounge-copy small{color:hsl(var(--muted-foreground));font:500 9px / 1.3 var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-office__lounge-meta{color:hsl(var(--muted-foreground));font:500 9px / 1 var(--font-mono);align-items:center;gap:7px;margin-left:auto;display:flex}.agent-office__lounge-mail{color:hsl(var(--info));align-items:center;gap:3px;display:inline-flex}.agent-office__lounge-mail svg{width:11px;height:11px}@media (width<=1040px){.agent-office__briefing{grid-template-columns:1fr}.agent-office__client-header{flex-wrap:wrap}.agent-office__client-stats{justify-content:flex-start;width:100%}.agent-office__column-headings,.agent-office__lane{grid-template-columns:150px minmax(390px,1fr) 230px}.agent-office__mail-routes{left:176px}.agent-office__summary>div{min-width:72px}.agent-office__summary span{display:none}.agent-office__title{min-width:185px}.agent-office__title h1{max-width:200px}}@media (width<=820px){.agent-office__header{flex-wrap:wrap;gap:8px}.agent-office__summary{order:3;justify-content:flex-start;width:100%}.agent-office__summary>div{padding-block:3px}.agent-office__live-pill{margin-left:auto}.agent-office__column-headings{display:none}.agent-office__lane{grid-template-columns:132px minmax(380px,1fr)}.agent-office__mail-routes{left:158px}.agent-office__history{display:none}.agent-office__floor{overflow-x:auto}}@media (prefers-reduced-motion:reduce){.agent-office *,.agent-office :before,.agent-office :after{scroll-behavior:auto;transition-duration:.001ms;animation-duration:.001ms;animation-iteration-count:1}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Bt as n,Ga as r,Nt as i,lt as a,qt as o}from"./vendor-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Bt as n,Ga as r,Nt as i,lt as a,qt as o}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{t as s}from"./useWebSocket-B2jKc_G4.js";import{t as c}from"./utils-BecmXwgG.js";import{R as l}from"./stores-D9Ng0JyF.js";import{n as u,o as d,r as f,t as p}from"./dialog-DPl7DolS.js";var m=e(r(),1),h=a();function g({open:e,onClose:r,className:a}){let{t:g}=t(),[_,v]=(0,m.useState)([]),y=s(),b=l(e=>e.wsConnected),x=(0,m.useRef)(null),S=(0,m.useRef)(null);(0,m.useEffect)(()=>{if(!(!e||!b||!y.client?.isConnected))return y.client.send?.({type:`process.list`}),x.current=y.client.on?.(`process.list`,e=>{let t=e?.payload;t?.processes&&v(t.processes)})??null,S.current=setInterval(()=>{y.client.send?.({type:`process.list`})},3e3),()=>{x.current?.(),S.current&&clearInterval(S.current)}},[e,b,y.client]);let C=_.filter(e=>e.status===`running`),w=(0,m.useCallback)(e=>{e.background&&!window.confirm(g(`activity:process.confirmKillBackground`,{pid:e.pid,defaultValue:`Terminate detached background process ${e.pid}?`}))||y.client.send?.({type:`process.kill`,payload:{pid:e.pid}})},[g,y.client]),T=(0,m.useCallback)(()=>{window.confirm(g(`activity:process.confirmKillAll`,{count:C.length,defaultValue:`Terminate all ${C.length} running processes?`}))&&y.client.send?.({type:`process.killAll`})},[C.length,g,y.client]);return(0,h.jsx)(p,{open:e,onOpenChange:e=>{e||r()},children:(0,h.jsxs)(u,{className:c(`max-w-lg gap-0 p-0 overflow-hidden flex flex-col max-h-[75dvh] pt-[10dvh]`,a),showCloseButton:!1,children:[(0,h.jsx)(d,{className:`sr-only`,children:g(`activity:process.heading`)}),(0,h.jsx)(f,{className:`sr-only`,children:g(`activity:process.subtitle`,{active:C.length,total:_.length})}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b shrink-0`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,h.jsx)(`span`,{className:`flex items-center justify-center w-8 h-8 rounded-lg bg-warning/10 text-warning`,children:(0,h.jsx)(i,{className:`h-4 w-4`})}),(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h2`,{className:`text-sm font-semibold`,children:g(`activity:process.heading`)}),(0,h.jsx)(`span`,{className:`text-[10px] text-muted-foreground tabular-nums`,children:g(`activity:process.subtitle`,{active:C.length,total:_.length})})]})]}),(0,h.jsx)(`div`,{className:`flex items-center gap-1`,children:C.length>0&&(0,h.jsxs)(`button`,{type:`button`,onClick:T,className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs text-destructive hover:bg-destructive/10 transition-colors font-medium`,children:[(0,h.jsx)(n,{className:`h-3 w-3 fill-current`}),g(`activity:process.killAll`)]})})]}),(0,h.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain`,children:_.length===0?(0,h.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 gap-3 text-muted-foreground`,children:[(0,h.jsx)(i,{className:`h-10 w-10 opacity-15`}),(0,h.jsx)(`p`,{className:`text-sm font-medium`,children:g(`activity:process.emptyTitle`)}),(0,h.jsx)(`p`,{className:`text-xs text-center max-w-xs`,children:g(`activity:process.emptyBody`)})]}):(0,h.jsx)(`div`,{className:`divide-y`,children:_.map(e=>{let t=e.status===`running`?Math.floor((Date.now()-e.startedAt)/1e3):null,r=t?t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`:null,i=e.protected===!0,a=e.background===!0;return(0,h.jsxs)(`div`,{className:c(`flex items-center justify-between px-4 py-3 text-xs transition-colors`,e.status===`running`?`bg-background hover:bg-muted/30`:`bg-muted/20 text-muted-foreground`),children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0 flex-1`,children:[(0,h.jsx)(`span`,{className:c(`led shrink-0`,e.status===`running`?i?`text-info`:`text-success led-pulse`:`text-muted-foreground`)}),(0,h.jsxs)(`div`,{className:`min-w-0`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground shrink-0`,children:g(`activity:process.pidLabel`,{pid:e.pid})}),(0,h.jsx)(`span`,{className:`font-medium truncate`,children:e.tool}),i&&(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 px-1 py-0.5 rounded text-[9px] bg-info/10 text-info font-medium shrink-0`,title:g(`activity:process.protectedTitle`),children:[(0,h.jsx)(o,{className:`h-2.5 w-2.5`}),g(`activity:process.protected`)]}),a&&(0,h.jsx)(`span`,{className:`inline-flex items-center px-1 py-0.5 rounded text-[9px] bg-success/10 text-success font-medium shrink-0`,title:g(`activity:process.backgroundTitle`),children:g(`activity:process.background`)})]}),(0,h.jsx)(`code`,{className:`text-[10px] text-muted-foreground/70 truncate block mt-0.5 font-mono`,children:e.command})]})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0 ml-3`,children:[r&&(0,h.jsx)(`span`,{className:`text-[10px] text-muted-foreground tabular-nums`,children:r}),e.status===`running`&&!i&&(0,h.jsx)(`button`,{type:`button`,onClick:()=>w(e),className:`p-1.5 rounded-md hover:bg-destructive/10 hover:text-destructive transition-colors`,title:g(`activity:process.killTitle`,{pid:e.pid}),children:(0,h.jsx)(n,{className:`h-3.5 w-3.5 fill-current`})})]})]},e.pid)})})})]})})}export{g as ProcessMonitor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Ga as n,Ot as r,Qr as i,
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Ga as n,Ot as r,Qr as i,lt as a,na as o,sn as s,ta as c,yn as l}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{t as u}from"./ws-client-DXT4gi-N.js";import{t as d}from"./utils-BecmXwgG.js";var f=e(n(),1),p=a(),m=200,h=new Set([`raw_user`,`refined_user`]),g=[`raw_user`,`refined_user`];function _(e,t){return e(`activity:promptJournal.cat.${t}`,t)}function v(){let{t:e}=t(),n=u(),[a,o]=(0,f.useState)([]),[c,v]=(0,f.useState)(!0),[b,x]=(0,f.useState)(null),[S,C]=(0,f.useState)(!0),[w,T]=(0,f.useState)({category:``,session:``,limit:m}),[E,D]=(0,f.useState)(new Set),O=(0,f.useCallback)(()=>{if(!n.isConnected){C(!1);return}C(!0),x(null),n.send({type:`prompts.journal`,payload:{filter:{...w.category?{category:w.category}:{},limit:w.limit}}})},[n,w.category,w.limit]);(0,f.useEffect)(()=>{let e=e=>{let t=e.payload;v(t.enabled);let n=(t.entries??[]).filter(e=>h.has(e.category));o(n),x(t.error??null),C(!1)};return n.on(`prompts.journal`,e),O(),()=>n.off(`prompts.journal`,e)},[n,O]);let k=(0,f.useMemo)(()=>{let e=w.session.trim().toLowerCase(),t=a.filter(t=>!e||t.sessionId.toLowerCase().includes(e)),n=new Map;for(let e of[...t].reverse()){let t=e.timestamp.slice(0,10),r=n.get(t)??[];r.push(e),n.set(t,r)}return[...n.entries()]},[a,w.session]),A=(0,f.useMemo)(()=>{let e=0;for(let t of a)e+=t.metadata.tokenEstimate??0;return{count:a.length,tokens:e}},[a]),j=e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},M=(0,f.useMemo)(()=>g.filter(e=>a.some(t=>t.category===e)),[a]);return(0,p.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto`,children:[(0,p.jsxs)(`div`,{className:`border-b border-border/70 px-4 py-3 sm:px-6`,children:[(0,p.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(s,{className:`h-5 w-5 text-primary`}),(0,p.jsx)(`h1`,{className:`text-base font-semibold`,children:e(`activity:promptJournal.title`)})]}),(0,p.jsxs)(`button`,{type:`button`,onClick:O,disabled:S,className:`inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50`,children:[(0,p.jsx)(l,{className:d(`h-3.5 w-3.5`,S&&`animate-spin`)}),e(`activity:promptJournal.refresh`)]})]}),(0,p.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:e(`activity:promptJournal.subtitle`)}),c&&A.count>0&&(0,p.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{children:e(`activity:promptJournal.statEntries`,{count:A.count})}),(0,p.jsx)(`span`,{children:e(`activity:promptJournal.statTokens`,{count:A.tokens.toLocaleString()})})]})]}),(0,p.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-border/70 px-4 py-2 sm:px-6`,children:[(0,p.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{children:e(`activity:promptJournal.filterCategory`)}),(0,p.jsxs)(`select`,{value:w.category,onChange:e=>T(t=>({...t,category:e.target.value})),className:`rounded border border-border bg-background px-2 py-1 text-xs outline-none focus:ring-1 focus:ring-primary`,children:[(0,p.jsx)(`option`,{value:``,children:e(`activity:promptJournal.filterAll`)}),M.map(t=>(0,p.jsx)(`option`,{value:t,children:_(e,t)},t))]})]}),(0,p.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{children:e(`activity:promptJournal.filterSession`)}),(0,p.jsx)(`input`,{type:`text`,value:w.session,onChange:e=>T(t=>({...t,session:e.target.value})),placeholder:`sess_…`,className:`w-40 rounded border border-border bg-background px-2 py-1 text-xs outline-none focus:ring-1 focus:ring-primary`})]}),(0,p.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{children:e(`activity:promptJournal.filterLimit`)}),(0,p.jsxs)(`select`,{value:w.limit,onChange:e=>T(t=>({...t,limit:Number(e.target.value)})),className:`rounded border border-border bg-background px-2 py-1 text-xs outline-none focus:ring-1 focus:ring-primary`,children:[(0,p.jsx)(`option`,{value:50,children:`50`}),(0,p.jsx)(`option`,{value:200,children:`200`}),(0,p.jsx)(`option`,{value:1e3,children:`1000`})]})]})]}),(0,p.jsxs)(`div`,{className:`min-h-0 flex-1 px-4 py-3 sm:px-6`,children:[S&&(0,p.jsx)(`div`,{className:`py-10 text-center text-sm text-muted-foreground`,children:e(`activity:promptJournal.loading`)}),!S&&b&&(0,p.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-10 text-sm text-destructive`,children:[(0,p.jsx)(r,{className:`h-4 w-4`}),b]}),!S&&!b&&!c&&(0,p.jsx)(`div`,{className:`py-10 text-center text-sm text-muted-foreground`,children:e(`activity:promptJournal.disabled`)}),!S&&!b&&c&&k.length===0&&(0,p.jsxs)(`div`,{className:`py-10 text-center`,children:[(0,p.jsx)(i,{className:`mx-auto h-8 w-8 text-muted-foreground/50`}),(0,p.jsx)(`div`,{className:`mt-2 text-sm font-medium text-foreground`,children:e(`activity:promptJournal.emptyTitle`)}),(0,p.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e(`activity:promptJournal.emptyHint`)})]}),!S&&!b&&c&&k.length>0&&(0,p.jsx)(`div`,{className:`space-y-5`,children:k.map(([e,t])=>(0,p.jsxs)(`section`,{children:[(0,p.jsxs)(`h2`,{className:`sticky top-0 z-10 border-b border-border/60 bg-background/90 py-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground backdrop-blur`,children:[e,(0,p.jsx)(`span`,{className:`ml-2 font-normal normal-case text-muted-foreground/60`,children:t.length})]}),(0,p.jsx)(`ul`,{className:`mt-2 space-y-2`,children:t.map(e=>(0,p.jsx)(y,{entry:e,expanded:E.has(e.id),onToggle:()=>j(e.id)},e.id))})]},e))})]})]})}function y({entry:e,expanded:n,onToggle:r}){let{t:i}=t(),a=e.timestamp.slice(11,19),s=e.metadata,l=e.content.trim().slice(0,240),u=e.rawContent!==void 0&&e.rawContent!==e.content;return(0,p.jsxs)(`li`,{className:`rounded-lg border border-border/70 bg-card/60`,children:[(0,p.jsxs)(`button`,{type:`button`,onClick:r,className:`flex w-full items-start gap-2 rounded-lg px-3 py-2 text-left hover:bg-accent/40`,children:[n?(0,p.jsx)(o,{className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground`}):(0,p.jsx)(c,{className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground`}),(0,p.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,p.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-xs`,children:[(0,p.jsx)(`span`,{className:`tabular text-muted-foreground`,children:a}),(0,p.jsx)(`span`,{className:`rounded bg-primary/10 px-1.5 py-0.5 font-medium text-primary`,children:_(i,e.category)}),(0,p.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 text-muted-foreground`,children:e.role}),(0,p.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.sessionId})]}),!n&&l&&(0,p.jsx)(`div`,{className:`mt-1 line-clamp-2 whitespace-pre-wrap break-words text-xs text-foreground/80`,children:l})]}),(0,p.jsxs)(`span`,{className:`shrink-0 text-[11px] tabular text-muted-foreground`,children:[`~`,s.tokenEstimate,` `,i(`activity:promptJournal.tokens`)]})]}),n&&(0,p.jsxs)(`div`,{className:`border-t border-border/60 px-3 py-2 pl-9`,children:[(0,p.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:i(`activity:promptJournal.refinedBody`)}),(0,p.jsx)(`pre`,{className:`mt-1 max-h-72 overflow-auto whitespace-pre-wrap break-words rounded bg-muted/50 p-2 text-xs text-foreground`,children:e.content}),u&&(0,p.jsxs)(`div`,{className:`mt-2`,children:[(0,p.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:i(`activity:promptJournal.rawInput`)}),(0,p.jsx)(`pre`,{className:`mt-1 max-h-40 overflow-auto whitespace-pre-wrap break-words rounded bg-muted/30 p-2 text-xs text-muted-foreground`,children:e.rawContent})]})]})]})}export{v as PromptJournalView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./chat-store-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./chat-store-BiEXyguk.js";import{Aa as n,Ba as r,Ca as i,Ga as a,dt as o,jt as s,lt as c,ra as l,ur as u}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{t as d}from"./utils-BecmXwgG.js";import"./stores-D9Ng0JyF.js";import{n as f,o as p,r as m,t as h}from"./dialog-DPl7DolS.js";var g=e(a(),1),_=c(),v={btw:{label:`btw`,titleKey:`btwTitle`,tone:`bg-primary/10 text-primary border-primary/30`},steer:{label:`steer`,titleKey:`steerTitle`,tone:`bg-warning/10 text-warning border-warning/35`},queue:{label:`queue`,titleKey:`queueTitle`,tone:`bg-info/10 text-info border-info/30`}};function y({open:e,onClose:a,className:c}){let{t:y}=r(),b=t(e=>e.queue),x=t(e=>e.removeQueued),S=t(e=>e.clearQueue),[C,w]=(0,g.useState)(`oldest`),T=(0,g.useCallback)(e=>{x(e)},[x]),E=(0,g.useMemo)(()=>{let e=b.map((e,t)=>({item:e,sourceIdx:t}));return e.sort((e,t)=>C===`newest`?t.item.addedAt-e.item.addedAt:e.item.addedAt-t.item.addedAt),e},[b,C]),D=b.length>0&&b.every(e=>e.alreadyDispatched);return(0,_.jsx)(h,{open:e,onOpenChange:e=>{e||a()},children:(0,_.jsxs)(f,{className:d(`max-w-lg gap-0 overflow-hidden border-border/80 bg-card p-0 pt-[10dvh] flex flex-col max-h-[70dvh]`,c),showCloseButton:!1,children:[(0,_.jsx)(p,{className:`sr-only`,children:y(`activity:queue.heading`)}),(0,_.jsx)(m,{className:`sr-only`,children:y(`activity:queue.subtitle`,{count:b.length})}),(0,_.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/70 bg-card/95 px-4 py-3 shrink-0`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,_.jsx)(`span`,{className:`flex items-center justify-center w-8 h-8 rounded-md border border-primary/20 bg-primary/10 text-primary`,children:(0,_.jsx)(u,{className:`h-4 w-4`})}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`h2`,{className:`text-sm font-semibold`,children:y(`activity:queue.heading`)}),(0,_.jsx)(`span`,{className:`text-[10px] text-muted-foreground tabular-nums`,children:y(`activity:queue.subtitle`,{count:b.length})})]})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,_.jsxs)(`button`,{type:`button`,onClick:()=>w(e=>e===`newest`?`oldest`:`newest`),className:d(`flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs transition-colors font-medium`,`text-muted-foreground hover:bg-muted hover:text-foreground`),title:y(C===`newest`?`activity:queue.sortNewestTitle`:`activity:queue.sortOldestTitle`),"data-testid":`queue-sort-toggle`,children:[C===`newest`?(0,_.jsx)(n,{className:`h-3 w-3`}):(0,_.jsx)(i,{className:`h-3 w-3`}),y(C===`newest`?`activity:queue.newest`:`activity:queue.oldest`)]}),b.length>0&&!D&&(0,_.jsxs)(`button`,{type:`button`,onClick:()=>S(),className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs text-destructive hover:bg-destructive/10 transition-colors font-medium`,title:y(`activity:queue.clearDispatchedTitle`),"data-testid":`queue-clear-all`,children:[(0,_.jsx)(s,{className:`h-3 w-3`}),y(`activity:queue.clear`)]})]})]}),(0,_.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain`,children:b.length===0?(0,_.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 gap-3 text-muted-foreground`,children:[(0,_.jsx)(u,{className:`h-10 w-10 opacity-15`}),(0,_.jsx)(`p`,{className:`text-sm font-medium`,children:y(`activity:queue.emptyTitle`)}),(0,_.jsx)(`p`,{className:`text-xs text-center max-w-xs`,children:y(`activity:queue.emptyBody`)})]}):(0,_.jsx)(`ul`,{className:`divide-y divide-border/60`,"data-testid":`queue-list`,children:E.map(({item:e,sourceIdx:t},n)=>{let r=v[e.mode],i=e.alreadyDispatched===!0;return(0,_.jsxs)(`li`,{className:d(`flex items-start justify-between gap-3 px-4 py-3 text-xs transition-colors`,i?`bg-muted/30 text-muted-foreground hover:bg-muted/40`:`hover:bg-muted/35`),"data-testid":`queue-item`,"data-dispatched":i?`true`:void 0,children:[(0,_.jsxs)(`div`,{className:`flex items-start gap-3 min-w-0 flex-1`,children:[(0,_.jsxs)(`span`,{className:`mt-1 text-[10px] font-mono text-muted-foreground shrink-0 w-5 text-right tabular-nums`,children:[n+1,`.`]}),(0,_.jsx)(`span`,{className:d(`shrink-0 inline-flex items-center justify-center rounded border px-1.5 py-0.5 text-[10px] font-semibold uppercase`,r.tone,i&&`opacity-60`),title:y(`activity:queue.${r.titleKey}`),"data-testid":`queue-mode-${e.mode}`,children:r.label}),(0,_.jsx)(`p`,{className:`text-sm leading-relaxed min-w-0 break-words flex-1`,children:e.text.length>120?`${e.text.slice(0,117)}…`:e.text}),i&&(0,_.jsxs)(`span`,{className:`shrink-0 mt-0.5 inline-flex items-center gap-1 text-[10px] font-semibold uppercase text-success`,title:y(`activity:queue.dispatchedTitle`),"data-testid":`queue-dispatched-${t}`,children:[(0,_.jsx)(l,{className:`h-3 w-3`}),y(`activity:queue.dispatchedLabel`)]})]}),!i&&(0,_.jsx)(`button`,{type:`button`,onClick:()=>T(t),className:`ml-1 p-1.5 rounded-md shrink-0 hover:bg-destructive/10 hover:text-destructive transition-colors`,title:y(`activity:queue.removeTitle`),"data-testid":`queue-remove-${t}`,children:(0,_.jsx)(o,{className:`h-3.5 w-3.5`})})]},`${e.addedAt}-${t}`)})})}),b.length>0&&(0,_.jsx)(`div`,{className:`border-t border-border/70 bg-muted/20 px-4 py-2.5 shrink-0`,children:(0,_.jsx)(`p`,{className:`text-[10px] text-muted-foreground text-center`,children:y(`activity:queue.footer`)})})]})})}export{y as QueuePanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./chat-store-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./chat-store-BiEXyguk.js";import{Ba as n,Ga as r,Ji as i,Ot as a,Pa as o,hn as s,lt as c,pn as l,rn as u,xi as d}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{t as f}from"./session-store-CKpAwNIm.js";import{n as p}from"./ui-store-3HoYrTu5.js";var m=e(r(),1),h=c();function g(){let e=f(e=>e.session),{t:r}=n(),c=f.getState().session?.id,g=f(e=>e.projectName),x=f(e=>e.cwd),S=f(e=>e.mode),C=f(e=>e.contextMode),w=f(e=>e.lastVisitedAt),T=t(e=>e.messages),E=t(e=>e.queue.length),D=t(e=>e.boundSessionId),O=p(e=>e.currentView),k=p(e=>e.dockSection),[A,j]=(0,m.useState)([]),M=(0,m.useMemo)(()=>{if(typeof window>`u`)return 0;let e=0;for(let t of[`wrongstack-session`,`wrongstack-chat`,`wrongstack-ui`,`wrongstack-config`]){let n=window.localStorage.getItem(t);typeof n==`string`&&(e+=n.length)}return e},[T.length]),N=typeof window<`u`&&!!window.__wrongstackSessionRehydrated,P=typeof window<`u`&&!!window.__wrongstackChatRehydrated;function F(e,t){j(n=>[{ts:Date.now(),note:e,ok:t},...n].slice(0,20))}function I(){F(r(`activity:refresh.simulatedF5`),!0)}let L=D!==null&&c!==void 0&&D!==c;return(0,h.jsx)(`div`,{className:`h-full min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain bg-[hsl(var(--surface-2)/0.45)] p-4 sm:p-6`,children:(0,h.jsxs)(`div`,{className:`mx-auto max-w-5xl space-y-5 sm:space-y-6`,children:[(0,h.jsx)(`header`,{className:`rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:(0,h.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,h.jsxs)(`div`,{className:`min-w-0`,children:[(0,h.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-2 text-xl font-bold sm:text-2xl`,children:[(0,h.jsx)(l,{className:`h-6 w-6 shrink-0 text-primary sm:h-7 sm:w-7`}),r(`activity:refresh.heading`)]}),(0,h.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:r(`activity:refresh.subtitle`)})]}),(0,h.jsx)(`button`,{type:`button`,onClick:I,className:`inline-flex h-9 w-full items-center justify-center rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 sm:w-auto`,children:r(`activity:refresh.recordProbe`)})]})}),(0,h.jsxs)(`section`,{className:`space-y-3`,children:[(0,h.jsxs)(`h2`,{className:`text-lg font-semibold flex items-center gap-2`,children:[(0,h.jsx)(o,{className:`w-5 h-5`}),r(`activity:refresh.latestSession`)]}),(0,h.jsx)(_,{label:r(`activity:refresh.restoredLocal`),ok:N,extra:c?r(`activity:refresh.sessionIdExtra`,{id:c}):r(`activity:refresh.noSessionYet`)}),(0,h.jsx)(_,{label:r(`activity:refresh.activePointer`),ok:!!e?.id,extra:e?y(e):`null`}),(0,h.jsx)(_,{label:r(`activity:refresh.lastVisited`),ok:w>0,extra:w>0?new Date(w).toISOString():r(`activity:refresh.never`)})]}),(0,h.jsxs)(`section`,{className:`space-y-3`,children:[(0,h.jsxs)(`h2`,{className:`text-lg font-semibold flex items-center gap-2`,children:[(0,h.jsx)(d,{className:`w-5 h-5`}),r(`activity:refresh.persistedEnv`)]}),(0,h.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-3`,children:[(0,h.jsx)(v,{label:`projectName`,value:g||`∅`}),(0,h.jsx)(v,{label:`cwd`,value:x||`∅`,mono:!0}),(0,h.jsx)(v,{label:`mode`,value:S,mono:!0}),(0,h.jsx)(v,{label:`contextMode`,value:C,mono:!0})]})]}),(0,h.jsxs)(`section`,{className:`space-y-3`,children:[(0,h.jsxs)(`h2`,{className:`text-lg font-semibold flex items-center gap-2`,children:[(0,h.jsx)(s,{className:`w-5 h-5`}),r(`activity:refresh.transcriptRehydrate`)]}),(0,h.jsx)(_,{label:r(`activity:refresh.localTranscript`),ok:P&&(T.length>0||D===null),extra:T.length===0?r(`activity:refresh.noMessages`):r(`activity:refresh.messagesExtra`,{count:T.length,queued:E})}),(0,h.jsx)(_,{label:r(`activity:refresh.noBleed`),ok:!L,extra:L?r(`activity:refresh.bleedExtra`,{bound:D??`∅`,active:c??`∅`}):r(`activity:refresh.transcriptBinds`),warn:L}),T.length>0&&(0,h.jsxs)(`div`,{className:`space-y-1 rounded-lg border border-border/70 bg-card/65 p-3 text-xs font-mono`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:`first:`}),` `,b(T[0])]}),(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:`last:`}),` `,b(T[T.length-1]??T[0])]})]})]}),(0,h.jsxs)(`section`,{className:`space-y-3`,children:[(0,h.jsxs)(`h2`,{className:`text-lg font-semibold flex items-center gap-2`,children:[(0,h.jsx)(u,{className:`w-5 h-5`}),r(`activity:refresh.uiWorkspace`)]}),(0,h.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-3`,children:[(0,h.jsx)(v,{label:`currentView`,value:O,mono:!0}),(0,h.jsx)(v,{label:`dockSection`,value:k??r(`activity:refresh.noneValue`),mono:!0})]}),(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`activity:refresh.payloadSize`,{count:M})})]}),(0,h.jsxs)(`section`,{className:`space-y-2`,children:[(0,h.jsx)(`h2`,{className:`text-lg font-semibold`,children:r(`activity:refresh.probeLog`)}),A.length===0?(0,h.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r(`activity:refresh.noProbes`)}):(0,h.jsx)(`ul`,{className:`space-y-1 text-xs font-mono`,children:A.map((e,t)=>(0,h.jsxs)(`li`,{className:`flex items-center gap-2`,children:[e.ok?(0,h.jsx)(i,{className:`w-4 h-4 text-success shrink-0`}):(0,h.jsx)(a,{className:`w-4 h-4 text-warning shrink-0`}),(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:new Date(e.ts).toLocaleTimeString()}),(0,h.jsx)(`span`,{children:e.note})]},`${e.ts}-${t}`))})]})]})})}function _({label:e,extra:t,ok:n,warn:r}){return(0,h.jsxs)(`div`,{className:`rounded-lg border px-3 py-2 ${r?`border-warning/40 bg-warning/10 text-warning`:n?`border-success/40 bg-success/10 text-success`:`border-border bg-muted/40 text-muted-foreground`}`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs font-medium`,children:[n&&!r?(0,h.jsx)(i,{className:`h-4 w-4 shrink-0`}):(0,h.jsx)(a,{className:`h-4 w-4 shrink-0`}),(0,h.jsx)(`span`,{className:`min-w-0 break-words`,children:e})]}),(0,h.jsx)(`div`,{className:`text-xs font-mono mt-1 break-all`,children:t})]})}function v({label:e,value:t,mono:n}){return(0,h.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-border/70 bg-card/75 p-3 shadow-sm`,children:[(0,h.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:e}),(0,h.jsx)(`p`,{className:`mt-1 text-sm break-all `+(n?`font-mono`:`font-medium`),children:t})]})}function y(e){let t=e.title?.trim();return t?`${e.id} — "${t}" (${e.provider}/${e.model})`:`${e.id} (${e.provider}/${e.model})`}function b(e){let t=(e.content??``).trim().replace(/\s+/g,` `);return`[${e.role}] ${t.length>100?`${t.slice(0,99)}…`:t}`}export{g as RefreshDebugView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Ga as n,lt as r}from"./vendor-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Ga as n,lt as r}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{t as i}from"./utils-BecmXwgG.js";import{t as a}from"./button-Dhmop_yM.js";import{t as o}from"./input-C3rIQ26u.js";import{o as s}from"./index-Cyhuj8ku.js";var c=e(n(),1),l=r(),u=[`feature`,`bug_fix`,`refactor`,`performance`,`security`,`ui_change`,`api_change`,`infrastructure`,`migration`,`testing`,`documentation`,`maintenance`,`other`,`unspecified`],d=[`unspecified`,`low`,`medium`,`high`,`critical`],f={draft:`bg-muted text-muted-foreground`,collecting_information:`bg-warning/15 text-warning`,submitted:`bg-success/15 text-success`,cancelled:`bg-destructive/15 text-destructive`,archived:`bg-muted text-muted-foreground`};function p(e){let t=Date.now()-e;if(t<6e4)return`just now`;let n=Math.floor(t/6e4);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function m(){let{t:e}=t(),[n,r]=(0,c.useState)(null),[m,h]=(0,c.useState)([]),[g,_]=(0,c.useState)(!0),[v,y]=(0,c.useState)(null),[b,x]=(0,c.useState)(``),[S,C]=(0,c.useState)(``),[w,T]=(0,c.useState)(`unspecified`),[E,D]=(0,c.useState)(`unspecified`),[O,k]=(0,c.useState)(!1),[A,j]=(0,c.useState)(null),[M,N]=(0,c.useState)(null),P=(0,c.useCallback)(async()=>{_(!0),y(null);try{let e=await fetch(`/api/requirement-intakes`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(t?.error?.message??`List failed (HTTP ${e.status})`)}let t=await e.json();r(t.projectId),h(t.intakes)}catch(e){y(e instanceof Error?e.message:String(e))}finally{_(!1)}},[]);(0,c.useEffect)(()=>{P()},[P]);let F=(0,c.useCallback)(async()=>{let e=b.trim();if(!e){j(`Describe the request first — it is preserved verbatim.`);return}if(!n){j(`No project identity available yet.`);return}k(!0),j(null),N(null);try{let t=await fetch(`/api/projects/${encodeURIComponent(n)}/requirement-intakes`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({projectId:n,requestedBy:`webui`,originalRequest:e,...S.trim()?{title:S.trim()}:{},...w===`unspecified`?{}:{requestType:w},...E===`unspecified`?{}:{priority:E}})}),r=await t.json().catch(()=>null);if(!t.ok||!r?.record)throw Error(r?.error?.message??`Create failed (HTTP ${t.status})`);let i=await fetch(`/api/requirement-intakes/${r.record.id}/submit`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`});if(!i.ok){let e=await i.json().catch(()=>null);throw Error(e?.error?.message??`Submit failed (HTTP ${i.status})`)}N(`Intake recorded and submitted (${r.record.id}).`),x(``),C(``),T(`unspecified`),D(`unspecified`),await P()}catch(e){j(e instanceof Error?e.message:String(e))}finally{k(!1)}},[b,S,w,E,n,P]);return(0,l.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden`,children:[(0,l.jsxs)(`header`,{className:`border-b border-border/70 px-5 py-3`,children:[(0,l.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:e(`activity:reqIntake.requirementsIntake`)}),(0,l.jsx)(`div`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:e(`activity:reqIntake.collectAndPreserveSoftwareDevelopmentRequests`)})]}),(0,l.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain p-5`,children:[v?(0,l.jsxs)(`div`,{role:`alert`,className:`mb-4 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:[v,(0,l.jsx)(`button`,{type:`button`,className:`ml-2 underline underline-offset-2`,onClick:()=>void P(),children:e(`activity:reqIntake.retry`)})]}):null,(0,l.jsxs)(`section`,{"aria-label":e(`activity:reqIntake.fileANewIntake`),className:`mb-6 rounded-lg border border-border/70 bg-card/60 p-4`,children:[(0,l.jsx)(`div`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:e(`activity:reqIntake.fileANewRequest`)}),(0,l.jsxs)(`div`,{className:`space-y-3`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsxs)(`label`,{htmlFor:`intake-request`,className:`mb-1 block text-xs text-foreground`,children:[e(`activity:reqIntake.requestText`),` `,(0,l.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,l.jsx)(`textarea`,{id:`intake-request`,value:b,onChange:e=>x(e.target.value),placeholder:e(`activity:reqIntake.describeTheFeatureBugFixRefactorOrChange`),rows:4,className:i(`w-full resize-y rounded-md border border-border/70 bg-background px-3 py-2`,`text-sm text-foreground placeholder:text-muted-foreground/70`,`focus:outline-none focus:ring-2 focus:ring-ring`)}),/\[VIBE\]/i.test(b)?(0,l.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5 rounded bg-primary/10 px-2 py-1 text-[11px] font-medium text-primary`,children:[(0,l.jsx)(`span`,{children:`🌊`}),(0,l.jsxs)(`span`,{children:[(0,l.jsx)(`strong`,{children:`VIBE Protocol Detected:`}),` Three-Stage Verification (Spec-Synthesizer → Coder → Auditor) is active.`]})]}):null,(0,l.jsx)(`p`,{className:`mt-1 text-[11px] text-muted-foreground`,children:e(`activity:reqIntake.storedVerbatimAsTheRecordApos`)})]}),(0,l.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`label`,{htmlFor:`intake-title`,className:`mb-1 block text-xs text-foreground`,children:e(`activity:reqIntake.titleOptional`)}),(0,l.jsx)(o,{id:`intake-title`,value:S,onChange:e=>C(e.target.value),placeholder:e(`activity:reqIntake.shortDisplayTitle`)})]}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`label`,{htmlFor:`intake-type`,className:`mb-1 block text-xs text-foreground`,children:e(`activity:reqIntake.type`)}),(0,l.jsx)(`select`,{id:`intake-type`,value:w,onChange:e=>T(e.target.value),className:i(`w-full rounded-md border border-border/70 bg-background px-2 py-2`,`text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring`),children:u.map(e=>(0,l.jsx)(`option`,{value:e,children:e},e))})]}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`label`,{htmlFor:`intake-priority`,className:`mb-1 block text-xs text-foreground`,children:e(`activity:reqIntake.priority`)}),(0,l.jsx)(`select`,{id:`intake-priority`,value:E,onChange:e=>D(e.target.value),className:i(`w-full rounded-md border border-border/70 bg-background px-2 py-2`,`text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring`),children:d.map(e=>(0,l.jsx)(`option`,{value:e,children:e},e))})]})]}),A?(0,l.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:A}):null,M?(0,l.jsx)(`div`,{role:`status`,className:`rounded-md border border-success/30 bg-success/10 px-3 py-2 text-xs text-success`,children:M}):null,(0,l.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,l.jsx)(a,{variant:`secondary`,size:`sm`,disabled:O,onClick:()=>{x(``),j(null),N(null)},children:e(`activity:reqIntake.clear`)}),(0,l.jsx)(a,{size:`sm`,disabled:O||!b.trim(),onClick:()=>void F(),children:O?`Filing…`:`File + submit`})]})]})]}),(0,l.jsxs)(`section`,{"aria-label":e(`activity:reqIntake.intakeRecords`),className:`space-y-2`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,l.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:e(`activity:reqIntake.records`)}),(0,l.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[m.length,` total`]})]}),g?(0,l.jsx)(`div`,{className:`py-8 text-center text-xs text-muted-foreground`,children:e(`activity:reqIntake.loading`)}):m.length===0?(0,l.jsx)(`div`,{className:`rounded-md border border-dashed border-border/70 py-10 text-center text-xs text-muted-foreground`,children:e(`activity:reqIntake.noIntakeRecordsYetFileThe`)}):(0,l.jsx)(`ul`,{className:`space-y-2`,children:m.map(e=>(0,l.jsxs)(`li`,{className:`rounded-md border border-border/70 bg-card/60 p-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,l.jsxs)(`div`,{className:`min-w-0`,children:[(0,l.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,title:e.title,children:e.title}),(0,l.jsx)(`div`,{className:`mt-0.5 font-mono text-[10px] text-muted-foreground`,children:e.id})]}),(0,l.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-1.5`,children:[e.isVibeMode?(0,l.jsx)(s,{variant:`outline`,className:`border-primary/40 bg-primary/10 text-[10px] text-primary`,children:`🌊 VIBE`}):null,(0,l.jsx)(s,{variant:`secondary`,className:`text-[10px]`,children:e.requestType}),(0,l.jsx)(s,{className:i(`text-[10px]`,f[e.status]??`bg-muted text-muted-foreground`),children:e.status})]})]}),(0,l.jsxs)(`div`,{className:`mt-1.5 text-[11px] text-muted-foreground`,children:[e.priority,` · updated `,p(e.updatedAt)]})]},e.id))})]})]})]})}export{m as RequirementIntakeView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MemoryManager-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Ga as n,Vn as r,bt as i,dr as a,lt as o}from"./vendor-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MemoryManager-UVJcZ8F1.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-DZ9_OO6N.js","assets/monaco-BCqJp2xW.js","assets/monaco-Bowa0-zp.css","assets/markdown-Kp5uSgOw.js","assets/vendor-BMdWcCR4.css","assets/i18n-dLvHUYek.js","assets/activity-COQ9xSFu.js","assets/chat-CzaGXz_W.js","assets/commandPalette-BovBiPec.js","assets/common-BBHmIHQW.js","assets/settings-DfID_cS9.js","assets/setup-DfcCCvUO.js","assets/toasts-DOfXc7Rt.js","assets/useWebSocket-B2jKc_G4.js","assets/chat-store-BiEXyguk.js","assets/utils-BecmXwgG.js","assets/ws-client-DXT4gi-N.js","assets/session-store-CKpAwNIm.js","assets/codemap-activity-store-BWt_a7Gs.js","assets/stores-D9Ng0JyF.js","assets/mailbox-store-DhAVkVJQ.js","assets/ui-store-3HoYrTu5.js","assets/view-navigation-C1UDTk5R.js","assets/codemap-index-store-CDhApwWQ.js","assets/Toaster-tBe1ZrKx.js","assets/dialog-DPl7DolS.js","assets/button-Dhmop_yM.js","assets/input-C3rIQ26u.js","assets/index-Cyhuj8ku.js","assets/ConfirmModal-e_pAJNXI.js","assets/ModelPicker-BX3TyLGh.js","assets/index-B8J_xxU5.css","assets/roster-ws-Vj_HH49O.js","assets/shared-BUXBOqyO.js","assets/MemoryDrawer-8sFKIDFT.js","assets/AudienceMemoryPanel-BLpp2tHi.js","assets/vector-memory-panel-CBA4CK6N.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,Ga as n,Vn as r,bt as i,dr as a,lt as o}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{s}from"./monaco-BCqJp2xW.js";import{t as c}from"./utils-BecmXwgG.js";import{C as l,E as u,T as d,w as f}from"./index-Cyhuj8ku.js";var p=e(n(),1),m=o(),h=(0,p.lazy)(()=>s(()=>import(`./MemoryManager-UVJcZ8F1.js`).then(e=>({default:e.MemoryManager})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]))),g=(0,p.lazy)(()=>s(()=>import(`./AudienceMemoryPanel-BLpp2tHi.js`).then(e=>({default:e.AudienceMemoryPanel})),__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35]))),_=(0,p.lazy)(()=>s(()=>import(`./vector-memory-panel-CBA4CK6N.js`).then(e=>({default:e.VectorMemoryPanel})),__vite__mapDeps([38,1,2,3,4,5,6,27,17,28])));function v({label:e}){return(0,m.jsx)(`div`,{className:`flex h-full min-h-0 items-center justify-center bg-background text-xs text-muted-foreground`,"aria-busy":`true`,children:(0,m.jsxs)(`span`,{className:`font-mono uppercase tracking-wide`,children:[e,`…`]})})}var y=[{value:`all`,label:`activity:memoryManager.tabAllMemories`,hint:`activity:memoryManager.tabAllMemoriesHint`,Icon:a},{value:`audience`,label:`activity:memoryManager.tabAudience`,hint:`activity:memoryManager.tabAudienceHint`,Icon:i},{value:`vector`,label:`activity:memoryManager.tabVectorMemory`,hint:`activity:memoryManager.tabVectorMemoryHint`,Icon:r}];function b({defaultValue:e=`all`}={}){let{t:n}=t();return(0,m.jsxs)(l,{defaultValue:e,className:`flex h-full min-h-0 min-w-0 flex-1 flex-col`,children:[(0,m.jsx)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-border/70 bg-card/55 px-4 py-2 sm:px-5`,role:`presentation`,children:(0,m.jsx)(d,{"aria-label":n(`activity:memoryManager.lensesAria`),className:`h-9 bg-muted/40 p-1 shadow-none`,children:y.map(({value:e,label:t,hint:r,Icon:i})=>(0,m.jsxs)(u,{value:e,className:c(`h-7 gap-2 px-3 text-[11px] font-semibold uppercase tracking-wide`,`data-[state=active]:bg-background data-[state=active]:text-foreground`,`data-[state=active]:shadow-[0_0_0_1px_hsl(var(--border)/0.7)]`),children:[(0,m.jsx)(i,{className:`size-3.5`}),(0,m.jsx)(`span`,{children:n(t)}),(0,m.jsx)(`span`,{className:`hidden font-mono text-[9px] font-normal normal-case text-muted-foreground sm:inline`,children:n(r)})]},e))})}),(0,m.jsx)(f,{value:`all`,className:`mt-0 flex-1 overflow-hidden ring-offset-0 focus-visible:ring-0`,children:(0,m.jsx)(p.Suspense,{fallback:(0,m.jsx)(v,{label:n(`activity:memoryManager.loadingSage`)}),children:(0,m.jsx)(h,{})})}),(0,m.jsx)(f,{value:`audience`,className:`mt-0 flex-1 overflow-hidden ring-offset-0 focus-visible:ring-0`,children:(0,m.jsx)(p.Suspense,{fallback:(0,m.jsx)(v,{label:n(`activity:memoryManager.loadingAudience`)}),children:(0,m.jsx)(g,{})})}),(0,m.jsx)(f,{value:`vector`,className:`mt-0 flex-1 overflow-y-auto px-4 pb-6 pt-4 ring-offset-0 focus-visible:ring-0 sm:px-5`,children:(0,m.jsx)(p.Suspense,{fallback:(0,m.jsx)(v,{label:n(`activity:memoryManager.loadingVectorMemory`)}),children:(0,m.jsx)(_,{})})})]})}export{b as SageTabs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,En as n,Ga as r,Mr as i,Ot as a,Pr as o,Qt as s,Ut as c,_ as l,a as u,c as d,dt as f,f as p,h as m,i as h,lt as g,mn as _,or as v,qi as y,r as b,ra as x,s as S,u as C,ua as w,vr as T,ya as E}from"./vendor-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ba as t,En as n,Ga as r,Mr as i,Ot as a,Pr as o,Qt as s,Ut as c,_ as l,a as u,c as d,dt as f,f as p,h as m,i as h,lt as g,mn as _,or as v,qi as y,r as b,ra as x,s as S,u as C,ua as w,vr as T,ya as E}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{t as D}from"./utils-BecmXwgG.js";var O=e(r(),1),k=g();function A({pct:e}){let{t:n}=t(),r=(0,O.useId)(),i=2*Math.PI*26,a=i-Math.max(0,Math.min(100,e))/100*i;return(0,k.jsxs)(`div`,{className:`relative h-16 w-16 shrink-0`,children:[(0,k.jsxs)(`svg`,{viewBox:`0 0 64 64`,className:`h-16 w-16 -rotate-90`,role:`img`,"aria-label":n(`activity:progressring.progress`),children:[(0,k.jsx)(`circle`,{cx:`32`,cy:`32`,r:26,fill:`none`,stroke:`hsl(var(--muted))`,strokeWidth:`6`}),(0,k.jsx)(`circle`,{cx:`32`,cy:`32`,r:26,fill:`none`,stroke:`url(#${r})`,strokeWidth:`6`,strokeLinecap:`round`,strokeDasharray:i,strokeDashoffset:a,style:{transition:`stroke-dashoffset 0.6s cubic-bezier(0.16,1,0.3,1)`}}),(0,k.jsx)(`defs`,{children:(0,k.jsxs)(`linearGradient`,{id:r,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,k.jsx)(`stop`,{offset:`0%`,stopColor:`hsl(var(--primary))`}),(0,k.jsx)(`stop`,{offset:`100%`,stopColor:`hsl(var(--info))`})]})})]}),(0,k.jsxs)(`div`,{className:`absolute inset-0 flex items-center justify-center text-sm font-bold text-foreground`,children:[Math.round(e),`%`]})]})}var j={pending:{label:`Pending`,icon:y,text:`text-muted-foreground`,ring:`border-border/70 bg-muted/45`,dot:`bg-muted-foreground`,hex:`hsl(var(--muted-foreground))`},queued:{label:`Ready`,icon:y,text:`text-primary`,ring:`border-primary/35 bg-primary/10`,dot:`bg-primary`,hex:`hsl(var(--primary))`},in_progress:{label:`Running`,icon:v,spin:!0,text:`text-warning`,ring:`border-warning/45 bg-warning/10`,dot:`bg-warning`,hex:`hsl(var(--warning))`},blocked:{label:`Blocked`,icon:y,text:`text-destructive`,ring:`border-destructive/30 bg-destructive/10`,dot:`bg-destructive`,hex:`hsl(var(--destructive))`},review:{label:`Review`,icon:y,text:`text-primary`,ring:`border-primary/35 bg-primary/10`,dot:`bg-primary`,hex:`hsl(var(--info))`},failed:{label:`Failed`,icon:f,text:`text-destructive`,ring:`border-destructive/45 bg-destructive/10`,dot:`bg-destructive`,hex:`hsl(var(--destructive))`},completed:{label:`Done`,icon:x,text:`text-success`,ring:`border-success/35 bg-success/10`,dot:`bg-success`,hex:`hsl(var(--success))`},cancelled:{label:`Cancelled`,icon:E,text:`text-muted-foreground`,ring:`border-border/70 bg-muted/45`,dot:`bg-muted-foreground`,hex:`hsl(var(--muted-foreground))`}};function M(e){return j[e]??j.pending}var N={critical:{text:`text-destructive`,chip:`bg-destructive/10 text-destructive`},high:{text:`text-warning`,chip:`bg-warning/12 text-warning`},medium:{text:`text-primary`,chip:`bg-primary/10 text-primary`},low:{text:`text-muted-foreground`,chip:`bg-muted text-muted-foreground`}};function P(e){return N[e]??N.medium}var F={running:`border-primary/35 bg-primary/10 text-primary`,paused:`border-warning/35 bg-warning/10 text-warning`,stopped:`border-border/70 bg-muted text-muted-foreground`,completed:`border-success/35 bg-success/10 text-success`,failed:`border-destructive/35 bg-destructive/10 text-destructive`,deadlocked:`border-destructive/35 bg-destructive/10 text-destructive`,idle:`border-border bg-muted text-muted-foreground`},I=[`bg-warning`,`bg-primary`,`bg-success`,`bg-destructive`,`bg-secondary`,`bg-muted-foreground`,`bg-accent`],L={started:{icon:n,color:`text-warning`},completed:{icon:x,color:`text-success`},failed:{icon:f,color:`text-destructive`},retrying:{icon:_,color:`text-warning`},wave:{icon:T,color:`text-primary`},deadlock:{icon:a,color:`text-destructive`},verification_failed:{icon:s,color:`text-destructive`},conflict:{icon:i,color:`text-warning`},split:{icon:c,color:`text-primary`},supervisor:{icon:w,color:`text-primary`}};function R(e){let t=e.trim().split(/\s+/);return((t[0]?.[0]??``)+(t[1]?.[0]??``)).toUpperCase()||`·`}function z(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?t%60?`${n}m ${t%60}s`:`${n}m`:`${Math.floor(n/60)}h ${n%60}m`}function B(e,t){let n=Math.max(0,Math.floor((t-e)/1e3));if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m`:`${Math.floor(r/60)}h`}var V=300,H=128,U=240,W={pending:{ring:`border-border/70`,chip:`bg-muted text-muted-foreground`,dot:`bg-muted-foreground`},queued:{ring:`border-primary/35`,chip:`bg-primary/10 text-primary`,dot:`bg-primary`},in_progress:{ring:`border-warning/45`,chip:`bg-warning/12 text-warning`,dot:`bg-warning`},blocked:{ring:`border-destructive/30`,chip:`bg-destructive/10 text-destructive`,dot:`bg-destructive`},review:{ring:`border-primary/35`,chip:`bg-primary/10 text-primary`,dot:`bg-primary`},failed:{ring:`border-destructive/45`,chip:`bg-destructive/10 text-destructive`,dot:`bg-destructive`},completed:{ring:`border-success/35`,chip:`bg-success/12 text-success`,dot:`bg-success`},cancelled:{ring:`border-border/70`,chip:`bg-muted text-muted-foreground`,dot:`bg-muted-foreground`}};function G({data:e}){let n=e.task,{t:r}=t(),i=W[n.displayStatus],a=n.displayStatus===`in_progress`,s=n.displayStatus===`completed`?x:n.displayStatus===`failed`?f:a?v:y;return(0,k.jsxs)(`div`,{className:D(`sdd-node-enter group relative rounded-lg border bg-card/95 px-2.5 py-2 text-left shadow-lg backdrop-blur`,i.ring,a&&`sdd-node-running`,n.displayStatus===`completed`&&`sdd-node-complete`,n.displayStatus===`failed`&&`sdd-node-failed`,e.onTaskClick&&`hover:brightness-125`),style:{width:U,animationDelay:`${Math.min(e.index*45,600)}ms`},children:[e.onTaskClick&&(0,k.jsx)(`button`,{type:`button`,"aria-label":r(`activity:sdd.openTask`,{title:n.title,defaultValue:`Open task: ${n.title}`}),className:`absolute inset-0 z-10 cursor-pointer rounded-lg`,onClick:()=>e.onTaskClick?.(n.id)}),(0,k.jsx)(S,{type:`target`,position:l.Left,isConnectable:!1,className:`!h-1.5 !w-1.5 !border-0 !bg-border`}),(0,k.jsx)(S,{type:`source`,position:l.Right,isConnectable:!1,className:`!h-1.5 !w-1.5 !border-0 !bg-border`}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,k.jsx)(s,{className:D(`h-3.5 w-3.5`,a&&`animate-spin`,i.chip.split(` `).find(e=>e.startsWith(`text`)))}),(0,k.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:n.shortId}),(0,k.jsx)(`span`,{className:D(`font-mono text-[10px] font-bold uppercase`,P(n.priority).text),children:n.priority[0]}),(0,k.jsx)(`span`,{className:D(`ml-auto rounded px-1.5 py-px text-[9px] font-medium`,i.chip),children:r(`activity:sdd.status.${n.displayStatus}`)})]}),(0,k.jsx)(`p`,{className:`mt-1 line-clamp-2 text-[11px] leading-snug text-foreground`,children:n.title}),(n.agentName||n.worktreeBranch)&&(0,k.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5`,children:[n.agentName&&(0,k.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,k.jsx)(`span`,{className:D(`flex h-4 w-4 items-center justify-center rounded-full text-[8px] font-bold text-white`,a?`bg-warning sdd-agent-live`:`bg-muted-foreground`),children:R(n.agentName)}),(0,k.jsx)(`span`,{className:`max-w-[88px] truncate text-[10px] text-muted-foreground`,children:n.agentName})]}),n.retries?(0,k.jsxs)(`span`,{className:`flex items-center gap-0.5 text-[9px] text-destructive`,children:[(0,k.jsx)(_,{className:`h-2.5 w-2.5`}),n.retries]}):null,n.worktreeBranch&&(0,k.jsxs)(`span`,{className:`ml-auto flex items-center gap-0.5 text-[9px] text-muted-foreground`,title:n.worktreeBranch,children:[(0,k.jsx)(o,{className:`h-2.5 w-2.5`}),(0,k.jsx)(`span`,{className:`max-w-[70px] truncate`,children:n.worktreeBranch.replace(/^.*\//,``)})]})]})]})}function K({data:e}){return(0,k.jsx)(`div`,{className:`whitespace-nowrap text-[11px] font-bold uppercase text-muted-foreground`,children:e.label})}var q={task:G,colLabel:K};function J(e,t,n){let r=new Map(e.map(e=>[e.shortId,e])),i=[],a=0;t.forEach((e,t)=>{i.push({id:`__col_${t}`,position:{x:t*V,y:-52},data:{label:e.label},draggable:!1,selectable:!1,type:`colLabel`,style:{pointerEvents:`none`}}),e.taskIds.forEach((e,o)=>{let s=r.get(e);s&&i.push({id:s.id,position:{x:t*V,y:o*H},data:{task:s,index:a++,onTaskClick:n},type:`task`,draggable:!0})})});let o=[];for(let t of e)for(let e of t.deps){let n=r.get(e);if(!n)continue;let i=n.displayStatus===`completed`&&(t.displayStatus===`in_progress`||t.displayStatus===`queued`);o.push({id:`${n.id}->${t.id}`,source:n.id,target:t.id,animated:i,className:i?`sdd-edge-flow`:void 0,style:{stroke:M(t.displayStatus).hex,strokeWidth:i?2.2:1.4,opacity:t.displayStatus===`pending`?.4:.85}})}return{nodes:i,edges:o}}function Y({tasks:e,columns:t,onTaskClick:n}){let{fitView:r}=m(),{nodes:i,edges:a}=(0,O.useMemo)(()=>J(e,t,n),[e,t,n]),o=e.length;return(0,O.useEffect)(()=>{let e=setTimeout(()=>r({padding:.18,duration:400}),60);return()=>clearTimeout(e)},[o,r]),(0,k.jsxs)(p,{nodes:i,edges:a,nodeTypes:q,fitView:!0,fitViewOptions:{padding:.18},minZoom:.2,maxZoom:1.6,proOptions:{hideAttribution:!0},nodesConnectable:!1,elementsSelectable:!!n,children:[(0,k.jsx)(b,{variant:h.Dots,gap:22,size:1,color:`hsl(var(--border))`}),(0,k.jsx)(u,{showInteractive:!1,className:`!bottom-2 !left-2`}),(0,k.jsx)(d,{pannable:!0,zoomable:!0,nodeStrokeWidth:2,maskColor:`hsl(var(--background) / 0.65)`,nodeColor:e=>{let t=e.data?.task?.displayStatus;return t?M(t).hex:`hsl(var(--muted-foreground))`},className:`!bottom-2 !right-2 !h-24 !w-40 overflow-hidden rounded-md border border-border/70 bg-card`})]})}function X({tasks:e,columns:t,onTaskClick:n}){return(0,k.jsx)(C,{children:(0,k.jsx)(Y,{tasks:e,columns:t,onTaskClick:n})})}export{R as a,P as c,F as i,M as l,I as n,B as o,L as r,z as s,X as t,A as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$n as t,Ba as n,Bt as r,Ci as i,Ct as a,Ea as o,En as s,Et as c,Ga as l,Gt as u,Ji as d,Ni as f,Nt as p,Ot as m,Pa as h,Pr as g,Pt as _,Qr as v,Ti as y,Ua as b,Ut as ee,Vn as te,Wt as x,dt as S,gi as ne,gn as C,ia as w,in as T,jn as E,jt as D,lt as O,ma as k,mn as A,mr as re,na as j,or as M,qn as N,ra as P,ta as F,ut as I,xt as ie,zi as L}from"./vendor-DZ9_OO6N.js";import"./i18n-dLvHUYek.js";import{t as ae}from"./useWebSocket-B2jKc_G4.js";import{t as R}from"./utils-BecmXwgG.js";import{c as z,m as B,s as V}from"./stores-D9Ng0JyF.js";import{n as oe}from"./ui-store-3HoYrTu5.js";import{o as H}from"./view-navigation-C1UDTk5R.js";import{a as se,i as ce,n as U,o as W,r as le,t as G}from"./dialog-DPl7DolS.js";import{t as K}from"./button-Dhmop_yM.js";import{n as ue,t as q}from"./ModelPicker-BX3TyLGh.js";import{c as J,s as de}from"./index-Cyhuj8ku.js";import{a as Y,c as fe,i as X,l as pe,n as me,o as he,r as ge,s as _e,t as ve,u as ye}from"./SddFlowGraph-DRoJjwE7.js";import{SpecsView as be}from"./SpecsView-DCXc8NKW.js";var Z=e(l(),1),Q=O();function xe({feed:e,now:t}){let{t:r}=n();return(0,Q.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b border-border px-3 py-2 text-xs font-semibold text-foreground`,children:[(0,Q.jsx)(h,{className:`h-3.5 w-3.5 text-warning`}),r(`activity:sdd.activityHeading`)]}),(0,Q.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 space-y-1 overflow-auto overscroll-contain p-2`,children:e.length===0?(0,Q.jsx)(`p`,{className:`px-1 pt-4 text-center text-[11px] text-muted-foreground`,children:r(`activity:sdd.feedEmpty`)}):e.map((e,n)=>{let r=ge[e.kind]??ge.started,i=r.icon;return(0,Q.jsxs)(`div`,{className:R(`sdd-rise flex items-start gap-2 rounded-md px-2 py-1.5 text-[11px]`,n===0?`bg-muted`:`hover:bg-muted`),children:[(0,Q.jsx)(i,{className:R(`mt-0.5 h-3.5 w-3.5 shrink-0`,r.color)}),(0,Q.jsx)(`span`,{className:`flex-1 leading-snug text-foreground`,children:e.text}),(0,Q.jsx)(`span`,{className:`shrink-0 tabular-nums text-[10px] text-muted-foreground`,children:he(e.ts,t)})]},`${e.ts}-${n}`)})})]})}function Se({open:e,onOpenChange:t,snapshot:r,busy:i,onConfirm:a}){let{t:o}=n(),s=r?.mergedCommits?.length??0,c=r?.baseBranch,[l,u]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{e&&u(!1)},[e]);let d=r?.status===`running`||r?.status===`paused`,f=(0,Z.useMemo)(()=>{let e=new Set;for(let t of r?.tasks??[])t.worktreeBranch&&e.add(t.worktreeBranch);return e.size},[r?.tasks]),p=(0,Z.useMemo)(()=>{let e=new Set;for(let t of r?.tasks??[])t.displayStatus===`in_progress`&&t.agentName&&e.add(t.agentName);return e.size},[r?.tasks]);return(0,Q.jsx)(G,{open:e,onOpenChange:e=>!i&&t(e),children:(0,Q.jsxs)(U,{className:`sm:max-w-lg border-destructive/50`,children:[(0,Q.jsxs)(se,{children:[(0,Q.jsxs)(W,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(D,{className:`h-5 w-5 text-destructive`}),o(`activity:sdd.destroyTitle`)]}),(0,Q.jsx)(le,{children:o(`activity:sdd.destroyDesc`)})]}),(0,Q.jsxs)(`ul`,{className:`space-y-1.5 py-1 text-sm`,children:[d&&(0,Q.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Q.jsx)(`span`,{className:`mt-0.5 text-destructive`,children:`■`}),(0,Q.jsx)(`span`,{children:p>0?o(`activity:sdd.stopRunAgents`,{count:p}):o(`activity:sdd.stopRun`)})]}),(0,Q.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Q.jsx)(`span`,{className:`mt-0.5 text-destructive`,children:`■`}),(0,Q.jsx)(`span`,{children:f>0?o(`activity:sdd.removeWorktreesCount`,{count:f}):o(`activity:sdd.removeWorktreesAll`)})]}),(0,Q.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Q.jsx)(`span`,{className:`mt-0.5 text-destructive`,children:`■`}),(0,Q.jsx)(`span`,{children:o(`activity:sdd.deleteArtifacts`)})]})]}),s>0&&(0,Q.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-2 rounded-md border border-warning/30 bg-warning/5 p-2.5 text-sm`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked),className:`mt-0.5 h-4 w-4 accent-warning`}),(0,Q.jsxs)(`span`,{children:[(0,Q.jsx)(`span`,{className:`font-medium`,children:o(`activity:sdd.revertMerged`,{count:s})}),` `,`on `,(0,Q.jsx)(`code`,{className:`text-xs`,children:c??o(`activity:sdd.baseBranchFallback`)}),(0,Q.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:o(`activity:sdd.revertHint`)})]})]}),(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md bg-muted/50 p-2 text-xs text-muted-foreground`,children:[(0,Q.jsx)(m,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-warning`}),o(s>0&&!l?`activity:sdd.noteLeaveMerged`:`activity:sdd.noteAbandon`)]}),(0,Q.jsxs)(ce,{className:`gap-2 sm:gap-2`,children:[(0,Q.jsx)(K,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>t(!1),children:o(`common:action.cancel`)}),(0,Q.jsx)(K,{size:`sm`,disabled:i,onClick:()=>a(l),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:i?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(M,{className:`mr-1 h-3.5 w-3.5 animate-spin`}),` `,o(`activity:sdd.destroying`)]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D,{className:`mr-1 h-3.5 w-3.5`}),` `,o(`activity:sdd.destroyAll`)]})})]})]})})}var Ce=[{key:`pending`,labelKey:`kanbanBacklog`,accent:`border-border/70`,head:`text-muted-foreground`},{key:`queued`,labelKey:`kanbanReady`,accent:`border-primary/35`,head:`text-primary`},{key:`in_progress`,labelKey:`kanbanRunning`,accent:`border-warning/45`,head:`text-warning`},{key:`review`,labelKey:`kanbanReview`,accent:`border-primary/35`,head:`text-primary`},{key:`failed`,labelKey:`kanbanFailed`,accent:`border-destructive/35`,head:`text-destructive`},{key:`completed`,labelKey:`kanbanDone`,accent:`border-success/35`,head:`text-success`}];function we({tasks:e,selectedId:t,onTaskClick:r}){let{t:i}=n(),a=(0,Z.useMemo)(()=>{let t=new Map;for(let e of Ce)t.set(e.key,[]);for(let n of e){let e=n.displayStatus===`blocked`?`pending`:n.displayStatus===`cancelled`?`failed`:n.displayStatus;(t.get(e)??t.get(`pending`))?.push(n)}return t},[e]);return(0,Q.jsx)(`div`,{className:`flex h-full min-h-0 min-w-0 gap-3 overflow-x-auto p-4`,children:Ce.map(e=>{let n=a.get(e.key)??[];return(0,Q.jsxs)(`div`,{className:`flex min-h-0 w-64 shrink-0 flex-col`,children:[(0,Q.jsxs)(`div`,{className:R(`mb-2 flex items-center gap-2 border-b-2 pb-1.5`,e.accent),children:[(0,Q.jsx)(`span`,{className:R(`text-xs font-bold uppercase tracking-wide`,e.head),children:i(`activity:sdd.${e.labelKey}`)}),(0,Q.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 text-[10px] text-muted-foreground`,children:n.length})]}),(0,Q.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto overscroll-contain pr-1`,children:[n.map(e=>(0,Q.jsx)(Te,{task:e,selected:e.id===t,onClick:()=>r(e.id)},e.id)),n.length===0&&(0,Q.jsx)(`div`,{className:`rounded-md border border-dashed border-border py-6 text-center text-[10px] text-muted-foreground`,children:i(`activity:sdd.kanbanEmpty`)})]})]},e.key)})})}function Te({task:e,selected:t,onClick:n}){let r=e.displayStatus===`in_progress`;return(0,Q.jsxs)(`button`,{type:`button`,onClick:n,className:R(`sdd-node-enter w-full rounded-lg border bg-card/85 p-2 text-left shadow-sm transition hover:border-primary/35 hover:bg-accent/35`,t?`border-primary/55 ring-1 ring-primary/35`:`border-border/70`,r&&`sdd-node-running`,e.displayStatus===`completed`&&`sdd-node-complete`,e.displayStatus===`failed`&&`sdd-node-failed`),children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[r&&(0,Q.jsx)(M,{className:`h-3 w-3 animate-spin text-warning`}),e.displayStatus===`completed`&&(0,Q.jsx)(P,{className:`h-3 w-3 text-success`}),e.displayStatus===`failed`&&(0,Q.jsx)(S,{className:`h-3 w-3 text-destructive`}),(0,Q.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:e.shortId}),(0,Q.jsx)(`span`,{className:R(`ml-auto rounded px-1.5 text-[9px] font-bold uppercase`,fe(e.priority).chip),children:e.priority})]}),(0,Q.jsx)(`p`,{className:`mt-1 line-clamp-2 text-[11px] leading-snug text-foreground`,children:e.title}),(e.agentName||e.worktreeBranch||e.retries)&&(0,Q.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5`,children:[e.agentName&&(0,Q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`span`,{className:R(`flex h-4 w-4 items-center justify-center rounded-full text-[8px] font-bold text-white`,r?`bg-warning sdd-agent-live`:`bg-muted-foreground`),children:Y(e.agentName)}),(0,Q.jsx)(`span`,{className:`max-w-[80px] truncate text-[10px] text-muted-foreground`,children:e.agentName})]}),e.retries?(0,Q.jsxs)(`span`,{className:`flex items-center gap-0.5 text-[9px] text-destructive`,children:[(0,Q.jsx)(A,{className:`h-2.5 w-2.5`}),e.retries]}):null,e.worktreeBranch&&(0,Q.jsx)(g,{className:`ml-auto h-2.5 w-2.5 text-muted-foreground`})]})]})}function Ee({task:e,allTasks:i,feed:s,now:c,expanded:l,modelCandidates:u,defaultModel:d,onClose:p,onToggleExpanded:m,onRetry:h,onReassign:_,onSetModel:v,onSetVerification:y,onCancel:b,onDelete:te,onSplit:x,onSelectTask:ne}){let{t:C}=n(),w=pe(e.displayStatus),T=w.icon,E=e.displayStatus===`in_progress`,O=e.displayStatus===`pending`||e.displayStatus===`blocked`||e.displayStatus===`queued`,[k,re]=(0,Z.useState)(!1),[j,M]=(0,Z.useState)(``),[F,I]=(0,Z.useState)(null),[ie,L]=(0,Z.useState)(!1),[ae,z]=(0,Z.useState)(``),[B,V]=(0,Z.useState)(!1),[oe,H]=(0,Z.useState)(e.verificationCommand??``),se=()=>{j.trim()&&(_(e.id,j.trim()),re(!1),M(``))},ce=()=>{let t=ae.split(`
|
|
2
|
+
`).map(e=>e.trim()).filter(Boolean).map(e=>{let[t,...n]=e.split(`::`),r=(t??``).trim();return{title:r,description:n.join(`::`).trim()||r}}).filter(e=>e.title);t.length&&(x(e.id,t),L(!1),z(``))},U=(0,Z.useMemo)(()=>new Map(i.map(e=>[e.shortId,e])),[i]),W=(0,Z.useMemo)(()=>i.filter(t=>t.deps.includes(e.shortId)),[i,e.shortId]),le=(0,Z.useMemo)(()=>s.filter(t=>t.taskId===e.id||t.taskShortId===e.shortId),[s,e.id,e.shortId]),G=e.startedAt&&!e.completedAt?_e(c-e.startedAt):e.startedAt&&e.completedAt?_e(e.completedAt-e.startedAt):null;return(0,Q.jsxs)(`div`,{className:`sdd-rise flex h-full min-h-0 min-w-0 flex-col`,children:[(0,Q.jsxs)(`div`,{className:R(`flex items-center gap-2 border-b border-border/70 bg-card/70 px-3 py-2`,l&&`px-5 py-3`),children:[(0,Q.jsx)(`button`,{type:`button`,onClick:p,className:`text-muted-foreground hover:text-foreground`,title:C(`activity:sddTask.backTitle`),children:(0,Q.jsx)(o,{className:`h-4 w-4`})}),(0,Q.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:e.shortId}),m&&(0,Q.jsx)(`button`,{type:`button`,onClick:m,className:`ml-1 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition hover:bg-muted hover:text-foreground`,title:C(l?`activity:sddTask.collapseTitle`:`activity:sddTask.expandTitle`),"aria-label":C(l?`activity:sddTask.collapseTitle`:`activity:sddTask.expandTitle`),"aria-pressed":l,children:l?(0,Q.jsx)(N,{className:`h-4 w-4`}):(0,Q.jsx)(t,{className:`h-4 w-4`})}),(0,Q.jsxs)(`span`,{className:R(`ml-auto flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px]`,w.ring,w.text),children:[(0,Q.jsx)(T,{className:R(`h-3 w-3`,E&&`animate-spin`)}),w.label]})]}),(0,Q.jsxs)(`div`,{className:R(`min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain`,l?`grid grid-cols-2 content-start gap-4 p-5`:`space-y-3 p-3`),children:[(0,Q.jsx)(`h3`,{className:R(`text-sm font-semibold leading-snug text-foreground`,l&&`col-span-2 text-lg`),children:e.title}),e.agentName&&(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border/70 bg-muted/45 p-2`,children:[(0,Q.jsx)(`span`,{className:R(`flex h-7 w-7 items-center justify-center rounded-full text-[10px] font-bold text-white`,E?`bg-warning sdd-agent-live`:`bg-muted-foreground`),children:Y(e.agentName)}),(0,Q.jsxs)(`div`,{className:`leading-tight`,children:[(0,Q.jsx)(`div`,{className:`text-xs font-medium text-foreground`,children:e.agentName}),(0,Q.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:C(E?`activity:sddTask.workingOn`:`activity:sddTask.assigned`)})]})]}),(0,Q.jsxs)(`div`,{className:`grid grid-cols-2 gap-1.5 text-[11px]`,children:[(0,Q.jsx)(Oe,{label:C(`activity:sddTask.metaPriority`),children:(0,Q.jsx)(`span`,{className:R(`font-medium uppercase`,fe(e.priority).text),children:e.priority})}),(0,Q.jsx)(Oe,{label:C(`activity:sddTask.metaType`),children:e.type}),G&&(0,Q.jsx)(Oe,{label:e.completedAt?C(`activity:sddTask.metaDuration`):C(`activity:sddTask.metaElapsed`),children:(0,Q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(f,{className:`h-3 w-3 text-muted-foreground`}),G]})}),e.retries?(0,Q.jsx)(Oe,{label:C(`activity:sddTask.metaRetries`),children:(0,Q.jsxs)(`span`,{className:`flex items-center gap-1 text-destructive`,children:[(0,Q.jsx)(A,{className:`h-3 w-3`}),e.retries]})}):null,e.worktreeBranch&&(0,Q.jsx)(Oe,{label:C(`activity:sddTask.metaWorktree`),full:!0,children:(0,Q.jsxs)(`span`,{className:`flex items-center gap-1 font-mono text-foreground`,title:e.worktreeBranch,children:[(0,Q.jsx)(g,{className:`h-3 w-3 text-muted-foreground`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.worktreeBranch})]})})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:[C(`activity:sddTask.workerModel`),!e.model&&d&&(0,Q.jsxs)(`span`,{className:`font-normal normal-case text-muted-foreground`,children:[`· `,C(`activity:sddTask.runDefault`,{model:d})]})]}),(0,Q.jsx)(q,{value:e.model,provider:e.provider,candidates:u,placeholder:d?C(`activity:sddTask.runDefaultPlaceholderModel`,{model:d}):C(`activity:sddTask.runDefaultPlaceholder`),onPick:(t,n)=>v(e.id,t,n),onReset:e.model?()=>v(e.id,void 0,void 0):void 0}),e.fallbackModels&&e.fallbackModels.length>0&&(0,Q.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:e.fallbackModels.map(e=>(0,Q.jsxs)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-[9px] text-muted-foreground`,children:[`↳ `,e]},e))})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:[C(`activity:sddTask.verificationCmd`),(0,Q.jsxs)(`span`,{className:`font-normal normal-case text-muted-foreground`,children:[`· `,C(`activity:sddTask.gatesCompletion`)]})]}),B?(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Q.jsx)(`input`,{value:oe,onChange:e=>H(e.target.value),onKeyDown:t=>{t.key===`Enter`?(y(e.id,oe.trim()||void 0),V(!1)):t.key===`Escape`&&(H(e.verificationCommand??``),V(!1))},placeholder:C(`activity:sddTask.verifyPlaceholder`),className:`w-full rounded border border-border bg-background px-2 py-1 font-mono text-[11px] text-foreground`}),(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>{y(e.id,oe.trim()||void 0),V(!1)},className:`rounded bg-primary px-2 py-0.5 text-[10px] text-primary-foreground hover:opacity-90`,children:C(`common:action.save`)}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>{H(e.verificationCommand??``),V(!1)},className:`rounded bg-muted px-2 py-0.5 text-[10px] text-muted-foreground hover:bg-muted/80`,children:C(`common:action.cancel`)})]})]}):e.verificationCommand?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[e.verificationState&&(0,Q.jsx)(`span`,{title:e.verificationDetail,className:e.verificationState===`passed`?`rounded bg-success/10 px-1.5 py-0.5 text-[10px] text-success`:`rounded bg-destructive/10 px-1.5 py-0.5 text-[10px] text-destructive`,children:e.verificationState===`passed`?`✓ verified`:`✗ failed`}),(0,Q.jsx)(`code`,{className:`flex-1 truncate rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-foreground`,children:e.verificationCommand}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>V(!0),className:`rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground hover:bg-muted/80`,children:C(`common:action.edit`)}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>y(e.id,void 0),className:`rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground hover:bg-muted/80`,children:C(`common:action.clear`)})]}):(0,Q.jsx)(`button`,{type:`button`,onClick:()=>V(!0),className:`rounded border border-dashed border-border px-2 py-1 text-[10px] text-muted-foreground hover:bg-muted`,children:C(`activity:sddTask.addVerify`)})]}),e.description&&(0,Q.jsxs)(`div`,{className:R(l&&`col-span-2`),children:[(0,Q.jsx)(`div`,{className:`mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:C(`activity:sddTask.description`)}),(0,Q.jsx)(`p`,{className:`whitespace-pre-wrap rounded-md bg-muted p-2 text-[11px] leading-relaxed text-foreground`,children:e.description})]}),(0,Q.jsx)(De,{events:le,expanded:l}),e.deps.length>0&&(0,Q.jsx)($,{title:C(`activity:sddTask.dependsOn`),shortIds:e.deps,byShort:U,onSelectTask:ne}),W.length>0&&(0,Q.jsx)($,{title:C(`activity:sddTask.blocks`),shortIds:W.map(e=>e.shortId),byShort:U,onSelectTask:ne})]}),(0,Q.jsxs)(`div`,{className:R(`border-t border-border p-2`,l&&`px-5 py-3`),children:[k?(0,Q.jsxs)(`div`,{className:`sdd-rise flex items-center gap-1.5`,children:[(0,Q.jsx)(`input`,{value:j,onChange:e=>M(e.target.value),onKeyDown:e=>{e.key===`Enter`&&se(),e.key===`Escape`&&re(!1)},placeholder:C(`activity:sddTask.newWorkerPlaceholder`),className:`min-w-0 flex-1 rounded-md border border-border/70 bg-background px-2 py-1.5 text-xs outline-none focus:border-primary/60`}),(0,Q.jsx)(`button`,{type:`button`,onClick:se,disabled:!j.trim(),className:`rounded-md bg-primary/10 px-2 py-1.5 text-xs font-medium text-primary hover:bg-primary/15 disabled:opacity-40`,children:(0,Q.jsx)(P,{className:`h-3.5 w-3.5`})}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>re(!1),className:`rounded-md bg-muted px-2 py-1.5 text-xs text-muted-foreground hover:bg-muted`,children:(0,Q.jsx)(S,{className:`h-3.5 w-3.5`})})]}):F?(0,Q.jsxs)(`div`,{className:`sdd-rise flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`flex-1 text-xs text-foreground`,children:C(F===`stop`?`activity:sddTask.confirmStop`:`activity:sddTask.confirmDelete`)}),(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>{F===`stop`?b(e.id):te(e.id),I(null)},className:`inline-flex items-center gap-1 rounded-md bg-destructive/10 px-2.5 py-1.5 text-xs font-medium text-destructive hover:bg-destructive/15`,children:[(0,Q.jsx)(P,{className:`h-3.5 w-3.5`}),` `,C(F===`stop`?`common:action.stop`:`common:action.delete`)]}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>I(null),className:`rounded-md bg-muted px-2 py-1.5 text-xs text-muted-foreground hover:bg-muted`,children:(0,Q.jsx)(S,{className:`h-3.5 w-3.5`})})]}):(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>h(e.id),title:C(`activity:sddTask.retryTitle`),className:`inline-flex flex-1 items-center justify-center gap-1 rounded-md bg-warning/12 py-1.5 text-xs font-medium text-warning hover:bg-warning/18`,children:[(0,Q.jsx)(A,{className:`h-3.5 w-3.5`}),` `,C(`common:action.retry`)]}),(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>re(!0),className:`inline-flex flex-1 items-center justify-center gap-1 rounded-md bg-primary/10 py-1.5 text-xs font-medium text-primary hover:bg-primary/15`,children:[(0,Q.jsx)(a,{className:`h-3.5 w-3.5`}),` `,C(`activity:sddTask.reassign`)]}),E&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>I(`stop`),title:C(`activity:sddTask.stopTitle`),className:`inline-flex flex-1 items-center justify-center gap-1 rounded-md bg-destructive/10 py-1.5 text-xs font-medium text-destructive hover:bg-destructive/15`,children:[(0,Q.jsx)(r,{className:`h-3.5 w-3.5`}),` `,C(`common:action.stop`)]}),!E&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>L(!0),title:C(`activity:sddTask.splitTitle`),className:`inline-flex flex-1 items-center justify-center gap-1 rounded-md bg-primary/10 py-1.5 text-xs font-medium text-primary hover:bg-primary/15`,children:[(0,Q.jsx)(ee,{className:`h-3.5 w-3.5`}),` `,C(`activity:sddTask.split`)]}),O&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>I(`delete`),title:C(`activity:sddTask.deleteTitle`),className:`inline-flex flex-1 items-center justify-center gap-1 rounded-md bg-destructive/10 py-1.5 text-xs font-medium text-destructive hover:bg-destructive/15`,children:[(0,Q.jsx)(D,{className:`h-3.5 w-3.5`}),` `,C(`common:action.delete`)]})]}),ie&&(0,Q.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,Q.jsx)(`label`,{className:`text-[11px] text-muted-foreground`,htmlFor:`sdd-split-input`,children:C(`activity:sddTask.splitHint`)}),(0,Q.jsx)(`textarea`,{id:`sdd-split-input`,rows:3,value:ae,onChange:e=>z(e.target.value),placeholder:C(`activity:sddTask.splitPlaceholder`),className:`w-full resize-y rounded-md border border-border/70 bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring`}),(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:ce,className:`inline-flex flex-1 items-center justify-center gap-1 rounded-md bg-primary/10 py-1.5 text-xs font-medium text-primary hover:bg-primary/15`,children:[(0,Q.jsx)(ee,{className:`h-3.5 w-3.5`}),` `,C(`activity:sddTask.splitInto`)]}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>{L(!1),z(``)},className:`rounded-md bg-muted px-2 py-1.5 text-xs text-muted-foreground hover:bg-muted`,children:(0,Q.jsx)(S,{className:`h-3.5 w-3.5`})})]})]})]})]})}function De({events:e,expanded:t}){let{t:r}=n();return(0,Q.jsxs)(`section`,{className:R(`rounded-lg border border-border/70 bg-background/45`,t&&`col-span-2`),children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/60 px-3 py-2.5`,children:[(0,Q.jsx)(h,{className:`h-4 w-4 text-primary`}),(0,Q.jsx)(`h4`,{className:`text-xs font-semibold text-foreground`,children:r(`activity:sddTask.eventLog`)}),(0,Q.jsx)(`span`,{className:`rounded-full bg-muted px-2 py-0.5 text-[10px] text-muted-foreground`,children:e.length}),(0,Q.jsx)(`span`,{className:`ml-auto text-[10px] text-muted-foreground`,children:r(`activity:sddTask.newestFirst`)})]}),e.length===0?(0,Q.jsx)(`p`,{className:`px-3 py-5 text-center text-[11px] text-muted-foreground`,children:r(`activity:sddTask.noEvents`)}):(0,Q.jsx)(`div`,{className:R(`divide-y divide-border/45 overflow-auto`,t?`max-h-[32rem]`:`max-h-72`),children:e.map((e,t)=>{let n=e.kind===`file`,r=e.kind===`tool`,i=e.ok===!1||e.kind===`failed`||e.kind===`verification_failed`,a=n?v:r?p:h;return(0,Q.jsxs)(`div`,{className:R(`grid grid-cols-[4.75rem_1rem_minmax(0,1fr)] gap-2 px-3 py-2.5 text-[11px]`,i&&`bg-destructive/[0.035]`),children:[(0,Q.jsx)(`time`,{dateTime:new Date(e.ts).toISOString(),className:`font-mono text-[10px] text-muted-foreground`,title:new Date(e.ts).toLocaleString(),children:new Date(e.ts).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}),(0,Q.jsx)(a,{className:R(`mt-0.5 h-3.5 w-3.5`,i?`text-destructive`:n?`text-info`:r?`text-warning`:`text-primary`)}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[e.action&&(0,Q.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] font-medium text-foreground`,children:e.action}),e.agentName&&(0,Q.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:e.agentName}),e.durationMs!==void 0&&(0,Q.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:e.durationMs<1e3?`${Math.round(e.durationMs)}ms`:`${(e.durationMs/1e3).toFixed(1)}s`})]}),e.filePath?(0,Q.jsx)(`code`,{className:`mt-1 block break-all font-mono text-[10px] leading-relaxed text-foreground`,children:e.filePath}):e.detail?(0,Q.jsx)(`code`,{className:`mt-1 block break-words font-mono text-[10px] leading-relaxed text-muted-foreground`,children:e.detail}):(0,Q.jsx)(`p`,{className:`mt-1 break-words leading-relaxed text-foreground`,children:e.text})]})]},`${e.ts}-${e.kind}-${t}`)})})]})}function Oe({label:e,children:t,full:n}){return(0,Q.jsxs)(`div`,{className:R(`rounded-md border border-border bg-muted/50 px-2 py-1`,n&&`col-span-2`),children:[(0,Q.jsx)(`div`,{className:`text-[9px] uppercase tracking-wide text-muted-foreground`,children:e}),(0,Q.jsx)(`div`,{className:`text-foreground`,children:t})]})}function $({title:e,shortIds:t,byShort:n,onSelectTask:r}){return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:e}),(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:t.map(e=>{let t=n.get(e);return(0,Q.jsxs)(`button`,{type:`button`,disabled:!t,onClick:()=>t&&r(t.id),className:`flex items-center gap-1 rounded-full border border-border bg-muted px-2 py-0.5 text-[10px] text-foreground hover:bg-muted disabled:opacity-50`,title:t?.title,children:[(0,Q.jsx)(`span`,{className:R(`h-1.5 w-1.5 rounded-full`,pe(t?.displayStatus??`pending`).dot)}),(0,Q.jsx)(`span`,{className:`font-mono`,children:e})]},e)})})]})}function ke({onClose:e}){let{t}=n(),{client:a}=ae(),o=z(e=>e.snapshot),l=z(e=>e.lifecycleResult),u=z(e=>e.destroying),d=z(e=>e.setDestroying),f=z(e=>e.setLifecycleResult),[p,g]=(0,Z.useState)(()=>Date.now()),[_,v]=(0,Z.useState)(null),[y,b]=(0,Z.useState)(!1),[ee,te]=(0,Z.useState)(`graph`),[x,C]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{a?.send?.({type:`sdd.board.get`})},[a]);let w=o&&(o.status===`running`||o.status===`paused`);(0,Z.useEffect)(()=>{if(!w)return;let e=setInterval(()=>g(Date.now()),1e3);return g(Date.now()),()=>clearInterval(e)},[w]);let T=(0,Z.useCallback)(e=>a?.send?.(e),[a]),O=(0,Z.useRef)(null),k=(0,Z.useCallback)(e=>{O.current=null,T({type:`sdd.board.destroy`,payload:{revertMerged:e}})},[T]),re=(0,Z.useCallback)(e=>{C(!1),f(null),d(!0),w?(T({type:`sdd.board.stop`,payload:{}}),O.current={revertMerged:e,deadline:Date.now()+5e3}):k(e)},[w,T,k,d,f]);(0,Z.useEffect)(()=>{let e=O.current;if(!e)return;if(!w||Date.now()>=e.deadline){k(e.revertMerged);return}let t=setTimeout(()=>{let e=O.current;e&&k(e.revertMerged)},Math.max(0,e.deadline-Date.now()));return()=>clearTimeout(t)},[w,o,k]);let j=(0,Z.useCallback)(()=>{f(null),T({type:`sdd.board.cleanup_worktrees`,payload:{}})},[T,f]),M=(0,Z.useCallback)(()=>{f(null),T({type:`sdd.board.rollback`,payload:{}})},[T,f]),N=(0,Z.useMemo)(()=>(o?.tasks??[]).map(e=>({id:e.id,shortId:e.shortId,title:e.title,displayStatus:e.displayStatus,priority:e.priority,deps:e.deps,agentName:e.agentName,worktreeBranch:e.worktreeBranch})),[o?.tasks]),P=(0,Z.useMemo)(()=>{let e=new Map;for(let t of o?.tasks??[])t.displayStatus===`in_progress`&&t.agentName&&e.set(t.agentName,{name:t.agentName,task:t.title});return[...e.values()]},[o?.tasks]),F=(0,Z.useCallback)(e=>v(e),[]),ie=(0,Z.useCallback)(()=>{v(null),b(!1)},[]),L=(0,Z.useCallback)(e=>T({type:`sdd.board.retry`,payload:{taskId:e}}),[T]),V=(0,Z.useCallback)(()=>T({type:`sdd.board.retry_all_failed`,payload:{}}),[T]),H=(0,Z.useCallback)((e,t)=>{let n=t.trim();n&&T({type:`sdd.board.reassign`,payload:{taskId:e,agentName:n}})},[T]),se=(0,Z.useCallback)((e,t,n)=>T({type:`sdd.board.set_task_model`,payload:{taskId:e,model:t,provider:n}}),[T]),ce=(0,Z.useCallback)((e,t)=>T({type:`sdd.board.set_task_verification`,payload:{taskId:e,verificationCommand:t}}),[T]),U=(0,Z.useCallback)(e=>T({type:`sdd.board.cancel_task`,payload:{taskId:e}}),[T]),W=(0,Z.useCallback)(e=>{T({type:`sdd.board.delete_task`,payload:{taskId:e}}),v(null),b(!1)},[T]),le=(0,Z.useCallback)((e,t)=>{T({type:`sdd.board.split_task`,payload:{taskId:e,subtasks:t}}),v(null),b(!1)},[T]),G=ue(_!==null),q=(0,Z.useMemo)(()=>o?.tasks.find(e=>e.id===_)??null,[o?.tasks,_]),J=o?.progress,de=o?.diagnostics?.deadlockChains??[];return(0,Q.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col bg-background`,children:[(0,Q.jsxs)(`header`,{className:`sdd-sheen shrink-0 border-b border-border px-4 pb-3 pt-2.5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(h,{className:`h-5 w-5 text-warning`}),(0,Q.jsx)(`h1`,{className:`text-lg font-semibold text-foreground`,children:o?.title??t(`activity:sddBoard.titleFallback`)}),o&&(0,Q.jsx)(`span`,{className:R(`rounded-full border px-2 py-0.5 text-[11px] font-medium capitalize`,X[o.status]??X.idle),children:o.status}),o?.defaultModel&&(0,Q.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full border border-border bg-muted px-2 py-0.5 text-[10px] text-muted-foreground`,title:t(`activity:sddBoard.defaultModelTitle`),children:[(0,Q.jsx)(i,{className:`h-3 w-3 text-primary`}),o.defaultModel]})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,Q.jsxs)(`button`,{type:`button`,title:t(`activity:sddBoardView.openTheMirroredKanbanBoardSForThisRunOnePerDependencyWave`),onClick:()=>{let e=`run:${o.runId}`,t=B.getState().boards.filter(t=>t.tags?.includes(e)),n=t.find(e=>e.tags?.includes(`phase:wave-0`))??t[0];n&&(B.getState().setActiveBoardId(n.id),a?.send?.({type:`kanban.get`,payload:{boardId:n.id}})),oe.getState().setCurrentView(`kanban`)},className:`inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-muted-foreground hover:bg-muted`,children:[(0,Q.jsx)(h,{className:`h-3.5 w-3.5`}),` Kanban`]}),o&&(0,Q.jsx)(`div`,{className:`flex items-center rounded-md border border-border bg-muted p-0.5 text-[11px]`,children:[`graph`,`kanban`].map(e=>(0,Q.jsx)(`button`,{type:`button`,onClick:()=>te(e),className:R(`rounded px-2 py-0.5 capitalize transition`,ee===e?`bg-primary/12 text-primary`:`text-muted-foreground hover:text-foreground`),children:t(e===`graph`?`activity:sddBoard.graphLabel`:`activity:sddBoard.kanbanLabel`)},e))}),w&&(J?.failed??0)>0&&(0,Q.jsxs)(`button`,{type:`button`,onClick:V,title:t(`activity:sddBoard.retryAllTitle`),className:`inline-flex items-center gap-1 rounded-md bg-warning/15 px-2.5 py-1 text-xs font-medium text-warning hover:bg-warning/25`,children:[(0,Q.jsx)(A,{className:`h-3.5 w-3.5`}),` `,t(`activity:sddBoard.retryFailed`,{count:J?.failed??0})]}),w&&(0,Q.jsxs)(Q.Fragment,{children:[o?.status===`paused`?(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>T({type:`sdd.board.resume`,payload:{}}),className:`inline-flex items-center gap-1 rounded-md bg-success/15 px-2.5 py-1 text-xs font-medium text-success hover:bg-success/25`,children:[(0,Q.jsx)(s,{className:`h-3.5 w-3.5`}),` `,t(`activity:sddBoard.resume`)]}):(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>T({type:`sdd.board.pause`,payload:{}}),className:`inline-flex items-center gap-1 rounded-md bg-warning/15 px-2.5 py-1 text-xs font-medium text-warning hover:bg-warning/25`,children:[(0,Q.jsx)(E,{className:`h-3.5 w-3.5`}),` `,t(`activity:sddBoard.pause`)]}),(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>T({type:`sdd.board.stop`,payload:{}}),className:`inline-flex items-center gap-1 rounded-md bg-destructive/15 px-2.5 py-1 text-xs font-medium text-destructive hover:bg-destructive/25`,children:[(0,Q.jsx)(r,{className:`h-3.5 w-3.5`}),` `,t(`activity:sddBoard.stop`)]})]}),o&&!w&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:j,title:t(`activity:sddBoard.cleanTitle`),className:`inline-flex items-center gap-1 rounded-md bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground hover:bg-muted/80`,children:[(0,Q.jsx)(ne,{className:`h-3.5 w-3.5`}),` `,t(`activity:sddBoard.cleanWorktrees`)]}),(o.mergedCommits?.length??0)>0&&(0,Q.jsxs)(`button`,{type:`button`,onClick:M,title:t(`activity:sddBoard.rollbackTitle`,{count:o.mergedCommits?.length??0,base:o.baseBranch??t(`activity:sdd.baseBranchFallback`)}),className:`inline-flex items-center gap-1 rounded-md bg-warning/15 px-2.5 py-1 text-xs font-medium text-warning hover:bg-warning/25`,children:[(0,Q.jsx)(c,{className:`h-3.5 w-3.5`}),` `,t(`activity:sddBoard.rollback`,{count:o.mergedCommits?.length??0})]})]}),o&&(u?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-destructive/15 px-2.5 py-1 text-xs font-medium text-destructive`,children:[(0,Q.jsx)(A,{className:`h-3.5 w-3.5 animate-spin`}),` `,t(w?`activity:sddBoard.stopping`:`activity:sddBoard.destroying`)]}):(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>C(!0),title:t(`activity:sddBoard.destroyTitle`),className:`inline-flex items-center gap-1 rounded-md bg-destructive px-2.5 py-1 text-xs font-medium text-destructive-foreground hover:bg-destructive/90`,children:[(0,Q.jsx)(D,{className:`h-3.5 w-3.5`}),` `,t(`activity:sddBoard.destroy`)]})),(0,Q.jsx)(K,{variant:`ghost`,size:`icon`,onClick:e,children:(0,Q.jsx)(S,{className:`h-4 w-4`})})]})]}),o&&J&&(0,Q.jsxs)(`div`,{className:`mt-2.5 flex items-center gap-5`,children:[(0,Q.jsx)(ye,{pct:J.percentComplete}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,Q.jsx)(Me,{label:t(`activity:sddBoard.statDone`),value:`${J.completed}/${J.total}`,color:`text-success`}),J.inProgress>0&&(0,Q.jsx)(Me,{label:t(`activity:sddBoard.statRunning`),value:J.inProgress,color:`text-warning`}),J.failed>0&&(0,Q.jsx)(Me,{label:t(`activity:sddBoard.statFailed`),value:J.failed,color:`text-destructive`}),(0,Q.jsx)(Me,{label:t(`activity:sddBoard.statWave`),value:o.wave+1,color:`text-primary`}),w&&o.startedAt>0&&(0,Q.jsx)(Me,{label:t(`activity:sddBoard.statElapsed`),value:_e(p-o.startedAt),color:`text-foreground`})]}),(0,Q.jsx)(`div`,{className:`flex min-h-[24px] items-center gap-1.5`,children:P.length===0?(0,Q.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:t(`activity:sddBoard.noActiveWorkers`)}):P.map((e,t)=>(0,Q.jsxs)(`span`,{title:`${e.name} → ${e.task}`,className:`flex items-center gap-1 rounded-full bg-muted py-0.5 pl-0.5 pr-2`,children:[(0,Q.jsx)(`span`,{className:R(`sdd-agent-live flex h-5 w-5 items-center justify-center rounded-full text-[9px] font-bold text-white`,me[t%me.length]),children:Y(e.name)}),(0,Q.jsx)(`span`,{className:`max-w-[90px] truncate text-[11px] text-foreground`,children:e.name})]},e.name))})]})]})]}),l&&(0,Q.jsx)(je,{result:l,onDismiss:()=>f(null)}),de.length>0&&(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-destructive/30 bg-destructive/5 px-4 py-2 text-xs text-destructive`,children:[(0,Q.jsx)(m,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-semibold`,children:t(`activity:sddBoard.deadlock`)}),de.map(e=>(0,Q.jsxs)(`div`,{className:`font-mono`,children:[e.blocked,` ← `,e.blockedBy.join(`, `)]},e.blocked))]})]}),(0,Q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1`,children:[(0,Q.jsx)(`div`,{className:`relative min-h-0 min-w-0 flex-1 overflow-hidden`,children:o?ee===`graph`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ve,{tasks:N,columns:o.columns,onTaskClick:F}),(0,Q.jsx)(`div`,{className:`pointer-events-none absolute bottom-2 left-1/2 -translate-x-1/2 rounded-full bg-black/40 px-2 py-0.5 text-[10px] text-muted-foreground backdrop-blur`,children:t(`activity:sddBoard.clickTaskHint`)})]}):(0,Q.jsx)(we,{tasks:o.tasks,selectedId:_,onTaskClick:F}):(0,Q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 text-sm text-muted-foreground`,children:[(0,Q.jsx)(I,{className:`h-10 w-10 text-primary/40`}),(0,Q.jsx)(`p`,{className:`text-foreground`,children:t(`activity:sddBoard.noRunTitle`)}),(0,Q.jsx)(`p`,{className:`max-w-sm text-center text-xs text-muted-foreground`,children:t(`activity:sddBoard.noRunBody`)})]})}),o&&(0,Q.jsx)(`aside`,{"data-testid":`sdd-task-panel`,"data-expanded":y&&q?`true`:`false`,className:R(`shrink-0 border-l border-border bg-card transition-[width] duration-200 ease-out`,y&&q?`w-[min(72rem,72vw)]`:`w-80`),children:q?(0,Q.jsx)(Ee,{task:q,allTasks:o.tasks,feed:o.taskEvents?.[q.id]??o.feed??[],now:p,expanded:y,modelCandidates:G,defaultModel:o.defaultModel,onClose:ie,onToggleExpanded:()=>b(e=>!e),onRetry:L,onReassign:H,onSetModel:se,onSetVerification:ce,onCancel:U,onDelete:W,onSplit:le,onSelectTask:v},q.id):(0,Q.jsx)(xe,{feed:o.feed??[],now:p})})]}),(0,Q.jsx)(Se,{open:x,onOpenChange:C,snapshot:o,busy:u,onConfirm:re})]})}function Ae(e){let t=e.op===`cleanup_worktrees`?`lcClean`:e.op===`rollback`?`lcRollback`:`lcDestroy`,n=b.t(`activity:sddBoard.${t}`);if(!e.ok)return b.t(`activity:sddBoard.lcFailed`,{op:n,reason:e.reason??b.t(`activity:sddBoard.lcUnknownError`)});let r=[];typeof e.removed==`number`&&r.push(b.t(`activity:sddBoard.lcWorktrees`,{count:e.removed})),typeof e.reverted==`number`&&e.reverted>0&&r.push(b.t(`activity:sddBoard.lcCommits`,{count:e.reverted})),e.deleted?.length&&r.push(b.t(`activity:sddBoard.lcDeleted`,{items:e.deleted.join(`, `)}));let i=r.length?r.join(` · `):b.t(`activity:sddBoard.lcNothing`);return e.reason?b.t(`activity:sddBoard.lcNote`,{op:n,body:i,reason:e.reason}):b.t(`activity:sddBoard.lcOk`,{op:n,body:i})}function je({result:e,onDismiss:t}){let n=!e.ok||!!e.reason;return(0,Q.jsxs)(`div`,{className:R(`flex items-start gap-2 border-b px-4 py-2 text-xs`,n?`border-warning/30 bg-warning/5 text-warning`:`border-success/30 bg-success/5 text-success`),children:[n?(0,Q.jsx)(L,{className:`mt-0.5 h-4 w-4 shrink-0`}):(0,Q.jsx)(d,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:Ae(e)}),(0,Q.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 opacity-60 hover:opacity-100`,children:(0,Q.jsx)(S,{className:`h-3.5 w-3.5`})})]})}function Me({label:e,value:t,color:n}){return(0,Q.jsxs)(`span`,{className:`flex items-baseline gap-1`,children:[(0,Q.jsx)(`span`,{className:R(`font-semibold tabular-nums`,n),children:t}),(0,Q.jsx)(`span`,{className:`text-[10px] uppercase tracking-wide text-muted-foreground`,children:e})]})}var Ne={idle:`phaseStart`,questioning:`phaseInterview`,spec_review:`phaseSpecReview`,implementation:`phasePlanning`,task_review:`phaseTaskReview`,executing:`phaseRunning`,done:`phaseDone`},Pe=[`questioning`,`spec_review`,`implementation`,`task_review`,`executing`];function Fe({onClose:e,onRunStarted:t}){let{t:r}=n(),{client:i}=ae(),a=V(e=>e.snapshot),o=V(e=>e.agentText),s=V(e=>e.error),c=V(e=>e.startedRunId),l=V(e=>e.setStartedRunId),[d,f]=(0,Z.useState)(``),[p,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(!1),[v,y]=(0,Z.useState)(!0),[b,ee]=(0,Z.useState)(!0),[ne,w]=(0,Z.useState)(!1),[E,D]=(0,Z.useState)(void 0),[O,k]=(0,Z.useState)(void 0),[N,ie]=(0,Z.useState)([]),[L,z]=(0,Z.useState)(4),[B,oe]=(0,Z.useState)(!0),[H,se]=(0,Z.useState)(!1),ce=ue(ne),U=(0,Z.useCallback)(e=>i?.send?.(e),[i]),W=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{U({type:`sdd.spec.get`})},[U]);let le=a?.answers.length??0;(0,Z.useEffect)(()=>{W.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[le,o]),(0,Z.useEffect)(()=>{c&&(l(null),t?.())},[t,l,c]);let G=a?.busy??!1,Y=a?.phase??`idle`,X=!!a?.sessionId,pe=!!a?.resumed,me=a?.lastRunId;(0,Z.useEffect)(()=>{X&&g(!1)},[X]);let he=a?.answers[a.answers.length-1]?.question??``,ge=!!a&&(a.taskCount>0||!!a.graphId||Y===`task_review`||Y===`executing`),_e=()=>{let e=d.trim();!e||G||h||(g(!0),U({type:`sdd.spec.start`,payload:{goal:e}}))},ye=()=>{let e=p.trim();!e||G||(U({type:`sdd.spec.message`,payload:{text:e}}),m(``))},be=e=>{G||!e.trim()||(U({type:`sdd.spec.message`,payload:{text:e.trim()}}),m(``))},xe=()=>!G&&U({type:`sdd.spec.approve`,payload:{}}),Se=e=>!G&&U({type:`sdd.spec.rewind`,payload:e?{targetPhase:e}:{}}),Ce=()=>{U({type:`sdd.run.start`,payload:{parallelSlots:L,worktrees:B,planDecompose:H,...E?{model:E,provider:O}:{},...N.length?{fallbackModels:N}:{}}}),w(!1)},we=()=>{G||U({type:`sdd.spec.discard`,payload:{}})},Te=(0,Z.useMemo)(()=>(a?.board?.tasks??[]).map(e=>({id:e.id,shortId:e.shortId,title:e.title,displayStatus:e.displayStatus,priority:e.priority,deps:e.deps,agentName:e.agentName,worktreeBranch:e.worktreeBranch,retries:e.retries})),[a?.board]),Ee=Te.length>0,De=o&&Y===`questioning`?o:he??``,Oe=(0,Z.useMemo)(()=>Le(De),[De]),$=a?.answers.length??0,ke=a?.minQuestions??2,Ae=a?.maxQuestions??5,je=$>=ke,Me=Math.min(100,Math.round($/Math.max(1,Ae)*100));return(0,Q.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col bg-background`,children:[(0,Q.jsxs)(`header`,{className:`sdd-sheen flex shrink-0 items-center justify-between border-b border-border px-4 py-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(x,{className:`h-5 w-5 text-primary`}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h1`,{className:`text-lg font-semibold`,children:a?.title||r(`activity:sddWizard.titleFallback`)}),X&&(0,Q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[r(`activity:sddWizard.${Ne[Y]??`phaseStart`}`),Y===`questioning`&&` · ${r(`activity:sddWizard.questionsSuffix`,{cur:a?.questionCount??0,max:a?.maxQuestions??0})}`,a&&a.taskCount>0?` · ${r(`activity:sddWizard.tasksSuffix`,{count:a.taskCount})}`:``]})]}),G&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-muted-foreground`})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[me&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>t?.(),className:`inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-xs font-medium text-muted-foreground hover:bg-muted`,children:[(0,Q.jsx)(C,{className:`h-3.5 w-3.5`}),` `,r(`activity:sddWizard.openLiveBoard`)]}),X&&(0,Q.jsx)(`button`,{type:`button`,onClick:we,disabled:G,title:r(`activity:sddWizard.discardTitle`),className:`inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-xs font-medium text-muted-foreground hover:bg-destructive/10 hover:text-destructive disabled:opacity-50`,children:r(`activity:sddWizard.discardInterview`)}),ge&&(0,Q.jsxs)(`div`,{className:`relative flex items-center gap-1.5`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>w(e=>!e),title:r(`activity:sddWizard.runCfgTitle`),className:R(`inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs font-medium`,E||N.length||H?`border-primary/40 bg-primary/10 text-primary`:`border-border bg-muted text-muted-foreground hover:text-foreground`),children:[(0,Q.jsx)(u,{className:`h-3.5 w-3.5`}),E||r(`activity:sddWizard.modelsLabel`)]}),(0,Q.jsxs)(`button`,{type:`button`,onClick:Ce,className:`inline-flex items-center gap-1 rounded-md bg-success/15 px-2.5 py-1 text-xs font-medium text-success hover:bg-success/25`,children:[(0,Q.jsx)(C,{className:`h-3.5 w-3.5`}),` `,r(`activity:sddWizard.startRun`)]}),ne&&(0,Q.jsxs)(`div`,{className:`sdd-rise absolute right-0 top-9 z-50 w-72 rounded-lg border border-border bg-popover p-3 shadow-xl`,children:[(0,Q.jsx)(`div`,{className:`mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:r(`activity:sddWizard.defaultWorkerModel`)}),(0,Q.jsx)(q,{value:E,provider:O,candidates:ce,placeholder:r(`activity:sddWizard.leaderDefaultPlaceholder`),resetLabel:r(`activity:sddWizard.useSessionDefault`),onPick:(e,t)=>{D(e),k(t)},onReset:E?()=>{D(void 0),k(void 0)}:void 0}),(0,Q.jsx)(`div`,{className:`mb-1 mt-3 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:r(`activity:sddWizard.fallbackChain`)}),(0,Q.jsx)(de,{value:N,candidates:ce,onChange:ie}),(0,Q.jsx)(`p`,{className:`mt-2 text-[10px] text-muted-foreground`,children:r(`activity:sddWizard.appliesToAll`)}),(0,Q.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-2`,children:[(0,Q.jsx)(`label`,{htmlFor:`sdd-slots`,className:`text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:r(`activity:sddWizard.parallelAgents`)}),(0,Q.jsx)(`input`,{id:`sdd-slots`,type:`number`,min:1,max:16,value:L,onChange:e=>{let t=Number.parseInt(e.target.value,10);z(Number.isFinite(t)?Math.min(16,Math.max(1,t)):1)},className:`w-16 rounded-md border border-border bg-background px-2 py-1 text-right text-xs outline-none focus:border-primary`})]}),(0,Q.jsxs)(`label`,{className:`mt-2 flex cursor-pointer items-center justify-between gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:r(`activity:sddWizard.isolateWorktrees`)}),(0,Q.jsx)(`input`,{type:`checkbox`,checked:B,onChange:e=>oe(e.target.checked),className:`h-3.5 w-3.5 accent-primary`})]}),(0,Q.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:r(B?`activity:sddWizard.worktreeOn`:`activity:sddWizard.worktreeOff`)}),(0,Q.jsxs)(`label`,{className:`mt-2 flex cursor-pointer items-center justify-between gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:r(`activity:sddWizard.planDecompose`)}),(0,Q.jsx)(`input`,{type:`checkbox`,checked:H,onChange:e=>se(e.target.checked),className:`h-3.5 w-3.5 accent-primary`})]}),(0,Q.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:r(H?`activity:sddWizard.planDecomposeOn`:`activity:sddWizard.planDecomposeOff`)})]})]}),(0,Q.jsx)(K,{variant:`ghost`,size:`icon`,onClick:e,children:(0,Q.jsx)(S,{className:`h-4 w-4`})})]})]}),X&&(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center gap-1 border-b bg-card/50 px-4 py-1.5 text-[11px]`,children:Pe.map((e,t)=>{let n=e===Y,i=Pe.indexOf(Y)>t;return(0,Q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[i&&!G&&Y!==`executing`&&Y!==`done`?(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>Se(e),title:r(`activity:sddWizard.rewindToPhaseTitle`,`Return to this phase to revise`),className:`inline-flex items-center rounded-full px-2 py-0.5 text-success transition hover:bg-success/10 hover:underline`,children:[(0,Q.jsx)(P,{className:`mr-0.5 inline h-3 w-3`}),r(`activity:sddWizard.${Ne[e]}`)]}):(0,Q.jsxs)(`span`,{className:R(`rounded-full px-2 py-0.5`,n?`bg-primary/15 text-primary font-medium`:i?`text-success`:`text-muted-foreground`),children:[i&&(0,Q.jsx)(P,{className:`mr-0.5 inline h-3 w-3`}),r(`activity:sddWizard.${Ne[e]}`)]}),t<Pe.length-1&&(0,Q.jsx)(`span`,{className:`text-muted-foreground/65`,children:`→`})]},e)})}),(0,Q.jsxs)(`div`,{ref:J(`sdd-wizard`),className:`min-h-0 flex-1 overflow-auto overscroll-contain p-4`,children:[s&&(0,Q.jsx)(`div`,{className:`mb-3 rounded-md border border-destructive/40 bg-destructive/5 p-2 text-xs text-destructive`,children:s}),pe&&X&&(0,Q.jsx)(`div`,{className:`mb-3 rounded-md border border-primary/30 bg-primary/5 px-3 py-2 text-xs text-primary`,children:r(`activity:sddWizard.resumeBanner`)}),X?(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[Y===`questioning`&&(0,Q.jsxs)(`div`,{className:`rounded-md border border-border/80 bg-card/60 p-2.5 shadow-sm`,children:[(0,Q.jsxs)(`div`,{className:`mb-1.5 flex items-center justify-between text-xs`,children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5 font-medium text-foreground`,children:[(0,Q.jsx)(x,{className:`h-3.5 w-3.5 text-primary`}),r(`activity:sddWizard.interviewProgress`,`Interview Progress`)]}),(0,Q.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[r(`activity:sddWizard.questionOf`,{current:$+1,max:Ae}),` · `,je?(0,Q.jsx)(`span`,{className:`font-medium text-success`,children:r(`activity:sddWizard.minRequiredMet`,`Min met ✓`)}):(0,Q.jsx)(`span`,{children:r(`activity:sddWizard.minRequiredRemaining`,{count:ke-$})})]})]}),(0,Q.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-muted`,children:(0,Q.jsx)(`div`,{className:R(`h-full transition-all duration-500`,je?`bg-success`:`bg-primary`),style:{width:`${Math.max(12,Me)}%`}})})]}),Ee&&(0,Q.jsxs)(`div`,{className:`sdd-rise overflow-hidden rounded-lg border border-primary/20 bg-[hsl(var(--surface-2)/0.85)]`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>y(e=>!e),className:`flex w-full items-center gap-1.5 border-b border-border/60 px-3 py-1.5 text-[11px] font-medium text-primary hover:bg-muted/40`,children:[v?(0,Q.jsx)(j,{className:`h-3.5 w-3.5`}):(0,Q.jsx)(F,{className:`h-3.5 w-3.5`}),(0,Q.jsx)(te,{className:`h-3.5 w-3.5`}),r(`activity:sddWizard.taskGraphSummary`,{count:a?.taskCount??0}),(0,Q.jsx)(`span`,{className:`ml-auto text-muted-foreground`,children:r(v?`activity:sddWizard.dragToExplore`:`activity:sddWizard.show`)})]}),v&&(0,Q.jsx)(`div`,{className:`h-[32dvh] min-h-[200px]`,children:(0,Q.jsx)(ve,{tasks:Te,columns:a?.board?.columns??[]})})]}),a?.goal&&(0,Q.jsxs)(`div`,{className:`rounded-md border border-border bg-muted/30 px-3 py-2`,children:[(0,Q.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(_,{className:`h-3 w-3`}),` `,r(`activity:sddWizard.goalLabel`)]}),(0,Q.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-foreground/90`,children:a.goal})]}),a?.answers.length||o&&Y===`questioning`||G?(0,Q.jsxs)(`div`,{className:`space-y-2.5`,children:[a?.answers.map((e,t)=>(0,Q.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Q.jsx)(ze,{speaker:`assistant`,text:e.question,questionIndex:t+1}),(0,Q.jsx)(ze,{speaker:`user`,text:e.answer})]},`${t}-${e.question.slice(0,32)}`)),o&&Y===`questioning`&&o!==he&&(0,Q.jsx)(ze,{speaker:`assistant`,text:o,live:!0,questionIndex:$+1}),G&&(0,Q.jsx)(ze,{speaker:`assistant`,text:``,thinking:!0})]}):null,a?.spec&&(0,Q.jsxs)(`div`,{className:`sdd-rise rounded-md border border-border bg-card p-3`,children:[(0,Q.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-sm font-semibold`,children:[(0,Q.jsx)(x,{className:`h-3.5 w-3.5 text-primary`}),a.spec.title]}),(0,Q.jsx)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:a.spec.overview}),(0,Q.jsx)(`ul`,{className:`space-y-0.5 text-xs`,children:a.spec.requirements.map((e,t)=>(0,Q.jsxs)(`li`,{className:`flex gap-1.5`,children:[(0,Q.jsx)(`span`,{className:R(`shrink-0 font-mono uppercase`,fe(e.priority).text),children:e.priority[0]}),(0,Q.jsx)(`span`,{children:e.description})]},`${e.priority}-${t}-${e.description.slice(0,24)}`))})]}),o&&(Y===`implementation`||Y===`task_review`)&&(0,Q.jsxs)(`div`,{className:`sdd-rise rounded-md border border-border bg-card`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>ee(e=>!e),className:`flex w-full items-center gap-1.5 border-b border-border/60 px-3 py-2 text-sm font-semibold hover:bg-muted/40`,children:[b?(0,Q.jsx)(j,{className:`h-3.5 w-3.5`}):(0,Q.jsx)(F,{className:`h-3.5 w-3.5`}),(0,Q.jsx)(x,{className:`h-3.5 w-3.5 text-primary`}),` `,r(`activity:sddWizard.implementationPlan`)]}),b&&(0,Q.jsx)(`div`,{className:`max-h-[40dvh] overflow-auto px-3 py-2`,children:(0,Q.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-foreground/90`,children:Ie(o)})})]}),o&&Y!==`questioning`&&Y!==`implementation`&&Y!==`task_review`&&!a?.spec&&(0,Q.jsx)(ze,{speaker:`assistant`,text:o}),(Y===`spec_review`||Y===`implementation`||Y===`task_review`)&&(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-1`,children:[Y===`task_review`?(0,Q.jsxs)(K,{className:`bg-success/15 text-success hover:bg-success/25`,onClick:Ce,disabled:G,children:[(0,Q.jsx)(C,{className:`mr-1.5 h-4 w-4`}),r(`activity:sddWizard.startRun`,`Start Run`)]}):(0,Q.jsxs)(K,{variant:`secondary`,onClick:xe,disabled:G,children:[(0,Q.jsx)(P,{className:`mr-1.5 h-4 w-4`}),r(Y===`spec_review`?`activity:sddWizard.approveSpec`:`activity:sddWizard.approvePlan`)]}),(0,Q.jsxs)(K,{variant:`outline`,onClick:()=>Se(),disabled:G,className:`text-xs text-muted-foreground hover:text-foreground`,title:Y===`spec_review`?r(`activity:sddWizard.backToQuestionsTitle`,`Reject spec and return to questioning`):r(`activity:sddWizard.backToSpecTitle`,`Reject plan and return to spec review`),children:[(0,Q.jsx)(A,{className:`mr-1.5 h-3.5 w-3.5`}),Y===`spec_review`?r(`activity:sddWizard.backToQuestions`,`Back to Questions`):r(`activity:sddWizard.backToSpec`,`Back to Spec`)]})]}),(0,Q.jsx)(`div`,{ref:W})]}):(0,Q.jsxs)(`div`,{className:`mx-auto mt-8 max-w-xl`,children:[(0,Q.jsx)(`label`,{className:`mb-2 block text-sm font-medium`,htmlFor:`sdd-goal`,children:r(`activity:sddWizard.goalPrompt`)}),(0,Q.jsx)(`textarea`,{id:`sdd-goal`,value:d,onChange:e=>f(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&_e()},rows:4,placeholder:r(`activity:sddWizard.goalPlaceholder`),className:`w-full resize-none rounded-md border border-border bg-card px-3 py-2 text-sm outline-none focus:border-primary`}),(0,Q.jsx)(K,{className:`mt-3`,onClick:_e,disabled:!d.trim()||h,children:h?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(M,{className:`mr-1.5 h-4 w-4 animate-spin`}),` `,r(`activity:sddWizard.startingInterview`)]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(x,{className:`mr-1.5 h-4 w-4`}),` `,r(`activity:sddWizard.startInterview`)]})}),(0,Q.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:r(`activity:sddWizard.introBody`)})]})]}),X&&Y!==`executing`&&Y!==`done`&&(0,Q.jsxs)(`div`,{className:`border-t bg-card`,children:[Y===`questioning`&&!G&&(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 px-4 pt-2`,children:[Oe.map(e=>(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>m(e),className:`inline-flex items-center rounded-full border border-primary/25 bg-primary/5 px-2.5 py-1 text-xs text-primary transition hover:bg-primary/15 hover:border-primary/40 active:scale-95`,children:[(0,Q.jsx)(`span`,{className:`mr-1 opacity-70`,children:`👉`}),e]},e)),(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>be(r(`activity:sddWizard.quickBestPracticeDirective`,`Use standard industry best practices for this.`)),className:`inline-flex items-center rounded-full border border-warning/30 bg-warning/10 px-2.5 py-1 text-xs text-warning transition hover:bg-warning/20 active:scale-95`,title:`Answer using standard industry best practice`,children:[(0,Q.jsx)(re,{className:`mr-1 h-3 w-3`}),r(`activity:sddWizard.quickBestPractice`,`Use Best Practice`)]}),je&&(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>be(`We have covered the necessary requirements. Please generate the complete specification JSON now.`),className:`inline-flex items-center rounded-full border border-success/30 bg-success/15 px-2.5 py-1 text-xs font-medium text-success transition hover:bg-success/25 active:scale-95`,title:r(`activity:sddWizard.generateSpecNowTitle`,`Generate the specification now with gathered requirements`),children:[(0,Q.jsx)(I,{className:`mr-1 h-3 w-3`}),r(`activity:sddWizard.generateSpecNow`,`Generate Spec Now`)]})]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-end gap-2 px-4 py-2`,children:[(0,Q.jsx)(`textarea`,{value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),ye())},rows:1,placeholder:r(Y===`questioning`?`activity:sddWizard.answerPlaceholder`:`activity:sddWizard.changePlaceholder`),disabled:G,className:`max-h-32 flex-1 resize-none rounded-md border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary disabled:opacity-50`}),(0,Q.jsx)(K,{size:`icon`,onClick:ye,disabled:G||!p.trim(),children:(0,Q.jsx)(T,{className:`h-4 w-4`})})]})]})]})}function Ie(e){let t=e.replace(/```json[\s\S]*?```/gi,``).trim();return t.length>0?t:e.trim()}function Le(e){if(!e)return[];let t=[],n=e.matchAll(/(?:^|\n)\s*(?:[0-9]+[.)]|[A-D][.)]|[-*]\s+\*\*|[-*]\s+\[)\s*([^:\n\r]+)/gi);for(let e of n){let n=(e[1]??``).trim().replace(/^[`"']|[`"']$/g,``);n&&n.length>2&&n.length<50&&!t.includes(n)&&t.push(n)}if(t.length===0){let n=e.match(/(?:Options|Choices|Öneriler|Seçenekler):\s*([^\n\r]+)/i);if(n?.[1]){let e=n[1].split(/[,|/]/).map(e=>e.trim()).filter(e=>e.length>2&&e.length<45);t.push(...e.slice(0,4))}}return t.slice(0,4)}function Re(e){let t=e.toLowerCase();return/security|auth|jwt|oauth|token|permission|role|rbac|şifre|güvenlik/i.test(t)?{label:`Security & Auth`,color:`bg-destructive/10 text-destructive border-destructive/20`}:/database|sql|postgres|sqlite|redis|mongodb|schema|tablo|veritabanı/i.test(t)?{label:`Data & Storage`,color:`bg-info/10 text-info border-info/20`}:/api|endpoint|rest|graphql|grpc|route|http/i.test(t)?{label:`API & Routing`,color:`bg-success/10 text-success border-success/20`}:/test|vitest|jest|e2e|playwright|coverage|mock/i.test(t)?{label:`Testing & QA`,color:`bg-warning/10 text-warning border-warning/20`}:/ui|css|component|frontend|react|tailwind|button|view|görsel|arayüz/i.test(t)?{label:`UI & Layout`,color:`bg-primary/10 text-primary border-primary/20`}:/architecture|microservice|queue|worker|scale|mimari/i.test(t)?{label:`Architecture`,color:`bg-accent/30 text-accent-foreground border-border`}:null}function ze({speaker:e,text:t,live:n,thinking:r,questionIndex:i}){let a=e===`user`,[o,s]=(0,Z.useState)(!1),c=!a&&t?Re(t):null;return(0,Q.jsxs)(`div`,{className:R(`group sdd-rise flex items-start gap-2`,a&&`flex-row-reverse`),children:[(0,Q.jsx)(`span`,{className:R(`mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs`,a?`bg-info/15 text-info`:`bg-primary/15 text-primary`,(n||r)&&`sdd-agent-live`),children:a?(0,Q.jsx)(ie,{className:`h-3.5 w-3.5`}):(0,Q.jsx)(k,{className:`h-3.5 w-3.5`})}),(0,Q.jsxs)(`div`,{className:R(`relative max-w-[85%] rounded-2xl px-3.5 py-2.5 text-sm leading-relaxed text-foreground shadow-sm transition-all`,a?`rounded-tr-sm bg-info/10 border border-info/20`:`rounded-tl-sm bg-muted/80 border border-border/70`),children:[!a&&!r&&(0,Q.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 text-[10px]`,children:[i!==void 0&&(0,Q.jsxs)(`span`,{className:`rounded bg-primary/15 px-1.5 py-0.2 font-mono font-semibold text-primary`,children:[`Q`,i]}),c&&(0,Q.jsx)(`span`,{className:R(`rounded border px-1.5 py-0.2 font-medium`,c.color),children:c.label})]}),r?(0,Q.jsxs)(`span`,{className:`flex items-center gap-1 py-1`,children:[(0,Q.jsx)(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-200ms]`}),(0,Q.jsx)(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-100ms]`}),(0,Q.jsx)(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground`})]}):(0,Q.jsx)(`p`,{className:`whitespace-pre-wrap`,children:t}),!r&&t&&(0,Q.jsx)(`button`,{type:`button`,onClick:()=>{t&&(navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500))},title:o?`Copied`:`Copy`,className:`absolute -bottom-2 right-2 hidden rounded bg-background/90 p-1 text-[10px] text-muted-foreground shadow border group-hover:flex items-center gap-1 hover:text-foreground`,children:o?(0,Q.jsx)(w,{className:`h-3 w-3 text-success`}):(0,Q.jsx)(y,{className:`h-3 w-3`})})]})]})}var Be=[{id:`project`,labelKey:`activity:sddhub.tabProject`},{id:`board`,labelKey:`activity:sddhub.tabBoard`},{id:`specs`,labelKey:`activity:sddhub.tabSpecs`}];function Ve(){let{t:e}=n(),[t,r]=(0,Z.useState)(`project`),i=V(e=>e.startedRunId),a=V(e=>e.setStartedRunId),o=()=>H(`chat`),s=(0,Z.useCallback)(()=>r(`board`),[]);(0,Z.useEffect)(()=>{i&&(r(`board`),a(null))},[i,a]);let c=(e,t)=>{let n;if(e.key===`ArrowLeft`&&(n=(t-1+Be.length)%Be.length),e.key===`ArrowRight`&&(n=(t+1)%Be.length),e.key===`Home`&&(n=0),e.key===`End`&&(n=Be.length-1),n===void 0)return;e.preventDefault();let i=Be[n];i&&(r(i.id),e.currentTarget.parentElement?.querySelectorAll(`[role="tab"]`)[n]?.focus())};return(0,Q.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col bg-background`,children:[(0,Q.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:`flex shrink-0 items-end border-b border-border/70 bg-card px-4`,children:Be.map((n,i)=>{let a=t===n.id;return(0,Q.jsxs)(`button`,{id:`sdd-hub-tab-${n.id}`,type:`button`,role:`tab`,"aria-selected":a,"aria-controls":`sdd-hub-panel-${n.id}`,tabIndex:a?0:-1,onClick:()=>r(n.id),onKeyDown:e=>c(e,i),className:R(`relative px-4 py-2.5 text-sm font-medium transition-colors`,a?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:[e(n.labelKey),a&&(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`absolute bottom-0 left-0 right-0 h-0.5 bg-primary`})]},n.id)})}),(0,Q.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:[(0,Q.jsx)(`div`,{id:`sdd-hub-panel-project`,role:`tabpanel`,"aria-labelledby":`sdd-hub-tab-project`,hidden:t!==`project`,className:`h-full overflow-y-auto overscroll-contain`,children:(0,Q.jsx)(Fe,{onClose:o,onRunStarted:s})}),(0,Q.jsx)(`div`,{id:`sdd-hub-panel-board`,role:`tabpanel`,"aria-labelledby":`sdd-hub-tab-board`,hidden:t!==`board`,className:`h-full overflow-y-auto overscroll-contain`,children:(0,Q.jsx)(ke,{onClose:o})}),(0,Q.jsx)(`div`,{id:`sdd-hub-panel-specs`,role:`tabpanel`,"aria-labelledby":`sdd-hub-tab-specs`,hidden:t!==`specs`,className:`h-full overflow-y-auto overscroll-contain`,children:(0,Q.jsx)(be,{onClose:o,onRunStarted:s})})]})]})}export{Ve as SddHub};
|