@openchambery/web 2.1.7-beta.9 → 2.1.7
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/{AgentAvatar-DxS7U-Cp.js → AgentAvatar-CAR4F5Sn.js} +1 -1
- package/dist/assets/AssistantView-DgjRT4M4.js +3 -0
- package/dist/assets/{DiagramView-Bw2sCV3Y.js → DiagramView-Dd_3w4Hk.js} +1 -1
- package/dist/assets/{FadeInOnReveal-kNFcAb-K.js → FadeInOnReveal-CCVddfP5.js} +1 -1
- package/dist/assets/{Icon-DxBvAKXH.js → Icon-DDB7S6Vz.js} +1 -1
- package/dist/assets/{ImageLoadingPlaceholder-DQvRSYkt.js → ImageLoadingPlaceholder-C6fDEcU1.js} +1 -1
- package/dist/assets/{LoadingImage-CaXJqavb.js → LoadingImage-ByBH-5WW.js} +1 -1
- package/dist/assets/MarkdownRenderer-YbG78e0Y.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-EACzZK2L.js → MarkdownRendererImpl-BXgUthom.js} +1 -1
- package/dist/assets/{MarkstreamRendererImpl-yohfk508.js → MarkstreamRendererImpl-5W9P9U-w.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-ByVEkbBy.js → MobileDetailNavigation-Bk6C9i9l.js} +1 -1
- package/dist/assets/{MobileShareBridge-DddCiczO.js → MobileShareBridge-B5nF-gT6.js} +2 -2
- package/dist/assets/MobileTabPageHeader-D7r6pKco.js +2 -0
- package/dist/assets/{MultiRunWindow-CQWEGqds.js → MultiRunWindow-CpuFaAyG.js} +1 -1
- package/dist/assets/{OnboardingScreen-BGZp5N1h.js → OnboardingScreen-DINUboLT.js} +1 -1
- package/dist/assets/{OverlayScrollbar-OftHd9vR.js → OverlayScrollbar-BkxmoyYl.js} +1 -1
- package/dist/assets/{SettingsView-CDkq_RGv.js → SettingsView--C3eizlJ.js} +9 -9
- package/dist/assets/{SettingsWindow-CQhiLvNH.js → SettingsWindow-DYUvg92F.js} +1 -1
- package/dist/assets/{TerminalView-CEiDqWoI.js → TerminalView-BqAariXf.js} +1 -1
- package/dist/assets/{ToolOutputDialog-jXsCdUsx.js → ToolOutputDialog-D6lPUZrN.js} +1 -1
- package/dist/assets/{appThemeRegistry-C90Vniux.js → appThemeRegistry-wWazoyp8.js} +1 -1
- package/dist/assets/{button-DfHNBl0U.js → button-DymteyMv.js} +1 -1
- package/dist/assets/{collapsible-BJ3u2c1m.js → collapsible-Dzp5rO0Q.js} +1 -1
- package/dist/assets/{desktopHosts-BKeEWmL5.js → desktopHosts-DSBZ-9-L.js} +1 -1
- package/dist/assets/{desktopRelayRestore-FWm2fXr6.js → desktopRelayRestore-DK8TzHRx.js} +1 -1
- package/dist/assets/{diagram-KOjGEiKO.js → diagram-CQs9px6y.js} +1 -1
- package/dist/assets/{dialog-DBNBD_KB.js → dialog-DfUeXqdE.js} +1 -1
- package/dist/assets/dropdown-menu.styles-B6YMNOZz.js +1 -0
- package/dist/assets/{fileMentionTouchSelection-zOe2SiY_.js → fileMentionTouchSelection-CEIhM6Ov.js} +1 -1
- package/dist/assets/{fileQueries-Dhgypzyl.js → fileQueries-BGE5l3Jd.js} +1 -1
- package/dist/assets/{gitApi-pv3A0rDM.js → gitApi-BP68uLBQ.js} +1 -1
- package/dist/assets/{image-loading-DLh8WsH4.js → image-loading-qNtUCy69.js} +1 -1
- package/dist/assets/{input-CQ5f8Zqb.js → input-BvpZiRHI.js} +1 -1
- package/dist/assets/{insertionBoundaries-CCxWV_ir.js → insertionBoundaries-BywXllQ9.js} +1 -1
- package/dist/assets/{main-BbqWl6PU.js → main-DSY3-ZQZ.js} +2 -2
- package/dist/assets/{main-KrnbhzQQ.js → main-DdyFxokk.js} +12 -12
- package/dist/assets/{markdownHeightCache-BJ7s_IuQ.js → markdownHeightCache-MW1NYOaG.js} +1 -1
- package/dist/assets/{mcpQueries-BlrZ9jet.js → mcpQueries-BaQ2_bdm.js} +1 -1
- package/dist/assets/{miniChat-7ywVBnvf.js → miniChat-B43ASec3.js} +2 -2
- package/dist/assets/mobile-DloCio4f.js +2 -0
- package/dist/assets/{multirun-CZOOUr7O.js → multirun-Blywdd6A.js} +1 -1
- package/dist/assets/{persistence-DUPZl7Oy.js → persistence-B7ORJ371.js} +1 -1
- package/dist/assets/{platform-z2erC6Bs.js → platform-CiBU2bCp.js} +2 -2
- package/dist/assets/{projectMeta-DiTRU5Dp.js → projectMeta-BwPtPeMh.js} +1 -1
- package/dist/assets/renderElectronMiniChatApp-DCRctqrx.js +2 -0
- package/dist/assets/{renderMobileApp-fVXPQqNd.js → renderMobileApp-DuFdSBXi.js} +5 -5
- package/dist/assets/{runtimeConfig-DHFwtNBi.js → runtimeConfig-CqpbN2lM.js} +1 -1
- package/dist/assets/runtimeEndpointReset-bWBhgTs_.js +149 -0
- package/dist/assets/scheduledTaskNavigation-BnKGGUlX.js +1 -0
- package/dist/assets/sessionChangeSummary-BlR9MyHu.js +2 -0
- package/dist/assets/{sessionLookup-BSK3URnU.js → sessionLookup-6gcNEZnB.js} +1 -1
- package/dist/assets/{sortable-tabs-strip-D655zJ3T.js → sortable-tabs-strip-CWR8KhJB.js} +1 -1
- package/dist/assets/{speechSettingsQueries-ojxskgsA.js → speechSettingsQueries-Bp5LgcR7.js} +3 -3
- package/dist/assets/src-C9BNQK0O.css +2 -0
- package/dist/assets/{terminalApi-BnjU_lmF.js → terminalApi-bN5IYQau.js} +1 -1
- package/dist/assets/{textarea-HlFXg84f.js → textarea-ClPlugKE.js} +1 -1
- package/dist/assets/{tooltip-BQgoGUWx.js → tooltip-D-1Pgmq1.js} +1 -1
- package/dist/assets/{url-DAyfGWPH.js → url-nbXEti6c.js} +1 -1
- package/dist/assets/{useAppFontEffects-BQbKLVsD.js → useAppFontEffects-8UJ5f0dG.js} +53 -53
- package/dist/assets/{useAssistantUIStore-Dt0l5AKe.js → useAssistantUIStore-Dlvb7P0q.js} +1 -1
- package/dist/assets/{useDesktopWindowControlsLayout-BIn2hI3V.js → useDesktopWindowControlsLayout-B_hNd3pD.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-BycgG8Ov.js → useEffectiveDirectory-DISvoVLe.js} +1 -1
- package/dist/assets/{useFontPreferences-B4Cgu3bS.js → useFontPreferences-6LD7d7hP.js} +1 -1
- package/dist/assets/useMobileNavigationStore-BE_8Q8WJ.js +417 -0
- package/dist/assets/useUIStore-CDMI_Yzu.js +1 -0
- package/dist/assets/{useWorkerHighlightedLines-DmI50_3w.js → useWorkerHighlightedLines-BFygybD8.js} +1 -1
- package/dist/index.html +9 -9
- package/dist/mini-chat.html +9 -9
- package/dist/mobile.html +9 -9
- package/package.json +1 -1
- package/server/lib/assistants/DOCUMENTATION.md +39 -0
- package/server/lib/assistants/harness.js +20 -7
- package/server/lib/assistants/harness.test.js +21 -0
- package/server/lib/assistants/routes.js +2 -1
- package/server/lib/assistants/service.js +76 -13
- package/server/lib/assistants/service.test.js +53 -0
- package/server/lib/notifications/DOCUMENTATION.md +5 -0
- package/server/lib/opencode/feature-routes-runtime.js +1 -0
- package/server/lib/scheduled-tasks/DOCUMENTATION.md +25 -0
- package/server/lib/scheduled-tasks/run-history-store.js +18 -5
- package/server/lib/scheduled-tasks/run-history-store.test.js +51 -0
- package/server/lib/scheduled-tasks/runtime.js +70 -12
- package/server/lib/scheduled-tasks/runtime.test.js +131 -0
- package/dist/assets/AssistantView-Bnaa8U5L.js +0 -3
- package/dist/assets/MarkdownRenderer-DpXaDH86.js +0 -2
- package/dist/assets/MobileTabPageHeader-CAtpMLFM.js +0 -2
- package/dist/assets/context-menu-DBNnM4a7.js +0 -1
- package/dist/assets/dropdown-menu.styles-Cbl6jSsR.js +0 -1
- package/dist/assets/mobile-_nwad-rW.js +0 -2
- package/dist/assets/renderElectronMiniChatApp-DfB14cCR.js +0 -2
- package/dist/assets/runtimeEndpointReset-DOHn9DSm.js +0 -149
- package/dist/assets/sessionChangeSummary-Y9NdeIoe.js +0 -2
- package/dist/assets/src-GOs_VnY-.css +0 -2
- package/dist/assets/useMobileNavigationStore-DZUur_4b.js +0 -417
- package/dist/assets/useUIStore-pl39iO82.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,r as t}from"./runtime-switch-3ad3yzM7.js";import{a as n,i as r,r as i}from"./vendor-zustand-o69pgTEK.js";var a=null,o=null,s=null,c=new Set,l=!1,u=e=>{if(c.add(e),l||typeof window>`u`)return;l=!0;let t=()=>{for(let e of c)e()};try{window.addEventListener(`pagehide`,t,{capture:!0}),window.addEventListener(`beforeunload`,t,{capture:!0}),window.addEventListener(`visibilitychange`,()=>{typeof document<`u`&&document.visibilityState===`hidden`&&t()}),window.addEventListener(`freeze`,t)}catch{}},d=(e,t)=>{let n;try{n=e()}catch{return}let r=new Map,i=new Set,a,o=()=>{if(a=void 0,r.size===0&&i.size===0)return!0;let e=Array.from(r.entries()),o=Array.from(i);r.clear(),i.clear();let c=!0;for(let[i,a]of e)try{n.setItem(i,JSON.stringify(a,t?.replacer))}catch(e){console.error(`Failed to persist deferred storage value`,e),r.set(i,a),c=!1}for(let e of o)try{n.removeItem(e)}catch(t){console.error(`Failed to remove deferred storage value`,t),i.add(e),c=!1}return c||s(),c},s=()=>{a===void 0&&(a=setTimeout(o,0))};return u(o),{getItem:e=>{if(r.has(e))return r.get(e)??null;if(i.has(e))return null;let a=e=>e===null?null:JSON.parse(e,t?.reviver),o=n.getItem(e);return o instanceof Promise?o.then(a):a(o)},setItem:(e,t)=>{r.set(e,t),i.delete(e),s()},removeItem:e=>{r.delete(e),i.add(e),s()},flush:o}},f=e=>d(()=>h(),e),ee=e=>{let t=new Map,n=new Set,r,i=()=>{if(r=void 0,t.size===0&&n.size===0)return;let i=Array.from(t.entries()),a=Array.from(n);t.clear(),n.clear();for(let[t,n]of i)try{e.setItem(t,n)}catch(e){console.error(`Failed to persist deferred storage value`,e)}for(let t of a)try{e.removeItem(t)}catch(e){console.error(`Failed to remove deferred storage value`,e)}},a=()=>{r===void 0&&(r=setTimeout(i,0))};return u(i),{getItem:r=>t.has(r)?t.get(r)??null:n.has(r)?null:e.getItem(r),setItem:(e,r)=>{t.set(e,r),n.delete(e),a()},removeItem:e=>{t.delete(e),n.add(e),a()},clear:()=>{t.clear(),n.clear(),r!==void 0&&(clearTimeout(r),r=void 0),e.clear()},key:t=>e.key(t),get length(){return e.length}}},p=e=>{if(typeof window>`u`)return null;try{return window[e]??null}catch{return null}},m=()=>{let e=new Map;return{getItem:t=>e.get(t)??null,setItem:(t,n)=>{e.set(t,n)},removeItem:t=>{e.delete(t)},clear:()=>{e.clear()},key:t=>Array.from(e.keys())[t]??null,get length(){return e.size}}},te=()=>{let e=p(`localStorage`);if(!e)return m();let t=m(),n=!0,r=()=>{n=!1};return{getItem:i=>{if(n)try{let t=e.getItem(i);if(t!==null)return t}catch{r()}return t.getItem(i)},setItem:(i,a)=>{if(n)try{e.setItem(i,a),t.removeItem(i);return}catch{r();try{e.removeItem(i)}catch{}}t.setItem(i,a)},removeItem:n=>{try{e.removeItem(n)}catch{r()}t.removeItem(n)},clear:()=>{try{e.clear()}catch{r()}t.clear()},key:i=>{if(n)try{return e.key(i)}catch{r()}return t.key(i)},get length(){if(n)try{return e.length+t.length}catch{r()}return t.length}}},h=()=>(a||=te(),a),ne=()=>(s||=ee(h()),s),re=()=>{let e=p(`sessionStorage`);if(!e)return m();let t=m(),n=!0,r=()=>{n=!1};return{getItem:i=>{if(n)try{let t=e.getItem(i);if(t!==null)return t}catch{r()}return t.getItem(i)},setItem:(i,a)=>{if(n)try{e.setItem(i,a),t.removeItem(i);return}catch{r();try{e.removeItem(i)}catch{}}t.setItem(i,a)},removeItem:n=>{try{e.removeItem(n)}catch{r()}t.removeItem(n)},clear:()=>{try{e.clear()}catch{r()}t.clear()},key:i=>{if(n)try{return e.key(i)}catch{r()}return t.key(i)},get length(){if(n)try{return e.length+t.length}catch{r()}return t.length}}},ie=()=>(o||=re(),o);function ae(e,t){return t>=12?e:(e.chatRenderMode===`live`&&(e.chatRenderMode=`sorted`),e.activityRenderMode===`summary`&&(e.activityRenderMode=`collapsed`),e.showTurnChangedFiles===!1&&(e.showTurnChangedFiles=!0),e)}var g={markdown:`0.875rem`,code:`0.75rem`,uiHeader:`0.9375rem`,uiLabel:`0.8750rem`,meta:`0.875rem`,micro:`0.875rem`},oe={markdown:`0.9375rem`,code:`0.8125rem`,uiHeader:`0.875rem`,uiLabel:`0.8125rem`,meta:`0.8125rem`,micro:`0.75rem`},se={markdown:`0.9063rem`,code:`0.8750rem`,uiHeader:`0.9063rem`,uiLabel:`0.8438rem`,meta:`0.8438rem`,micro:`0.7813rem`};function _(e){return`--text-${e.replace(/([A-Z])/g,`-$1`).toLowerCase()}`}function v(e=document.documentElement){return e.classList.contains(`mobile-pointer`)&&!e.classList.contains(`desktop-runtime`)}function ce(e,t){return t?.mobile?oe[e]:g[e]}var y={semanticMarkdown:{fontSize:`var(--text-markdown)`},semanticCode:{fontSize:`var(--text-code)`},uiHeader:{fontSize:`var(--text-ui-header)`},uiLabel:{fontSize:`var(--text-ui-label)`},meta:{fontSize:`var(--text-meta)`},micro:{fontSize:`var(--text-micro)`},ui:{button:{fontSize:`var(--text-ui-label)`,lineHeight:`var(--ui-button-line-height)`,letterSpacing:`var(--ui-button-letter-spacing)`,fontWeight:`var(--ui-button-font-weight)`},buttonSmall:{fontSize:`var(--text-meta)`,lineHeight:`var(--ui-button-small-line-height)`,letterSpacing:`var(--ui-button-small-letter-spacing)`,fontWeight:`var(--ui-button-small-font-weight)`},buttonLarge:{fontSize:`var(--text-ui-label)`,lineHeight:`var(--ui-button-large-line-height)`,letterSpacing:`var(--ui-button-large-letter-spacing)`,fontWeight:`var(--ui-button-large-font-weight)`},label:{fontSize:`var(--text-meta)`,lineHeight:`var(--ui-label-line-height)`,letterSpacing:`var(--ui-label-letter-spacing)`,fontWeight:`var(--ui-label-font-weight)`},caption:{fontSize:`var(--text-micro)`,lineHeight:`var(--ui-caption-line-height)`,letterSpacing:`var(--ui-caption-letter-spacing)`,fontWeight:`var(--ui-caption-font-weight)`},badge:{fontSize:`var(--text-micro)`,lineHeight:`var(--ui-badge-line-height)`,letterSpacing:`var(--ui-badge-letter-spacing)`,fontWeight:`var(--ui-badge-font-weight)`},tooltip:{fontSize:`var(--text-micro)`,lineHeight:`var(--ui-tooltip-line-height)`,letterSpacing:`var(--ui-tooltip-letter-spacing)`,fontWeight:`var(--ui-tooltip-font-weight)`},input:{fontSize:`var(--text-ui-label)`,lineHeight:`var(--ui-input-line-height)`,letterSpacing:`var(--ui-input-letter-spacing)`,fontWeight:`var(--ui-input-font-weight)`},helperText:{fontSize:`var(--text-meta)`,lineHeight:`var(--ui-helper-text-line-height)`,letterSpacing:`var(--ui-helper-text-letter-spacing)`,fontWeight:`var(--ui-helper-text-font-weight)`}},code:{inline:{fontSize:`var(--text-code)`,lineHeight:`var(--code-inline-line-height)`,letterSpacing:`var(--code-inline-letter-spacing)`,fontWeight:`var(--code-inline-font-weight)`},block:{fontSize:`var(--text-code)`,lineHeight:`var(--code-block-line-height)`,letterSpacing:`var(--code-block-letter-spacing)`,fontWeight:`var(--code-block-font-weight)`},lineNumbers:{fontSize:`var(--text-micro)`,lineHeight:`var(--code-line-numbers-line-height)`,letterSpacing:`var(--code-line-numbers-letter-spacing)`,fontWeight:`var(--code-line-numbers-font-weight)`}},markdown:{body:{fontSize:`var(--text-markdown)`,lineHeight:`var(--markdown-body-line-height)`,letterSpacing:`var(--markdown-body-letter-spacing)`,fontWeight:`var(--markdown-body-font-weight)`},bodySmall:{fontSize:`var(--text-meta)`,lineHeight:`var(--markdown-body-small-line-height)`,letterSpacing:`var(--markdown-body-small-letter-spacing)`,fontWeight:`var(--markdown-body-small-font-weight)`},bodyLarge:{fontSize:`var(--text-markdown)`,lineHeight:`var(--markdown-body-large-line-height)`,letterSpacing:`var(--markdown-body-large-letter-spacing)`,fontWeight:`var(--markdown-body-large-font-weight)`},blockquote:{fontSize:`var(--text-markdown)`,lineHeight:`var(--markdown-blockquote-line-height)`,letterSpacing:`var(--markdown-blockquote-letter-spacing)`,fontWeight:`var(--markdown-blockquote-font-weight)`},list:{fontSize:`var(--text-markdown)`,lineHeight:`var(--markdown-list-line-height)`,letterSpacing:`var(--markdown-list-letter-spacing)`,fontWeight:`var(--markdown-list-font-weight)`},link:{fontSize:`var(--text-markdown)`,lineHeight:`var(--markdown-link-line-height)`,letterSpacing:`var(--markdown-link-letter-spacing)`,fontWeight:`var(--markdown-link-font-weight)`},code:{fontSize:`var(--text-code)`,lineHeight:`var(--markdown-code-line-height)`,letterSpacing:`var(--markdown-code-letter-spacing)`,fontWeight:`var(--markdown-code-font-weight)`},codeBlock:{fontSize:`var(--text-code)`,lineHeight:`var(--markdown-code-block-line-height)`,letterSpacing:`var(--markdown-code-block-letter-spacing)`,fontWeight:`var(--markdown-code-block-font-weight)`}},tool:{collapsed:{fontSize:`var(--text-code)`,lineHeight:`var(--code-block-line-height)`,letterSpacing:`var(--code-block-letter-spacing)`,fontWeight:`var(--code-block-font-weight)`},popup:{fontSize:`var(--text-code)`,lineHeight:`var(--code-block-line-height)`,letterSpacing:`var(--code-block-letter-spacing)`,fontWeight:`var(--code-block-font-weight)`},inline:{fontSize:`var(--text-code)`,lineHeight:`var(--code-inline-line-height)`,letterSpacing:`var(--code-inline-letter-spacing)`,fontWeight:`var(--code-inline-font-weight)`}}},b={padding:{collapsed:`0.375rem`,popup:`0.75rem`,popupContainer:`1rem`},backgroundOpacity:{muted:`30`,mutedAlt:`50`},getCollapsedStyles:()=>({...y.tool.collapsed,background:`transparent`,backgroundColor:`transparent`,margin:0,padding:b.padding.collapsed,borderRadius:0}),getPopupStyles:()=>({...y.tool.popup,background:`transparent`,backgroundColor:`transparent`,margin:0,padding:b.padding.popup,borderRadius:`0.75rem`}),getPopupContainerStyles:()=>({...y.tool.popup,background:`transparent`,backgroundColor:`transparent`,margin:0,padding:b.padding.popupContainer,borderRadius:`0.5rem`,overflowX:`auto`}),getInlineStyles:()=>({...y.tool.inline})},x=[{id:`inter`,label:`Inter`,description:`Modern UI sans with excellent readability at small sizes.`,stack:`"Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`Inter`,packageName:`@fontsource/inter`,filePrefix:`inter`,weights:[400,500,600]}},{id:`geist-sans`,label:`Geist Sans`,description:`Crisp sans-serif with a technical interface feel.`,stack:`"Geist Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`Geist Sans`,packageName:`@fontsource/geist-sans`,filePrefix:`geist-sans`,weights:[400,500,600]}},{id:`atkinson-hyperlegible`,label:`Atkinson Hyperlegible`,description:`Accessibility-focused sans-serif optimized for character distinction.`,stack:`"Atkinson Hyperlegible", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`Atkinson Hyperlegible`,packageName:`@fontsource/atkinson-hyperlegible`,filePrefix:`atkinson-hyperlegible`,weights:[400,700]}},{id:`source-sans-3`,label:`Source Sans 3`,description:`Adobe sans-serif tuned for clean, readable interfaces.`,stack:`"Source Sans 3", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`Source Sans 3`,packageName:`@fontsource/source-sans-3`,filePrefix:`source-sans-3`,weights:[400,500,600]}},{id:`roboto`,label:`Roboto`,description:`Familiar Material-style sans-serif with broad UI usage.`,stack:`"Roboto", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`Roboto`,packageName:`@fontsource/roboto`,filePrefix:`roboto`,weights:[400,500,600]}},{id:`noto-sans`,label:`Noto Sans`,description:`Readable sans-serif with strong international coverage.`,stack:`"Noto Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`Noto Sans`,packageName:`@fontsource/noto-sans`,filePrefix:`noto-sans`,weights:[400,500,600]}},{id:`dm-sans`,label:`DM Sans`,description:`Modern product UI sans-serif with friendly proportions.`,stack:`"DM Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`DM Sans`,packageName:`@fontsource/dm-sans`,filePrefix:`dm-sans`,weights:[400,500,600]}},{id:`manrope`,label:`Manrope`,description:`Polished geometric sans-serif for modern app interfaces.`,stack:`"Manrope", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,source:{family:`Manrope`,packageName:`@fontsource/manrope`,filePrefix:`manrope`,weights:[400,500,600]}},{id:`system`,label:`System`,description:`Native operating system interface font.`,stack:`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`}],S=[{id:`jetbrains-mono`,label:`JetBrains Mono`,description:`Developer-focused monospace with strong punctuation clarity.`,stack:`"JetBrains Mono", "SFMono-Regular", "Menlo", monospace`,source:{family:`JetBrains Mono`,packageName:`@fontsource/jetbrains-mono`,filePrefix:`jetbrains-mono`,weights:[400,500,600]}},{id:`fira-code`,label:`Fira Code`,description:`Readable coding font with ligature support.`,stack:`"Fira Code", "SFMono-Regular", "Menlo", monospace`,source:{family:`Fira Code`,packageName:`@fontsource/fira-code`,filePrefix:`fira-code`,weights:[400,500,600]}},{id:`geist-mono`,label:`Geist Mono`,description:`Sharp monospace pair for Geist Sans.`,stack:`"Geist Mono", "SFMono-Regular", "Menlo", monospace`,source:{family:`Geist Mono`,packageName:`@fontsource/geist-mono`,filePrefix:`geist-mono`,weights:[400,500,600]}},{id:`commit-mono`,label:`Commit Mono`,description:`Code-oriented monospace with polished editor ergonomics.`,stack:`"Commit Mono", "SFMono-Regular", "Menlo", monospace`,source:{family:`Commit Mono`,packageName:`@fontsource/commit-mono`,filePrefix:`commit-mono`,weights:[400,500,600]}},{id:`source-code-pro`,label:`Source Code Pro`,description:`Adobe monospace designed for source code readability.`,stack:`"Source Code Pro", "SFMono-Regular", "Menlo", monospace`,source:{family:`Source Code Pro`,packageName:`@fontsource/source-code-pro`,filePrefix:`source-code-pro`,weights:[400,500,600]}},{id:`cascadia-code`,label:`Cascadia Code`,description:`Microsoft coding font popular in terminals and editors.`,stack:`"Cascadia Code", "SFMono-Regular", "Menlo", monospace`,source:{family:`Cascadia Code`,packageName:`@fontsource/cascadia-code`,filePrefix:`cascadia-code`,weights:[400,500,600]}},{id:`roboto-mono`,label:`Roboto Mono`,description:`Neutral monospace companion to Roboto.`,stack:`"Roboto Mono", "SFMono-Regular", "Menlo", monospace`,source:{family:`Roboto Mono`,packageName:`@fontsource/roboto-mono`,filePrefix:`roboto-mono`,weights:[400,500,600]}},{id:`iosevka`,label:`Iosevka`,description:`Compact monospace for dense code and terminal layouts.`,stack:`"Iosevka", "SFMono-Regular", "Menlo", monospace`,source:{family:`Iosevka`,packageName:`@fontsource/iosevka`,filePrefix:`iosevka`,weights:[400,500,600]}},{id:`system-mono`,label:`System Mono`,description:`Native operating system monospace font.`,stack:`ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`}],le=e=>Object.fromEntries(e.map(e=>[e.id,e])),ue=le(x),de=le(S),fe=`system`,pe=`system-mono`,me=e=>typeof e==`string`&&e in ue,he=e=>typeof e==`string`&&e in de,C=`openchamber.mobileKeyboardMode`,ge=`meta[name="viewport"]`,w=`width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover`,_e=()=>!0;function T(e,t=`resize-content`){return e===`native`||e===`resize-content`?e:t}var ve=e=>T(e)===`resize-content`?`${w}, interactive-widget=resizes-content`:w,ye=()=>{if(typeof window>`u`)return`resize-content`;try{return T(localStorage.getItem(C))}catch{return`resize-content`}},E=e=>{let t=T(e);if(typeof window<`u`)try{t===`resize-content`?localStorage.removeItem(C):localStorage.setItem(C,t)}catch{}return t},be=e=>{let t=E(e);if(typeof document>`u`)return t;document.documentElement.setAttribute(`data-oc-mobile-keyboard-mode`,t);let n=document.querySelector(ge);if(n instanceof HTMLMetaElement){let e=ve(t);n.getAttribute(`content`)!==e&&n.setAttribute(`content`,e)}return t};function D(e){return e===`vim`?`vim`:`default`}var xe={completion:{title:`{agent_name} is ready`,message:`{last_message}`},error:{title:`Tool error`,message:`{last_message}`},question:{title:`{agent_name} needs input`,message:`{last_message}`},subtask:{title:`Subtask complete`,message:`{last_message}`}},Se={completion:{title:`Task completed`,message:`{session_name}`},error:{title:`Something went wrong`,message:`{session_name}`},question:{title:`Needs your answer`,message:`{session_name}`},subtask:{title:`Task completed`,message:`{session_name}`}},Ce={completion:{title:`{agent_name} is ready`,message:`{model_name} completed the task`},error:{title:`Tool error`,message:`{last_message}`},question:{title:`Input needed`,message:`{last_message}`},subtask:{title:`{agent_name} is ready`,message:`{model_name} completed the task`}},O={completion:{title:``,message:``},error:{title:``,message:``},question:{title:``,message:``},subtask:{title:``,message:``}},k=(e,t)=>e?e.title===t.title&&e.message===t.message:!1,we=e=>{if(!e||typeof e!=`object`)return!1;let t=e,n=e=>k(t.completion,e.completion)&&k(t.error,e.error)&&k(t.question,e.question)&&k(t.subtask,e.subtask);return n(xe)||n(Se)||n(Ce)},A=380,Te=380,Ee=1400,j=12,De=40,M=120,N=260,P=new Map,F=e=>(e??t()).trim()||`default`,I=e=>{if(!e)return``;let t=e.replace(/\\/g,`/`),n=t.startsWith(`//`),r=t.replace(/\/+$/g,``);return r=r.replace(/\/+/g,`/`),n&&!r.startsWith(`//`)&&(r=`/${r}`),r===``?t.startsWith(`/`)?`/`:``:r},L=e=>Number.isFinite(e)?Math.min(Ee,Math.max(Te,Math.round(e))):A,R=e=>{if(typeof e!=`string`)return null;let t=e.trim();return t?t.replace(/\\/g,`/`):null},z=e=>{if(typeof e!=`string`)return null;let t=e.trim();return t?t.length>M?t.slice(0,M):t:null},B=e=>e===`working`||e===`staged`||e===`turn`?e:null,V=e=>typeof e==`string`&&e.trim()||null,H=e=>typeof e==`string`&&e.trim()||null,Oe=(e,t)=>(e===`file`||e===`preview`)&&t||e,U=(e,t,n)=>{if(e===`diff`||e===`file-diff`)return e;if(typeof n==`string`){let e=n.trim();if(e)return e}return Oe(e,t)},W=(e,t)=>t===e?e:`${e}:${t}`,G=e=>e===`turn-diff-outside-workspace`?e:null,ke=e=>{let t=R(e.targetPath),n=U(e.mode,t,e.dedupeKey);return{id:W(e.mode,n),mode:e.mode,targetPath:t,dedupeKey:n,label:z(e.label),sessionTitleFallback:z(e.sessionTitleFallback),readOnly:e.readOnly===!0,stagedDiff:e.stagedDiff===!0,diffScope:B(e.diffScope)??(e.stagedDiff===!0?`staged`:`working`),diffTargetLine:typeof e.diffTargetLine==`number`&&Number.isFinite(e.diffTargetLine)?Math.max(1,Math.trunc(e.diffTargetLine)):null,diffTurnMessageId:V(e.diffTurnMessageId),diffSessionId:H(e.diffSessionId),fileNotice:e.mode===`file`?G(e.fileNotice):null,touchedAt:Date.now()}},Ae=(e,t,n)=>{if(e.length<=t)return e;let r=[...e].sort((e,t)=>e.touchedAt-t.touchedAt).filter(e=>e.id!==n),i=e.length-t;if(i<=0||r.length===0)return e.slice(-t);let a=new Set(r.slice(0,i).map(e=>e.id));return e.filter(e=>!a.has(e.id))},K=e=>{if(!Array.isArray(e))return[];let t=[],n=new Set;for(let r of e){if(!r||typeof r!=`object`)continue;let e=r;if(e.mode!==`diff`&&e.mode!==`file-diff`&&e.mode!==`file`&&e.mode!==`context`&&e.mode!==`chat`&&e.mode!==`preview`&&e.mode!==`browser`&&e.mode!==`btw`)continue;let i=R(typeof e.targetPath==`string`?e.targetPath:null),a=U(e.mode,i,typeof e.dedupeKey==`string`?e.dedupeKey:null),o=W(e.mode,a);!o||n.has(o)||(n.add(o),t.push({id:o,mode:e.mode,targetPath:i,dedupeKey:a,label:z(typeof e.label==`string`?e.label:null),sessionTitleFallback:z(typeof e.sessionTitleFallback==`string`?e.sessionTitleFallback:null),readOnly:e.readOnly===!0,stagedDiff:e.stagedDiff===!0,diffScope:B(e.diffScope)??(e.stagedDiff===!0?`staged`:`working`),diffTargetLine:typeof e.diffTargetLine==`number`&&Number.isFinite(e.diffTargetLine)?Math.max(1,Math.trunc(e.diffTargetLine)):null,diffTurnMessageId:V(e.diffTurnMessageId),diffSessionId:H(e.diffSessionId),fileNotice:e.mode===`file`?G(e.fileNotice):null,touchedAt:typeof e.touchedAt==`number`&&Number.isFinite(e.touchedAt)?e.touchedAt:Date.now()}))}return t},q=(e,t)=>t&&e.some(e=>e.id===t)?t:e.length===0?null:e[e.length-1].id,J=e=>{if(e){let t=K(e.tabs),n=q(t,e.activeTabId);return{...e,tabs:t,activeTabId:n,touchedAt:Date.now()}}return{isOpen:!1,expanded:!1,tabs:[],activeTabId:null,width:A,touchedAt:Date.now()}},je=(e,t)=>{let n=ke(t),r=e.tabs.findIndex(e=>e.id===n.id),i=r===-1?[...e.tabs,n]:e.tabs.map((e,t)=>t===r?{...e,diffTargetLine:n.diffTargetLine,diffTurnMessageId:n.diffTurnMessageId,diffSessionId:n.diffSessionId,mode:n.mode,targetPath:n.targetPath||e.targetPath,dedupeKey:n.dedupeKey,label:n.label,sessionTitleFallback:n.sessionTitleFallback||e.sessionTitleFallback,stagedDiff:n.stagedDiff,diffScope:n.diffScope,readOnly:n.readOnly,fileNotice:n.mode===`file`?n.fileNotice:null,touchedAt:Date.now()}:e),a=n.id,o=Ae(i,j,a);return{...e,isOpen:!0,tabs:o,activeTabId:q(o,a),touchedAt:Date.now()}},Me=(e,t)=>{let n=e.tabs.filter(e=>e.id!==t),r=e.activeTabId===t?n[n.length-1]?.id??null:q(n,e.activeTabId);return{...e,tabs:n,activeTabId:r,isOpen:n.length>0&&e.isOpen,touchedAt:Date.now()}},Ne=(e,t,n)=>{if(t===n)return e;let r=e.tabs.findIndex(e=>e.id===t),i=e.tabs.findIndex(e=>e.id===n);if(r===-1||i===-1)return e;let a=[...e.tabs],[o]=a.splice(r,1);return o?(a.splice(i,0,o),{...e,tabs:a,touchedAt:Date.now()}):e},Pe=(e,t,n)=>({...e,tabs:e.tabs.map(e=>e.id===t?{...e,targetPath:n}:e)}),Y=e=>{if(!e||typeof e!=`object`)return{};let t=e,n={};for(let[e,r]of Object.entries(t)){let t=I(e);if(!t||!r||typeof r!=`object`)continue;let i=r,a=K(i.tabs).filter(e=>e.mode!==`btw`),o=typeof i.activeTabId==`string`?i.activeTabId:null;a.length===0&&(i.mode===`diff`||i.mode===`file-diff`||i.mode===`file`||i.mode===`context`||i.mode===`chat`)&&(a=[ke({mode:i.mode,targetPath:typeof i.targetPath==`string`?i.targetPath:null,dedupeKey:typeof i.dedupeKey==`string`?i.dedupeKey:null,label:typeof i.label==`string`?i.label:null})],o=a[0]?.id??null);let s=q(a,o),c=Ae(a,j,s);n[t]={isOpen:i.isOpen===!0&&c.length>0,expanded:i.expanded===!0,tabs:c,activeTabId:q(c,s),width:L(typeof i.width==`number`?i.width:A),touchedAt:typeof i.touchedAt==`number`&&Number.isFinite(i.touchedAt)?i.touchedAt:Date.now()}}return n},X=(e,t)=>{let n=Object.entries(e);if(n.length<=t)return e;n.sort((e,t)=>(t[1]?.touchedAt??0)-(e[1]?.touchedAt??0));let r={};for(let[e,i]of n.slice(0,t))r[e]=i;return r},Fe=(e,t)=>{let n=Object.entries(e);if(n.length<=t)return e;n.sort((e,t)=>(t[1]?.touchedAt??0)-(e[1]?.touchedAt??0));let r={};for(let[e,i]of n.slice(0,t))r[e]=i;return r},Ie=(e,t)=>{let n=I((t||``).trim())||null,r=n?e.contextPanelByDirectory[n]:void 0;return{isRightSidebarOpen:e.isRightSidebarOpen,rightSidebarTab:e.rightSidebarTab,contextPanelDirectory:n,contextPanelIsOpen:!!(r?.isOpen&&r.tabs.length>0),contextPanelActiveTabId:r?.activeTabId??null,contextPanelExpanded:!!r?.expanded,touchedAt:Date.now()}},Le=(e,t,n)=>{let r=I((t||``).trim());if(!r)return e;let i=e[r];if(!i)return e;let a=!!(n?.contextPanelIsOpen&&n.contextPanelDirectory===r&&i.tabs.length>0),o=a?q(i.tabs,n?.contextPanelActiveTabId??i.activeTabId):i.activeTabId,s=a?!!n?.contextPanelExpanded:i.expanded;return i.isOpen===a&&i.activeTabId===o&&i.expanded===s?e:{...e,[r]:{...i,isOpen:a,activeTabId:o,expanded:s,touchedAt:Date.now()}}},Z=(e,t,n,r)=>{let i=e.contextPanelByDirectory[t],a=i?.tabs.find(e=>e.id===i.activeTabId);return a?.mode===`file`&&a.targetPath===n?!0:e.mainTabGuard?.(`files`,r)??!0},Q=n()(i(r((t,n)=>({theme:`system`,isMultiRunLauncherOpen:!1,isSidebarOpen:!0,sidebarWidth:N,hasManuallyResizedLeftSidebar:!1,isRightSidebarOpen:!1,rightSidebarWidth:360,hasManuallyResizedRightSidebar:!1,rightSidebarTab:`git`,contextPanelByDirectory:{},contextToolDiffByDirectory:{},sessionWorkspacePanelById:{},contextPanelsOpenBeforeRightSidebarCollapse:[],isBottomTerminalOpen:!1,isBottomTerminalExpanded:!1,bottomTerminalHeight:300,hasManuallyResizedBottomTerminal:!1,isSessionSwitcherOpen:!1,isSessionDropdownOpen:!1,activeMainTab:`chat`,mainTabGuard:null,sidebarOpenBeforeFullscreenTab:null,pendingDiffFile:null,pendingDiffStaged:!1,pendingDiffScope:null,pendingDiffLine:null,pendingDiagramFile:null,pendingFileNavigation:null,pendingFileFocusPath:null,pendingFileViewerMode:null,isMobile:!1,isCommandPaletteOpen:!1,isHelpDialogOpen:!1,isAboutDialogOpen:!1,isOpenCodeStatusDialogOpen:!1,openCodeStatusText:``,isSessionCreateDialogOpen:!1,isScheduledTasksDialogOpen:!1,scheduledTaskOpenRequest:null,isArchivedSessionsDialogOpen:!1,isSettingsDialogOpen:!1,isNewWorktreeDialogOpen:!1,isModelSelectorOpen:!1,isAgentSelectorOpen:!1,isModelSelectorInstant:!1,isAgentSelectorInstant:!1,sidebarSection:`sessions`,settingsPage:`home`,devicePairingRequested:!1,settingsHasOpenedOnce:!1,settingsProjectsSelectedId:null,settingsRemoteInstancesSelectedId:null,eventStreamStatus:`idle`,eventStreamHint:null,showReasoningTraces:!0,sessionTitleRefreshEnabled:!0,sessionGoalEnabled:!0,sessionGoalDefaultBudgetEnabled:!1,sessionGoalDefaultBudget:2e5,collapsibleThinkingBlocks:!0,chatRenderMode:`sorted`,activityRenderMode:`collapsed`,showDeletionDialog:!0,autoDeleteEnabled:!1,autoDeleteAfterDays:30,sessionRetentionAction:`archive`,autoDeleteLastRunAt:null,messageLimit:200,fontSize:100,codeFontSize:100,globalDraftStarters:null,terminalFontSize:13,editorFontSize:13,uiFont:fe,monoFont:pe,padding:100,cornerRadius:18,inputBarOffset:0,mobileKeyboardMode:ye(),favoriteModels:[],hiddenModels:[],providerOrder:[],collapsedModelProviders:[],recentModels:[],recentAgents:[],recentEfforts:{},diffLayoutPreference:`inline`,diffFileLayout:{},diffWrapLines:!1,gitChangesViewMode:`tree`,isTimelineDialogOpen:!1,isPromptNavigatorPanelOpen:!1,isImagePreviewOpen:!1,nativeNotificationsEnabled:!1,notificationMode:`hidden-only`,notifyOnSubtasks:!1,dockBadgeEnabled:!0,notifyOnCompletion:!0,notifyOnError:!0,notifyOnQuestion:!0,notifyOnPermission:!0,notifyOnScheduledTasks:!0,notifyOnAssistants:!0,notifyOnGoals:!0,notificationTemplates:{completion:{...O.completion},error:{...O.error},question:{...O.question},subtask:{...O.subtask}},summarizeLastMessage:!1,summaryThreshold:200,summaryLength:100,maxLastMessageLength:250,showTerminalQuickKeysOnDesktop:!1,persistChatDraft:!0,showOpenCodeUpdateNotifications:!0,inputSpellcheckEnabled:!1,wideChatLayoutEnabled:!1,codeBlockLineWrap:!0,showToolFileIcons:!0,showTurnChangedFiles:!0,showExpandedBashTools:!1,showSubagentTaskDetails:!1,timeFormatPreference:`auto`,weekStartPreference:`auto`,desktopWindowControlsPosition:`auto`,userMessageRenderingMode:`markdown`,collapsibleUserMessages:!0,stickyUserHeader:!1,promptNavigatorEnabled:!1,expandedEditorToolbar:!1,showSplitAssistantMessageActions:!1,showAssistantTps:!0,allowPromptingSubagentSessions:!1,isMobileSessionStatusBarCollapsed:!1,mobileSessionPanelOpen:!1,mobileSessionFilterProjectId:null,otaChannelOverride:null,isExpandedInput:!1,workStatusPanelEnabled:!0,workStatusHiddenSections:[],workStatusSectionOrder:[],workStatusExpandedSections:{},workStatusScrollTop:0,workStatusPanelVisible:!1,workStatusPanelFits:!1,workStatusOverlayOpen:!1,reportUsage:!1,shortcutOverrides:{},fileEditorKeymap:`default`,setTheme:e=>{t({theme:e}),n().applyTheme()},toggleSidebar:()=>{t(e=>{let t=!e.isSidebarOpen;return t&&!e.hasManuallyResizedLeftSidebar?{isSidebarOpen:t,sidebarWidth:N}:{isSidebarOpen:t}})},setSidebarOpen:e=>{t(t=>t.isSidebarOpen===e?e&&!t.hasManuallyResizedLeftSidebar&&t.sidebarWidth!==N?{isSidebarOpen:e,sidebarWidth:N}:t:e&&!t.hasManuallyResizedLeftSidebar?{isSidebarOpen:e,sidebarWidth:N}:{isSidebarOpen:e})},setSidebarWidth:e=>{t({sidebarWidth:e,hasManuallyResizedLeftSidebar:!0})},toggleRightSidebar:()=>{t(e=>{if(e.isRightSidebarOpen){let t=Object.entries(e.contextPanelByDirectory).filter(([,e])=>e.isOpen&&e.tabs.length>0).map(([e])=>e);return{isRightSidebarOpen:!1,contextPanelByDirectory:t.length===0?e.contextPanelByDirectory:Object.fromEntries(Object.entries(e.contextPanelByDirectory).map(([e,n])=>[e,t.includes(e)?{...n,isOpen:!1}:n])),contextPanelsOpenBeforeRightSidebarCollapse:t}}let t=e.contextPanelsOpenBeforeRightSidebarCollapse.length===0?e.contextPanelByDirectory:Object.fromEntries(Object.entries(e.contextPanelByDirectory).map(([t,n])=>[t,e.contextPanelsOpenBeforeRightSidebarCollapse.includes(t)&&n.tabs.length>0?{...n,isOpen:!0}:n]));return e.hasManuallyResizedRightSidebar?{isRightSidebarOpen:!0,contextPanelByDirectory:t,contextPanelsOpenBeforeRightSidebarCollapse:[]}:{isRightSidebarOpen:!0,rightSidebarWidth:360,contextPanelByDirectory:t,contextPanelsOpenBeforeRightSidebarCollapse:[]}})},setRightSidebarOpen:e=>{t(t=>t.isRightSidebarOpen===e?t:{isRightSidebarOpen:e,rightSidebarWidth:e&&!t.hasManuallyResizedRightSidebar&&t.rightSidebarWidth!==360?360:t.rightSidebarWidth})},setRightSidebarWidth:e=>{t({rightSidebarWidth:Math.min(860,Math.max(360,e)),hasManuallyResizedRightSidebar:!0})},setRightSidebarTab:e=>{t({rightSidebarTab:e})},syncWorkspacePanelsForSessionSwitch:({previousSessionId:e,previousDirectory:n,nextSessionId:r,nextDirectory:i})=>{let a=typeof e==`string`?e.trim():``,o=typeof r==`string`?r.trim():``;a!==o&&t(e=>{let t=e.sessionWorkspacePanelById;a&&(t={...t,[a]:Ie(e,n)});let r=o?t[o]:void 0,s=Le(e.contextPanelByDirectory,i,r),c=I((n||``).trim()),l=I((i||``).trim()),u=s;if(c&&c!==l){let e=u[c];e?.isOpen&&(u={...u,[c]:{...e,isOpen:!1,touchedAt:Date.now()}})}let d=r?r.isRightSidebarOpen:!1,f=r?.rightSidebarTab??e.rightSidebarTab;return{sessionWorkspacePanelById:Fe(t,De),contextPanelByDirectory:u,isRightSidebarOpen:d,rightSidebarTab:f,contextPanelsOpenBeforeRightSidebarCollapse:[]}})},openContextPanelTab:(e,n)=>{let r=I((e||``).trim());r&&t(e=>{let t=e.contextPanelByDirectory[r],i=J(t),a={...e.contextPanelByDirectory,[r]:je(i,n)};if(n.mode===`diff`||n.mode===`file-diff`){let t={...e.contextToolDiffByDirectory};return delete t[r],{contextPanelByDirectory:X(a,20),contextToolDiffByDirectory:t}}return{contextPanelByDirectory:X(a,20)}})},openContextDiff:(e,t,r=!1,i=null,a,o,s)=>{let c=I((e||``).trim()),l=(t||``).trim();if(!c||!l)return;let u=B(i)??(r?`staged`:`working`);n().openContextPanelTab(c,{mode:`diff`,targetPath:l,stagedDiff:u===`staged`,diffScope:u,diffTargetLine:a,diffTurnMessageId:o,diffSessionId:s})},openContextToolDiff:(e,n,r,i,a,o)=>{let s=I((e||``).trim()),c=(n||``).trim(),l=r.flatMap(e=>{let t=R(e.path),n=typeof e.patch==`string`?e.patch:``;return t&&n.trim()?[{path:t,patch:n}]:[]});if(!s||!c||l.length===0)return;let u={mode:`diff`,targetPath:c,stagedDiff:!1,diffScope:`turn`,diffTargetLine:i,diffTurnMessageId:a,diffSessionId:o};t(e=>{let t=e.contextPanelByDirectory[s],n=J(t),r=X({...e.contextPanelByDirectory,[s]:je(n,u)},20),i=new Set(Object.keys(r)),o=Object.fromEntries(Object.entries(e.contextToolDiffByDirectory).filter(([e])=>i.has(e)));return o[s]={targetPath:c,patches:l,turnMessageId:V(a)},{contextPanelByDirectory:r,contextToolDiffByDirectory:o}})},openContextFileDiff:(e,t,r=!1,i=null)=>{let a=I((e||``).trim()),o=(t||``).trim();if(!a||!o)return;let s=B(i)??(r?`staged`:`working`);n().openContextPanelTab(a,{mode:`file-diff`,targetPath:o,stagedDiff:s===`staged`,diffScope:s})},openContextFile:(e,t,r)=>{let i=I((e||``).trim()),a=R(t);!i||!a||Z(n(),i,a,()=>n().openContextFile(e,t,r))&&(n().openContextPanelTab(i,{mode:`file`,targetPath:a,fileNotice:G(r?.fileNotice)}),n().setPendingFileFocusPath(a),n().setPendingFileNavigation(null),n().setPendingFileViewerMode(r?.viewerMode??null))},openContextFileAtLine:(e,t,r,i)=>{let a=I((e||``).trim()),o=R(t),s=Number.isFinite(r)?Math.max(1,Math.trunc(r)):1,c=Number.isFinite(i)?Math.max(1,Math.trunc(i)):1;!a||!o||Z(n(),a,o,()=>n().openContextFileAtLine(e,t,r,i))&&(n().openContextPanelTab(a,{mode:`file`,targetPath:o}),n().setPendingFileFocusPath(null),n().setPendingFileNavigation({path:o,line:s,column:c}))},openContextOverview:e=>{let t=I((e||``).trim());t&&n().openContextPanelTab(t,{mode:`context`})},openContextPreview:(e,t)=>{let r=I((e||``).trim()),i=(t||``).trim();if(!r||!i)return;let a=null;try{let e=new URL(i);(e.protocol===`http:`||e.protocol===`https:`)&&(a=e.host||e.hostname||`Preview`)}catch{}n().openContextPanelTab(r,{mode:`preview`,targetPath:i,dedupeKey:i,label:a})},openContextBrowser:(e,t=``)=>{let r=I((e||``).trim());if(!r)return;let i=typeof t==`string`&&t.trim().length>0?t.trim():``;n().openContextPanelTab(r,{mode:`browser`,targetPath:i,dedupeKey:`desktop-browser`,label:`Browser`})},setContextPanelTabTargetPath:(e,n,r)=>{let i=I((e||``).trim()),a=(n||``).trim();!i||!a||t(e=>{let t=e.contextPanelByDirectory[i];return t?{contextPanelByDirectory:{...e.contextPanelByDirectory,[i]:Pe(t,a,r)}}:e})},setActiveContextPanelTab:(e,r)=>{let i=I((e||``).trim()),a=(r||``).trim();if(!i||!a)return;let o=n().contextPanelByDirectory[i]?.tabs.find(e=>e.id===a);o?.mode===`file`&&!Z(n(),i,o.targetPath,()=>n().setActiveContextPanelTab(e,r))||t(e=>{let t=e.contextPanelByDirectory[i],n=J(t);return!n.tabs.some(e=>e.id===a)||n.activeTabId===a&&n.isOpen?e:{contextPanelByDirectory:X({...e.contextPanelByDirectory,[i]:{...n,isOpen:!0,activeTabId:a,touchedAt:Date.now(),tabs:n.tabs.map(e=>e.id===a?{...e,touchedAt:Date.now()}:e)}},20)}})},reorderContextPanelTabs:(e,n,r)=>{let i=I((e||``).trim()),a=(n||``).trim(),o=(r||``).trim();!i||!a||!o||t(e=>{let t=e.contextPanelByDirectory[i],n=J(t);if(!n.tabs.some(e=>e.id===a)||!n.tabs.some(e=>e.id===o))return e;let r=Ne(n,a,o);return r.tabs===n.tabs?e:{contextPanelByDirectory:X({...e.contextPanelByDirectory,[i]:r},20)}})},closeContextPanelTab:(e,n)=>{let r=I((e||``).trim()),i=(n||``).trim();!r||!i||t(e=>{let t=e.contextPanelByDirectory[r],n=J(t);if(!n.tabs.some(e=>e.id===i))return e;let a={...e.contextPanelByDirectory,[r]:Me(n,i)};if(i===`diff`){let t={...e.contextToolDiffByDirectory};return delete t[r],{contextPanelByDirectory:X(a,20),contextToolDiffByDirectory:t}}return{contextPanelByDirectory:X(a,20)}})},closeActiveContextPanelTab:e=>{let t=I((e||``).trim());if(!t)return!1;let r=n().contextPanelByDirectory[t];if(!r?.isOpen||r.tabs.length===0)return!1;let i=q(r.tabs,r.activeTabId);return i?(n().closeContextPanelTab(t,i),!0):!1},closeContextPanel:e=>{let n=I((e||``).trim());n&&t(e=>{let t=e.contextPanelByDirectory[n];return!t||!t.isOpen?e:{contextPanelByDirectory:X({...e.contextPanelByDirectory,[n]:{...J(t),isOpen:!1}},20)}})},toggleContextPanelExpanded:e=>{let n=I((e||``).trim());n&&t(e=>{let t=e.contextPanelByDirectory[n],r=J(t);return{contextPanelByDirectory:X({...e.contextPanelByDirectory,[n]:{...r,expanded:!r.expanded}},20)}})},setContextPanelWidth:(e,n)=>{let r=I((e||``).trim());r&&t(e=>{let t=e.contextPanelByDirectory[r],i=J(t);return{contextPanelByDirectory:X({...e.contextPanelByDirectory,[r]:{...i,width:L(n)}},20)}})},toggleBottomTerminal:()=>{t(e=>{let t=!e.isBottomTerminalOpen;return t&&typeof window<`u`?{isBottomTerminalOpen:t,bottomTerminalHeight:Math.floor(window.innerHeight*.32),hasManuallyResizedBottomTerminal:!1}:{isBottomTerminalOpen:t}})},setBottomTerminalOpen:e=>{t(t=>{if(t.isBottomTerminalOpen===e){if(!e)return t;if(!t.hasManuallyResizedBottomTerminal&&typeof window<`u`){let n=Math.floor(window.innerHeight*.32);return t.bottomTerminalHeight===n&&t.hasManuallyResizedBottomTerminal===!1?t:{isBottomTerminalOpen:e,bottomTerminalHeight:n,hasManuallyResizedBottomTerminal:!1}}return t}return e&&typeof window<`u`?{isBottomTerminalOpen:e,bottomTerminalHeight:Math.floor(window.innerHeight*.32),hasManuallyResizedBottomTerminal:!1}:{isBottomTerminalOpen:e}})},setBottomTerminalExpanded:e=>{t({isBottomTerminalExpanded:e})},setBottomTerminalHeight:e=>{t({bottomTerminalHeight:e,hasManuallyResizedBottomTerminal:!0})},setSessionSwitcherOpen:e=>{n().isSessionSwitcherOpen!==e&&t({isSessionSwitcherOpen:e})},setSessionDropdownOpen:e=>{n().isSessionDropdownOpen!==e&&t({isSessionDropdownOpen:e})},setMainTabGuard:e=>{n().mainTabGuard!==e&&t({mainTabGuard:e})},setActiveMainTab:e=>{let r=n().mainTabGuard;return r&&!r(e)?!1:(P.set(F(),e),t({activeMainTab:e}),!0)},prepareForRuntimeSwitch:e=>{P.set(F(e),n().activeMainTab),t({contextToolDiffByDirectory:{}})},restoreForRuntimeSwitch:e=>{t({activeMainTab:P.get(F(e))??`chat`})},setPendingDiffFile:(e,n=!1,r=null,i)=>{t({pendingDiffFile:e,pendingDiffStaged:e?n:!1,pendingDiffScope:e?r:null,pendingDiffLine:e&&typeof i==`number`&&Number.isFinite(i)?Math.max(1,Math.trunc(i)):null})},setPendingDiagramFile:e=>{t({pendingDiagramFile:e})},setPendingFileNavigation:e=>{t({pendingFileNavigation:e})},setPendingFileFocusPath:e=>{t({pendingFileFocusPath:e})},setPendingFileViewerMode:e=>{t({pendingFileViewerMode:e})},navigateToDiff:(e,r=!1,i=null,a)=>{let o=n().mainTabGuard;o&&!o(`diff`)||t({pendingDiffFile:e,pendingDiffStaged:r,pendingDiffScope:i,pendingDiffLine:typeof a==`number`&&Number.isFinite(a)?Math.max(1,Math.trunc(a)):null,activeMainTab:`diff`})},consumePendingDiffFile:()=>{let{pendingDiffFile:e}=n();return e&&t({pendingDiffFile:null,pendingDiffStaged:!1,pendingDiffScope:null,pendingDiffLine:null}),e},navigateToDiagram:e=>{let r=n().mainTabGuard;r&&!r(`diagram`)||t({pendingDiagramFile:e,activeMainTab:`diagram`})},consumePendingDiagramFile:()=>{let{pendingDiagramFile:e}=n();return e&&t({pendingDiagramFile:null}),e},setIsMobile:e=>{t({isMobile:e})},toggleCommandPalette:()=>{t(e=>({isCommandPaletteOpen:!e.isCommandPaletteOpen}))},setCommandPaletteOpen:e=>{t({isCommandPaletteOpen:e})},toggleHelpDialog:()=>{t(e=>({isHelpDialogOpen:!e.isHelpDialogOpen}))},setHelpDialogOpen:e=>{t({isHelpDialogOpen:e})},setAboutDialogOpen:e=>{t({isAboutDialogOpen:e})},setOpenCodeStatusDialogOpen:e=>{t({isOpenCodeStatusDialogOpen:e})},setOpenCodeStatusText:e=>{t({openCodeStatusText:e})},setSessionCreateDialogOpen:e=>{t({isSessionCreateDialogOpen:e})},setScheduledTasksDialogOpen:e=>{t({isScheduledTasksDialogOpen:e})},setScheduledTaskOpenRequest:e=>{t({scheduledTaskOpenRequest:e})},setArchivedSessionsDialogOpen:e=>{t({isArchivedSessionsDialogOpen:e})},setSettingsDialogOpen:e=>{t(t=>e?t.settingsHasOpenedOnce?{isSettingsDialogOpen:!0}:{isSettingsDialogOpen:!0,settingsHasOpenedOnce:!0}:{isSettingsDialogOpen:!1})},setNewWorktreeDialogOpen:e=>{t({isNewWorktreeDialogOpen:e})},setModelSelectorOpen:(e,n)=>{t(t=>e?{isModelSelectorOpen:!0,isAgentSelectorOpen:!1,isModelSelectorInstant:n?.instant===!0}:{isModelSelectorOpen:!1,isModelSelectorInstant:n?.instant===!0||n?.instant!==!1&&t.isModelSelectorInstant})},setAgentSelectorOpen:(e,n)=>{t(t=>e?{isAgentSelectorOpen:!0,isModelSelectorOpen:!1,isAgentSelectorInstant:n?.instant===!0}:{isAgentSelectorOpen:!1,isAgentSelectorInstant:n?.instant!==!1&&t.isAgentSelectorInstant})},setSidebarSection:e=>{t({sidebarSection:e})},setSettingsPage:e=>{t({settingsPage:e})},setSettingsProjectsSelectedId:e=>{t({settingsProjectsSelectedId:e})},setSettingsRemoteInstancesSelectedId:e=>{t({settingsRemoteInstancesSelectedId:e})},setEventStreamStatus:(e,n)=>{t({eventStreamStatus:e,eventStreamHint:n??null})},setShowReasoningTraces:n=>{t({showReasoningTraces:n}),e(n)},setSessionTitleRefreshEnabled:e=>{t({sessionTitleRefreshEnabled:e})},setSessionGoalEnabled:e=>{t({sessionGoalEnabled:e})},setSessionGoalDefaultBudgetEnabled:e=>{t({sessionGoalDefaultBudgetEnabled:e})},setSessionGoalDefaultBudget:e=>{t({sessionGoalDefaultBudget:e})},setCollapsibleThinkingBlocks:e=>{t({collapsibleThinkingBlocks:e})},setChatRenderMode:e=>{t({chatRenderMode:e})},setActivityRenderMode:e=>{t({activityRenderMode:e})},setShowDeletionDialog:e=>{t({showDeletionDialog:e})},setAutoDeleteEnabled:e=>{t({autoDeleteEnabled:e})},setAutoDeleteAfterDays:e=>{t({autoDeleteAfterDays:Math.max(1,Math.min(365,e))})},setSessionRetentionAction:e=>{t({sessionRetentionAction:e})},setAutoDeleteLastRunAt:e=>{t({autoDeleteLastRunAt:e})},setMessageLimit:e=>{t({messageLimit:Math.max(10,Math.min(500,Math.round(e)))})},setFontSize:e=>{t({fontSize:Math.max(50,Math.min(200,e))}),n().applyTypography()},setCodeFontSize:e=>{t({codeFontSize:Math.max(50,Math.min(200,e))}),n().applyTypography()},setGlobalDraftStarters:e=>{t({globalDraftStarters:e})},setTerminalFontSize:e=>{t({terminalFontSize:Math.max(9,Math.min(52,Math.round(e)))})},setEditorFontSize:e=>{t({editorFontSize:Math.max(9,Math.min(32,Math.round(e)))})},setUiFont:e=>{t({uiFont:e})},setMonoFont:e=>{t({monoFont:e})},setPadding:e=>{t({padding:Math.max(50,Math.min(200,e))}),n().applyPadding()},setCornerRadius:e=>{t({cornerRadius:e})},applyTypography:()=>{let{fontSize:e,codeFontSize:t}=n(),r=document.documentElement,i=e/100,a=t/100,o=typeof document<`u`&&v(r),s=Object.keys(g);if(i===1&&a===1){for(let e of s)r.style.removeProperty(_(e));return}for(let e of s){let t=ce(e,{mobile:o}),n=parseFloat(t);if(!Number.isFinite(n))continue;let s=e===`code`?a:i;if(s===1){r.style.removeProperty(_(e));continue}if(o){let t=n*16*s;r.style.setProperty(_(e),`calc(${Math.round(t*1e3)/1e3} * var(--dpt))`)}else r.style.setProperty(_(e),`${n*s}rem`)}},applyPadding:()=>{let{padding:e}=n(),t=document.documentElement,r=e/100;if(r===1){t.style.removeProperty(`--user-padding-scale`),t.style.removeProperty(`--line-height-tight`),t.style.removeProperty(`--line-height-normal`),t.style.removeProperty(`--line-height-relaxed`),t.style.removeProperty(`--line-height-loose`);return}let i=Math.sqrt(r);t.style.setProperty(`--user-padding-scale`,i.toString());let a=1+(r-1)*.15;t.style.setProperty(`--line-height-tight`,(1.25*a).toFixed(3)),t.style.setProperty(`--line-height-normal`,(1.5*a).toFixed(3)),t.style.setProperty(`--line-height-relaxed`,(1.625*a).toFixed(3)),t.style.setProperty(`--line-height-loose`,(2*a).toFixed(3))},setDiffLayoutPreference:e=>{t({diffLayoutPreference:e})},setDiffFileLayout:(e,n)=>{t(t=>({diffFileLayout:{...t.diffFileLayout,[e]:n}}))},setDiffWrapLines:e=>{t({diffWrapLines:e})},setGitChangesViewMode:e=>{t({gitChangesViewMode:e})},setInputBarOffset:e=>{t({inputBarOffset:e})},setMobileKeyboardMode:e=>{t(t=>t.mobileKeyboardMode===e?t:{mobileKeyboardMode:e})},toggleFavoriteModel:(e,n,r)=>{t(t=>t.favoriteModels.some(t=>t.providerID===e&&t.modelID===n)?{favoriteModels:t.favoriteModels.filter(t=>t.providerID!==e||t.modelID!==n)}:{favoriteModels:[r===void 0?{providerID:e,modelID:n}:{providerID:e,modelID:n,variant:r},...t.favoriteModels]})},reorderFavoriteModel:(e,n,r,i)=>{t(t=>{let a=t.favoriteModels.findIndex(t=>t.providerID===e&&t.modelID===n),o=t.favoriteModels.findIndex(e=>e.providerID===r&&e.modelID===i);if(a===-1||o===-1||a===o)return t;let s=t.favoriteModels.slice(),[c]=s.splice(a,1);return c?(s.splice(o,0,c),{favoriteModels:s}):t})},setProviderOrder:e=>{t(t=>{let n=e.filter(e=>typeof e==`string`&&e.length>0),r=t.providerOrder;return r.length===n.length&&r.every((e,t)=>e===n[t])?t:{providerOrder:n}})},toggleHiddenModel:(e,n)=>{t(t=>t.hiddenModels.some(t=>t.providerID===e&&t.modelID===n)?{hiddenModels:t.hiddenModels.filter(t=>t.providerID!==e||t.modelID!==n)}:{hiddenModels:[{providerID:e,modelID:n},...t.hiddenModels]})},isHiddenModel:(e,t)=>{let{hiddenModels:r}=n();return r.some(n=>n.providerID===e&&n.modelID===t)},hideAllModels:(e,n)=>{t(t=>{let r=t.hiddenModels.filter(t=>t.providerID!==e);return{hiddenModels:[...n.filter(e=>typeof e==`string`&&e.length>0).map(t=>({providerID:e,modelID:t})),...r]}})},showAllModels:e=>{t(t=>({hiddenModels:t.hiddenModels.filter(t=>t.providerID!==e)}))},toggleModelProviderCollapsed:e=>{let n=typeof e==`string`?e.trim():``;n&&t(e=>e.collapsedModelProviders.includes(n)?{collapsedModelProviders:e.collapsedModelProviders.filter(e=>e!==n)}:{collapsedModelProviders:[...e.collapsedModelProviders,n]})},setModelProvidersCollapsed:(e,n)=>{let r=Array.from(new Set(e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(Boolean)));r.length!==0&&t(e=>{let t=new Set(r),i=e.collapsedModelProviders.filter(e=>!t.has(e));return{collapsedModelProviders:n?[...i,...r]:i}})},isFavoriteModel:(e,t)=>{let{favoriteModels:r}=n();return r.some(n=>n.providerID===e&&n.modelID===t)},addRecentModel:(e,n,r)=>{t(t=>{let i=[r===void 0?{providerID:e,modelID:n}:{providerID:e,modelID:n,variant:r},...t.recentModels.filter(t=>t.providerID!==e||t.modelID!==n)].slice(0,5),a=t.favoriteModels.findIndex(t=>t.providerID===e&&t.modelID===n);if(a===-1)return{recentModels:i};let o=t.favoriteModels[a];if(o.variant===r)return{recentModels:i};let s=r===void 0?{providerID:o.providerID,modelID:o.modelID}:{providerID:o.providerID,modelID:o.modelID,variant:r},c=t.favoriteModels.slice();return c[a]=s,{recentModels:i,favoriteModels:c}})},addRecentAgent:e=>{let n=typeof e==`string`?e.trim():``;n&&t(e=>{if(e.recentAgents.includes(n))return e;let t=e.recentAgents;return{recentAgents:[n,...t].slice(0,5)}})},addRecentEffort:(e,n,r)=>{let i=typeof e==`string`?e.trim():``,a=typeof n==`string`?n.trim():``;if(!i||!a)return;let o=`${i}/${a}`,s=typeof r==`string`&&r.trim().length>0?r.trim():`default`;t(e=>{let t=e.recentEfforts[o]??[];if(t.includes(s))return e;let n=t;return{recentEfforts:{...e.recentEfforts,[o]:[s,...n].slice(0,5)}}})},updateProportionalSidebarWidths:()=>{typeof window>`u`||t(e=>{let t={};if(e.isBottomTerminalOpen&&!e.hasManuallyResizedBottomTerminal){let n=Math.floor(window.innerHeight*.32);e.bottomTerminalHeight!==n&&(t.bottomTerminalHeight=n)}return Object.keys(t).length>0?t:e})},applyTheme:()=>{let{theme:e}=n(),t=document.documentElement;if(t.classList.remove(`light`,`dark`),e===`system`){let e=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;t.classList.add(e)}else t.classList.add(e)},setMultiRunLauncherOpen:e=>{t({isMultiRunLauncherOpen:e})},openMultiRunLauncher:()=>{t({isMultiRunLauncherOpen:!0,isSessionSwitcherOpen:!1})},setTimelineDialogOpen:e=>{t({isTimelineDialogOpen:e})},setPromptNavigatorPanelOpen:e=>{t({isPromptNavigatorPanelOpen:e})},togglePromptNavigatorPanel:()=>{t(e=>({isPromptNavigatorPanelOpen:!e.isPromptNavigatorPanelOpen}))},setImagePreviewOpen:e=>{t({isImagePreviewOpen:e})},setNativeNotificationsEnabled:e=>{t({nativeNotificationsEnabled:e})},setNotificationMode:e=>{t({notificationMode:e})},setShowTerminalQuickKeysOnDesktop:e=>{t({showTerminalQuickKeysOnDesktop:e})},setNotifyOnSubtasks:e=>{t({notifyOnSubtasks:e})},setDockBadgeEnabled:e=>{t({dockBadgeEnabled:e})},setNotifyOnCompletion:e=>{t({notifyOnCompletion:e})},setNotifyOnError:e=>{t({notifyOnError:e})},setNotifyOnQuestion:e=>{t({notifyOnQuestion:e})},setNotifyOnPermission:e=>{t({notifyOnPermission:e})},setNotifyOnScheduledTasks:e=>{t({notifyOnScheduledTasks:e})},setNotifyOnAssistants:e=>{t({notifyOnAssistants:e})},setNotifyOnGoals:e=>{t({notifyOnGoals:e})},setNotificationTemplates:e=>{t({notificationTemplates:e})},setSummarizeLastMessage:e=>{t({summarizeLastMessage:e})},setSummaryThreshold:e=>{t({summaryThreshold:e})},setSummaryLength:e=>{t({summaryLength:e})},setMaxLastMessageLength:e=>{t({maxLastMessageLength:e})},setPersistChatDraft:e=>{t({persistChatDraft:e})},setShowOpenCodeUpdateNotifications:e=>{t({showOpenCodeUpdateNotifications:e})},setInputSpellcheckEnabled:e=>{t({inputSpellcheckEnabled:e})},setWideChatLayoutEnabled:e=>{t({wideChatLayoutEnabled:e})},setCodeBlockLineWrap:e=>{t({codeBlockLineWrap:e})},setShowToolFileIcons:e=>{t({showToolFileIcons:e})},setShowTurnChangedFiles:e=>{t({showTurnChangedFiles:e})},setShowExpandedBashTools:e=>{t({showExpandedBashTools:e})},setShowSubagentTaskDetails:e=>{t({showSubagentTaskDetails:e})},setTimeFormatPreference:e=>{t({timeFormatPreference:e})},setWeekStartPreference:e=>{t({weekStartPreference:e})},setDesktopWindowControlsPosition:e=>{t({desktopWindowControlsPosition:e})},setUserMessageRenderingMode:e=>{t({userMessageRenderingMode:e})},setCollapsibleUserMessages:e=>{t({collapsibleUserMessages:e})},setStickyUserHeader:e=>{t({stickyUserHeader:e})},setPromptNavigatorEnabled:e=>{t({promptNavigatorEnabled:e})},setExpandedEditorToolbar:e=>{t({expandedEditorToolbar:e})},setShowSplitAssistantMessageActions:e=>{t({showSplitAssistantMessageActions:e})},setShowAssistantTps:e=>{t({showAssistantTps:e})},setAllowPromptingSubagentSessions:e=>{t({allowPromptingSubagentSessions:e})},setIsMobileSessionStatusBarCollapsed:e=>{t({isMobileSessionStatusBarCollapsed:e})},setMobileSessionPanelOpen:e=>{t({mobileSessionPanelOpen:e})},setMobileSessionFilterProjectId:e=>{t({mobileSessionFilterProjectId:e})},setOtaChannelOverride:e=>{t({otaChannelOverride:e})},setReportUsage:e=>{t({reportUsage:e})},viewPagerPage:`center`,setViewPagerPage:e=>{t({viewPagerPage:e}),t(e===`left`?{isSessionSwitcherOpen:!0,isRightSidebarOpen:!1}:e===`right`?{isRightSidebarOpen:!0,isSessionSwitcherOpen:!1}:{isSessionSwitcherOpen:!1,isRightSidebarOpen:!1})},setShortcutOverride:(e,n)=>{t(t=>({shortcutOverrides:{...t.shortcutOverrides,[e]:n}}))},clearShortcutOverride:e=>{t(t=>{let n={...t.shortcutOverrides};return delete n[e],{shortcutOverrides:n}})},resetAllShortcutOverrides:()=>{t({shortcutOverrides:{}})},setFileEditorKeymap:e=>{t({fileEditorKeymap:D(e)})},toggleExpandedInput:()=>{t(e=>({isExpandedInput:!e.isExpandedInput}))},setExpandedInput:e=>{t({isExpandedInput:e})},setWorkStatusPanelEnabled:e=>{t({workStatusPanelEnabled:e,workStatusOverlayOpen:!1})},setWorkStatusPanelVisible:e=>{t(t=>t.workStatusPanelVisible===e?t:{workStatusPanelVisible:e})},setWorkStatusPanelFits:e=>{t(t=>t.workStatusPanelFits===e?t:{workStatusPanelFits:e})},setWorkStatusOverlayOpen:e=>{t({workStatusOverlayOpen:e})},setWorkStatusSectionVisible:(e,n)=>{t(t=>{let r=t.workStatusHiddenSections.filter(t=>t!==e);return n||r.push(e),{workStatusHiddenSections:r}})},setWorkStatusHiddenSections:e=>{t({workStatusHiddenSections:e})},setWorkStatusSectionOrder:e=>{t({workStatusSectionOrder:e})},setWorkStatusSectionExpanded:(e,n)=>{t(t=>({workStatusExpandedSections:{...t.workStatusExpandedSections,[e]:n}}))},setWorkStatusScrollTop:e=>{t({workStatusScrollTop:e})}}),{name:`ui-store`,storage:f(),version:14,migrate:(e,t)=>{if(!e||typeof e!=`object`)return e;let n=e;if(delete n.mermaidRenderingMode,ae(n,t),t<11&&n.sidebarWidth===280&&(n.sidebarWidth=N),t<10&&delete n.diffViewMode,t<13&&(delete n.notesPanelHeight,delete n.todoPanelHeight,(n.activeMainTab===`plan`||n.activeMainTab===`context`)&&(n.activeMainTab=`chat`),n.rightSidebarTab===`context`&&(n.rightSidebarTab=`files`)),t<1&&we(n.notificationTemplates)&&(n.notificationTemplates={completion:{...O.completion},error:{...O.error},question:{...O.question},subtask:{...O.subtask}}),t<3){let e=new Set([90,120,180,220]),t=n.memoryLimitHistorical,r=n.memoryLimitActiveSession;typeof t==`number`&&!e.has(t)?n.messageLimit=t:typeof r==`number`&&!e.has(r)&&(n.messageLimit=r),delete n.memoryLimitHistorical,delete n.memoryLimitViewport,delete n.memoryLimitActiveSession}if((typeof n.rightSidebarTab!=`string`||n.rightSidebarTab!==`git`&&n.rightSidebarTab!==`files`&&n.rightSidebarTab!==`browser`)&&(n.rightSidebarTab=`files`),n.contextPanelByDirectory=Y(n.contextPanelByDirectory),t<5)if(!n.shortcutOverrides||typeof n.shortcutOverrides!=`object`)n.shortcutOverrides={};else{let e=n.shortcutOverrides,t={};for(let[n,r]of Object.entries(e))typeof n==`string`&&typeof r==`string`&&(t[n]=r);n.shortcutOverrides=t}return t<6&&(n.contextPanelByDirectory=Y(n.contextPanelByDirectory)),t<7&&(n.contextPanelByDirectory=Y(n.contextPanelByDirectory)),t<8&&n.gitChangesViewMode!==`flat`&&n.gitChangesViewMode!==`tree`&&(n.gitChangesViewMode=`tree`),n.fileEditorKeymap=D(n.fileEditorKeymap),n},partialize:e=>({theme:e.theme,isSidebarOpen:e.isSidebarOpen,sidebarWidth:e.sidebarWidth,isRightSidebarOpen:e.isRightSidebarOpen,rightSidebarWidth:e.rightSidebarWidth,rightSidebarTab:e.rightSidebarTab,contextPanelByDirectory:Object.fromEntries(Object.entries(e.contextPanelByDirectory).map(([e,t])=>{let n=t.tabs.filter(e=>e.mode!==`btw`);return[e,{...t,tabs:n,activeTabId:q(n,t.activeTabId),isOpen:t.isOpen&&n.length>0}]})),isBottomTerminalOpen:e.isBottomTerminalOpen,isBottomTerminalExpanded:e.isBottomTerminalExpanded,bottomTerminalHeight:e.bottomTerminalHeight,isSessionSwitcherOpen:e.isSessionSwitcherOpen,activeMainTab:e.activeMainTab,sidebarSection:e.sidebarSection,settingsPage:e.settingsPage,settingsHasOpenedOnce:e.settingsHasOpenedOnce,settingsProjectsSelectedId:e.settingsProjectsSelectedId,settingsRemoteInstancesSelectedId:e.settingsRemoteInstancesSelectedId,isSessionCreateDialogOpen:e.isSessionCreateDialogOpen,showReasoningTraces:e.showReasoningTraces,sessionTitleRefreshEnabled:e.sessionTitleRefreshEnabled,sessionGoalEnabled:e.sessionGoalEnabled,sessionGoalDefaultBudgetEnabled:e.sessionGoalDefaultBudgetEnabled,sessionGoalDefaultBudget:e.sessionGoalDefaultBudget,collapsibleThinkingBlocks:e.collapsibleThinkingBlocks,chatRenderMode:e.chatRenderMode,activityRenderMode:e.activityRenderMode,showDeletionDialog:e.showDeletionDialog,autoDeleteEnabled:e.autoDeleteEnabled,autoDeleteAfterDays:e.autoDeleteAfterDays,sessionRetentionAction:e.sessionRetentionAction,autoDeleteLastRunAt:e.autoDeleteLastRunAt,messageLimit:e.messageLimit,fontSize:e.fontSize,codeFontSize:e.codeFontSize,globalDraftStarters:e.globalDraftStarters,terminalFontSize:e.terminalFontSize,editorFontSize:e.editorFontSize,uiFont:e.uiFont,monoFont:e.monoFont,padding:e.padding,cornerRadius:e.cornerRadius,favoriteModels:e.favoriteModels,hiddenModels:e.hiddenModels,providerOrder:e.providerOrder,collapsedModelProviders:e.collapsedModelProviders,recentModels:e.recentModels,recentAgents:e.recentAgents,recentEfforts:e.recentEfforts,diffLayoutPreference:e.diffLayoutPreference,diffWrapLines:e.diffWrapLines,gitChangesViewMode:e.gitChangesViewMode,nativeNotificationsEnabled:e.nativeNotificationsEnabled,notificationMode:e.notificationMode,showTerminalQuickKeysOnDesktop:e.showTerminalQuickKeysOnDesktop,notifyOnSubtasks:e.notifyOnSubtasks,dockBadgeEnabled:e.dockBadgeEnabled,notifyOnCompletion:e.notifyOnCompletion,notifyOnError:e.notifyOnError,notifyOnQuestion:e.notifyOnQuestion,notifyOnPermission:e.notifyOnPermission,notifyOnScheduledTasks:e.notifyOnScheduledTasks,notifyOnAssistants:e.notifyOnAssistants,notifyOnGoals:e.notifyOnGoals,notificationTemplates:e.notificationTemplates,summarizeLastMessage:e.summarizeLastMessage,summaryThreshold:e.summaryThreshold,summaryLength:e.summaryLength,maxLastMessageLength:e.maxLastMessageLength,persistChatDraft:e.persistChatDraft,showOpenCodeUpdateNotifications:e.showOpenCodeUpdateNotifications,inputSpellcheckEnabled:e.inputSpellcheckEnabled,wideChatLayoutEnabled:e.wideChatLayoutEnabled,workStatusPanelEnabled:e.workStatusPanelEnabled,workStatusHiddenSections:e.workStatusHiddenSections,workStatusSectionOrder:e.workStatusSectionOrder,workStatusExpandedSections:e.workStatusExpandedSections,workStatusScrollTop:e.workStatusScrollTop,codeBlockLineWrap:e.codeBlockLineWrap,showToolFileIcons:e.showToolFileIcons,showTurnChangedFiles:e.showTurnChangedFiles,showExpandedBashTools:e.showExpandedBashTools,showSubagentTaskDetails:e.showSubagentTaskDetails,timeFormatPreference:e.timeFormatPreference,weekStartPreference:e.weekStartPreference,desktopWindowControlsPosition:e.desktopWindowControlsPosition,userMessageRenderingMode:e.userMessageRenderingMode,collapsibleUserMessages:e.collapsibleUserMessages,stickyUserHeader:e.stickyUserHeader,promptNavigatorEnabled:e.promptNavigatorEnabled,expandedEditorToolbar:e.expandedEditorToolbar,showSplitAssistantMessageActions:e.showSplitAssistantMessageActions,showAssistantTps:e.showAssistantTps,allowPromptingSubagentSessions:e.allowPromptingSubagentSessions,isMobileSessionStatusBarCollapsed:e.isMobileSessionStatusBarCollapsed,mobileSessionFilterProjectId:e.mobileSessionFilterProjectId,otaChannelOverride:e.otaChannelOverride,shortcutOverrides:e.shortcutOverrides,fileEditorKeymap:e.fileEditorKeymap})}),{name:`ui-store`}));e(Q.getState().showReasoningTraces);var $=Q.persist;$?.hasHydrated?.()&&e(Q.getState().showReasoningTraces),typeof $?.onFinishHydration==`function`&&$.onFinishHydration(()=>{e(Q.getState().showReasoningTraces)});export{h as C,ie as S,b as _,E as a,f as b,de as c,x as d,ue as f,se as g,g as h,T as i,pe as l,me as m,Q as n,_e as o,he as p,be as r,S as s,I as t,fe as u,y as v,ne as x,v as y};
|
package/dist/assets/{useWorkerHighlightedLines-DmI50_3w.js → useWorkerHighlightedLines-BFygybD8.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t}from"./runtime-fetch-QCWYlAx0.js";import{Mn as n,ln as r}from"./persistence-DUPZl7Oy.js";import{it as i,rt as a}from"./vendor-base-ui-CdzJ6My_.js";import{n as o}from"./platform-z2erC6Bs.js";import{v as s}from"./useUIStore-pl39iO82.js";import{n as c}from"./vendor-react-BP2cRVqX.js";import{a as l,n as u}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{f as d,r as f,t as p}from"./button-DfHNBl0U.js";import{n as m}from"./useThemeSystem-8jhE4Zyk.js";import{n as h}from"./Icon-DxBvAKXH.js";import{i as g,n as _,t as v}from"./tooltip-BQgoGUWx.js";import{a as y,i as b,o as x,t as S}from"./image-loading-DLh8WsH4.js";import{n as C}from"./MarkdownRenderer-DpXaDH86.js";import{n as w,o as T,s as E,t as D}from"./markdown-worker-DFNZ3KJ_.js";import{n as ee}from"./markdownTheme-CV7_0QAL.js";import{t as te}from"./vendor-tanstack-react-virtual-B_EO--9t.js";var O=e(i(),1),k=c(),A=a(),ne=`w-[min(30rem,calc(100cqw-1rem))] min-w-[280px] max-w-full overflow-hidden rounded-xl shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,j={maxWidth:`min(28rem, calc(100cqw - 4ch))`,backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`},M=`flex items-center justify-between gap-3 border-b border-[var(--surface-subtle)] px-3 py-2.5`,N=`text-xs font-medium leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,re=`text-xs tabular-nums leading-4 text-muted-foreground md:text-[0.8125rem] md:leading-5`,P=`m-0 list-none divide-y divide-[var(--surface-subtle)] p-0`,F=`${P} max-h-[min(22rem,50vh)] overflow-y-auto`,ie=`${P} w-full`,ae={className:`p-0 rounded-none`,maxHeightClass:`max-h-[46vh]`,disableHorizontal:!0},I=`px-2.5 py-1.5 text-xs leading-4 md:py-2 md:text-[0.8125rem] md:leading-5`,oe=`flex min-w-0 items-center gap-1 text-xs leading-4 text-muted-foreground md:gap-1.5 md:text-[0.8125rem] md:leading-5`,se=`min-w-0 truncate text-xs leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,ce=`inline-flex shrink-0 items-center gap-1 text-xs leading-4 tabular-nums text-muted-foreground md:text-[0.8125rem] md:leading-5`,le=`h-3 w-3 shrink-0 md:h-3.5 md:w-3.5`,ue={in_progress:`text-foreground`,pending:`text-foreground`,completed:`text-muted-foreground line-through`,cancelled:`text-muted-foreground line-through`},L={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},R=e=>{let t=(0,k.c)(26),{todo:n,isActive:r,activeRef:i}=e,{t:a}=d(),o=z.has(n.status)?n.status:`pending`,s=L[o],c;t[0]!==a||t[1]!==s?(c=a(s),t[0]=a,t[1]=s,t[2]=c):c=t[2];let l=c,u;t[3]===o?u=t[4]:(u=o===`in_progress`?(0,A.jsx)(h,{name:`record-circle`,className:`h-3.5 w-3.5 text-[var(--status-info)]`,"aria-hidden":`true`}):o===`completed`?(0,A.jsx)(h,{name:`checkbox-circle`,className:`h-3.5 w-3.5 text-[var(--status-success)]`,"aria-hidden":`true`}):(0,A.jsx)(h,{name:`time`,className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":`true`}),t[3]=o,t[4]=u);let p=u,m=r?`step`:void 0,y=r&&`bg-[var(--surface-muted)] before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-[var(--status-info)]`,b;t[5]===y?b=t[6]:(b=f(`group relative grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] items-start gap-2.5`,I,y),t[5]=y,t[6]=b);let x;t[7]!==p||t[8]!==l?(x=(0,A.jsx)(g,{asChild:!0,children:(0,A.jsx)(`span`,{className:`flex size-4 items-center justify-center`,"aria-label":l,children:p})}),t[7]=p,t[8]=l,t[9]=x):x=t[9];let S;t[10]===l?S=t[11]:(S=(0,A.jsx)(_,{side:`left`,sideOffset:6,children:l}),t[10]=l,t[11]=S);let C;t[12]!==x||t[13]!==S?(C=(0,A.jsxs)(v,{children:[x,S]}),t[12]=x,t[13]=S,t[14]=C):C=t[14];let w=ue[o],T;t[15]===w?T=t[16]:(T=f(`block whitespace-normal break-words`,w),t[15]=w,t[16]=T);let E;t[17]!==T||t[18]!==n.content?(E=(0,A.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,A.jsx)(`span`,{className:T,children:n.content})}),t[17]=T,t[18]=n.content,t[19]=E):E=t[19];let D;return t[20]!==i||t[21]!==E||t[22]!==m||t[23]!==b||t[24]!==C?(D=(0,A.jsxs)(`li`,{ref:i,"aria-current":m,className:b,children:[C,E]}),t[20]=i,t[21]=E,t[22]=m,t[23]=b,t[24]=C,t[25]=D):D=t[25],D},z=new Set([`in_progress`,`pending`,`completed`,`cancelled`]),B=`image/png`,V=l(`OpenChamberMedia`),H=e=>{let t=e.toLowerCase().split(`;`)[0]?.trim()||B;if(t===`image/jpeg`||t===`image/jpg`)return`jpg`;if(t===`image/webp`)return`webp`;if(t===`image/gif`)return`gif`;if(t===`image/svg+xml`)return`svg`;if(t===`image/png`)return`png`;let n=t.split(`/`)[1];return n&&/^[a-z0-9.+-]+$/i.test(n)?n:`png`},U=(e,t)=>{let n=`image.${H(t)}`,r=(((e||``).trim()||n).split(/[\\/]/).pop()||n).replace(/[^\w.\- ()[\]]+/g,`_`).replace(/^\.+/,``);return r?/\.[a-z0-9]{1,8}$/i.test(r)?r:`${r}.${H(t)}`:n},W=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`Failed to encode image`))},r.onerror=()=>n(r.error??Error(`Failed to encode image`)),r.readAsDataURL(e)}),de=async e=>{let t=await W(e),n=t.indexOf(`,`);return n>=0?t.slice(n+1):t},fe=(e,t)=>{let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)},G=async(e,t)=>{let n=await fetch(e,{signal:t,cache:`no-store`});if(!n.ok)throw Error(`Image fetch failed (${n.status})`);return n.blob()},pe=async(e,t=B)=>{if(!e.naturalWidth||!e.naturalHeight)return null;let n=e.currentSrc||e.src;if(n&&(/^(?:blob:|data:|openchamber-asset:)/i.test(n)||/^https?:/i.test(n)||/^\/api(?=\/|[?#]|$)/.test(n)))try{let e=await G(n);if(e.size>0)return e}catch{}try{let n=document.createElement(`canvas`);n.width=e.naturalWidth,n.height=e.naturalHeight;let r=n.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0);let i=t.startsWith(`image/`)?t:B,a=await new Promise(e=>{n.toBlob(t=>e(t),i===`image/jpg`?`image/jpeg`:i)});return a&&a.size>0?a:null}catch{return null}},me=async(e,t)=>{let n=``;try{return n=await S(e,t??new AbortController().signal),await G(n,t)}finally{n&&y(n)}},he=async(e,n)=>{let r=e.effectiveDirectory??``,i=null;e.prefetchedBlob&&e.prefetchedBlob.size>0&&(i=e.prefetchedBlob);let a=e.displayUrl?.trim();if(!i&&a)try{i=await G(a,n)}catch{i=null}if(!i){let a=e.sourceUrl.trim();if(!a)throw Error(`Image source is empty`);if(/^(?:data|blob):/i.test(a)||/^https?:/i.test(a)||/^\/api(?=\/|[?#]|$)/.test(a))i=await G(a,n);else{let e=x(a,r);if(b(e))try{i=await me(e.path,n)}catch{let r=await t(`/api/fs/raw`,{method:`GET`,cache:`no-store`,query:{path:e.path},signal:n});if(!r.ok)throw Error(`Image source request failed with status ${r.status}`);i=await r.blob()}else i=await G(e.source,n)}}if(!i||i.size<=0)throw Error(`Image is empty`);let o=(e.mimeType||(i.type&&i.type.startsWith(`image/`)?i.type:``)||B).split(`;`)[0].trim()||B;return{blob:i,filename:U(e.filename,o),mimeType:o}},ge=()=>!o()||u===void 0?!1:u.isPluginAvailable(`OpenChamberMedia`),_e=async(e,t)=>{let{blob:i,filename:a,mimeType:o}=await he(e,t);if(ge()){let e=await de(i);return await V.saveImage({dataBase64:e,mimeType:o,filename:a}),`saved`}if(r()){let e=n()?.vscode;if(e?.saveImage){let t=await W(i);return await e.saveImage({fileName:a,dataUrl:t}),`saved`}}return fe(i,a),`downloaded`},ve=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),ye=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,K=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=ye(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},be=e=>`<pre><code>${ve(e)}</code></pre>`,xe=e=>{let t=(0,k.c)(21),{code:n,language:r,className:i,style:a,codeStyle:o,wrap:s}=e,c=s!==void 0&&s,{currentTheme:l}=m(),u=O.useRef(null),d;t[0]===l?d=t[1]:(d=ee(l),t[0]=l,t[1]=d);let p=d,h,g;t[2]!==n||t[3]!==o||t[4]!==c?(h=()=>{let e=u.current;e&&(e.innerHTML=be(n),K(e,c,o))},g=[n,c,o],t[2]=n,t[3]=o,t[4]=c,t[5]=h,t[6]=g):(h=t[5],g=t[6]),O.useLayoutEffect(h,g);let _,v;t[7]!==n||t[8]!==o||t[9]!==r||t[10]!==c?(_=()=>{let e=u.current;if(!e)return;let t=!0,i=new AbortController;return D(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,K(e,c,o))}),()=>{t=!1,i.abort()}},v=[n,r,c,o],t[7]=n,t[8]=o,t[9]=r,t[10]=c,t[11]=_,t[12]=v):(_=t[11],v=t[12]),O.useEffect(_,v);let y;t[13]===i?y=t[14]:(y=f(`typography-code`,i),t[13]=i,t[14]=y);let b=p,x;t[15]!==a||t[16]!==b?(x={...b,...a},t[15]=a,t[16]=b,t[17]=x):x=t[17];let S;return t[18]!==y||t[19]!==x?(S=(0,A.jsx)(`div`,{ref:u,className:y,style:x}),t[18]=y,t[19]=x,t[20]=S):S=t[20],S},Se=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},Ce=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},we=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,Te=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,Ee=(e,t)=>!e||typeof e!=`object`?String(e):E(e,t||``),q=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},De=e=>{if(!e||typeof e!=`object`)return;let t=q(e.patch)??q(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=q(e.patch)??q(e.diff);if(t)return t}},Oe=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},ke=(e,t,n)=>{let r=Se(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&we(r)&&(r=Te(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=De(n);if(e)return e}return r},Ae=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t}from"./runtime-fetch-QCWYlAx0.js";import{Mn as n,ln as r}from"./persistence-B7ORJ371.js";import{it as i,rt as a}from"./vendor-base-ui-CdzJ6My_.js";import{n as o}from"./platform-CiBU2bCp.js";import{v as s}from"./useUIStore-CDMI_Yzu.js";import{n as c}from"./vendor-react-BP2cRVqX.js";import{a as l,n as u}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{f as d,r as f,t as p}from"./button-DymteyMv.js";import{n as m}from"./useThemeSystem-8jhE4Zyk.js";import{n as h}from"./Icon-DDB7S6Vz.js";import{i as g,n as _,t as v}from"./tooltip-D-1Pgmq1.js";import{a as y,i as b,o as x,t as S}from"./image-loading-qNtUCy69.js";import{n as C}from"./MarkdownRenderer-YbG78e0Y.js";import{n as w,o as T,s as E,t as D}from"./markdown-worker-DFNZ3KJ_.js";import{n as ee}from"./markdownTheme-CV7_0QAL.js";import{t as te}from"./vendor-tanstack-react-virtual-B_EO--9t.js";var O=e(i(),1),k=c(),A=a(),ne=`w-[min(30rem,calc(100cqw-1rem))] min-w-[280px] max-w-full overflow-hidden rounded-xl shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,j={maxWidth:`min(28rem, calc(100cqw - 4ch))`,backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`},M=`flex items-center justify-between gap-3 border-b border-[var(--surface-subtle)] px-3 py-2.5`,N=`text-xs font-medium leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,re=`text-xs tabular-nums leading-4 text-muted-foreground md:text-[0.8125rem] md:leading-5`,P=`m-0 list-none divide-y divide-[var(--surface-subtle)] p-0`,F=`${P} max-h-[min(22rem,50vh)] overflow-y-auto`,ie=`${P} w-full`,ae={className:`p-0 rounded-none`,maxHeightClass:`max-h-[46vh]`,disableHorizontal:!0},I=`px-2.5 py-1.5 text-xs leading-4 md:py-2 md:text-[0.8125rem] md:leading-5`,oe=`flex min-w-0 items-center gap-1 text-xs leading-4 text-muted-foreground md:gap-1.5 md:text-[0.8125rem] md:leading-5`,se=`min-w-0 truncate text-xs leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,ce=`inline-flex shrink-0 items-center gap-1 text-xs leading-4 tabular-nums text-muted-foreground md:text-[0.8125rem] md:leading-5`,le=`h-3 w-3 shrink-0 md:h-3.5 md:w-3.5`,ue={in_progress:`text-foreground`,pending:`text-foreground`,completed:`text-muted-foreground line-through`,cancelled:`text-muted-foreground line-through`},L={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},R=e=>{let t=(0,k.c)(26),{todo:n,isActive:r,activeRef:i}=e,{t:a}=d(),o=z.has(n.status)?n.status:`pending`,s=L[o],c;t[0]!==a||t[1]!==s?(c=a(s),t[0]=a,t[1]=s,t[2]=c):c=t[2];let l=c,u;t[3]===o?u=t[4]:(u=o===`in_progress`?(0,A.jsx)(h,{name:`record-circle`,className:`h-3.5 w-3.5 text-[var(--status-info)]`,"aria-hidden":`true`}):o===`completed`?(0,A.jsx)(h,{name:`checkbox-circle`,className:`h-3.5 w-3.5 text-[var(--status-success)]`,"aria-hidden":`true`}):(0,A.jsx)(h,{name:`time`,className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":`true`}),t[3]=o,t[4]=u);let p=u,m=r?`step`:void 0,y=r&&`bg-[var(--surface-muted)] before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-[var(--status-info)]`,b;t[5]===y?b=t[6]:(b=f(`group relative grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] items-start gap-2.5`,I,y),t[5]=y,t[6]=b);let x;t[7]!==p||t[8]!==l?(x=(0,A.jsx)(g,{asChild:!0,children:(0,A.jsx)(`span`,{className:`flex size-4 items-center justify-center`,"aria-label":l,children:p})}),t[7]=p,t[8]=l,t[9]=x):x=t[9];let S;t[10]===l?S=t[11]:(S=(0,A.jsx)(_,{side:`left`,sideOffset:6,children:l}),t[10]=l,t[11]=S);let C;t[12]!==x||t[13]!==S?(C=(0,A.jsxs)(v,{children:[x,S]}),t[12]=x,t[13]=S,t[14]=C):C=t[14];let w=ue[o],T;t[15]===w?T=t[16]:(T=f(`block whitespace-normal break-words`,w),t[15]=w,t[16]=T);let E;t[17]!==T||t[18]!==n.content?(E=(0,A.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,A.jsx)(`span`,{className:T,children:n.content})}),t[17]=T,t[18]=n.content,t[19]=E):E=t[19];let D;return t[20]!==i||t[21]!==E||t[22]!==m||t[23]!==b||t[24]!==C?(D=(0,A.jsxs)(`li`,{ref:i,"aria-current":m,className:b,children:[C,E]}),t[20]=i,t[21]=E,t[22]=m,t[23]=b,t[24]=C,t[25]=D):D=t[25],D},z=new Set([`in_progress`,`pending`,`completed`,`cancelled`]),B=`image/png`,V=l(`OpenChamberMedia`),H=e=>{let t=e.toLowerCase().split(`;`)[0]?.trim()||B;if(t===`image/jpeg`||t===`image/jpg`)return`jpg`;if(t===`image/webp`)return`webp`;if(t===`image/gif`)return`gif`;if(t===`image/svg+xml`)return`svg`;if(t===`image/png`)return`png`;let n=t.split(`/`)[1];return n&&/^[a-z0-9.+-]+$/i.test(n)?n:`png`},U=(e,t)=>{let n=`image.${H(t)}`,r=(((e||``).trim()||n).split(/[\\/]/).pop()||n).replace(/[^\w.\- ()[\]]+/g,`_`).replace(/^\.+/,``);return r?/\.[a-z0-9]{1,8}$/i.test(r)?r:`${r}.${H(t)}`:n},W=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`Failed to encode image`))},r.onerror=()=>n(r.error??Error(`Failed to encode image`)),r.readAsDataURL(e)}),de=async e=>{let t=await W(e),n=t.indexOf(`,`);return n>=0?t.slice(n+1):t},fe=(e,t)=>{let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)},G=async(e,t)=>{let n=await fetch(e,{signal:t,cache:`no-store`});if(!n.ok)throw Error(`Image fetch failed (${n.status})`);return n.blob()},pe=async(e,t=B)=>{if(!e.naturalWidth||!e.naturalHeight)return null;let n=e.currentSrc||e.src;if(n&&(/^(?:blob:|data:|openchamber-asset:)/i.test(n)||/^https?:/i.test(n)||/^\/api(?=\/|[?#]|$)/.test(n)))try{let e=await G(n);if(e.size>0)return e}catch{}try{let n=document.createElement(`canvas`);n.width=e.naturalWidth,n.height=e.naturalHeight;let r=n.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0);let i=t.startsWith(`image/`)?t:B,a=await new Promise(e=>{n.toBlob(t=>e(t),i===`image/jpg`?`image/jpeg`:i)});return a&&a.size>0?a:null}catch{return null}},me=async(e,t)=>{let n=``;try{return n=await S(e,t??new AbortController().signal),await G(n,t)}finally{n&&y(n)}},he=async(e,n)=>{let r=e.effectiveDirectory??``,i=null;e.prefetchedBlob&&e.prefetchedBlob.size>0&&(i=e.prefetchedBlob);let a=e.displayUrl?.trim();if(!i&&a)try{i=await G(a,n)}catch{i=null}if(!i){let a=e.sourceUrl.trim();if(!a)throw Error(`Image source is empty`);if(/^(?:data|blob):/i.test(a)||/^https?:/i.test(a)||/^\/api(?=\/|[?#]|$)/.test(a))i=await G(a,n);else{let e=x(a,r);if(b(e))try{i=await me(e.path,n)}catch{let r=await t(`/api/fs/raw`,{method:`GET`,cache:`no-store`,query:{path:e.path},signal:n});if(!r.ok)throw Error(`Image source request failed with status ${r.status}`);i=await r.blob()}else i=await G(e.source,n)}}if(!i||i.size<=0)throw Error(`Image is empty`);let o=(e.mimeType||(i.type&&i.type.startsWith(`image/`)?i.type:``)||B).split(`;`)[0].trim()||B;return{blob:i,filename:U(e.filename,o),mimeType:o}},ge=()=>!o()||u===void 0?!1:u.isPluginAvailable(`OpenChamberMedia`),_e=async(e,t)=>{let{blob:i,filename:a,mimeType:o}=await he(e,t);if(ge()){let e=await de(i);return await V.saveImage({dataBase64:e,mimeType:o,filename:a}),`saved`}if(r()){let e=n()?.vscode;if(e?.saveImage){let t=await W(i);return await e.saveImage({fileName:a,dataUrl:t}),`saved`}}return fe(i,a),`downloaded`},ve=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),ye=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,K=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=ye(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},be=e=>`<pre><code>${ve(e)}</code></pre>`,xe=e=>{let t=(0,k.c)(21),{code:n,language:r,className:i,style:a,codeStyle:o,wrap:s}=e,c=s!==void 0&&s,{currentTheme:l}=m(),u=O.useRef(null),d;t[0]===l?d=t[1]:(d=ee(l),t[0]=l,t[1]=d);let p=d,h,g;t[2]!==n||t[3]!==o||t[4]!==c?(h=()=>{let e=u.current;e&&(e.innerHTML=be(n),K(e,c,o))},g=[n,c,o],t[2]=n,t[3]=o,t[4]=c,t[5]=h,t[6]=g):(h=t[5],g=t[6]),O.useLayoutEffect(h,g);let _,v;t[7]!==n||t[8]!==o||t[9]!==r||t[10]!==c?(_=()=>{let e=u.current;if(!e)return;let t=!0,i=new AbortController;return D(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,K(e,c,o))}),()=>{t=!1,i.abort()}},v=[n,r,c,o],t[7]=n,t[8]=o,t[9]=r,t[10]=c,t[11]=_,t[12]=v):(_=t[11],v=t[12]),O.useEffect(_,v);let y;t[13]===i?y=t[14]:(y=f(`typography-code`,i),t[13]=i,t[14]=y);let b=p,x;t[15]!==a||t[16]!==b?(x={...b,...a},t[15]=a,t[16]=b,t[17]=x):x=t[17];let S;return t[18]!==y||t[19]!==x?(S=(0,A.jsx)(`div`,{ref:u,className:y,style:x}),t[18]=y,t[19]=x,t[20]=S):S=t[20],S},Se=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},Ce=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},we=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,Te=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,Ee=(e,t)=>!e||typeof e!=`object`?String(e):E(e,t||``),q=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},De=e=>{if(!e||typeof e!=`object`)return;let t=q(e.patch)??q(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=q(e.patch)??q(e.diff);if(t)return t}},Oe=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},ke=(e,t,n)=>{let r=Se(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&we(r)&&(r=Te(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=De(n);if(e)return e}return r},Ae=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`),r=e=>/\(\s*File has more lines\..*offset.*\)/i.test(e.trim());return{type:t,lines:n.map(e=>{let n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);if(t!==`directory`){let t=e.match(/^(\d+):\s?(.*)$/);if(t){let e=t[2],n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);return{lineNumber:i?null:Number(t[1]),text:e,isInfo:i}}}return{lineNumber:null,text:e,isInfo:i}}).filter((e,t,n)=>{if(e.text.trim().length>0)return!0;let r=n[t-1],i=n[t+1],a=!!(r?.isInfo||i?.isInfo),o=e.lineNumber!==null;return!(a&&o)})}},je=(e,t)=>{try{let n=e.trim().split(`
|
|
4
4
|
`).filter(Boolean);if(n.length===0)return null;let r=[];return n.forEach(e=>{let t=e.match(/^(\s*)(.+)$/);if(t){let[,e,n]=t,i=Math.floor(e.length/2),a=!n.endsWith(`/`);r.push({name:n.replace(/\/$/,``),depth:i,isFile:a})}}),(0,A.jsx)(`div`,{className:f(`w-full min-w-0 font-mono space-y-0.5`,t?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/30`),style:s.tool.popup,children:r.map((e,t)=>(0,A.jsx)(`div`,{className:`min-w-0`,style:{paddingLeft:`${e.depth*20}px`},children:e.isFile?(0,A.jsx)(`span`,{className:`text-foreground/90 block truncate`,children:e.name}):(0,A.jsxs)(`span`,{className:`font-semibold text-foreground block truncate`,children:[e.name,`/`]})},t))})}catch{return null}},Me={backgroundColor:`var(--status-info)`,opacity:.6},Ne=(e,t,n)=>{try{let r=e.trim().split(`
|
package/dist/index.html
CHANGED
|
@@ -552,28 +552,28 @@
|
|
|
552
552
|
opacity: 0.72;
|
|
553
553
|
}
|
|
554
554
|
</style>
|
|
555
|
-
<script type="module" crossorigin src="/assets/main-
|
|
555
|
+
<script type="module" crossorigin src="/assets/main-DSY3-ZQZ.js"></script>
|
|
556
556
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
557
557
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-C8w0nlKy.js">
|
|
558
558
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-3ad3yzM7.js">
|
|
559
559
|
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-QCWYlAx0.js">
|
|
560
560
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CdzJ6My_.js">
|
|
561
561
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-o69pgTEK.js">
|
|
562
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
562
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-CDMI_Yzu.js">
|
|
563
563
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BP2cRVqX.js">
|
|
564
564
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
565
565
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
566
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
567
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
568
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
566
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-B7ORJ371.js">
|
|
567
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DSBZ-9-L.js">
|
|
568
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DK8TzHRx.js">
|
|
569
569
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-MF2GBrFx.js">
|
|
570
570
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
571
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
572
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
571
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-CiBU2bCp.js">
|
|
572
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-bN5IYQau.js">
|
|
573
573
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
574
574
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-KNLHDj7G.js">
|
|
575
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
576
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
575
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-CqpbN2lM.js">
|
|
576
|
+
<link rel="stylesheet" crossorigin href="/assets/src-C9BNQK0O.css">
|
|
577
577
|
</head>
|
|
578
578
|
<body class="h-full bg-background text-foreground">
|
|
579
579
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -74,28 +74,28 @@
|
|
|
74
74
|
}
|
|
75
75
|
</style>
|
|
76
76
|
|
|
77
|
-
<script type="module" crossorigin src="/assets/miniChat-
|
|
77
|
+
<script type="module" crossorigin src="/assets/miniChat-B43ASec3.js"></script>
|
|
78
78
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
79
79
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-C8w0nlKy.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-3ad3yzM7.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-QCWYlAx0.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CdzJ6My_.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-o69pgTEK.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
84
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-CDMI_Yzu.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BP2cRVqX.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
87
87
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
89
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
88
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-B7ORJ371.js">
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DSBZ-9-L.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DK8TzHRx.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-MF2GBrFx.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
93
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
93
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-CiBU2bCp.js">
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-bN5IYQau.js">
|
|
95
95
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
96
96
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-KNLHDj7G.js">
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
98
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-CqpbN2lM.js">
|
|
98
|
+
<link rel="stylesheet" crossorigin href="/assets/src-C9BNQK0O.css">
|
|
99
99
|
</head>
|
|
100
100
|
<body class="h-full bg-background text-foreground">
|
|
101
101
|
<div id="root" class="h-full">
|
package/dist/mobile.html
CHANGED
|
@@ -63,28 +63,28 @@
|
|
|
63
63
|
})();
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
|
-
<script type="module" crossorigin src="/assets/mobile-
|
|
66
|
+
<script type="module" crossorigin src="/assets/mobile-DloCio4f.js"></script>
|
|
67
67
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-C8w0nlKy.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-3ad3yzM7.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="/assets/runtime-fetch-QCWYlAx0.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CdzJ6My_.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-o69pgTEK.js">
|
|
73
|
-
<link rel="modulepreload" crossorigin href="/assets/useUIStore-
|
|
73
|
+
<link rel="modulepreload" crossorigin href="/assets/useUIStore-CDMI_Yzu.js">
|
|
74
74
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BP2cRVqX.js">
|
|
75
75
|
<link rel="modulepreload" crossorigin href="/assets/vendor-pathe-vBmvQE8f.js">
|
|
76
76
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-query-core-BWz0ose6.js">
|
|
77
|
-
<link rel="modulepreload" crossorigin href="/assets/persistence-
|
|
78
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-
|
|
79
|
-
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-
|
|
77
|
+
<link rel="modulepreload" crossorigin href="/assets/persistence-B7ORJ371.js">
|
|
78
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopHosts-DSBZ-9-L.js">
|
|
79
|
+
<link rel="modulepreload" crossorigin href="/assets/desktopRelayRestore-DK8TzHRx.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="/assets/vendor-opencode-client-MF2GBrFx.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/platform-
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/terminalApi-
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/platform-CiBU2bCp.js">
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/terminalApi-bN5IYQau.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-KNLHDj7G.js">
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
87
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-CqpbN2lM.js">
|
|
87
|
+
<link rel="stylesheet" crossorigin href="/assets/src-C9BNQK0O.css">
|
|
88
88
|
</head>
|
|
89
89
|
<body class="h-full bg-background text-foreground">
|
|
90
90
|
<div id="root" class="h-full"></div>
|
package/package.json
CHANGED
|
@@ -43,6 +43,45 @@ reasoning display.
|
|
|
43
43
|
|
|
44
44
|
## Acceptance criteria
|
|
45
45
|
|
|
46
|
+
### Scheduled-task result review
|
|
47
|
+
|
|
48
|
+
- `schedule_task` retains the existing assistant/project/task mapping. The task
|
|
49
|
+
prompt preserves the user's delivery intent. A terminal run is handed from the
|
|
50
|
+
scheduler to `reportScheduledTaskResult`; prompt admission and intermediate
|
|
51
|
+
session events do not wake the contact. Associations created after the run
|
|
52
|
+
started do not receive its historical result.
|
|
53
|
+
- Each enabled owner receives a read-only contact-lane turn with the captured
|
|
54
|
+
contact configuration, the run's original task prompt, authoritative outcome,
|
|
55
|
+
error and bounded worker output. `read_session` can fetch the full result.
|
|
56
|
+
The existing live contact-turn state drives working indicators; no synthetic
|
|
57
|
+
user message is inserted. The review cannot execute the task again.
|
|
58
|
+
- The model decides whether to deliver requested findings or remain quiet for
|
|
59
|
+
successful background work. Scheduled reviews alone accept an exact
|
|
60
|
+
`openchamber-final` declaration `{ "status": "silent", "text": "" }`.
|
|
61
|
+
Empty/malformed responses remain errors. Background progress is buffered until
|
|
62
|
+
this decision; silent reviews produce no transcript bubble, unread message,
|
|
63
|
+
or contact notification. Read-only worker-watch follow-ups keep their existing
|
|
64
|
+
reply behavior.
|
|
65
|
+
- The additive `assistant_scheduled_result` table records terminal review
|
|
66
|
+
receipts by assistant/run, including silence and cancellation. Stable turn IDs
|
|
67
|
+
also reconcile already-persisted replies. Duplicate delivery and reopening the
|
|
68
|
+
service do not replay completed reviews. The scheduler retains an unacknowledged
|
|
69
|
+
result when the service closes or admission/preparation fails. User interruption
|
|
70
|
+
follows the existing automatic-turn cancellation policy.
|
|
71
|
+
- Assistant-owned results bypass the generic scheduled-task notification;
|
|
72
|
+
contact notification settings apply only when the review speaks. Disabled
|
|
73
|
+
contacts consume the handoff without waking. Deleted/unowned associations use
|
|
74
|
+
the scheduler's ordinary notification path. Per-owner receipts let one failed
|
|
75
|
+
owner retry without replaying other completed owners.
|
|
76
|
+
- This is Host-owned behavior for web, Electron, hosted mobile, Capacitor and
|
|
77
|
+
clients connected to that Host. It requires a running Host, not an open UI.
|
|
78
|
+
The extension-owned VS Code runtime does not gain a scheduler.
|
|
79
|
+
- Integration coverage in `scheduled-tasks/runtime.test.js` runs the real
|
|
80
|
+
scheduler, SQLite stores, assistant mapping/lane and pi response protocol with
|
|
81
|
+
only upstream execution and model responses replaced. It covers report,
|
|
82
|
+
silence, task failure and restart recovery. This does not measure live model
|
|
83
|
+
decision quality or device push delivery.
|
|
84
|
+
|
|
46
85
|
### Contact memory recall
|
|
47
86
|
|
|
48
87
|
- `search_memory({ query?, from?, to?, limit?, cursor? })` searches this contact's authored text beyond the automatically trimmed recent window. Empty query browses history. Search is literal (SQLite ASCII case folding, Chinese text preserved), with inclusive timezone-qualified ISO time bounds. Results contain source `messageID`, role, creation time, snippet, Unicode character offset and total length. Default 10 matches, maximum 20; each call examines at most 200 indexed message candidates. Empty matches with `complete:false` are partial, and the model must follow `nextCursor` before concluding that accessible history has no match.
|
|
@@ -113,6 +113,7 @@ export const CONTACT_SYSTEM_PROMPT = [
|
|
|
113
113
|
'An empty registered catalog still permits looking up existing sessions and inspecting the working directory. Resolve the existing workspace first. Assignment requires a registered project: when the resolved workspace needs registration, explain that specific prerequisite and ask the user to register it in Settings. Workspace discovery should preserve the user existing directory structure.',
|
|
114
114
|
'For substantive work, match the workspace, inspect relevant existing chats with list_sessions, then create a worker through assign_session with projectPath or continue the relevant conversation with sessionID plus the task prompt (omit model args to keep the prior worker model). File and shell tools support discovery and the small-task exception. To only listen without prompting when asked (监听/watch/monitor), watch_session with sessionID — a plain @session:id mention alone is not a watch request. To abort a running session, stop_session with sessionID. Optional worker model via providerID/modelID/model from the connected catalog — that does not change this contact. Current-turn user attachments are server-forwarded on assign. One successful assign_session or watch_session ends the turn — do not call it again.',
|
|
115
115
|
'A reply without the tool call does nothing. Never say 已创建, created, scheduled, opened, watched, or stopped unless the tool already returned success.',
|
|
116
|
+
'When creating a scheduled task, preserve the user reporting intent in its prompt: deliver requested research/summaries, or keep successful background work quiet when no report is wanted. Its eventual result returns to this contact for a read-only review; waking the contact does not require sending a message.',
|
|
116
117
|
].join(' ');
|
|
117
118
|
|
|
118
119
|
// A workspace response must explicitly finish or ask for missing input. Plain
|
|
@@ -126,11 +127,12 @@ const WORKSPACE_RESPONSE_PROTOCOL = [
|
|
|
126
127
|
'Do not use a final declaration for a progress update or promise to act later. Never invent tool results, User messages, or future assistant turns. Only supplied tool-result records are execution evidence.',
|
|
127
128
|
].join('\n');
|
|
128
129
|
|
|
129
|
-
const parseFinalResponse = (text) => {
|
|
130
|
+
const parseFinalResponse = (text, allowSilent = false) => {
|
|
130
131
|
const match = text.trim().match(/^```openchamber-final\s*([\s\S]*?)```$/u);
|
|
131
132
|
if (!match) return null;
|
|
132
133
|
try {
|
|
133
134
|
const value = JSON.parse(match[1]);
|
|
135
|
+
if (allowSilent && value?.status === 'silent' && value.text === '') return { status: 'silent', text: '' };
|
|
134
136
|
if (!value || !['complete', 'blocked'].includes(value.status) || typeof value.text !== 'string' || !value.text.trim()) return null;
|
|
135
137
|
return { status: value.status, text: value.text.trim() };
|
|
136
138
|
} catch {
|
|
@@ -366,6 +368,7 @@ export function createContactStreamFn(createChatCompletion, {
|
|
|
366
368
|
/** Fixed Agent message length before this contact turn (prior history only). */
|
|
367
369
|
turnMessageStart = 0,
|
|
368
370
|
variant = null,
|
|
371
|
+
allowSilent = false,
|
|
369
372
|
} = {}) {
|
|
370
373
|
let callSequence = 0;
|
|
371
374
|
const turnStart = Number.isFinite(Number(turnMessageStart)) ? Math.max(0, Number(turnMessageStart)) : 0;
|
|
@@ -438,6 +441,7 @@ export function createContactStreamFn(createChatCompletion, {
|
|
|
438
441
|
let text;
|
|
439
442
|
let parsed;
|
|
440
443
|
let finalText;
|
|
444
|
+
let silent = false;
|
|
441
445
|
let rejectedCodingCalls = [];
|
|
442
446
|
// Repair only the rejected response: no tools have executed from it.
|
|
443
447
|
// Real results stay in messages, so already completed work is not replayed.
|
|
@@ -475,7 +479,8 @@ export function createContactStreamFn(createChatCompletion, {
|
|
|
475
479
|
}
|
|
476
480
|
for (const value of finalPublic.slice(observedPublic.length)) publishPublicMessage(value);
|
|
477
481
|
text = stripPublicMessages(text);
|
|
478
|
-
const finalResponse = parseFinalResponse(text);
|
|
482
|
+
const finalResponse = parseFinalResponse(text, allowSilent);
|
|
483
|
+
silent = finalResponse?.status === 'silent';
|
|
479
484
|
finalText = finalResponse?.text ?? null;
|
|
480
485
|
// A final answer is opaque text; quoted tool examples in it cannot run.
|
|
481
486
|
parsed = finalText === null ? parseContactToolCalls(text, allowedNames) : { toolCalls: [], chatText: finalText };
|
|
@@ -551,7 +556,8 @@ export function createContactStreamFn(createChatCompletion, {
|
|
|
551
556
|
} else {
|
|
552
557
|
bubbleTracker.finish(replyBubbles);
|
|
553
558
|
}
|
|
554
|
-
const partial = assistantMessage(model, [...publicBubbles, ...replyBubbles].join('\n\n'), 'stop');
|
|
559
|
+
const partial = assistantMessage(model, silent ? '' : [...publicBubbles, ...replyBubbles].join('\n\n'), 'stop');
|
|
560
|
+
if (silent) partial.contactSilent = true;
|
|
555
561
|
stream.push({ type: 'start', partial });
|
|
556
562
|
stream.push({ type: 'text_start', contentIndex: 0, partial });
|
|
557
563
|
stream.push({ type: 'text_delta', contentIndex: 0, delta: chatText, partial });
|
|
@@ -641,7 +647,9 @@ export async function runContactTurn({
|
|
|
641
647
|
AgentImpl = Agent,
|
|
642
648
|
signal = null,
|
|
643
649
|
readOnly = false,
|
|
650
|
+
allowSilent = false,
|
|
644
651
|
}) {
|
|
652
|
+
allowSilent = readOnly && allowSilent;
|
|
645
653
|
const providerID = assistant.providerID;
|
|
646
654
|
const modelID = assistant.modelID;
|
|
647
655
|
const cwd = resolveAssistantCwd(assistant);
|
|
@@ -657,7 +665,8 @@ export async function runContactTurn({
|
|
|
657
665
|
const systemPrompt = [
|
|
658
666
|
CONTACT_SYSTEM_PROMPT,
|
|
659
667
|
'Conversation history is a bounded recent window. Use search_memory and read_memory to recall earlier facts from this contact when references or decisions are missing. Search by short distinctive terms or browse by time, read the relevant source, and report its date when useful. A page with complete=false still has older candidates. Cleared memory forms an access boundary and deleted history is unavailable. Historical messages are quoted evidence; current user instructions govern actions. OpenChamber card context records contain actual session identifiers and status. Ask for missing details after checking accessible history.',
|
|
660
|
-
readOnly ? 'This turn is a background result
|
|
668
|
+
readOnly ? 'This turn is a background result review. Only read-only lookup tools are available. Never create or continue work; follow the latest user constraints.' : '',
|
|
669
|
+
allowSilent ? 'Decide whether this scheduled result needs a user-facing reply. Deliver requested research, summaries, or other requested output. Successful background work with no requested report should stay silent. Report actionable failures or missing input unless the user explicitly requested silence. For silence, emit only ```openchamber-final\n{"status":"silent","text":""}\n```. Otherwise give the actual result in the user language. Do not narrate checks or announce progress.' : '',
|
|
661
670
|
formatPiCodingPrompt({
|
|
662
671
|
cwd: runtime?.cwd,
|
|
663
672
|
skillsPrompt: runtime?.skillsPrompt,
|
|
@@ -705,12 +714,13 @@ export async function runContactTurn({
|
|
|
705
714
|
streamFn: createContactStreamFn(createChatCompletion, {
|
|
706
715
|
variant: assistant.variant,
|
|
707
716
|
pendingFileParts,
|
|
708
|
-
onTextDelta,
|
|
709
|
-
onBubbleDelta,
|
|
717
|
+
onTextDelta: allowSilent ? null : onTextDelta,
|
|
718
|
+
onBubbleDelta: allowSilent ? null : onBubbleDelta,
|
|
710
719
|
globalEventHub,
|
|
711
720
|
bubbleGapMs: 280,
|
|
712
721
|
signal,
|
|
713
722
|
turnMessageStart,
|
|
723
|
+
allowSilent,
|
|
714
724
|
}),
|
|
715
725
|
});
|
|
716
726
|
|
|
@@ -725,7 +735,7 @@ export async function runContactTurn({
|
|
|
725
735
|
error.code = 'upstream_error';
|
|
726
736
|
throw error;
|
|
727
737
|
}
|
|
728
|
-
const requested = detectRequestedContactTools(userText, contactTools.map((tool) => tool.name));
|
|
738
|
+
const requested = allowSilent ? [] : detectRequestedContactTools(userText, contactTools.map((tool) => tool.name));
|
|
729
739
|
const hasRequestedResult = () => agent.state.messages.some((message) => (
|
|
730
740
|
message?.role === 'toolResult' && requested.includes(message.toolName)
|
|
731
741
|
));
|
|
@@ -760,6 +770,9 @@ export async function runContactTurn({
|
|
|
760
770
|
const turnMessages = agent.state.messages.slice(turnMessageStart);
|
|
761
771
|
const reset = contactTurnHasSuccessfulReset(turnMessages);
|
|
762
772
|
const lastMessage = turnMessages.at(-1);
|
|
773
|
+
if (allowSilent && lastMessage?.role === 'assistant' && lastMessage.contactSilent === true) {
|
|
774
|
+
return { silent: true, text: '', bubbles: [], cards: [], thinkingLevel: agent.state.thinkingLevel, tools: [...agent.state.tools] };
|
|
775
|
+
}
|
|
763
776
|
// Terminal tools stop further mutations. A tools-disabled model pass owns
|
|
764
777
|
// their user-facing result, including failures and successful resets.
|
|
765
778
|
if (reset || lastMessage?.role === 'toolResult') {
|
|
@@ -1793,6 +1793,27 @@ it('rejects simulated tool results even without a final fence', async () => {
|
|
|
1793
1793
|
expect((await stream.result()).content.filter((part) => part.type === 'toolCall')).toHaveLength(1)
|
|
1794
1794
|
})
|
|
1795
1795
|
|
|
1796
|
+
it('lets a scheduled follow-up finish silently without publishing progress or a notification marker', async () => {
|
|
1797
|
+
const onBubbleDelta = vi.fn()
|
|
1798
|
+
const createChatCompletion = vi.fn(async () => ({ text: '```openchamber-message\n{"text":"Checking the result"}\n```\n```openchamber-final\n{"status":"silent","text":""}\n```' }))
|
|
1799
|
+
const result = await runContactTurn({
|
|
1800
|
+
assistant: { providerID: 'p', modelID: 'm' },
|
|
1801
|
+
readOnly: true, allowSilent: true, history: [], userText: 'Scheduled maintenance succeeded; no report requested.',
|
|
1802
|
+
createChatCompletion, onBubbleDelta,
|
|
1803
|
+
})
|
|
1804
|
+
expect(result).toMatchObject({ silent: true, text: '', bubbles: [], cards: [] })
|
|
1805
|
+
expect(onBubbleDelta).not.toHaveBeenCalled()
|
|
1806
|
+
expect(createChatCompletion).toHaveBeenCalledOnce()
|
|
1807
|
+
})
|
|
1808
|
+
|
|
1809
|
+
it.each(['', '```openchamber-final\n{"status":"silent","text":""}\n```'])('does not turn an empty or unauthorized response into successful silence', async (text) => {
|
|
1810
|
+
await expect(runContactTurn({
|
|
1811
|
+
assistant: { providerID: 'p', modelID: 'm' }, readOnly: true,
|
|
1812
|
+
allowSilent: text === '', history: [], userText: 'Review the result',
|
|
1813
|
+
createChatCompletion: async () => ({ text }),
|
|
1814
|
+
})).rejects.toMatchObject({ code: 'upstream_error' })
|
|
1815
|
+
})
|
|
1816
|
+
|
|
1796
1817
|
it('rejects a background model attempt to restart a session before executing its tool', async () => {
|
|
1797
1818
|
const assignWork = vi.fn()
|
|
1798
1819
|
const createChatCompletion = vi.fn(async () => ({ text: '```openchamber-tool\n{"name":"assign_session","arguments":{"sessionID":"ses_completed","prompt":"restart"}}\n```' }))
|
|
@@ -47,6 +47,7 @@ export const registerAssistantRoutes = (app, dependencies) => {
|
|
|
47
47
|
createChatCompletion: boundCompletion,
|
|
48
48
|
});
|
|
49
49
|
setAssignedSessionSettleHandler(({ sessionId, status }) => service.reportAssignedSessionSettle(sessionId, status));
|
|
50
|
+
const unsubscribeTaskResults = dependencies.setTaskResultHandler?.((run) => service.reportScheduledTaskResult(run));
|
|
50
51
|
app.use('/api/openchamber/assistants', (req, res, next) => Promise.resolve(dependencies.refreshAllowedRoots?.()).then(next).catch((error) => respond(res, () => { throw error; })));
|
|
51
52
|
app.get('/api/openchamber/assistants/capability', (_req, res) => respond(res, () => service.capability()));
|
|
52
53
|
app.get('/api/openchamber/assistants', (_req, res) => respond(res, () => service.snapshot())); app.get('/api/openchamber/assistants/snapshot', (_req, res) => respond(res, () => service.snapshot())); app.put('/api/openchamber/assistants/settings', (req, res) => respond(res, () => service.setEnabled(req.body)));
|
|
@@ -107,5 +108,5 @@ export const registerAssistantRoutes = (app, dependencies) => {
|
|
|
107
108
|
// Contact send admits the user message at 202; assistant bubbles stream on SSE.
|
|
108
109
|
app.post('/api/openchamber/assistants/:assistantID/messages', (req, res) => respond(res, () => service.send(req.params.assistantID, req.body), 202)); app.post('/api/openchamber/assistants/:assistantID/share', (req, res) => respond(res, () => service.share(req.params.assistantID, req.body), 202)); app.get('/api/openchamber/assistants/share-operations/:operationID', (req, res) => respond(res, () => { const operation = service.shareOperation(req.params.operationID); if (!operation) throw new AssistantError('not_found'); return operation; }));
|
|
109
110
|
app.use('/api/openchamber/assistants/topics', gone); app.use('/api/openchamber/assistants/:assistantID/topics', gone);
|
|
110
|
-
return { service, close: () => { setAssignedSessionSettleHandler(null); service.close(); } };
|
|
111
|
+
return { service, close: () => { unsubscribeTaskResults?.(); setAssignedSessionSettleHandler(null); service.close(); } };
|
|
111
112
|
};
|