@wrongstack/webui 0.308.2 → 0.308.4
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-BRsiLkYT.js → AgentRosterView-z7sAuWGe.js} +1 -1
- package/dist/assets/{AnalyticsDashboard-wgm1_jI-.js → AnalyticsDashboard-Ch1DX7tR.js} +1 -1
- package/dist/assets/{AudienceMemoryPanel-Dj2zRV6l.js → AudienceMemoryPanel-Cec0V4--.js} +1 -1
- package/dist/assets/{ChangesView-Cc7SriFS.js → ChangesView-CzvRJS2F.js} +1 -1
- package/dist/assets/{ChronicleDashboard-CyqJjnDP.js → ChronicleDashboard-Dc5cQH7A.js} +1 -1
- package/dist/assets/{CodeEditor-CrQxq-34.js → CodeEditor-C1xScB5M.js} +1 -1
- package/dist/assets/{CodeMap-CAhE44jp.js → CodeMap-BMcY8qXe.js} +1 -1
- package/dist/assets/{ConfirmModal-gREeWWsa.js → ConfirmModal-i2BGY0ev.js} +1 -1
- package/dist/assets/{CronJobsPanel-D6AfSxD8.js → CronJobsPanel-D4VNa-Kl.js} +1 -1
- package/dist/assets/{DeadCodeScanPanel-LOzt0Z1Z.js → DeadCodeScanPanel-DyV2LHm_.js} +1 -1
- package/dist/assets/{DebugDashboard-CNdS9FFO.js → DebugDashboard-C_T68C0f.js} +1 -1
- package/dist/assets/{DesignGalleryView-CDDM4pDl.js → DesignGalleryView-CVmV-AU2.js} +1 -1
- package/dist/assets/{GoalView-mzLqil_K.js → GoalView-DQa9PklT.js} +1 -1
- package/dist/assets/{KanbanView-Dlsji4r2.js → KanbanView-CDp4gTML.js} +1 -1
- package/dist/assets/{MailboxDetailView-Cxx74zQn.js → MailboxDetailView-D7aRTWS8.js} +1 -1
- package/dist/assets/{MemoryDrawer-BnT2jWmE.js → MemoryDrawer-Bivx9AXj.js} +1 -1
- package/dist/assets/{MemoryManager-DlVmZ-0S.js → MemoryManager-DOTxwo0l.js} +1 -1
- package/dist/assets/{ModelPicker-CsaLCgdi.js → ModelPicker-MpC6-gWQ.js} +1 -1
- package/dist/assets/{OfficeMapPanel-B_95mXEy.js → OfficeMapPanel-Q8nQfQVb.js} +1 -1
- package/dist/assets/{ProcessMonitor-Dmmbx4lh.js → ProcessMonitor-C8GH1q2B.js} +1 -1
- package/dist/assets/{PromptJournalView-DBCw7oeQ.js → PromptJournalView-BdOYPAjU.js} +1 -1
- package/dist/assets/{QueuePanel-CKAGgWxS.js → QueuePanel-RBW9Sh9b.js} +1 -1
- package/dist/assets/{RefreshDebugView-CKPQ_tKX.js → RefreshDebugView-1lZduXKE.js} +1 -1
- package/dist/assets/{RequirementIntakeView-B5JKkW9E.js → RequirementIntakeView-BtKuq_F4.js} +1 -1
- package/dist/assets/SageTabs-D2_mTlcJ.js +2 -0
- package/dist/assets/{SddFlowGraph-BCgIDw11.js → SddFlowGraph-BdaItHkB.js} +1 -1
- package/dist/assets/{SddHub-CkH8Kv7V.js → SddHub-DVO0JGWk.js} +1 -1
- package/dist/assets/{SessionInspectView-PA6jl9bt.js → SessionInspectView-xchxZrHA.js} +1 -1
- package/dist/assets/{SessionList-vOuy4gzk.js → SessionList-2W7mKbcZ.js} +1 -1
- package/dist/assets/{SessionsDashboard-DXt34ZON.js → SessionsDashboard-6QJsVGap.js} +1 -1
- package/dist/assets/{SetupScreen-Cm50YBwk.js → SetupScreen-DM2KCb23.js} +1 -1
- package/dist/assets/{SkillDetailView-BBu6DBBh.js → SkillDetailView-Cx2z8hyp.js} +1 -1
- package/dist/assets/{SpecsView-DeHi6LWP.js → SpecsView-D-qbN6F5.js} +1 -1
- package/dist/assets/{TechStackView-cARkf3Ep.js → TechStackView-C7XFcAls.js} +1 -1
- package/dist/assets/{TerminalPanel-HWOYFCGa.js → TerminalPanel-DZs5mkPP.js} +1 -1
- package/dist/assets/{Toaster-CQLQAp7y.js → Toaster-ChF897Tc.js} +1 -1
- package/dist/assets/{activity-CnuG3uZL.js → activity-C6pIBHte.js} +1 -1
- package/dist/assets/{activity-K2WIjlQo.js → activity-CA5G03Kw.js} +1 -1
- package/dist/assets/{activity-DFBPo9d3.js → activity-CezOSNBd.js} +1 -1
- package/dist/assets/{activity-BCIzGgqa.js → activity-CkGBp_I-.js} +1 -1
- package/dist/assets/{activity-BZIZDVJp.js → activity-CxnlCaZu.js} +1 -1
- package/dist/assets/{activity-CQqsspgO.js → activity-DYwBIByU.js} +1 -1
- package/dist/assets/{activity-ChTE_hao.js → activity-l8lDAw8a.js} +1 -1
- package/dist/assets/{i18n-CcHSmDoO.js → i18n-DiD9Wcep.js} +2 -2
- package/dist/assets/{index-Bj3blCRO.js → index-Cnerffls.js} +4 -4
- package/dist/assets/{index-DBU8t21H.css → index-D2tx76V0.css} +1 -1
- package/dist/assets/{stores-kaIFQfXo.js → stores-CzgPPQlG.js} +1 -1
- package/dist/assets/{useWebSocket-DjrFK4tQ.js → useWebSocket-DvMcAAgU.js} +1 -1
- package/dist/assets/vector-memory-panel-C6iWDhkJ.js +1 -0
- package/dist/components/MemoryManager/SageTabs.d.ts +1 -1
- package/dist/components/vector-memory-panel/ForgetVectorMemoryDialog.d.ts +13 -0
- package/dist/components/vector-memory-panel/model.d.ts +11 -0
- package/dist/index.html +9 -9
- package/dist/index.js +2196 -1996
- package/package.json +8 -8
- package/dist/assets/SageTabs-D04tfLki.js +0 -2
- package/dist/assets/vector-memory-panel-CjqIA8Vf.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./chat-store-c0pGYczr.js";import{Ra as t,za as n}from"./vendor-C_zEzV4N.js";import"./i18n-CcHSmDoO.js";import{r,t as i}from"./ws-client-BVq0hf0a.js";import"./session-store-BgiP4PnQ.js";import"./codemap-activity-store-BH7Mh4k9.js";import"./mailbox-store-bF96Ih2G.js";import"./ui-store-xx1NssJI.js";var a=`signal`,o=`wrongstack-palette`,s=[{id:`signal`,labelKey:`settings:general.paletteSignal`,swatch:`hsl(345.9 99% 58.8%)`,swatchSecondary:`hsl(37.5 98.4% 50%)`},{id:`emerald-gold`,labelKey:`settings:general.paletteEmeraldGold`,swatch:`hsl(152 66% 48%)`,swatchSecondary:`hsl(42 96% 54%)`},{id:`blue-navy`,labelKey:`settings:general.paletteBlueNavy`,swatch:`hsl(213 90% 60%)`,swatchSecondary:`hsl(36 96% 54%)`},{id:`purple-pink`,labelKey:`settings:general.palettePurplePink`,swatch:`hsl(263 82% 66%)`,swatchSecondary:`hsl(332 94% 62%)`},{id:`cyan-teal`,labelKey:`settings:general.paletteCyanTeal`,swatch:`hsl(180 76% 46%)`,swatchSecondary:`hsl(36 96% 54%)`},{id:`rose-copper`,labelKey:`settings:general.paletteRoseCopper`,swatch:`hsl(14 82% 56%)`,swatchSecondary:`hsl(34 96% 54%)`},{id:`indigo-amber`,labelKey:`settings:general.paletteIndigoAmber`,swatch:`hsl(233 74% 58%)`,swatchSecondary:`hsl(38 96% 54%)`},{id:`sage-sand`,labelKey:`settings:general.paletteSageSand`,swatch:`hsl(130 28% 55%)`,swatchSecondary:`hsl(36 55% 72%)`},{id:`slate-violet`,labelKey:`settings:general.paletteSlateViolet`,swatch:`hsl(248 50% 55%)`,swatchSecondary:`hsl(285 52% 62%)`},{id:`coral-mint`,labelKey:`settings:general.paletteCoralMint`,swatch:`hsl(12 85% 62%)`,swatchSecondary:`hsl(162 55% 55%)`},{id:`arctic-ember`,labelKey:`settings:general.paletteArcticEmber`,swatch:`hsl(195 85% 58%)`,swatchSecondary:`hsl(14 85% 55%)`},{id:`moss-rust`,labelKey:`settings:general.paletteMossRust`,swatch:`hsl(100 45% 38%)`,swatchSecondary:`hsl(18 70% 48%)`}];function c(e){return typeof e==`string`&&s.some(t=>t.id===e)}function l(e){return s.find(t=>t.id===e)??s[0]}function u(e,t){if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return c(n)?n:t}catch{return t}}function d(e,t){t===`signal`?e.removeAttribute(`data-palette`):e.setAttribute(`data-palette`,t)}var f=n()(t(e=>({provider:``,model:``,wsUrl:r(),wsConnected:!1,wsStatus:{state:`connecting`},theme:`system`,palette:`signal`,autoConnect:!0,soundOnComplete:!1,setProvider:t=>e({provider:t}),setModel:t=>e({model:t}),setConfig:t=>e(t),setTheme:t=>e({theme:t}),setPalette:t=>e({palette:t}),setWsConnected:t=>e({wsConnected:t}),setWsStatus:t=>e({wsStatus:t,wsConnected:t.state===`open`}),setSoundOnComplete:t=>e({soundOnComplete:t})}),{name:`wrongstack-config`,partialize:e=>({provider:e.provider,model:e.model,baseUrl:e.baseUrl,theme:e.theme,palette:e.palette,autoConnect:e.autoConnect,soundOnComplete:e.soundOnComplete}),merge:(e,t)=>{let{apiKey:n,...i}=e??{};return{...t,...i,wsUrl:r(),wsConnected:!1,wsStatus:{state:`connecting`},palette:c(i.palette)?i.palette:u(o,t.palette)}}}));function p(e,t){return t>=100?`danger`:`warning`}function ee(e,t){switch(e){case`budget.threshold_reached`:{let e=t,n=e.limit>0?Math.round(e.used/e.limit*100):0;return`${e.subagentId} [${e.kind}] ${n}% (${e.used}/${e.limit})`}case`budget.decision`:{let e=t;return`${e.subagentId} [${e.kind}] → ${e.decision}`}case`consensus.vote_initiated`:{let e=t;return`Vote: "${e.title}" — ${e.eligible.length} voters`}case`consensus.vote_cast`:{let e=t;return`${e.voterId} voted ${e.value}`}case`consensus.vote_resolved`:{let e=t;return`${e.result} — ✅${e.approveCount} ❌${e.rejectCount}`}case`task.pending`:return`Task queued: "${t.description.slice(0,60)}"`;case`task.started`:{let e=t;return`${e.subagentId} started ${e.taskId}`}case`task.completed`:{let e=t;return`Task ${e.taskId} ${e.status} (${e.durationMs}ms)`}case`task.failed`:{let e=t;return`Task ${e.taskId} failed: ${e.error.slice(0,60)}`}case`subagent.budget_extended`:{let e=t;return`${e.subagentId} [${e.kind}] extended → ${e.extendedTo}ms`}default:return e}}var te=200,ne=50,m=300,h=200,re=100;function g(e,t,n){if(!(e.size<=t)){if(n)for(let[r,i]of e){if(e.size<=t)break;n(i)&&e.delete(r)}for(let n of e.keys()){if(e.size<=t)break;e.delete(n)}}}var ie=n()(e=>({coordinatorStatus:`idle`,subagents:new Map,events:[],consensusVotes:new Map,tasks:new Map,taskCounts:{pending:0,running:0,completed:0,failed:0},budgetAlerts:[],lastUpdated:Date.now(),setCoordinatorStatus:(t,n)=>e(e=>({coordinatorStatus:t,coordinatorMode:n,lastUpdated:Date.now()})),updateCoordinatorStats:t=>e(e=>{let n=new Map(e.subagents);for(let e of t.subagentStatuses??[]){let t=n.get(e.id);n.set(e.id,{id:e.id,name:e.name,role:t?.role??`agent`,status:e.status,currentTask:e.currentTask,budgetLimits:t?.budgetLimits,budgetUsage:t?.budgetUsage,lastSeen:t?.lastSeen??Date.now()})}return g(n,h,e=>e.status===`stopped`),{subagents:n,taskCounts:{pending:t.pending,running:t.inFlight,completed:t.completed,failed:0},lastUpdated:Date.now()}}),updateSubagentBudget:(t,n)=>e(e=>{let r=new Map(e.subagents),i=r.get(t);return r.set(t,{id:t,name:i?.name??t,role:i?.role??`agent`,status:i?.status??`idle`,...i,...n,lastSeen:Date.now()}),g(r,h,e=>e.status===`stopped`),{subagents:r,lastUpdated:Date.now()}}),pushEvent:(t,n,r,i,a)=>e(e=>{let o=n.kind??t,s=(t.includes(`budget`)||t.includes(`threshold`))&&typeof n.limit==`number`&&n.limit>0?Math.round(n.used/n.limit*100):void 0,c=s===void 0?t.includes(`consensus.vote_resolved`)?`info`:t.includes(`consensus.vote_initiated`)?`warning`:`info`:s>=100?`danger`:s>=85?`warning`:`info`;return{events:[{id:`${r}-${t}`,ts:r,type:t,subagentId:i,taskId:a,payload:n,kind:o,level:c,message:ee(t,n)},...e.events].slice(0,te),lastUpdated:Date.now()}}),pushConsensusVote:(t,n,r)=>e(e=>{let i=new Map(e.consensusVotes);return i.set(t,{changeId:t,title:n,status:`pending`,eligible:r,votes:[],approveCount:0,rejectCount:0,abstainCount:0,expiresAt:Date.now()+3e5}),g(i,re,e=>e.status!==`pending`),{consensusVotes:i,lastUpdated:Date.now()}}),recordConsensusVote:(t,n,r,i)=>e(e=>{let a=new Map(e.consensusVotes),o=a.get(t);if(!o)return{};let s={...o,votes:[...o.votes.filter(e=>e.agentId!==n),{agentId:n,agentName:r,value:i,votedAt:Date.now()}],approveCount:i===`approve`?o.approveCount+1:o.approveCount,rejectCount:i===`reject`?o.rejectCount+1:o.rejectCount,abstainCount:i===`abstain`?o.abstainCount+1:o.abstainCount};return a.set(t,s),{consensusVotes:a,lastUpdated:Date.now()}}),resolveConsensusVote:(t,n,r,i)=>e(e=>{let a=new Map(e.consensusVotes),o=a.get(t);return o?(a.set(t,{...o,status:n,approveCount:r,rejectCount:i,resolvedAt:Date.now()}),{consensusVotes:a,lastUpdated:Date.now()}):{}}),pushTaskPending:(t,n,r)=>e(e=>{let i=new Map(e.tasks);return i.set(t,{id:t,description:n,status:`pending`,priority:r,queuedAt:Date.now()}),g(i,m,e=>e.status===`completed`||e.status===`failed`),{tasks:i,taskCounts:{...e.taskCounts,pending:e.taskCounts.pending+1},lastUpdated:Date.now()}}),startTask:(t,n)=>e(e=>{let r=new Map(e.tasks),i=r.get(t);return i?r.set(t,{...i,status:`running`,subagentId:n,startedAt:Date.now()}):r.set(t,{id:t,description:``,status:`running`,subagentId:n,startedAt:Date.now()}),{tasks:r,taskCounts:{...e.taskCounts,pending:Math.max(0,e.taskCounts.pending-1),running:e.taskCounts.running+1},lastUpdated:Date.now()}}),completeTask:(t,n,r)=>e(e=>{let i=new Map(e.tasks),a=i.get(t);return a&&i.set(t,{...a,status:n,completedAt:Date.now(),durationMs:r}),g(i,m,e=>e.status===`completed`||e.status===`failed`),{tasks:i,taskCounts:{...e.taskCounts,running:Math.max(0,e.taskCounts.running-1),completed:n===`completed`?e.taskCounts.completed+1:e.taskCounts.completed,failed:n===`failed`?e.taskCounts.failed+1:e.taskCounts.failed},lastUpdated:Date.now()}}),failTask:(t,n)=>e(e=>{let r=new Map(e.tasks),i=r.get(t);return i&&r.set(t,{...i,status:`failed`,error:n,completedAt:Date.now()}),g(r,m,e=>e.status===`completed`||e.status===`failed`),{tasks:r,taskCounts:{...e.taskCounts,running:Math.max(0,e.taskCounts.running-1),failed:e.taskCounts.failed+1},lastUpdated:Date.now()}}),recordBudgetDecision:(t,n,r,i)=>e(e=>{let a=new Map;for(let t of e.budgetAlerts){let e=`${t.subagentId}:${t.kind}`;a.has(e)||a.set(e,t)}let o=`${t}:${n}`,s=a.get(o);return s&&a.set(o,{...s,decision:r,newLimit:i,level:r===`extend`?`warning`:`danger`}),{budgetAlerts:Array.from(a.values()),lastUpdated:Date.now()}}),recordBudgetAlert:(t,n,r,i)=>e(e=>{let a=`${Date.now()}-${t}-${n}`,o=i>0?Math.round(r/i*100):0;return{budgetAlerts:[{id:a,ts:Date.now(),subagentId:t,kind:n,level:p(n,o),used:r,limit:i,pct:o},...e.budgetAlerts].slice(0,ne),lastUpdated:Date.now()}}),recordBudgetExtended:(t,n,r)=>e(e=>{let i=new Map(e.subagents),a=i.get(t);if(a?.budgetLimits){let e={...a.budgetLimits};n===`timeout`&&r&&(e.timeoutMs=r),n===`iterations`&&(e.maxIterations=r),n===`tool_calls`&&(e.maxToolCalls=r),i.set(t,{...a,budgetLimits:e,lastSeen:Date.now()})}return{subagents:i,lastUpdated:Date.now()}}),clear:()=>e({coordinatorStatus:`idle`,coordinatorMode:void 0,subagents:new Map,events:[],consensusVotes:new Map,tasks:new Map,taskCounts:{pending:0,running:0,completed:0,failed:0},budgetAlerts:[],lastUpdated:Date.now()})})),ae=n()(e=>({snapshot:null,lastFiredAt:{},revision:0,setSnapshot:t=>e(e=>({snapshot:t,revision:e.revision+1})),recordFired:(t,n)=>e(e=>({lastFiredAt:{...e.lastFiredAt,[t]:n},revision:e.revision+1})),clear:()=>e({snapshot:null,lastFiredAt:{},revision:0})}));function oe(){return`ref_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function _(e){switch(e.split(`.`).pop()?.toLowerCase()??``){case`ts`:case`tsx`:return`typescript`;case`js`:case`jsx`:return`javascript`;case`json`:return`json`;case`md`:case`mdx`:return`markdown`;case`css`:return`css`;case`scss`:return`scss`;case`html`:case`htm`:return`html`;case`py`:return`python`;case`rs`:return`rust`;case`go`:return`go`;case`rb`:return`ruby`;case`java`:return`java`;case`c`:return`c`;case`cpp`:case`hpp`:return`cpp`;case`h`:return`c`;case`sh`:case`bash`:return`bash`;case`sql`:return`sql`;case`yaml`:case`yml`:return`yaml`;case`toml`:return`toml`;default:return``}}function v(e,t=20,n=2e3){let r=e.split(`
|
|
1
|
+
import{a as e}from"./chat-store-c0pGYczr.js";import{Ra as t,za as n}from"./vendor-C_zEzV4N.js";import"./i18n-DiD9Wcep.js";import{r,t as i}from"./ws-client-BVq0hf0a.js";import"./session-store-BgiP4PnQ.js";import"./codemap-activity-store-BH7Mh4k9.js";import"./mailbox-store-bF96Ih2G.js";import"./ui-store-xx1NssJI.js";var a=`signal`,o=`wrongstack-palette`,s=[{id:`signal`,labelKey:`settings:general.paletteSignal`,swatch:`hsl(345.9 99% 58.8%)`,swatchSecondary:`hsl(37.5 98.4% 50%)`},{id:`emerald-gold`,labelKey:`settings:general.paletteEmeraldGold`,swatch:`hsl(152 66% 48%)`,swatchSecondary:`hsl(42 96% 54%)`},{id:`blue-navy`,labelKey:`settings:general.paletteBlueNavy`,swatch:`hsl(213 90% 60%)`,swatchSecondary:`hsl(36 96% 54%)`},{id:`purple-pink`,labelKey:`settings:general.palettePurplePink`,swatch:`hsl(263 82% 66%)`,swatchSecondary:`hsl(332 94% 62%)`},{id:`cyan-teal`,labelKey:`settings:general.paletteCyanTeal`,swatch:`hsl(180 76% 46%)`,swatchSecondary:`hsl(36 96% 54%)`},{id:`rose-copper`,labelKey:`settings:general.paletteRoseCopper`,swatch:`hsl(14 82% 56%)`,swatchSecondary:`hsl(34 96% 54%)`},{id:`indigo-amber`,labelKey:`settings:general.paletteIndigoAmber`,swatch:`hsl(233 74% 58%)`,swatchSecondary:`hsl(38 96% 54%)`},{id:`sage-sand`,labelKey:`settings:general.paletteSageSand`,swatch:`hsl(130 28% 55%)`,swatchSecondary:`hsl(36 55% 72%)`},{id:`slate-violet`,labelKey:`settings:general.paletteSlateViolet`,swatch:`hsl(248 50% 55%)`,swatchSecondary:`hsl(285 52% 62%)`},{id:`coral-mint`,labelKey:`settings:general.paletteCoralMint`,swatch:`hsl(12 85% 62%)`,swatchSecondary:`hsl(162 55% 55%)`},{id:`arctic-ember`,labelKey:`settings:general.paletteArcticEmber`,swatch:`hsl(195 85% 58%)`,swatchSecondary:`hsl(14 85% 55%)`},{id:`moss-rust`,labelKey:`settings:general.paletteMossRust`,swatch:`hsl(100 45% 38%)`,swatchSecondary:`hsl(18 70% 48%)`}];function c(e){return typeof e==`string`&&s.some(t=>t.id===e)}function l(e){return s.find(t=>t.id===e)??s[0]}function u(e,t){if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return c(n)?n:t}catch{return t}}function d(e,t){t===`signal`?e.removeAttribute(`data-palette`):e.setAttribute(`data-palette`,t)}var f=n()(t(e=>({provider:``,model:``,wsUrl:r(),wsConnected:!1,wsStatus:{state:`connecting`},theme:`system`,palette:`signal`,autoConnect:!0,soundOnComplete:!1,setProvider:t=>e({provider:t}),setModel:t=>e({model:t}),setConfig:t=>e(t),setTheme:t=>e({theme:t}),setPalette:t=>e({palette:t}),setWsConnected:t=>e({wsConnected:t}),setWsStatus:t=>e({wsStatus:t,wsConnected:t.state===`open`}),setSoundOnComplete:t=>e({soundOnComplete:t})}),{name:`wrongstack-config`,partialize:e=>({provider:e.provider,model:e.model,baseUrl:e.baseUrl,theme:e.theme,palette:e.palette,autoConnect:e.autoConnect,soundOnComplete:e.soundOnComplete}),merge:(e,t)=>{let{apiKey:n,...i}=e??{};return{...t,...i,wsUrl:r(),wsConnected:!1,wsStatus:{state:`connecting`},palette:c(i.palette)?i.palette:u(o,t.palette)}}}));function p(e,t){return t>=100?`danger`:`warning`}function ee(e,t){switch(e){case`budget.threshold_reached`:{let e=t,n=e.limit>0?Math.round(e.used/e.limit*100):0;return`${e.subagentId} [${e.kind}] ${n}% (${e.used}/${e.limit})`}case`budget.decision`:{let e=t;return`${e.subagentId} [${e.kind}] → ${e.decision}`}case`consensus.vote_initiated`:{let e=t;return`Vote: "${e.title}" — ${e.eligible.length} voters`}case`consensus.vote_cast`:{let e=t;return`${e.voterId} voted ${e.value}`}case`consensus.vote_resolved`:{let e=t;return`${e.result} — ✅${e.approveCount} ❌${e.rejectCount}`}case`task.pending`:return`Task queued: "${t.description.slice(0,60)}"`;case`task.started`:{let e=t;return`${e.subagentId} started ${e.taskId}`}case`task.completed`:{let e=t;return`Task ${e.taskId} ${e.status} (${e.durationMs}ms)`}case`task.failed`:{let e=t;return`Task ${e.taskId} failed: ${e.error.slice(0,60)}`}case`subagent.budget_extended`:{let e=t;return`${e.subagentId} [${e.kind}] extended → ${e.extendedTo}ms`}default:return e}}var te=200,ne=50,m=300,h=200,re=100;function g(e,t,n){if(!(e.size<=t)){if(n)for(let[r,i]of e){if(e.size<=t)break;n(i)&&e.delete(r)}for(let n of e.keys()){if(e.size<=t)break;e.delete(n)}}}var ie=n()(e=>({coordinatorStatus:`idle`,subagents:new Map,events:[],consensusVotes:new Map,tasks:new Map,taskCounts:{pending:0,running:0,completed:0,failed:0},budgetAlerts:[],lastUpdated:Date.now(),setCoordinatorStatus:(t,n)=>e(e=>({coordinatorStatus:t,coordinatorMode:n,lastUpdated:Date.now()})),updateCoordinatorStats:t=>e(e=>{let n=new Map(e.subagents);for(let e of t.subagentStatuses??[]){let t=n.get(e.id);n.set(e.id,{id:e.id,name:e.name,role:t?.role??`agent`,status:e.status,currentTask:e.currentTask,budgetLimits:t?.budgetLimits,budgetUsage:t?.budgetUsage,lastSeen:t?.lastSeen??Date.now()})}return g(n,h,e=>e.status===`stopped`),{subagents:n,taskCounts:{pending:t.pending,running:t.inFlight,completed:t.completed,failed:0},lastUpdated:Date.now()}}),updateSubagentBudget:(t,n)=>e(e=>{let r=new Map(e.subagents),i=r.get(t);return r.set(t,{id:t,name:i?.name??t,role:i?.role??`agent`,status:i?.status??`idle`,...i,...n,lastSeen:Date.now()}),g(r,h,e=>e.status===`stopped`),{subagents:r,lastUpdated:Date.now()}}),pushEvent:(t,n,r,i,a)=>e(e=>{let o=n.kind??t,s=(t.includes(`budget`)||t.includes(`threshold`))&&typeof n.limit==`number`&&n.limit>0?Math.round(n.used/n.limit*100):void 0,c=s===void 0?t.includes(`consensus.vote_resolved`)?`info`:t.includes(`consensus.vote_initiated`)?`warning`:`info`:s>=100?`danger`:s>=85?`warning`:`info`;return{events:[{id:`${r}-${t}`,ts:r,type:t,subagentId:i,taskId:a,payload:n,kind:o,level:c,message:ee(t,n)},...e.events].slice(0,te),lastUpdated:Date.now()}}),pushConsensusVote:(t,n,r)=>e(e=>{let i=new Map(e.consensusVotes);return i.set(t,{changeId:t,title:n,status:`pending`,eligible:r,votes:[],approveCount:0,rejectCount:0,abstainCount:0,expiresAt:Date.now()+3e5}),g(i,re,e=>e.status!==`pending`),{consensusVotes:i,lastUpdated:Date.now()}}),recordConsensusVote:(t,n,r,i)=>e(e=>{let a=new Map(e.consensusVotes),o=a.get(t);if(!o)return{};let s={...o,votes:[...o.votes.filter(e=>e.agentId!==n),{agentId:n,agentName:r,value:i,votedAt:Date.now()}],approveCount:i===`approve`?o.approveCount+1:o.approveCount,rejectCount:i===`reject`?o.rejectCount+1:o.rejectCount,abstainCount:i===`abstain`?o.abstainCount+1:o.abstainCount};return a.set(t,s),{consensusVotes:a,lastUpdated:Date.now()}}),resolveConsensusVote:(t,n,r,i)=>e(e=>{let a=new Map(e.consensusVotes),o=a.get(t);return o?(a.set(t,{...o,status:n,approveCount:r,rejectCount:i,resolvedAt:Date.now()}),{consensusVotes:a,lastUpdated:Date.now()}):{}}),pushTaskPending:(t,n,r)=>e(e=>{let i=new Map(e.tasks);return i.set(t,{id:t,description:n,status:`pending`,priority:r,queuedAt:Date.now()}),g(i,m,e=>e.status===`completed`||e.status===`failed`),{tasks:i,taskCounts:{...e.taskCounts,pending:e.taskCounts.pending+1},lastUpdated:Date.now()}}),startTask:(t,n)=>e(e=>{let r=new Map(e.tasks),i=r.get(t);return i?r.set(t,{...i,status:`running`,subagentId:n,startedAt:Date.now()}):r.set(t,{id:t,description:``,status:`running`,subagentId:n,startedAt:Date.now()}),{tasks:r,taskCounts:{...e.taskCounts,pending:Math.max(0,e.taskCounts.pending-1),running:e.taskCounts.running+1},lastUpdated:Date.now()}}),completeTask:(t,n,r)=>e(e=>{let i=new Map(e.tasks),a=i.get(t);return a&&i.set(t,{...a,status:n,completedAt:Date.now(),durationMs:r}),g(i,m,e=>e.status===`completed`||e.status===`failed`),{tasks:i,taskCounts:{...e.taskCounts,running:Math.max(0,e.taskCounts.running-1),completed:n===`completed`?e.taskCounts.completed+1:e.taskCounts.completed,failed:n===`failed`?e.taskCounts.failed+1:e.taskCounts.failed},lastUpdated:Date.now()}}),failTask:(t,n)=>e(e=>{let r=new Map(e.tasks),i=r.get(t);return i&&r.set(t,{...i,status:`failed`,error:n,completedAt:Date.now()}),g(r,m,e=>e.status===`completed`||e.status===`failed`),{tasks:r,taskCounts:{...e.taskCounts,running:Math.max(0,e.taskCounts.running-1),failed:e.taskCounts.failed+1},lastUpdated:Date.now()}}),recordBudgetDecision:(t,n,r,i)=>e(e=>{let a=new Map;for(let t of e.budgetAlerts){let e=`${t.subagentId}:${t.kind}`;a.has(e)||a.set(e,t)}let o=`${t}:${n}`,s=a.get(o);return s&&a.set(o,{...s,decision:r,newLimit:i,level:r===`extend`?`warning`:`danger`}),{budgetAlerts:Array.from(a.values()),lastUpdated:Date.now()}}),recordBudgetAlert:(t,n,r,i)=>e(e=>{let a=`${Date.now()}-${t}-${n}`,o=i>0?Math.round(r/i*100):0;return{budgetAlerts:[{id:a,ts:Date.now(),subagentId:t,kind:n,level:p(n,o),used:r,limit:i,pct:o},...e.budgetAlerts].slice(0,ne),lastUpdated:Date.now()}}),recordBudgetExtended:(t,n,r)=>e(e=>{let i=new Map(e.subagents),a=i.get(t);if(a?.budgetLimits){let e={...a.budgetLimits};n===`timeout`&&r&&(e.timeoutMs=r),n===`iterations`&&(e.maxIterations=r),n===`tool_calls`&&(e.maxToolCalls=r),i.set(t,{...a,budgetLimits:e,lastSeen:Date.now()})}return{subagents:i,lastUpdated:Date.now()}}),clear:()=>e({coordinatorStatus:`idle`,coordinatorMode:void 0,subagents:new Map,events:[],consensusVotes:new Map,tasks:new Map,taskCounts:{pending:0,running:0,completed:0,failed:0},budgetAlerts:[],lastUpdated:Date.now()})})),ae=n()(e=>({snapshot:null,lastFiredAt:{},revision:0,setSnapshot:t=>e(e=>({snapshot:t,revision:e.revision+1})),recordFired:(t,n)=>e(e=>({lastFiredAt:{...e.lastFiredAt,[t]:n},revision:e.revision+1})),clear:()=>e({snapshot:null,lastFiredAt:{},revision:0})}));function oe(){return`ref_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function _(e){switch(e.split(`.`).pop()?.toLowerCase()??``){case`ts`:case`tsx`:return`typescript`;case`js`:case`jsx`:return`javascript`;case`json`:return`json`;case`md`:case`mdx`:return`markdown`;case`css`:return`css`;case`scss`:return`scss`;case`html`:case`htm`:return`html`;case`py`:return`python`;case`rs`:return`rust`;case`go`:return`go`;case`rb`:return`ruby`;case`java`:return`java`;case`c`:return`c`;case`cpp`:case`hpp`:return`cpp`;case`h`:return`c`;case`sh`:case`bash`:return`bash`;case`sql`:return`sql`;case`yaml`:case`yml`:return`yaml`;case`toml`:return`toml`;default:return``}}function v(e,t=20,n=2e3){let r=e.split(`
|
|
2
2
|
`),i=!1,a=e;return r.length>t&&(a=r.slice(0,t).join(`
|
|
3
3
|
`),i=!0),a.length>n&&(a=a.slice(0,n),i=!0),i&&(a=a.replace(/\s+$/,``)+`
|
|
4
4
|
…`),{text:a,truncated:i}}function y(e){return e.length===0?``:[`[File reference contract]`,`Before answering or modifying anything related to these references, use the available file-reading tools to read each complete project file:`,...e.map(e=>`- ${JSON.stringify(e)}`),`If a read is paginated or chunked, continue on the same path until EOF. Do not treat an inline preview as the complete file.`].join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n,o as r,r as i,t as a}from"./chat-store-c0pGYczr.js";import{Ga as o,Ua as s,za as c}from"./vendor-C_zEzV4N.js";import{t as l}from"./i18n-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n,o as r,r as i,t as a}from"./chat-store-c0pGYczr.js";import{Ga as o,Ua as s,za as c}from"./vendor-C_zEzV4N.js";import{t as l}from"./i18n-DiD9Wcep.js";import{a as u,c as d,i as f,l as p,o as m,s as h,t as g}from"./ws-client-BVq0hf0a.js";import{t as _}from"./session-store-BgiP4PnQ.js";import{i as v,n as y}from"./codemap-activity-store-BH7Mh4k9.js";import{F as b,I as x,P as ee,T as S,_ as C,a as te,b as ne,c as re,f as ie,g as ae,h as oe,i as w,j as T,l as se,o as ce,p as le,r as E,s as D,t as O,u as k,v as ue,y as de}from"./stores-CzgPPQlG.js";import{r as A}from"./mailbox-store-bF96Ih2G.js";import{n as j,t as fe}from"./ui-store-xx1NssJI.js";import{n as pe,o as me}from"./view-navigation-CZKugncK.js";import{t as he}from"./codemap-index-store-BFm1TzVW.js";import{n as M}from"./Toaster-ChF897Tc.js";var N=e(o(),1);function ge(e,t){if(t)return!0;try{return new URLSearchParams(e).get(`shell`)===`desktop`}catch{return!1}}function P(){return typeof window>`u`?!1:ge(window.location.search,!!window.wrongstackDesktopHost)}function F(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function I(e,t=``){return typeof e==`string`?e:t}function L(e,t=0){return typeof e==`number`&&Number.isFinite(e)?e:t}function _e(e){let t=F(e.payload);if(!t)return null;switch(e.type){case`provider.thinking_delta`:{let e=I(t.text);return e?{kind:`thinking-delta`,text:e}:null}case`provider.text_delta`:{let e=I(t.text);return e?{kind:`text-delta`,text:e,messageId:I(t.messageId)}:null}case`provider.response`:return{kind:`response`,content:t.content,stopReason:I(t.stopReason)};case`run.result`:return{kind:`run-result`,status:I(t.status),iterations:L(t.iterations,1),...typeof t.finalText==`string`?{finalText:t.finalText}:{}};case`error`:return{kind:`error`,message:I(t.message,`Run failed`)};default:return null}}function R(e){let t=F(e.payload);if(!t)return null;if(e.type===`tool.started`){let e=I(t.name,`tool`);return{kind:`started`,id:I(t.id,e),name:e,input:t.input,messageId:I(t.messageId)}}if(e.type===`tool.progress`){let e=F(t.event);return{kind:`progress`,id:I(t.id),name:I(t.name,`tool`),eventType:I(e?.type),text:I(e?.text).trim()}}return e.type===`tool.executed`?{kind:`executed`,id:I(t.id),name:I(t.name),ok:t.ok!==!1,durationMs:L(t.durationMs),...typeof t.output==`string`?{output:t.output}:{},...Array.isArray(t.sage)?{sage:t.sage.filter(e=>typeof e==`string`)}:{}}:null}function z(e){if(!(typeof e!=`number`||!Number.isFinite(e)))return e}function B(e){return typeof e==`string`&&e.length>0?e:void 0}function ve(e){let t=F(e.payload);if(!t)return null;switch(e.type){case`fleet.concurrency_update`:return{kind:`concurrency`,active:L(t.fleetConcurrency),maximum:L(t.fleetConcurrencyMax),maxSpawns:z(t.maxSpawns),usedSpawns:z(t.usedSpawns),remainingSpawns:z(t.remainingSpawns),maxSpawnsSource:B(t.maxSpawnsSource),maxConcurrentSource:B(t.maxConcurrentSource),effectiveSource:B(t.effectiveSource),checkpointMaxSpawns:z(t.checkpointMaxSpawns),ceilingMismatch:t.ceilingMismatch===!0||void 0};case`client.status_update`:return{kind:`client-status`,status:t};case`sessions.status_update`:return{kind:`sessions`,sessions:Array.isArray(t.sessions)?t.sessions:[]};case`coordinator.stats`:return{kind:`coordinator`,agents:Array.isArray(t.subagentStatuses)?t.subagentStatuses.filter(e=>F(e)!==null):[]};default:return null}}new Set([...new Set([`mode_changed`,`compaction`,`checkpoint`,`skill_activated`,`skill_deactivated`,`agent_spawned`,`agent_stopped`,`agent_error`,`error`,`provider_retry`,`provider_error`,`message_truncated`])].filter(e=>e!==`checkpoint`));var ye=[`[MAILBOX]`,`[MAILBOX BTW]`,`[BY THE WAY —`,`[QUEUED MESSAGES —`,`[FLEET PULSE]`,`[loop-detector]`,`[SESSION RESUME FILE VALIDATION]`,`[SESSION RESUME INTERRUPTED WORK]`];function be(e){let t=e.trimStart();for(let e of ye)if(t.startsWith(e))return!0;return!1}function xe(e){return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
2
|
<rect width="64" height="64" fill="#121210" />
|
|
3
3
|
<path fill="#FD9F02" d="M5 27h10v10H5zM27 27h10v10H27zM38 27h10v10H38zM49 27h10v10H49z" />
|
|
4
4
|
<path fill="#FE2E5F" d="M16 32h10v10H16z" />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ga as t,ea as n,jt as r,lt as i,or as a}from"./vendor-C_zEzV4N.js";import{a as o,i as s,n as c,o as l,r as u,t as d}from"./dialog-BJjDUqb3.js";import{t as f}from"./button-DvpRpKkt.js";var p=e(t(),1);async function m(e=``){let t=await fetch(`${e}/api/vector-memory/status`,{credentials:`include`});if(!t.ok)throw Error(`status failed: HTTP ${t.status}`);return await t.json()}async function h(e,t={}){let n=new URLSearchParams;n.set(`q`,e),t.limit!==void 0&&n.set(`limit`,String(t.limit)),t.threshold!==void 0&&n.set(`threshold`,String(t.threshold)),t.similarity===!0&&n.set(`similarity`,`1`);let r=await fetch(`${t.baseUrl??``}/api/vector-memory/search?${n.toString()}`,{credentials:`include`});if(!r.ok)throw Error(`search failed: HTTP ${r.status}`);return await r.json()}function g(e,t=170){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t-1)}…`:n}async function _(e,t={}){let n=await fetch(`${t.baseUrl??``}/api/vector-memory/store/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`include`});if(!n.ok)throw Error(`forget failed: HTTP ${n.status}`);return await n.json()}var v=i();function y({hit:e,busy:t,error:n,onCancel:i,onConfirm:p,onOpenChange:m}){return(0,v.jsx)(d,{open:e!==null,onOpenChange:m,children:(0,v.jsxs)(c,{className:`max-w-md`,children:[(0,v.jsxs)(o,{children:[(0,v.jsx)(`span`,{className:`mb-2 flex size-10 items-center justify-center border border-destructive/35 bg-destructive/10 text-destructive`,children:(0,v.jsx)(r,{className:`size-4`})}),(0,v.jsx)(l,{children:`Forget this vector memory?`}),(0,v.jsx)(u,{className:`leading-6`,children:`This removes the entry and its embedding from the vector memory store.`})]}),(0,v.jsx)(`div`,{className:`border border-border/70 bg-background/45 p-3 text-xs text-muted-foreground`,children:g(e?.text??``,180)}),n===void 0?null:(0,v.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:n}),(0,v.jsxs)(s,{children:[(0,v.jsx)(f,{variant:`outline`,onClick:i,disabled:t,children:`Cancel`}),(0,v.jsxs)(f,{variant:`destructive`,onClick:p,disabled:t,children:[t?(0,v.jsx)(a,{className:`size-4 animate-spin`}):(0,v.jsx)(r,{className:`size-4`}),t?`Forgetting…`:`Forget memory`]})]})]})})}function b({baseUrl:e=``}={}){let[t,r]=(0,p.useState)(),[i,a]=(0,p.useState)(),[o,s]=(0,p.useState)(``),[c,l]=(0,p.useState)(10),[u,d]=(0,p.useState)(void 0),[f,b]=(0,p.useState)([]),[S,C]=(0,p.useState)(),[w,T]=(0,p.useState)(),[E,D]=(0,p.useState)(!1),[O,k]=(0,p.useState)(null),[A,j]=(0,p.useState)(null),[M,N]=(0,p.useState)(!1),[P,F]=(0,p.useState)(),[I,L]=(0,p.useState)(0),R=(0,p.useRef)(0),z=(0,p.useRef)(!1),B=(0,p.useRef)(e);(0,p.useEffect)(()=>{let t=!1;return B.current!==e&&(B.current=e,z.current=!1,r(void 0),a(void 0)),m(e).then(e=>{t||(z.current=!0,r(e),a(void 0))}).catch(e=>{t||z.current||(r(void 0),a(e instanceof Error?e.message:String(e)))}),()=>{t=!0}},[e,I]);let V=async()=>{let t=o.trim();if(t.length!==0){D(!0),T(void 0),k(null),j(null),F(void 0);try{let n=await h(t,{limit:c,...u===void 0?{}:{threshold:u},similarity:!0,baseUrl:e});b(n.hits),C(n.similarity)}catch(e){b([]),C(void 0),T(e instanceof Error?e.message:String(e))}finally{R.current+=1,D(!1)}}},H=async()=>{if(A===null)return;let t=A.id,n=R.current,r=f,i=S;N(!0),F(void 0);try{let{removed:a}=await _(t,{baseUrl:e});if(a){if(R.current===n){let e=r.findIndex(e=>e.id===t);b(r.filter(e=>e.id!==t)),i!==void 0&&e>=0&&C(i.filter((t,n)=>n!==e).map(t=>t.filter((t,n)=>n!==e))),O===t&&k(null)}j(e=>e?.id===t?null:e),L(e=>e+1)}else F(`The store reported the entry was not removed.`)}catch(e){F(e instanceof Error?e.message:String(e))}finally{N(!1)}};return i===void 0?t===void 0?(0,v.jsxs)(`div`,{className:`vector-memory-panel vector-memory-panel--loading`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsx)(`p`,{children:`Loading status…`})]}):t.enabled?(0,v.jsxs)(`div`,{className:`vector-memory-panel`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsxs)(`dl`,{className:`vector-memory-panel__status`,children:[(0,v.jsx)(`dt`,{children:`Active provider`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.providerId??`unknown`})}),(0,v.jsx)(`dt`,{children:`Model`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.modelId??`unknown`})}),(0,v.jsx)(`dt`,{children:`Dimensions`}),(0,v.jsx)(`dd`,{children:t.dimensions??`unknown`}),(0,v.jsx)(`dt`,{children:`Entries / vectors`}),(0,v.jsxs)(`dd`,{children:[t.entries??0,` / `,t.vectors??0]}),(0,v.jsx)(`dt`,{children:`Store path`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.storePath??`(project root)`})}),(0,v.jsx)(`dt`,{children:`Model cache`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:t.modelCacheDir??`(project root)`})}),(0,v.jsx)(`dt`,{children:`Providers`}),(0,v.jsx)(`dd`,{children:t.providers?.join(`, `)??``}),t.cache?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`dt`,{children:`Embedding cache`}),(0,v.jsxs)(`dd`,{children:[t.cache.entries,` entries · `,t.cache.providers,` provider`,t.cache.providers===1?``:`s`,` · `,t.cache.totalUseCount,` hits`]})]}):null]}),(0,v.jsxs)(`div`,{className:`vector-memory-panel__search`,children:[(0,v.jsx)(`label`,{htmlFor:`vm-query`,children:`Query`}),(0,v.jsx)(`input`,{id:`vm-query`,type:`text`,value:o,onChange:e=>s(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&V()},placeholder:`apple banana`}),(0,v.jsxs)(`div`,{className:`vector-memory-panel__controls`,children:[(0,v.jsxs)(`label`,{children:[`limit`,(0,v.jsx)(`input`,{type:`number`,min:1,max:50,value:c,onChange:e=>l(Math.max(1,Math.min(50,Number(e.currentTarget.value)||10)))})]}),(0,v.jsxs)(`label`,{children:[`threshold`,(0,v.jsx)(`input`,{type:`number`,min:0,max:1,step:.05,value:u??``,onChange:e=>{let t=e.currentTarget.value;d(t===``?void 0:Number.parseFloat(t))}})]}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>void V(),disabled:E,children:E?`Searching…`:`Search`})]})]}),w===void 0?null:(0,v.jsxs)(`p`,{className:`vector-memory-panel__error`,children:[`Search error: `,w]}),(0,v.jsxs)(`ol`,{className:`vector-memory-panel__hits`,children:[f.map(e=>{let t=O===e.id;return(0,v.jsxs)(`li`,{className:t?`vector-memory-panel__hit vector-memory-panel__hit--expanded`:`vector-memory-panel__hit`,children:[(0,v.jsxs)(`button`,{type:`button`,className:`vector-memory-panel__hit-toggle`,"aria-expanded":t,onClick:()=>k(t?null:e.id),children:[(0,v.jsx)(n,{"aria-hidden":`true`,className:t?`vector-memory-panel__hit-chevron vector-memory-panel__hit-chevron--open`:`vector-memory-panel__hit-chevron`}),(0,v.jsx)(`span`,{className:`vector-memory-panel__hit-score`,children:e.score.toFixed(3)}),e.summary?(0,v.jsx)(`span`,{className:`vector-memory-panel__hit-summary`,children:e.summary}):null]}),(0,v.jsx)(`p`,{className:`vector-memory-panel__hit-text`,children:t?e.text:g(e.text)}),e.tags.length>0?(0,v.jsx)(`p`,{className:`vector-memory-panel__hit-tags`,children:e.tags.map(e=>(0,v.jsx)(`span`,{className:`vector-memory-panel__hit-tag`,children:e},e))}):null,t?(0,v.jsxs)(`div`,{className:`vector-memory-panel__hit-detail`,children:[(0,v.jsxs)(`dl`,{className:`vector-memory-panel__hit-fields`,children:[(0,v.jsx)(`dt`,{children:`id`}),(0,v.jsx)(`dd`,{children:(0,v.jsx)(`code`,{children:e.id})}),(0,v.jsx)(`dt`,{children:`score`}),(0,v.jsx)(`dd`,{children:e.score.toFixed(3)}),e.summary?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`dt`,{children:`summary`}),(0,v.jsx)(`dd`,{children:e.summary})]}):null]}),(0,v.jsx)(`div`,{className:`vector-memory-panel__hit-actions`,children:(0,v.jsx)(`button`,{type:`button`,className:`vector-memory-panel__forget`,onClick:()=>{F(void 0),j(e)},children:`Forget`})})]}):null]},e.id)}),f.length===0&&E===!1&&o.trim().length>0?(0,v.jsx)(`li`,{className:`vector-memory-panel__no-hits`,children:`No results.`}):null]}),S!==void 0&&S.length>1?(0,v.jsxs)(`div`,{className:`vector-memory-panel__heatmap`,"data-testid":`vector-memory-heatmap`,children:[(0,v.jsx)(`h4`,{children:`Result similarity`}),(0,v.jsx)(`p`,{className:`vector-memory-panel__heatmap-hint`,children:`Pairwise cosine similarity between returned hits. Darker cells = more similar. A bright diagonal with mostly dark off-diagonals means results form a tight cluster; a noisy grid means the search returned mixed topics.`}),(0,v.jsxs)(`div`,{className:`vector-memory-panel__heatmap-grid`,style:{gridTemplateColumns:`auto repeat(${S.length}, minmax(20px, 1fr))`},role:`table`,"aria-label":`Pairwise cosine similarity between returned hits`,children:[(0,v.jsx)(`div`,{className:`vector-memory-panel__heatmap-corner`}),S.map((e,t)=>(0,v.jsx)(`div`,{className:`vector-memory-panel__heatmap-col-label`,children:t+1},`col-${t}`)),S.map((e,t)=>(0,v.jsx)(x,{row:e,index:t},`row-${t}`))]})]}):null,(0,v.jsx)(y,{hit:A,busy:M,error:P,onCancel:()=>j(null),onConfirm:()=>void H(),onOpenChange:e=>{!e&&!M&&j(null)}})]}):(0,v.jsxs)(`div`,{className:`vector-memory-panel vector-memory-panel--disabled`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsx)(`p`,{children:`Disabled — the webui-server host does not have a vector memory store wired.`})]}):(0,v.jsxs)(`div`,{className:`vector-memory-panel vector-memory-panel--error`,children:[(0,v.jsx)(`h3`,{children:`Vector Memory`}),(0,v.jsxs)(`p`,{children:[`Status unavailable: `,i]})]})}function x({row:e,index:t}){return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`div`,{className:`vector-memory-panel__heatmap-row-label`,children:t+1}),e.map((e,n)=>{let r=t===n,i=Math.max(0,Math.min(1,e)),a=95-i*60,o=`hsl(220, ${r?0:35}%, ${a}%)`;return(0,v.jsx)(`div`,{className:r?`vector-memory-panel__heatmap-cell vector-memory-panel__heatmap-cell--diagonal`:`vector-memory-panel__heatmap-cell`,style:{background:o},role:`cell`,"aria-label":`hit ${t+1} vs hit ${n+1}: ${i.toFixed(2)}`,title:`hit ${t+1} ↔ hit ${n+1}: ${i.toFixed(3)}`,children:i>=.5?i.toFixed(2):``},`cell-${t}-${n}`)})]})}export{b as VectorMemoryPanel};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VectorMemoryHit } from './model.js';
|
|
2
|
+
interface ForgetVectorMemoryDialogProps {
|
|
3
|
+
/** The hit pending removal. The dialog is open while this is non-null. */
|
|
4
|
+
hit: VectorMemoryHit | null;
|
|
5
|
+
busy: boolean;
|
|
6
|
+
error: string | undefined;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function ForgetVectorMemoryDialog({ hit, busy, error, onCancel, onConfirm, onOpenChange, }: ForgetVectorMemoryDialogProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ForgetVectorMemoryDialog.d.ts.map
|
|
@@ -44,6 +44,17 @@ export declare function searchVectorMemory(query: string, opts?: {
|
|
|
44
44
|
similarity?: boolean;
|
|
45
45
|
baseUrl?: string;
|
|
46
46
|
}): Promise<VectorMemorySearchResponse>;
|
|
47
|
+
/** Collapse whitespace and truncate with an ellipsis — same preview contract
|
|
48
|
+
* as the MemoryManager's `memoryPreview`, kept local so the panel stays
|
|
49
|
+
* self-contained (no cross-feature import). */
|
|
50
|
+
export declare function previewText(text: string, max?: number): string;
|
|
51
|
+
/** Forget (hard-remove) a single entry and its embedding from the
|
|
52
|
+
* vector-memory store. Maps to `DELETE /api/vector-memory/store/:id`. */
|
|
53
|
+
export declare function forgetVectorMemory(id: string, opts?: {
|
|
54
|
+
baseUrl?: string;
|
|
55
|
+
}): Promise<{
|
|
56
|
+
removed: boolean;
|
|
57
|
+
}>;
|
|
47
58
|
/** Hook: track the live status, re-fetching on focus. */
|
|
48
59
|
export declare function useVectorMemoryStatus(baseUrl?: string): {
|
|
49
60
|
status: VectorMemoryStatus | undefined;
|
package/dist/index.html
CHANGED
|
@@ -5,39 +5,39 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/wrongstack.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>WrongStack WebUI</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Cnerffls.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/monaco-BCqJp2xW.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/markdown-CIRD7kOg.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/vendor-C_zEzV4N.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/utils-tsZEnrBH.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/chat-store-c0pGYczr.js">
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-CezOSNBd.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/chat-CzaGXz_W.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/commandPalette-BovBiPec.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/assets/common-BBHmIHQW.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/settings-DijFr-kZ.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/setup-DfcCCvUO.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/toasts-DOfXc7Rt.js">
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/i18n-
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/i18n-DiD9Wcep.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/session-store-BgiP4PnQ.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/ws-client-BVq0hf0a.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/codemap-activity-store-BH7Mh4k9.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/mailbox-store-bF96Ih2G.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/ui-store-xx1NssJI.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/stores-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/stores-CzgPPQlG.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/view-navigation-CZKugncK.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/codemap-index-store-BFm1TzVW.js">
|
|
31
|
-
<link rel="modulepreload" crossorigin href="/assets/Toaster-
|
|
32
|
-
<link rel="modulepreload" crossorigin href="/assets/useWebSocket-
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/Toaster-ChF897Tc.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/useWebSocket-DvMcAAgU.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/dialog-BJjDUqb3.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/button-DvpRpKkt.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/input-BtoHcCl9.js">
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/ConfirmModal-
|
|
37
|
-
<link rel="modulepreload" crossorigin href="/assets/ModelPicker-
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/ConfirmModal-i2BGY0ev.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/ModelPicker-MpC6-gWQ.js">
|
|
38
38
|
<link rel="stylesheet" crossorigin href="/assets/monaco-Bowa0-zp.css">
|
|
39
39
|
<link rel="stylesheet" crossorigin href="/assets/vendor-BMdWcCR4.css">
|
|
40
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
40
|
+
<link rel="stylesheet" crossorigin href="/assets/index-D2tx76V0.css">
|
|
41
41
|
</head>
|
|
42
42
|
<body>
|
|
43
43
|
<div id="root"></div>
|