@wrongstack/webui 0.302.2 → 0.305.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-g1KmcsGN.js +9 -0
- package/dist/assets/{AnalyticsDashboard-C9aPEyov.js → AnalyticsDashboard-D7KwqZWe.js} +1 -1
- package/dist/assets/{AudienceMemoryPanel-Bciki41o.js → AudienceMemoryPanel-CkCY5vFN.js} +2 -2
- package/dist/assets/ChangesView-Cd7XaPKE.js +1 -0
- package/dist/assets/ChronicleDashboard-CKTXZQBu.js +1 -0
- package/dist/assets/CodeEditor-xrPrWeRC.js +1 -0
- package/dist/assets/CodeMap-CnlnHM8P.js +1 -0
- package/dist/assets/{ConfirmModal-CdKg3EOQ.js → ConfirmModal-BD6pUkAB.js} +1 -1
- package/dist/assets/{CronJobsPanel-CJ7Vc1Am.js → CronJobsPanel-DVbRI19g.js} +1 -1
- package/dist/assets/{DeadCodeScanPanel-DaeHUzc5.js → DeadCodeScanPanel-Dp6vW6pV.js} +1 -1
- package/dist/assets/{DebugDashboard-BI3EmXrM.js → DebugDashboard-L27zCOIW.js} +1 -1
- package/dist/assets/DesignGalleryView-BSOnBsKq.js +1 -0
- package/dist/assets/GoalView-5ELSJ5fI.js +1 -0
- package/dist/assets/KanbanView-Cs3ei9fW.js +3 -0
- package/dist/assets/MailboxDetailView-BKPIVEkq.js +1 -0
- package/dist/assets/MemoryDrawer-WBQBcL-C.js +1 -0
- package/dist/assets/MemoryManager-svukiuox.js +1 -0
- package/dist/assets/{ModelPicker-IOZSUnqM.js → ModelPicker-C1ohvzbO.js} +1 -1
- package/dist/assets/OfficeMapPanel-DnOaGBxn.js +4 -0
- package/dist/assets/{ProcessMonitor-TGqyXxmB.js → ProcessMonitor-Cu3KUgai.js} +1 -1
- package/dist/assets/{QueuePanel-5aMgQbHv.js → QueuePanel-B4zQao-A.js} +1 -1
- package/dist/assets/{RefreshDebugView-DfBYFPEF.js → RefreshDebugView-DTO6YlTY.js} +1 -1
- package/dist/assets/{RequirementIntakeView-CNAFKiQ3.js → RequirementIntakeView-Bz0BWn9P.js} +1 -1
- package/dist/assets/{SageTabs-olgLJfg_.js → SageTabs-DGzgZls5.js} +2 -2
- package/dist/assets/SddFlowGraph-B-5J7zOV.js +1 -0
- package/dist/assets/SddHub-CTVOMFR2.js +2 -0
- package/dist/assets/{SessionInspectView-CytBw7Y9.js → SessionInspectView-CvxwjPXI.js} +1 -1
- package/dist/assets/SessionList-BiYRM1rX.js +1 -0
- package/dist/assets/{SessionsDashboard-CridPbkX.js → SessionsDashboard-DKRZzumv.js} +1 -1
- package/dist/assets/{SetupScreen-BkVjdky4.js → SetupScreen-CQnV2Grl.js} +1 -1
- package/dist/assets/SkillDetailView-BP3g7iie.js +3 -0
- package/dist/assets/{SpecsView-DUx1sgtH.js → SpecsView-D4uEj-OZ.js} +1 -1
- package/dist/assets/{TechStackView-CvUiAISX.js → TechStackView-epS5clib.js} +1 -1
- package/dist/assets/{TerminalPanel-Dg5hqYTA.js → TerminalPanel-Dj4n-0MH.js} +1 -1
- package/dist/assets/Toaster-Dic3369l.js +1 -0
- package/dist/assets/{activity-CZIixoel.js → activity-BI4XyF_x.js} +3 -3
- package/dist/assets/{activity-BwEBEQ51.js → activity-Dg9Q9kwt.js} +3 -3
- package/dist/assets/{activity-BnTQWNPX.js → activity-Dr_u3dOm.js} +3 -3
- package/dist/assets/{activity-CRMLR4a3.js → activity-Dzgvt4Nh.js} +3 -3
- package/dist/assets/{activity-Xqrt9v4z.js → activity-IttuV5ar.js} +3 -3
- package/dist/assets/{activity-BLSyJfTr.js → activity-L2_b8Uan.js} +3 -3
- package/dist/assets/{activity-C-9I3_s4.js → activity-gB90peLu.js} +3 -3
- package/dist/assets/{button-Dcy288Mc.js → button-DvHe5h9X.js} +1 -1
- package/dist/assets/{chat-store-DbxFVDwi.js → chat-store-RzAVkc8a.js} +2 -2
- package/dist/assets/{codemap-activity-store-DQfjo7-j.js → codemap-activity-store-DBdfN0ix.js} +1 -1
- package/dist/assets/codemap-index-store-45CkVCxN.js +1 -0
- package/dist/assets/{dialog-ftgTihmF.js → dialog-jbs7gu-q.js} +1 -1
- package/dist/assets/{empty-state-RRSqQaCk.js → empty-state-D-ojp6Gp.js} +1 -1
- package/dist/assets/i18n-nlW2iAya.js +2 -0
- package/dist/assets/index-hNmvVlqt.js +132 -0
- package/dist/assets/index-mNf-KFcC.css +1 -0
- package/dist/assets/{input-fo9-BPBC.js → input-oJ0Gehqp.js} +1 -1
- package/dist/assets/{mailbox-store-C1mzoSqJ.js → mailbox-store-BuLRsYu3.js} +1 -1
- package/dist/assets/{roster-ws-Da57e_sI.js → roster-ws-IRvFZ_v1.js} +1 -1
- package/dist/assets/{session-store-Df7_hhe9.js → session-store-DkPaOIhe.js} +1 -1
- package/dist/assets/settings-4A6zNjep.js +1 -0
- package/dist/assets/settings-Bq1PPj3V.js +1 -0
- package/dist/assets/settings-BxL8m0v6.js +1 -0
- package/dist/assets/settings-CZR4viP9.js +1 -0
- package/dist/assets/settings-L8hBHrGD.js +1 -0
- package/dist/assets/settings-t7_uBgp_.js +1 -0
- package/dist/assets/settings-uLdezc9e.js +1 -0
- package/dist/assets/{shared-KAzksK0C.js → shared-CiaNczO0.js} +1 -1
- package/dist/assets/stores-DxTO5dWX.js +7 -0
- package/dist/assets/{ui-store-CE4-TlwB.js → ui-store-FVcXVdRC.js} +1 -1
- package/dist/assets/useWebSocket-B3WtCdii.js +29 -0
- package/dist/assets/{utils-B-9lSDIn.js → utils-D1fGupR8.js} +1 -1
- package/dist/assets/{vendor-BuarzSSb.js → vendor-AeHpGMaG.js} +30 -30
- package/dist/assets/{view-navigation-DIDEcp4V.js → view-navigation-D-afwlSZ.js} +1 -1
- package/dist/assets/ws-client-Cvio0IrC.js +1 -0
- package/dist/components/KanbanContractGraphDashboard.d.ts +7 -0
- package/dist/components/KanbanContractGraphPanel.d.ts +12 -0
- package/dist/components/KanbanContractGraphView.d.ts +40 -0
- package/dist/components/KanbanTaskInspectorChrome.d.ts +62 -0
- package/dist/components/KanbanViewModeTabs.d.ts +1 -1
- package/dist/components/KanbanWorkbench.d.ts +9 -0
- package/dist/components/MemoryManager/MemoryDetail.d.ts +1 -1
- package/dist/components/MemoryManager/ReviewQueue.d.ts +25 -0
- package/dist/components/SettingsPanel/ToolsSection.d.ts +1 -0
- package/dist/components/TaskVerificationSection.d.ts +3 -3
- package/dist/components/agent-roster-data.d.ts +21 -0
- package/dist/hooks/useWebSocket.d.ts +3 -0
- package/dist/index.html +23 -23
- package/dist/index.js +7112 -4760
- package/dist/lib/kanban-cleaner.d.ts +20 -1
- package/dist/lib/palettes.d.ts +1 -1
- package/dist/lib/ws-client-actions.d.ts +3 -0
- package/dist/stores/kanban-store.d.ts +5 -1
- package/dist/stores/local-prefs.d.ts +1 -1
- package/dist/stores/session-store.d.ts +4 -0
- package/dist/stores/ui-store.d.ts +3 -3
- package/dist/types/client-message.d.ts +5 -0
- package/dist/types/sage.d.ts +18 -13
- package/dist/types/server-message.d.ts +2 -2
- package/dist/types/system.d.ts +4 -0
- package/package.json +8 -8
- package/dist/assets/AgentRosterView-BwukmHoA.js +0 -9
- package/dist/assets/ChangesView-DumffowD.js +0 -1
- package/dist/assets/ChronicleDashboard-BYGV5twz.js +0 -1
- package/dist/assets/CodeEditor-D2Dnax7e.js +0 -1
- package/dist/assets/CodeMap-DIKKs3Ux.js +0 -1
- package/dist/assets/DesignGalleryView-DMW6Ab__.js +0 -1
- package/dist/assets/GoalView-3291Hxnb.js +0 -1
- package/dist/assets/KanbanView-CFE63A4a.js +0 -3
- package/dist/assets/MailboxDetailView-CUTWkSyK.js +0 -1
- package/dist/assets/MemoryDrawer-Dsy0AX6f.js +0 -1
- package/dist/assets/MemoryManager-D1kXeVE3.js +0 -1
- package/dist/assets/OfficeMapPanel-Q81eioDB.js +0 -4
- package/dist/assets/SddHub-7Z55QY-M.js +0 -2
- package/dist/assets/SessionList-C3ygQN8A.js +0 -1
- package/dist/assets/SkillDetailView-Cp-xEHww.js +0 -3
- package/dist/assets/Toaster-BgN2bRJx.js +0 -1
- package/dist/assets/codemap-index-store-COStDU-8.js +0 -1
- package/dist/assets/i18n-9T7iGYgW.js +0 -2
- package/dist/assets/index-Cw20Xg0d.css +0 -1
- package/dist/assets/index-FHt-sKVF.js +0 -132
- package/dist/assets/progress-ring-B9pqitSa.js +0 -1
- package/dist/assets/settings-Bb7_utQE.js +0 -1
- package/dist/assets/settings-Bd8zMwvC.js +0 -1
- package/dist/assets/settings-DdFgBMAw.js +0 -1
- package/dist/assets/settings-De6sXIFO.js +0 -1
- package/dist/assets/settings-E8SKMLxq.js +0 -1
- package/dist/assets/settings-zIY9-ivF.js +0 -1
- package/dist/assets/settings-zKBcRjqE.js +0 -1
- package/dist/assets/stores-vuG0AaKy.js +0 -7
- package/dist/assets/useWebSocket-CZSpbA3M.js +0 -29
- package/dist/assets/ws-client-TTMa0XaT.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fa as e,Pa as t}from"./vendor-AeHpGMaG.js";import{n}from"./utils-D1fGupR8.js";function r(e,t){if(e==null){let e=Error(t?`Expected ${t} to be defined`:`Expected value to be defined`);throw e.name=`ExpectDefinedError`,e}return e}function i(e){return e!==`tool_use`&&e!==`tool_call`}var a=/<nextsteps\b[^>]*>\s*\n+/i,o=/^(?:(\d+)[.)]\s*|[-*•]\s*)(.+?)(\s+auto="true")?$/,s=6;function c(e,t=!1,n=!0){return n?d(e,t):u(e)}function l(e,t,n,r){e.push(r?{index:t,text:n,auto:!0}:{index:t,text:n})}function u(e){let t=e.split(`
|
|
2
2
|
`),n=[],r=new Set;for(let e of t){let t=e.trim();if(!t)continue;let i=o.exec(t);if(!i)continue;let a=i[1],c=i[2].trim(),u;if(u=a===void 0?n.length+1:Number.parseInt(a,10),r.has(u))continue;r.add(u);let d=!!i[3]&&n.length===0&&u===1;if(l(n,u,c,d),n.length>=s)break}return{steps:n,texts:n.map(e=>e.text),stripped:e,autoTexts:n.filter(e=>e.auto).map(e=>e.text)}}function d(e,t){let n=a.exec(e);if(!n)return{steps:[],texts:[],stripped:e,autoTexts:[]};let r=n.index+n[0].length,i=e.slice(r),c=i.split(`
|
|
3
3
|
`),u=[],d=new Set;for(let e of c){let t=e.trim();if(!t)continue;let n=o.exec(t);if(!n)break;let r=n[1],i=n[2].trim(),a;if(a=r===void 0?u.length+1:Number.parseInt(r,10),d.has(a))continue;d.add(a);let c=!!n[3]&&u.length===0&&a===1;if(l(u,a,i,c),u.length>=s)break}if(u.length===0||!i.includes(`</nextsteps>`))return{steps:[],texts:[],stripped:e,autoTexts:[]};let p=u.map(e=>e.text),m=u.filter(e=>e.auto).map(e=>e.text),h=n.index,g=n[0].length+f(i,u.length);return{steps:u,texts:p,stripped:(e.slice(0,h)+e.slice(h+g)).replace(/\n{3,}/g,`
|
|
4
4
|
|
|
@@ -14,4 +14,4 @@ import{Ma as e,Na as t}from"./vendor-BuarzSSb.js";import{n}from"./utils-B-9lSDIn
|
|
|
14
14
|
|
|
15
15
|
… [older streamed text omitted to protect memory] …
|
|
16
16
|
|
|
17
|
-
`+e.slice(e.length-(n-r))}var w=new WeakMap;function T(e){if(e===void 0)return 0;let t=typeof e==`object`&&!!e;if(t){let t=w.get(e);if(t!==void 0)return t}let n;try{n=JSON.stringify(e).length*2}catch{n=S*2}return t&&w.set(e,n),n}function E(e,t){let n=C(e.content,t),r=e.toolResult===void 0?void 0:C(e.toolResult,t),i=e.thinkingLog?{...e.thinkingLog,text:C(e.thinkingLog.text,t)}:void 0,a=T(e.toolInput)>t*2?`[tool input omitted from live transcript to protect memory]`:e.toolInput;return n===e.content&&r===e.toolResult&&i?.text===e.thinkingLog?.text&&a===e.toolInput?e:{...e,content:n,...r===void 0?{}:{toolResult:r},...i?{thinkingLog:i}:{},...a===void 0?{}:{toolInput:a}}}function D(e){let t=384+e.content.length*2+(e.toolResult?.length??0)*2+(e.thinkingLog?.text.length??0)*2+T(e.toolInput);for(let n of e.attachments??[])t+=(n.dataUrl?.length??0)*2+192;for(let n of e.sageLines??[])t+=n.length*2;for(let n of e.progressLines??[])t+=n.length*2;return t}function O(e,t={}){let n=Math.max(1,Math.floor(t.maxMessages??h)),r=Math.max(1,Math.floor(t.maxBytes??50331648)),i=Math.max(1,Math.floor(t.maxFieldChars??2097152)),a=[],o=0;for(let t=e.length-1;t>=0&&a.length<n;--t){let n=E(e[t],i),s=D(n);if(s>r&&n.attachments?.some(e=>e.dataUrl)&&(n={...n,attachments:n.attachments.map(e=>({...e,dataUrl:void 0}))},s=D(n)),a.length>0&&o+s>r)break;a.push(n),o+=s}return a.reverse(),a}function k(e){let t=new Map;for(let n of e)n.role===`tool`&&n.toolUseId&&t.set(n.toolUseId,n.id);return t}var A=
|
|
17
|
+
`+e.slice(e.length-(n-r))}var w=new WeakMap;function T(e){if(e===void 0)return 0;let t=typeof e==`object`&&!!e;if(t){let t=w.get(e);if(t!==void 0)return t}let n;try{n=JSON.stringify(e).length*2}catch{n=S*2}return t&&w.set(e,n),n}function E(e,t){let n=C(e.content,t),r=e.toolResult===void 0?void 0:C(e.toolResult,t),i=e.thinkingLog?{...e.thinkingLog,text:C(e.thinkingLog.text,t)}:void 0,a=T(e.toolInput)>t*2?`[tool input omitted from live transcript to protect memory]`:e.toolInput;return n===e.content&&r===e.toolResult&&i?.text===e.thinkingLog?.text&&a===e.toolInput?e:{...e,content:n,...r===void 0?{}:{toolResult:r},...i?{thinkingLog:i}:{},...a===void 0?{}:{toolInput:a}}}function D(e){let t=384+e.content.length*2+(e.toolResult?.length??0)*2+(e.thinkingLog?.text.length??0)*2+T(e.toolInput);for(let n of e.attachments??[])t+=(n.dataUrl?.length??0)*2+192;for(let n of e.sageLines??[])t+=n.length*2;for(let n of e.progressLines??[])t+=n.length*2;return t}function O(e,t={}){let n=Math.max(1,Math.floor(t.maxMessages??h)),r=Math.max(1,Math.floor(t.maxBytes??50331648)),i=Math.max(1,Math.floor(t.maxFieldChars??2097152)),a=[],o=0;for(let t=e.length-1;t>=0&&a.length<n;--t){let n=E(e[t],i),s=D(n);if(s>r&&n.attachments?.some(e=>e.dataUrl)&&(n={...n,attachments:n.attachments.map(e=>({...e,dataUrl:void 0}))},s=D(n)),a.length>0&&o+s>r)break;a.push(n),o+=s}return a.reverse(),a}function k(e){let t=new Map;for(let n of e)n.role===`tool`&&n.toolUseId&&t.set(n.toolUseId,n.id);return t}var A=e()(t((e,t)=>({messages:[],currentAssistantMessageId:null,currentToolId:null,isLoading:!1,abortController:null,executions:new Map,toolMessageIdsByUseId:new Map,queue:[],runStart:null,refining:!1,pendingRefinement:null,thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null,boundSessionId:null,addMessage:t=>{let r=`msg_${Date.now()}_${n().slice(0,8)}`,i={...t,id:r,timestamp:t.timestamp??Date.now()};return e(e=>{let n=O([...e.messages,i]),a=k(n),o=e.executions;if(o.size>0){let e=new Map,t=!1;for(let[n,r]of o)a.has(n)?e.set(n,r):t=!0;t&&(o=e)}let s={messages:n,currentAssistantMessageId:t.role===`assistant`?r:e.currentAssistantMessageId,toolMessageIdsByUseId:a};if(i.role===`tool`&&i.toolUseId){let e=new Map(a);e.set(i.toolUseId,r),s.toolMessageIdsByUseId=e}return o!==e.executions&&(s.executions=o),s}),r},setMessages:t=>{let n=O(t);e({messages:n,currentAssistantMessageId:null,currentToolId:null,executions:new Map,toolMessageIdsByUseId:k(n),thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null})},updateMessage:(t,n)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,...n}:e)}))},appendToMessage:(t,n)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,content:C(e.content+n)}:e)}))},finalizeMessage:(t,n)=>{let r=n?.final!==!1;e(e=>({messages:e.messages.map(e=>{if(e.id!==t)return e;if(e.role!==`assistant`)return{...e,content:m(e.content),streaming:!1};let n=c(e.content),i=r&&n.steps.length>0?{steps:n.steps}:void 0;return{...e,content:m(n.stripped),streaming:!1,...i?{nextSteps:i}:{}}})}))},setToolResult:(t,n,r)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,toolResult:C(n),isError:!r,progressLines:void 0}:e)}))},appendToolProgress:(e,n)=>{t().appendToolProgressLines(e,[n])},appendToolProgressLines:(t,n)=>{n.length!==0&&e(e=>({messages:e.messages.map(e=>{if(e.id!==t)return e;let r=e.progressLines??[];return r.push(...n),r.length>30&&r.splice(0,r.length-30),{...e,progressLines:r}})}))},getToolMessageId:e=>t().toolMessageIdsByUseId.get(e),setToolResultByUseId:(e,n,r)=>{let i=t().toolMessageIdsByUseId.get(e);i&&t().setToolResult(i,n,r)},appendToolProgressLinesByUseId:(e,n)=>{let r=t().toolMessageIdsByUseId.get(e);r&&t().appendToolProgressLines(r,n)},setLoading:t=>e({isLoading:t}),setAbortController:t=>e({abortController:t}),clearMessages:()=>e({messages:[],currentAssistantMessageId:null,currentToolId:null,executions:new Map,toolMessageIdsByUseId:new Map,thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null,boundSessionId:null}),setBoundSessionId:t=>e({boundSessionId:t}),setCurrentAssistantMessage:t=>e({currentAssistantMessageId:t}),setCurrentToolId:t=>e({currentToolId:t}),truncateAfter:t=>e(e=>{let n=e.messages.findIndex(e=>e.id===t);if(n===-1)return e;let r=e.messages.slice(0,n+1);return{messages:r,currentAssistantMessageId:null,currentToolId:null,toolMessageIdsByUseId:k(r)}}),addExecution:t=>{e(e=>{let n=new Map(e.executions);return n.set(t.id,t),{executions:n}})},updateExecution:(t,n)=>{e(e=>{let r=new Map(e.executions),i=r.get(t);return i&&r.set(t,{...i,...n}),{executions:r}})},setRefining:t=>e({refining:t}),setPendingRefinement:(t,n,r=`queue`)=>e({pendingRefinement:t===null?null:{text:t,images:n??[],mode:r}}),enqueue:(t,n=`queue`,r,i)=>{let a=Date.now(),o=++v;if(e(e=>({queue:[...e.queue,{text:t,mode:n,addedAt:a,itemId:o,...r?.length?{images:r}:{},...i?{alreadyDispatched:!0}:{}}]})),i){let e=setTimeout(()=>{g.delete(o);let e=null;A.setState(t=>{let n=t.queue.find(e=>e.itemId===o&&e.alreadyDispatched===!0);if(n&&n.bubbleAdded!==!0){let t=n.images??[];e={role:`user`,content:n.text,...t.length>0?{attachments:t.map(e=>({id:e.id,kind:`image`,dataUrl:e.dataUrl,mediaType:e.mediaType,bytes:e.bytes,name:e.name}))}:{}}}return{queue:t.queue.filter(e=>!(e.itemId===o&&e.alreadyDispatched===!0))}}),e&&A.getState().addMessage(e)},x);g.set(o,e)}},dequeue:()=>{let{queue:n}=t();if(n.length===0)return null;let[i,...a]=n;return i?.itemId!==void 0&&_(i.itemId),e({queue:a}),r(i)},dequeueDrainable:()=>{let t={popped:null,leadingBubbles:[]};e(e=>{let n=e.queue.findIndex(e=>e.alreadyDispatched!==!0);if(n===-1){for(let n of e.queue)if(n.alreadyDispatched===!0&&n.bubbleAdded!==!0){let e=n.images??[];t.leadingBubbles.push({role:`user`,content:n.text,...e.length>0?{attachments:e.map(e=>({id:e.id,kind:`image`,dataUrl:e.dataUrl,mediaType:e.mediaType,bytes:e.bytes,name:e.name}))}:{}})}return t.leadingBubbles.length===0?{}:{queue:e.queue.filter(e=>!(e.alreadyDispatched===!0&&e.bubbleAdded!==!0))}}for(let r=0;r<n;r+=1){let n=e.queue[r];if(n.bubbleAdded===!0)continue;let i=n.images??[];t.leadingBubbles.push({role:`user`,content:n.text,...i.length>0?{attachments:i.map(e=>({id:e.id,kind:`image`,dataUrl:e.dataUrl,mediaType:e.mediaType,bytes:e.bytes,name:e.name}))}:{}})}let r=e.queue[n],i=e.queue.map((e,t)=>t<n&&e.bubbleAdded!==!0&&e.alreadyDispatched===!0?{...e,bubbleAdded:!0}:e).slice(0,n).concat(e.queue.map((e,t)=>t<n&&e.bubbleAdded!==!0&&e.alreadyDispatched===!0?{...e,bubbleAdded:!0}:e).slice(n+1));return t.popped=r,{queue:i}});for(let e of t.leadingBubbles)A.getState().addMessage(e);let n=t.popped;return n?.itemId!==void 0&&_(n.itemId),n},removeQueued:t=>e(e=>{let n=e.queue[t];return n?.itemId!==void 0&&_(n.itemId),{queue:e.queue.filter((e,n)=>n!==t)}}),clearQueue:()=>{let t=Array.from(g.values());g.clear();for(let e of t)clearTimeout(e);e({queue:[]})},removeMessage:t=>e(e=>{let n=e.messages.filter(e=>e.id!==t);return{messages:n,toolMessageIdsByUseId:k(n)}}),updateLastUserMessage:t=>e(e=>{let n=e.messages;for(let e=n.length-1;e>=0;e--)if(n[e].role===`user`){let r={...n[e],content:t},i=[...n];return i[e]=r,{messages:i}}return e}),setRunStart:t=>e({runStart:t}),appendThinking:t=>e(e=>({thinkingBuffer:C(e.thinkingBuffer+t),thinkingStartedAt:e.thinkingStartedAt??Date.now(),thinkingLogBuffer:C(e.thinkingLogBuffer+t),thinkingLogStartedAt:e.thinkingLogStartedAt??Date.now()})),clearThinking:()=>e({thinkingBuffer:``,thinkingStartedAt:null}),flushThinkingLog:e=>{let{thinkingLogBuffer:n,thinkingLogStartedAt:r}=t(),i=n.trim();if(!i)return;let a=r??Date.now();t().addMessage({role:`system`,content:``,thinkingLog:{iteration:e,text:i,startedAt:a,durationMs:Math.max(0,Date.now()-a)}}),t().clearThinkingLog()},clearThinkingLog:()=>e({thinkingLogBuffer:``,thinkingLogStartedAt:null})}),{name:`wrongstack-chat`,version:3,partialize:e=>({messages:e.messages.slice(-200).map(e=>e.attachments?.some(e=>e.dataUrl)?{...e,attachments:e.attachments.map(e=>({...e,dataUrl:void 0}))}:e),queue:e.queue.filter(e=>e.alreadyDispatched!==!0).map(e=>e.images?{...e,images:void 0}:e),boundSessionId:e.boundSessionId,thinkingLogBuffer:e.thinkingLogBuffer}),migrate:(e,t)=>{if(t>3)return null;let n=e??{},r=Array.isArray(n.messages)?n.messages:[],i=Array.isArray(n.queue)?n.queue:[];t<3&&(i=i.filter(e=>typeof e==`object`&&!!e&&e.alreadyDispatched!==!0));let a=i.flatMap(e=>{let t=b(e);return t?[t]:[]});return{messages:O(r),queue:a,boundSessionId:typeof n.boundSessionId==`string`?n.boundSessionId:null,thinkingLogBuffer:typeof n.thinkingLogBuffer==`string`?n.thinkingLogBuffer:``}},onRehydrateStorage:()=>(e,t)=>{t||typeof window<`u`&&(window.__wrongstackChatRehydrated=!0)}}));export{r as a,p as i,i as n,c as r,A as t};
|
package/dist/assets/{codemap-activity-store-DQfjo7-j.js → codemap-activity-store-DBdfN0ix.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Na as e}from"./vendor-BuarzSSb.js";var t=8e3,n=2500,r=30*6e4,i=200,a=500,o={read:`read`,read_file:`read`,write:`write`,write_file:`write`,edit:`edit`,patch:`edit`,apply_patch:`edit`,replace:`edit`,delete:`delete`,delete_file:`delete`,remove:`delete`,grep:`search`,glob:`search`,search:`search`,"codebase-search":`search`,"codebase-index":`index`,remember:`memory`,forget:`memory`,memory_search:`memory`,memory_update:`memory`,memory_delete:`memory`};function s(e,t=``){return e===`rename`?`edit`:e in{read:1,write:1,edit:1,delete:1,search:1}?e:o[t]}function c(e){let t=[];for(let n of[`path`,`file`,`filePath`,`target`]){let r=e[n];typeof r==`string`&&t.push(r)}let n=e.files;if(typeof n==`string`&&t.push(n),Array.isArray(n))for(let e of n)typeof e==`string`&&t.push(e);return[...new Set(t)]}function l(e,t){let n=typeof t.old_string==`string`?t.old_string.trim():``,r=typeof t.new_string==`string`?t.new_string.trim():``;if(n||r)return`${n.replace(/\s+/g,` `).slice(0,42)||`∅`} → ${r.replace(/\s+/g,` `).slice(0,42)||`∅`}`;if(typeof t.patch==`string`){let n=d(t);return`${e} +${n?.added??0} −${n?.removed??0}`}let i=typeof t.content==`string`?t.content:void 0;if(i!==void 0){let t=i.length===0?0:i.split(/\r?\n/).length;return`${e} ${t} line${t===1?``:`s`}`}for(let e of[`query`,`pattern`,`old_string`,`new_string`,`text`,`command`]){let n=t[e];if(typeof n==`string`&&n.trim()){let t=n.trim().replace(/\s+/g,` `).slice(0,96);return e===`query`?`"${t}"`:e===`pattern`?`/${t}/`:e===`command`?`$ ${t}`:t}}return e}function u(e){return e.trim().replace(/\s+/g,` `).slice(0,72)}function d(e){let t=typeof e.old_string==`string`?e.old_string:void 0,n=typeof e.new_string==`string`?e.new_string:void 0;if(t!==void 0||n!==void 0){let e=t?t.split(/\r?\n/).length:0;return{added:n?n.split(/\r?\n/).length:0,removed:e,...t?{before:u(t)}:{},...n?{after:u(n)}:{}}}let r=typeof e.patch==`string`?e.patch:void 0;if(r){let e=r.split(/\r?\n/),t=e.filter(e=>e.startsWith(`+`)&&!e.startsWith(`+++`)),n=e.filter(e=>e.startsWith(`-`)&&!e.startsWith(`---`));return{added:t.length,removed:n.length,...n[0]?{before:u(n[0].slice(1))}:{},...t[0]?{after:u(t[0].slice(1))}:{}}}let i=typeof e.content==`string`?e.content:void 0;if(i!==void 0)return{added:i.length===0?0:i.split(/\r?\n/).length,removed:0,...i?{after:u(i)}:{}}}function f(e){let t=e.status??`observed`;return{...e,id:e.id??`${e.toolUseId??`event`}:${e.filePath}:${e.timestamp}`,status:t,source:e.source??`legacy`,agentName:e.agentName??e.agent,agent:e.agent??e.agentName}}function p(e,t){let n=e.get(t.filePath)??[];if(e.set(t.filePath,[t,...n].slice(0,i)),e.size<=a)return;let r=[...e.entries()].sort((e,t)=>(e[1][0]?.timestamp??0)-(t[1][0]?.timestamp??0))[0]?.[0];r&&e.delete(r)}function m(e){return`${e.sessionId??`unscoped`}:${e.agentId??e.agentName??e.agent??`external`}`}function h(e){let t=new Map;for(let n of e){let e=n.agentId??`external`,r=n.agentName??n.agent??`External process`,i=n.sessionId??`unscoped`,a=m(n),o=t.get(a);o?(o.operations.push(n),o.startedAt=Math.min(o.startedAt,n.timestamp)):t.set(a,{key:a,agentId:e,agentName:r,sessionId:i,operations:[n],startedAt:n.timestamp})}return[...t.values()].sort((e,t)=>e.startedAt-t.startedAt)}function g(e,t,n){let r=String(e.name??`unknown`),i=e.input&&typeof e.input==`object`?e.input:{},a=Date.now(),o=String(e.id??`${r}:${a}`),c=d(i);return(t.length>0?t:[{filePath:`(tool:${r})`,operation:`execute`}]).map((u,d)=>({id:`${o}:${d}`,toolUseId:o,filePath:u.filePath,type:u.operation===`execute`?`execute`:s(u.operation,r)??`edit`,toolName:r,summary:l(r,i),timestamp:a,status:n,source:`tool`,attribution:t.length>0?`exact`:`correlated`,...c?{change:c}:{},sessionId:typeof e.sessionId==`string`?e.sessionId:void 0,traceId:typeof e.traceId==`string`?e.traceId:void 0,agentId:typeof e.agentId==`string`?e.agentId:`leader`,agentName:typeof e.agentName==`string`?e.agentName:`LEADER`,...u.line?{line:u.line}:{},...u.endLine?{endLine:u.endLine}:{}}))}function _(e){let t=e.payload??{};if(e.type===`tool.started`||e.type===`tool.executed`||e.type===`codemap.tool_started`||e.type===`codemap.tool_executed`)return g(t,Array.isArray(t.fileTargets)?t.fileTargets:c(t.input&&typeof t.input==`object`?t.input:{}).map(e=>({filePath:e,operation:o[String(t.name??``)]??`edit`})),e.type===`tool.started`||e.type===`codemap.tool_started`?`active`:`completed`);if(e.type===`provider.response`){let e=t.blocks;if(!Array.isArray(e))return[];let n=[];for(let t of e){if(!t||typeof t!=`object`)continue;let e=t;if(e.type!==`tool_use`)continue;let r=String(e.name??``),i=o[r];if(!i)continue;let a=e.input&&typeof e.input==`object`?e.input:{},s=c(a),u=Date.now();s.length===0&&(i===`memory`||i===`search`||i===`index`)&&s.push(`(global)`);for(let e of s)n.push({filePath:e,type:i,toolName:r,summary:l(r,a),timestamp:u})}return n}if(e.type===`tool.progress`){let e=t.event&&typeof t.event==`object`?t.event:void 0;if(e?.type!==`file_changed`||typeof e.path!=`string`)return[];let n=String(e.operation??`edit`);return[{id:`${String(t.id??`progress`)}:${e.path}:${Date.now()}`,toolUseId:typeof t.id==`string`?t.id:void 0,filePath:e.path,type:s(n)??`edit`,toolName:String(t.name??`deterministic-tool`),summary:String(e.text??`tool reported file change`),timestamp:Date.now(),status:`active`,source:`deterministic`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,line:typeof e.line==`number`?e.line:void 0,endLine:typeof e.endLine==`number`?e.endLine:void 0,attribution:`exact`}]}if(e.type===`codemap.file_event`){let e=s(String(t.operation??`edit`))??`edit`;return typeof t.filePath==`string`?[{filePath:t.filePath,type:e,toolName:typeof t.toolName==`string`?t.toolName:String(t.source??`watcher`),summary:`${String(t.source??`external`)} ${String(t.operation??`changed`)}`,timestamp:typeof t.at==`number`?t.at:Date.now(),status:t.phase===`started`?`active`:`observed`,source:t.source??`external`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,toolUseId:typeof t.toolUseId==`string`?t.toolUseId:void 0,line:typeof t.line==`number`?t.line:void 0,endLine:typeof t.endLine==`number`?t.endLine:void 0}]:[]}return e.type===`file.saved`&&typeof t.filePath==`string`?[{filePath:t.filePath,type:`write`,toolName:`save`,summary:``,timestamp:Date.now(),source:`editor`}]:e.type===`memory.event`&&typeof t.event==`string`?[{filePath:`(memory)`,type:`memory`,toolName:`memory.${t.event}`,summary:String(t.memoryId??``),timestamp:Date.now()}]:[]}var v=e((e,i)=>({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0,recordActivity(n){let r=f(n);e(e=>{let n=new Map(e.history),i=new Map(e.pulses);return p(n,r),i.set(r.filePath,Date.now()+t),{history:n,pulses:i,totalCount:e.totalCount+1}})},startActivities(n){if(n.length===0)return;let r=n.map(e=>f({...e,status:`active`}));e(e=>{let n=new Map(e.history),i=new Map(e.pulses),a=new Map(e.activeOperations);for(let e of r)if(p(n,e),i.set(e.filePath,Date.now()+t),e.toolUseId){let t=a.get(e.toolUseId)??[];a.set(e.toolUseId,[...t,e])}return{history:n,pulses:i,activeOperations:a,totalCount:e.totalCount+r.length}})},finishTool(n,r){let i=r.timestamp??Date.now();e(e=>{let a=e.activeOperations.get(n)??[];if(a.length===0)return e;let o=new Map(e.history),s=new Map(e.pulses);for(let e of a){let a=o.get(e.filePath)??[];o.set(e.filePath,a.map(e=>e.toolUseId===n?{...e,status:r.ok?`completed`:`failed`,ok:r.ok,completedAt:i,durationMs:r.durationMs??i-e.timestamp}:e)),s.set(e.filePath,Date.now()+t)}let c=new Map(e.activeOperations);return c.delete(n),{history:o,pulses:s,activeOperations:c}})},recordFileEvent(r){let i=f({...r,attribution:r.attribution??(r.agentId?`exact`:`external`)});e(e=>{let r=(e.history.get(i.filePath)??[]).find(e=>e.source!==`watcher`&&e.source!==`external`&&Math.abs(i.timestamp-e.timestamp)<=n);if(r){let n=new Map(e.history);n.set(i.filePath,(n.get(i.filePath)??[]).map(e=>e.id===r.id?{...e,watcherConfirmed:e.watcherConfirmed||i.source===`watcher`||i.source===`editor`}:e));let a=new Map(e.pulses);return a.set(i.filePath,Date.now()+t),{history:n,pulses:a}}let a=i.toolUseId?e.activeOperations.get(i.toolUseId):void 0;if(a&&a.length>0){let n=a[0],r=f({...i,status:`active`,source:i.source??`deterministic`,sessionId:i.sessionId??n.sessionId,traceId:i.traceId??n.traceId,agentId:i.agentId??n.agentId,agentName:i.agentName??n.agentName,agent:i.agent??n.agent,attribution:`exact`}),o=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);return p(o,r),s.set(r.filePath,Date.now()+t),c.set(i.toolUseId,[...a,r]),{history:o,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let o=[...e.activeOperations.values()].flat().filter(e=>e.filePath.startsWith(`(tool:`)&&Math.abs(i.timestamp-e.timestamp)<=3e5);if(o.length===1){let n=o[0],r=f({...i,id:`${n.toolUseId}:${i.filePath}:${i.timestamp}`,toolUseId:n.toolUseId,toolName:n.toolName,summary:`${n.toolName} → filesystem ${i.type}`,status:`active`,source:`deterministic`,sessionId:n.sessionId,traceId:n.traceId,agentId:n.agentId,agentName:n.agentName,agent:n.agent,watcherConfirmed:!0,attribution:`correlated`}),a=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);if(p(a,r),s.set(r.filePath,Date.now()+t),r.toolUseId){let e=c.get(r.toolUseId)??[];c.set(r.toolUseId,[...e,r])}return{history:a,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let s=new Map(e.history),c=new Map(e.pulses);return p(s,i),c.set(i.filePath,Date.now()+t),{history:s,pulses:c,totalCount:e.totalCount+1}})},resolveActivitySymbol(t,n,r){e(e=>{let i=new Map(e.history);i.set(n,(i.get(n)??[]).map(e=>e.toolUseId===t?{...e,symbol:r}:e));let a=new Map(e.activeOperations),o=a.get(t);return o&&a.set(t,o.map(e=>e.filePath===n?{...e,symbol:r}:e)),{history:i,activeOperations:a}})},getActivityForFile(e){return i().history.get(e)??[]},getActiveForFile(e){return[...i().activeOperations.values()].flat().filter(t=>t.filePath===e)},getActiveOperations(){return[...i().activeOperations.values()].flat()},getAgentPresences(){return h(i().getActiveOperations())},getPulsingFiles(){return i()._sweep(),new Set(i().pulses.keys())},getPulseType(e){if(i()._sweep(),i().pulses.has(e))return i().history.get(e)?.[0]?.type},clear(){e({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0})},_sweep(){let t=Date.now(),n=[...i().pulses].filter(([,e])=>e<t).map(([e])=>e),a=[...i().activeOperations].filter(([,e])=>e.every(e=>t-e.timestamp>r)).map(([e])=>e);n.length===0&&a.length===0||e(e=>{let r=new Map(e.pulses);for(let e of n)r.delete(e);if(a.length===0)return{pulses:r};let i=new Map(e.history),o=new Map(e.activeOperations);for(let e of a){for(let n of o.get(e)??[])i.set(n.filePath,(i.get(n.filePath)??[]).map(n=>n.toolUseId===e?{...n,status:`failed`,ok:!1,completedAt:t,durationMs:t-n.timestamp,summary:`${n.summary||n.toolName} · telemetry timeout`}:n));o.delete(e)}return{pulses:r,history:i,activeOperations:o}})}}));export{v as i,_ as n,h as r,m as t};
|
|
1
|
+
import{Fa as e}from"./vendor-AeHpGMaG.js";var t=8e3,n=2500,r=30*6e4,i=200,a=500,o={read:`read`,read_file:`read`,write:`write`,write_file:`write`,edit:`edit`,patch:`edit`,apply_patch:`edit`,replace:`edit`,delete:`delete`,delete_file:`delete`,remove:`delete`,grep:`search`,glob:`search`,search:`search`,"codebase-search":`search`,"codebase-index":`index`,remember:`memory`,forget:`memory`,memory_search:`memory`,memory_update:`memory`,memory_delete:`memory`};function s(e,t=``){return e===`rename`?`edit`:e in{read:1,write:1,edit:1,delete:1,search:1}?e:o[t]}function c(e){let t=[];for(let n of[`path`,`file`,`filePath`,`target`]){let r=e[n];typeof r==`string`&&t.push(r)}let n=e.files;if(typeof n==`string`&&t.push(n),Array.isArray(n))for(let e of n)typeof e==`string`&&t.push(e);return[...new Set(t)]}function l(e,t){let n=typeof t.old_string==`string`?t.old_string.trim():``,r=typeof t.new_string==`string`?t.new_string.trim():``;if(n||r)return`${n.replace(/\s+/g,` `).slice(0,42)||`∅`} → ${r.replace(/\s+/g,` `).slice(0,42)||`∅`}`;if(typeof t.patch==`string`){let n=d(t);return`${e} +${n?.added??0} −${n?.removed??0}`}let i=typeof t.content==`string`?t.content:void 0;if(i!==void 0){let t=i.length===0?0:i.split(/\r?\n/).length;return`${e} ${t} line${t===1?``:`s`}`}for(let e of[`query`,`pattern`,`old_string`,`new_string`,`text`,`command`]){let n=t[e];if(typeof n==`string`&&n.trim()){let t=n.trim().replace(/\s+/g,` `).slice(0,96);return e===`query`?`"${t}"`:e===`pattern`?`/${t}/`:e===`command`?`$ ${t}`:t}}return e}function u(e){return e.trim().replace(/\s+/g,` `).slice(0,72)}function d(e){let t=typeof e.old_string==`string`?e.old_string:void 0,n=typeof e.new_string==`string`?e.new_string:void 0;if(t!==void 0||n!==void 0){let e=t?t.split(/\r?\n/).length:0;return{added:n?n.split(/\r?\n/).length:0,removed:e,...t?{before:u(t)}:{},...n?{after:u(n)}:{}}}let r=typeof e.patch==`string`?e.patch:void 0;if(r){let e=r.split(/\r?\n/),t=e.filter(e=>e.startsWith(`+`)&&!e.startsWith(`+++`)),n=e.filter(e=>e.startsWith(`-`)&&!e.startsWith(`---`));return{added:t.length,removed:n.length,...n[0]?{before:u(n[0].slice(1))}:{},...t[0]?{after:u(t[0].slice(1))}:{}}}let i=typeof e.content==`string`?e.content:void 0;if(i!==void 0)return{added:i.length===0?0:i.split(/\r?\n/).length,removed:0,...i?{after:u(i)}:{}}}function f(e){let t=e.status??`observed`;return{...e,id:e.id??`${e.toolUseId??`event`}:${e.filePath}:${e.timestamp}`,status:t,source:e.source??`legacy`,agentName:e.agentName??e.agent,agent:e.agent??e.agentName}}function p(e,t){let n=e.get(t.filePath)??[];if(e.set(t.filePath,[t,...n].slice(0,i)),e.size<=a)return;let r=[...e.entries()].sort((e,t)=>(e[1][0]?.timestamp??0)-(t[1][0]?.timestamp??0))[0]?.[0];r&&e.delete(r)}function m(e){return`${e.sessionId??`unscoped`}:${e.agentId??e.agentName??e.agent??`external`}`}function h(e){let t=new Map;for(let n of e){let e=n.agentId??`external`,r=n.agentName??n.agent??`External process`,i=n.sessionId??`unscoped`,a=m(n),o=t.get(a);o?(o.operations.push(n),o.startedAt=Math.min(o.startedAt,n.timestamp)):t.set(a,{key:a,agentId:e,agentName:r,sessionId:i,operations:[n],startedAt:n.timestamp})}return[...t.values()].sort((e,t)=>e.startedAt-t.startedAt)}function g(e,t,n){let r=String(e.name??`unknown`),i=e.input&&typeof e.input==`object`?e.input:{},a=Date.now(),o=String(e.id??`${r}:${a}`),c=d(i);return(t.length>0?t:[{filePath:`(tool:${r})`,operation:`execute`}]).map((u,d)=>({id:`${o}:${d}`,toolUseId:o,filePath:u.filePath,type:u.operation===`execute`?`execute`:s(u.operation,r)??`edit`,toolName:r,summary:l(r,i),timestamp:a,status:n,source:`tool`,attribution:t.length>0?`exact`:`correlated`,...c?{change:c}:{},sessionId:typeof e.sessionId==`string`?e.sessionId:void 0,traceId:typeof e.traceId==`string`?e.traceId:void 0,agentId:typeof e.agentId==`string`?e.agentId:`leader`,agentName:typeof e.agentName==`string`?e.agentName:`LEADER`,...u.line?{line:u.line}:{},...u.endLine?{endLine:u.endLine}:{}}))}function _(e){let t=e.payload??{};if(e.type===`tool.started`||e.type===`tool.executed`||e.type===`codemap.tool_started`||e.type===`codemap.tool_executed`)return g(t,Array.isArray(t.fileTargets)?t.fileTargets:c(t.input&&typeof t.input==`object`?t.input:{}).map(e=>({filePath:e,operation:o[String(t.name??``)]??`edit`})),e.type===`tool.started`||e.type===`codemap.tool_started`?`active`:`completed`);if(e.type===`provider.response`){let e=t.blocks;if(!Array.isArray(e))return[];let n=[];for(let t of e){if(!t||typeof t!=`object`)continue;let e=t;if(e.type!==`tool_use`)continue;let r=String(e.name??``),i=o[r];if(!i)continue;let a=e.input&&typeof e.input==`object`?e.input:{},s=c(a),u=Date.now();s.length===0&&(i===`memory`||i===`search`||i===`index`)&&s.push(`(global)`);for(let e of s)n.push({filePath:e,type:i,toolName:r,summary:l(r,a),timestamp:u})}return n}if(e.type===`tool.progress`){let e=t.event&&typeof t.event==`object`?t.event:void 0;if(e?.type!==`file_changed`||typeof e.path!=`string`)return[];let n=String(e.operation??`edit`);return[{id:`${String(t.id??`progress`)}:${e.path}:${Date.now()}`,toolUseId:typeof t.id==`string`?t.id:void 0,filePath:e.path,type:s(n)??`edit`,toolName:String(t.name??`deterministic-tool`),summary:String(e.text??`tool reported file change`),timestamp:Date.now(),status:`active`,source:`deterministic`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,line:typeof e.line==`number`?e.line:void 0,endLine:typeof e.endLine==`number`?e.endLine:void 0,attribution:`exact`}]}if(e.type===`codemap.file_event`){let e=s(String(t.operation??`edit`))??`edit`;return typeof t.filePath==`string`?[{filePath:t.filePath,type:e,toolName:typeof t.toolName==`string`?t.toolName:String(t.source??`watcher`),summary:`${String(t.source??`external`)} ${String(t.operation??`changed`)}`,timestamp:typeof t.at==`number`?t.at:Date.now(),status:t.phase===`started`?`active`:`observed`,source:t.source??`external`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,toolUseId:typeof t.toolUseId==`string`?t.toolUseId:void 0,line:typeof t.line==`number`?t.line:void 0,endLine:typeof t.endLine==`number`?t.endLine:void 0}]:[]}return e.type===`file.saved`&&typeof t.filePath==`string`?[{filePath:t.filePath,type:`write`,toolName:`save`,summary:``,timestamp:Date.now(),source:`editor`}]:e.type===`memory.event`&&typeof t.event==`string`?[{filePath:`(memory)`,type:`memory`,toolName:`memory.${t.event}`,summary:String(t.memoryId??``),timestamp:Date.now()}]:[]}var v=e((e,i)=>({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0,recordActivity(n){let r=f(n);e(e=>{let n=new Map(e.history),i=new Map(e.pulses);return p(n,r),i.set(r.filePath,Date.now()+t),{history:n,pulses:i,totalCount:e.totalCount+1}})},startActivities(n){if(n.length===0)return;let r=n.map(e=>f({...e,status:`active`}));e(e=>{let n=new Map(e.history),i=new Map(e.pulses),a=new Map(e.activeOperations);for(let e of r)if(p(n,e),i.set(e.filePath,Date.now()+t),e.toolUseId){let t=a.get(e.toolUseId)??[];a.set(e.toolUseId,[...t,e])}return{history:n,pulses:i,activeOperations:a,totalCount:e.totalCount+r.length}})},finishTool(n,r){let i=r.timestamp??Date.now();e(e=>{let a=e.activeOperations.get(n)??[];if(a.length===0)return e;let o=new Map(e.history),s=new Map(e.pulses);for(let e of a){let a=o.get(e.filePath)??[];o.set(e.filePath,a.map(e=>e.toolUseId===n?{...e,status:r.ok?`completed`:`failed`,ok:r.ok,completedAt:i,durationMs:r.durationMs??i-e.timestamp}:e)),s.set(e.filePath,Date.now()+t)}let c=new Map(e.activeOperations);return c.delete(n),{history:o,pulses:s,activeOperations:c}})},recordFileEvent(r){let i=f({...r,attribution:r.attribution??(r.agentId?`exact`:`external`)});e(e=>{let r=(e.history.get(i.filePath)??[]).find(e=>e.source!==`watcher`&&e.source!==`external`&&Math.abs(i.timestamp-e.timestamp)<=n);if(r){let n=new Map(e.history);n.set(i.filePath,(n.get(i.filePath)??[]).map(e=>e.id===r.id?{...e,watcherConfirmed:e.watcherConfirmed||i.source===`watcher`||i.source===`editor`}:e));let a=new Map(e.pulses);return a.set(i.filePath,Date.now()+t),{history:n,pulses:a}}let a=i.toolUseId?e.activeOperations.get(i.toolUseId):void 0;if(a&&a.length>0){let n=a[0],r=f({...i,status:`active`,source:i.source??`deterministic`,sessionId:i.sessionId??n.sessionId,traceId:i.traceId??n.traceId,agentId:i.agentId??n.agentId,agentName:i.agentName??n.agentName,agent:i.agent??n.agent,attribution:`exact`}),o=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);return p(o,r),s.set(r.filePath,Date.now()+t),c.set(i.toolUseId,[...a,r]),{history:o,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let o=[...e.activeOperations.values()].flat().filter(e=>e.filePath.startsWith(`(tool:`)&&Math.abs(i.timestamp-e.timestamp)<=3e5);if(o.length===1){let n=o[0],r=f({...i,id:`${n.toolUseId}:${i.filePath}:${i.timestamp}`,toolUseId:n.toolUseId,toolName:n.toolName,summary:`${n.toolName} → filesystem ${i.type}`,status:`active`,source:`deterministic`,sessionId:n.sessionId,traceId:n.traceId,agentId:n.agentId,agentName:n.agentName,agent:n.agent,watcherConfirmed:!0,attribution:`correlated`}),a=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);if(p(a,r),s.set(r.filePath,Date.now()+t),r.toolUseId){let e=c.get(r.toolUseId)??[];c.set(r.toolUseId,[...e,r])}return{history:a,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let s=new Map(e.history),c=new Map(e.pulses);return p(s,i),c.set(i.filePath,Date.now()+t),{history:s,pulses:c,totalCount:e.totalCount+1}})},resolveActivitySymbol(t,n,r){e(e=>{let i=new Map(e.history);i.set(n,(i.get(n)??[]).map(e=>e.toolUseId===t?{...e,symbol:r}:e));let a=new Map(e.activeOperations),o=a.get(t);return o&&a.set(t,o.map(e=>e.filePath===n?{...e,symbol:r}:e)),{history:i,activeOperations:a}})},getActivityForFile(e){return i().history.get(e)??[]},getActiveForFile(e){return[...i().activeOperations.values()].flat().filter(t=>t.filePath===e)},getActiveOperations(){return[...i().activeOperations.values()].flat()},getAgentPresences(){return h(i().getActiveOperations())},getPulsingFiles(){return i()._sweep(),new Set(i().pulses.keys())},getPulseType(e){if(i()._sweep(),i().pulses.has(e))return i().history.get(e)?.[0]?.type},clear(){e({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0})},_sweep(){let t=Date.now(),n=[...i().pulses].filter(([,e])=>e<t).map(([e])=>e),a=[...i().activeOperations].filter(([,e])=>e.every(e=>t-e.timestamp>r)).map(([e])=>e);n.length===0&&a.length===0||e(e=>{let r=new Map(e.pulses);for(let e of n)r.delete(e);if(a.length===0)return{pulses:r};let i=new Map(e.history),o=new Map(e.activeOperations);for(let e of a){for(let n of o.get(e)??[])i.set(n.filePath,(i.get(n.filePath)??[]).map(n=>n.toolUseId===e?{...n,status:`failed`,ok:!1,completedAt:t,durationMs:t-n.timestamp,summary:`${n.summary||n.toolName} · telemetry timeout`}:n));o.delete(e)}return{pulses:r,history:i,activeOperations:o}})}}));export{v as i,_ as n,h as r,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fa as e}from"./vendor-AeHpGMaG.js";var t=e(e=>({generation:0,lastUpdatedAt:null,notifyIndexUpdated(t=Date.now()){e(e=>({generation:e.generation+1,lastUpdatedAt:t}))}}));export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{G as t,J as n,K as r,U as i,
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{G as t,J as n,K as r,U as i,Va as a,W as o,Y as s,dt as c,lt as l,q as u}from"./vendor-AeHpGMaG.js";import{t as d}from"./utils-D1fGupR8.js";var f=e(a(),1),p=l(),m=i,h=n,g=f.forwardRef(({className:e,...t},n)=>(0,p.jsx)(u,{ref:n,className:d(`fixed inset-0 z-50 bg-black/65 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));g.displayName=u.displayName;var _=f.forwardRef(({className:e,children:n,showCloseButton:r=!0,...i},a)=>(0,p.jsxs)(h,{children:[(0,p.jsx)(g,{}),(0,p.jsxs)(t,{ref:a,className:d(`fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100vw-1.5rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border/70 bg-card p-5 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:p-6`,e),...i,children:[n,r&&(0,p.jsxs)(o,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,p.jsx)(c,{className:`h-4 w-4`}),(0,p.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));_.displayName=t.displayName;var v=({className:e,...t})=>(0,p.jsx)(`div`,{className:d(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});v.displayName=`DialogHeader`;var y=({className:e,...t})=>(0,p.jsx)(`div`,{className:d(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});y.displayName=`DialogFooter`;var b=f.forwardRef(({className:e,...t},n)=>(0,p.jsx)(s,{ref:n,className:d(`text-lg font-semibold leading-none`,e),...t}));b.displayName=s.displayName;var x=f.forwardRef(({className:e,...t},n)=>(0,p.jsx)(r,{ref:n,className:d(`text-sm text-muted-foreground`,e),...t}));x.displayName=r.displayName;export{v as a,y as i,_ as n,b as o,x as r,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{lt as e}from"./vendor-
|
|
1
|
+
import{lt as e}from"./vendor-AeHpGMaG.js";import{t}from"./utils-D1fGupR8.js";var n=e();function r({icon:e,title:r,description:i,action:a,className:o,panel:s=!0}){return(0,n.jsx)(`div`,{className:t(`flex min-h-0 min-w-0 flex-1 items-center justify-center p-4`,s&&`bg-[hsl(var(--surface-2)/0.45)]`,o),children:(0,n.jsxs)(`div`,{className:`ws-surface flex max-w-md flex-col items-center gap-3 rounded-xl p-6 text-center text-muted-foreground`,children:[e&&(0,n.jsx)(`span`,{className:`flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:e}),(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`p`,{className:`text-base font-semibold text-foreground`,children:r}),i&&(0,n.jsx)(`p`,{className:`mt-1 text-sm`,children:i})]}),a&&(0,n.jsx)(`button`,{type:`button`,onClick:a.onClick,className:`mt-1 rounded-md border border-border/70 bg-card/70 px-4 py-2 text-sm text-foreground shadow-sm transition-colors hover:bg-accent`,children:a.label})]})})}export{r as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/activity-Dg9Q9kwt.js","assets/rolldown-runtime-QTnfLwEv.js","assets/chat-CdiY7G6Z.js","assets/commandPalette-DpaemFux.js","assets/common-COVxQ0FV.js","assets/settings-t7_uBgp_.js","assets/setup-BFcmn89w.js","assets/toasts-BL_8kH4B.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Fa as e,La as t,Pa as n,Ra as r,za as i}from"./vendor-AeHpGMaG.js";import{t as a}from"./activity-Dg9Q9kwt.js";import{t as o}from"./chat-CdiY7G6Z.js";import{t as s}from"./commandPalette-DpaemFux.js";import{t as c}from"./common-COVxQ0FV.js";import{t as l}from"./settings-t7_uBgp_.js";import{t as u}from"./setup-BFcmn89w.js";import{t as d}from"./toasts-BL_8kH4B.js";import{s as f}from"./monaco-BLUV5g0U.js";var p=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},m=[`en`,`tr`,`de`,`fr`,`it`,`es`,`pt-BR`],h=[{code:`en`,name:`English`},{code:`tr`,name:`Türkçe`},{code:`de`,name:`Deutsch`},{code:`fr`,name:`Français`},{code:`it`,name:`Italiano`},{code:`es`,name:`Español`},{code:`pt-BR`,name:`Português (Brasil)`}],g=new Set(m);function _(){return typeof navigator>`u`||!navigator.language?`en`:y(navigator.language)}function v(e){return!e||typeof e!=`string`?_():y(e)}function y(e){let t=e.trim().toLowerCase();if(!t)return`en`;if(g.has(t))return t;let n=t.split(`-`)[0];return n&&g.has(n)?n:n===`pt`?`pt-BR`:`en`}var b={autonomy:`auto`,autonomyDelayMs:45e3,autoProceedMaxIterations:50,yolo:!0,maxIterations:500,chime:!1,confirmExit:!0,fleetChatVerbosity:`off`,nextPrediction:!1,nextStepsTool:!1,fallbackModels:[],fallbackProfiles:{},favoriteModels:[],favoriteModelsOnly:!1,modelMatrix:{},fallbackAuto:!0,modelAvailabilitySchedule:[],featureMcp:!0,featurePlugins:!0,featureMemory:!0,featureSkills:!0,featureModelsRegistry:!0,indexOnStart:!0,contextAutoCompact:!0,contextStrategy:`hybrid`,contextMode:`balanced`,tokenSavingTier:`auto`,maxConcurrent:10,titleAnimation:!0,logLevel:`info`,auditLevel:`standard`,enhanceEnabled:!0,enhanceDelayMs:6e4,enhanceCountdownMs:3e3,enhanceLanguage:`original`,refinerProvider:``,refinerModel:``,refinerFallbackProfile:``,thinkingWord:`thinking`,statuslineMode:`minimum`,animationStyle:`rainbow`,showThinkingLogs:!0,groupToolCalls:!0,autoCollapseInput:!1,showModelReasoning:!0,showAgentSwarmPanel:`bottom`,allowOutsideProjectRoot:!0,reasoningMode:`auto`,reasoningEffort:`high`,reasoningPreserve:!1,cacheTtl:`default`,breakerEnabled:!1,breakerAutoKillResetMs:6e4,fsAccess:`unrestricted`,debugStream:!1,hqEnabled:!1,hqUrl:``,hqToken:``,hqRawContent:!1,tgConfigured:!1,tgSessionEnd:!1,tgDelegate:!0,tgLongToolMs:3e4,uiLocale:_(),chimeraAutoFix:`off`,readSymbols:!1,showSageMemoryInject:!1,sageMemoryInjectThreshold:.85,preRefineSeconds:3,multiDiffSummaryThreshold:5,chimeraEnabled:!0,chimeraProvider:``,chimeraModel:``,chimeraMaxFiles:15,autoReviewEnabled:!1,autoReviewProvider:``,autoReviewModel:``,autoReviewFallbackProfile:``,autoReviewModelSelection:`round-robin`,autoReviewFallbackModels:[],autoReviewDebounceMs:15e3,autoReviewMaxFilesPerBatch:15,autoReviewMaxConcurrentReviews:2,autoReviewCascadeOn:`off`,pluginsEnabled:{}},x=e()(n(e=>({...b,set:t=>e(t),reset:()=>e(b)}),{name:`wrongstack-local-prefs`,version:15,migrate:(e,t)=>{let n=e??{};return t<12&&n.autoReviewDebounceMs===5e3&&(n.autoReviewDebounceMs=15e3),typeof n.fleetChatVerbosity!=`string`&&(n.streamFleet===!0?n.fleetChatVerbosity=`full`:(n.streamFleet,n.fleetChatVerbosity=`off`),delete n.streamFleet),n.fleetChatVerbosity!==`off`&&n.fleetChatVerbosity!==`full`&&(n.fleetChatVerbosity=`off`),[`hybrid`,`intelligent`,`selective`].includes(n.contextStrategy)||(n.contextStrategy=`hybrid`),n.auditLevel===`verbose`&&(n.auditLevel=`full`),[`minimal`,`standard`,`full`].includes(n.auditLevel)||(n.auditLevel=`standard`),typeof n.autoProceedMaxIterations!=`number`&&(n.autoProceedMaxIterations=50),(!n.fallbackProfiles||typeof n.fallbackProfiles!=`object`||Array.isArray(n.fallbackProfiles))&&(n.fallbackProfiles={}),Array.isArray(n.favoriteModels)||(n.favoriteModels=[]),typeof n.favoriteModelsOnly!=`boolean`&&(n.favoriteModelsOnly=!1),Array.isArray(n.modelAvailabilitySchedule)||(n.modelAvailabilitySchedule=[]),(!n.modelMatrix||typeof n.modelMatrix!=`object`||Array.isArray(n.modelMatrix))&&(n.modelMatrix={}),(typeof n.uiLocale!=`string`||!n.uiLocale)&&(n.uiLocale=_()),typeof n.breakerEnabled!=`boolean`&&(n.breakerEnabled=!1),typeof n.breakerAutoKillResetMs!=`number`&&(n.breakerAutoKillResetMs=6e4),n.fsAccess!==`unrestricted`&&n.fsAccess!==`project`&&(n.fsAccess=`unrestricted`),typeof n.debugStream!=`boolean`&&(n.debugStream=!1),typeof n.chimeraEnabled!=`boolean`&&(n.chimeraEnabled=!0),typeof n.chimeraProvider!=`string`&&(n.chimeraProvider=``),typeof n.chimeraModel!=`string`&&(n.chimeraModel=``),n.chimeraAutoFix!==`off`&&n.chimeraAutoFix!==`ask`&&n.chimeraAutoFix!==`auto`&&(n.chimeraAutoFix=`off`),(typeof n.chimeraMaxFiles!=`number`||!Number.isFinite(n.chimeraMaxFiles)||n.chimeraMaxFiles<1)&&(n.chimeraMaxFiles=15),typeof n.autoReviewEnabled!=`boolean`&&(n.autoReviewEnabled=!1),typeof n.autoReviewProvider!=`string`&&(n.autoReviewProvider=``),typeof n.autoReviewModel!=`string`&&(n.autoReviewModel=``),typeof n.autoReviewFallbackProfile!=`string`&&(n.autoReviewFallbackProfile=``),n.autoReviewModelSelection!==`round-robin`&&n.autoReviewModelSelection!==`random`&&(n.autoReviewModelSelection=`round-robin`),Array.isArray(n.autoReviewFallbackModels)||(n.autoReviewFallbackModels=[]),(typeof n.autoReviewDebounceMs!=`number`||!Number.isFinite(n.autoReviewDebounceMs)||n.autoReviewDebounceMs<0)&&(n.autoReviewDebounceMs=15e3),(typeof n.autoReviewMaxFilesPerBatch!=`number`||!Number.isFinite(n.autoReviewMaxFilesPerBatch)||n.autoReviewMaxFilesPerBatch<1)&&(n.autoReviewMaxFilesPerBatch=15),(typeof n.autoReviewMaxConcurrentReviews!=`number`||!Number.isFinite(n.autoReviewMaxConcurrentReviews)||n.autoReviewMaxConcurrentReviews<1)&&(n.autoReviewMaxConcurrentReviews=2),n.autoReviewCascadeOn!==`off`&&n.autoReviewCascadeOn!==`critical`&&n.autoReviewCascadeOn!==`high`&&(n.autoReviewCascadeOn=`off`),typeof n.showModelReasoning!=`boolean`&&(n.showModelReasoning=!0),typeof n.autoCollapseInput!=`boolean`&&(n.autoCollapseInput=!1),typeof n.showAgentSwarmPanel==`boolean`?n.showAgentSwarmPanel=n.showAgentSwarmPanel?`bottom`:`off`:(typeof n.showAgentSwarmPanel!=`string`||![`bottom`,`sidebar`,`off`].includes(n.showAgentSwarmPanel))&&(n.showAgentSwarmPanel=`bottom`),typeof n.allowOutsideProjectRoot!=`boolean`&&(n.allowOutsideProjectRoot=!0),typeof n.readSymbols!=`boolean`&&(n.readSymbols=!1),typeof n.showSageMemoryInject!=`boolean`&&(n.showSageMemoryInject=!1),(typeof n.sageMemoryInjectThreshold!=`number`||!Number.isFinite(n.sageMemoryInjectThreshold)||n.sageMemoryInjectThreshold<0||n.sageMemoryInjectThreshold>1)&&(n.sageMemoryInjectThreshold=.85),(typeof n.preRefineSeconds!=`number`||!Number.isFinite(n.preRefineSeconds)||n.preRefineSeconds<0)&&(n.preRefineSeconds=3),(typeof n.multiDiffSummaryThreshold!=`number`||!Number.isFinite(n.multiDiffSummaryThreshold)||n.multiDiffSummaryThreshold<0)&&(n.multiDiffSummaryThreshold=5),n},partialize:e=>{let{hqToken:t,...n}=e;return n},merge:(e,t)=>{let{hqToken:n,...r}=e??{};return{...t,...r,hqToken:``}}})),S=[`common`,`activity`,`chat`,`commandPalette`,`settings`,`setup`,`toasts`];function C(){try{return v(x.getState().uiLocale)}catch{return`en`}}i.use(t).use(r((e,t)=>p(Object.assign({"./locales/de/activity.json":()=>f(()=>import(`./activity-L2_b8Uan.js`),[]),"./locales/de/chat.json":()=>f(()=>import(`./chat-BnkVCZ3Q.js`),[]),"./locales/de/commandPalette.json":()=>f(()=>import(`./commandPalette-aaAou3Tl.js`),[]),"./locales/de/common.json":()=>f(()=>import(`./common-BiNu_WzQ.js`),[]),"./locales/de/settings.json":()=>f(()=>import(`./settings-CZR4viP9.js`),[]),"./locales/de/setup.json":()=>f(()=>import(`./setup-DD8rKpQU.js`),[]),"./locales/de/toasts.json":()=>f(()=>import(`./toasts-CFzweRH5.js`),[]),"./locales/en/activity.json":()=>f(()=>import(`./activity-Dg9Q9kwt.js`).then(e=>e.n),__vite__mapDeps([0,1])),"./locales/en/chat.json":()=>f(()=>import(`./chat-CdiY7G6Z.js`).then(e=>e.n),__vite__mapDeps([2,1])),"./locales/en/commandPalette.json":()=>f(()=>import(`./commandPalette-DpaemFux.js`).then(e=>e.n),__vite__mapDeps([3,1])),"./locales/en/common.json":()=>f(()=>import(`./common-COVxQ0FV.js`).then(e=>e.n),__vite__mapDeps([4,1])),"./locales/en/settings.json":()=>f(()=>import(`./settings-t7_uBgp_.js`).then(e=>e.n),__vite__mapDeps([5,1])),"./locales/en/setup.json":()=>f(()=>import(`./setup-BFcmn89w.js`).then(e=>e.n),__vite__mapDeps([6,1])),"./locales/en/toasts.json":()=>f(()=>import(`./toasts-BL_8kH4B.js`).then(e=>e.n),__vite__mapDeps([7,1])),"./locales/es/activity.json":()=>f(()=>import(`./activity-gB90peLu.js`),[]),"./locales/es/chat.json":()=>f(()=>import(`./chat-BPuAsrkF.js`),[]),"./locales/es/commandPalette.json":()=>f(()=>import(`./commandPalette-Nlxs0V7J.js`),[]),"./locales/es/common.json":()=>f(()=>import(`./common-BXJbu5Y-.js`),[]),"./locales/es/settings.json":()=>f(()=>import(`./settings-BxL8m0v6.js`),[]),"./locales/es/setup.json":()=>f(()=>import(`./setup-COxU-AT_.js`),[]),"./locales/es/toasts.json":()=>f(()=>import(`./toasts-BwQJwYLe.js`),[]),"./locales/fr/activity.json":()=>f(()=>import(`./activity-Dzgvt4Nh.js`),[]),"./locales/fr/chat.json":()=>f(()=>import(`./chat-BfQBSiII.js`),[]),"./locales/fr/commandPalette.json":()=>f(()=>import(`./commandPalette-Dfk74u87.js`),[]),"./locales/fr/common.json":()=>f(()=>import(`./common-Ch7JihXD.js`),[]),"./locales/fr/settings.json":()=>f(()=>import(`./settings-Bq1PPj3V.js`),[]),"./locales/fr/setup.json":()=>f(()=>import(`./setup-CMteRkTs.js`),[]),"./locales/fr/toasts.json":()=>f(()=>import(`./toasts-BCDGDcyq.js`),[]),"./locales/it/activity.json":()=>f(()=>import(`./activity-Dr_u3dOm.js`),[]),"./locales/it/chat.json":()=>f(()=>import(`./chat-CR2B97dj.js`),[]),"./locales/it/commandPalette.json":()=>f(()=>import(`./commandPalette-CUh_kgfp.js`),[]),"./locales/it/common.json":()=>f(()=>import(`./common-DPaTeTls.js`),[]),"./locales/it/settings.json":()=>f(()=>import(`./settings-L8hBHrGD.js`),[]),"./locales/it/setup.json":()=>f(()=>import(`./setup-pPW1kVR_.js`),[]),"./locales/it/toasts.json":()=>f(()=>import(`./toasts-Dm12Nq8t.js`),[]),"./locales/pt-BR/activity.json":()=>f(()=>import(`./activity-IttuV5ar.js`),[]),"./locales/pt-BR/chat.json":()=>f(()=>import(`./chat-DResBrkV.js`),[]),"./locales/pt-BR/commandPalette.json":()=>f(()=>import(`./commandPalette-tFxIIhvU.js`),[]),"./locales/pt-BR/common.json":()=>f(()=>import(`./common-DdGpRh8j.js`),[]),"./locales/pt-BR/settings.json":()=>f(()=>import(`./settings-4A6zNjep.js`),[]),"./locales/pt-BR/setup.json":()=>f(()=>import(`./setup-BOYK0I6-.js`),[]),"./locales/pt-BR/toasts.json":()=>f(()=>import(`./toasts-frBt6fvE.js`),[]),"./locales/tr/activity.json":()=>f(()=>import(`./activity-BI4XyF_x.js`),[]),"./locales/tr/chat.json":()=>f(()=>import(`./chat-Di8o0wDz.js`),[]),"./locales/tr/commandPalette.json":()=>f(()=>import(`./commandPalette-CGMq-qlP.js`),[]),"./locales/tr/common.json":()=>f(()=>import(`./common-pI6fYZW3.js`),[]),"./locales/tr/settings.json":()=>f(()=>import(`./settings-uLdezc9e.js`),[]),"./locales/tr/setup.json":()=>f(()=>import(`./setup-Bd23KLtt.js`),[]),"./locales/tr/toasts.json":()=>f(()=>import(`./toasts-DDYQsJV8.js`),[])}),`./locales/${e}/${t}.json`,4))).init({lng:C(),fallbackLng:`en`,supportedLngs:[...m],ns:[...S],defaultNS:`common`,partialBundledLanguages:!0,resources:{en:{common:c,activity:a,chat:o,commandPalette:s,settings:l,setup:u,toasts:d}},interpolation:{escapeValue:!1},react:{useSuspense:!1},returnNull:!1});function w(e){typeof document<`u`&&(document.documentElement.lang=e)}w(i.language||`en`),x.subscribe((e,t)=>{let n=e.uiLocale;n&&n!==t.uiLocale&&n!==i.language&&i.changeLanguage(n).then(()=>w(n))});function T(){window.wrongstackDesktopHost?.onLocaleChanged?.(e=>{if(!e)return;let t=v(e);if(t===i.language)return;let n=x.getState();n.uiLocale!==t&&n.set({uiLocale:t}),i.changeLanguage(t).then(()=>w(t))})}try{T()}catch{}export{h as n,x as t};
|