cli-jaw 2.2.11 → 2.2.13
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/bin/commands/doctor.js +20 -0
- package/dist/bin/commands/doctor.js.map +1 -1
- package/dist/bin/commands/init.js +7 -0
- package/dist/bin/commands/init.js.map +1 -1
- package/dist/bin/commands/slack.js +47 -5
- package/dist/bin/commands/slack.js.map +1 -1
- package/dist/bin/commands/tui/slash-command-runner.js +11 -2
- package/dist/bin/commands/tui/slash-command-runner.js.map +1 -1
- package/dist/server.js +18 -2
- package/dist/server.js.map +1 -1
- package/dist/src/agent/error-classifier.js +11 -2
- package/dist/src/agent/error-classifier.js.map +1 -1
- package/dist/src/agent/events/claude.js +7 -1
- package/dist/src/agent/events/claude.js.map +1 -1
- package/dist/src/agent/events/fulltext-bound.js +32 -0
- package/dist/src/agent/events/fulltext-bound.js.map +1 -0
- package/dist/src/agent/events/grok.js +7 -1
- package/dist/src/agent/events/grok.js.map +1 -1
- package/dist/src/agent/events/helpers.js +17 -4
- package/dist/src/agent/events/helpers.js.map +1 -1
- package/dist/src/agent/lifecycle-handler.js +56 -5
- package/dist/src/agent/lifecycle-handler.js.map +1 -1
- package/dist/src/agent/pi-runtime.js +30 -1
- package/dist/src/agent/pi-runtime.js.map +1 -1
- package/dist/src/agent/spawn/exit-drain.js +96 -0
- package/dist/src/agent/spawn/exit-drain.js.map +1 -0
- package/dist/src/agent/spawn/line-buffer.js +26 -0
- package/dist/src/agent/spawn/line-buffer.js.map +1 -0
- package/dist/src/agent/spawn/process-kill.js +31 -0
- package/dist/src/agent/spawn/process-kill.js.map +1 -1
- package/dist/src/agent/spawn.js +80 -23
- package/dist/src/agent/spawn.js.map +1 -1
- package/dist/src/agent/watchdog.js +21 -5
- package/dist/src/agent/watchdog.js.map +1 -1
- package/dist/src/cli/commands.js +68 -15
- package/dist/src/cli/commands.js.map +1 -1
- package/dist/src/cli/opencodex-models.js +67 -14
- package/dist/src/cli/opencodex-models.js.map +1 -1
- package/dist/src/cli/registry-live.js +55 -2
- package/dist/src/cli/registry-live.js.map +1 -1
- package/dist/src/cli/registry.js +8 -2
- package/dist/src/cli/registry.js.map +1 -1
- package/dist/src/core/config.js +26 -1
- package/dist/src/core/config.js.map +1 -1
- package/dist/src/messaging/channel-health.js +6 -0
- package/dist/src/messaging/channel-health.js.map +1 -1
- package/dist/src/messaging/channel-validate.js +85 -0
- package/dist/src/messaging/channel-validate.js.map +1 -0
- package/dist/src/routes/link-preview.js +14 -0
- package/dist/src/routes/link-preview.js.map +1 -1
- package/dist/src/routes/messaging.js +9 -0
- package/dist/src/routes/messaging.js.map +1 -1
- package/dist/src/routes/system.js +5 -0
- package/dist/src/routes/system.js.map +1 -1
- package/dist/src/slack/api.js +32 -3
- package/dist/src/slack/api.js.map +1 -1
- package/dist/src/slack/bot.js +37 -1
- package/dist/src/slack/bot.js.map +1 -1
- package/dist/src/slack/events.js +23 -0
- package/dist/src/slack/events.js.map +1 -1
- package/dist/src/slack/hot-notify.js +33 -0
- package/dist/src/slack/hot-notify.js.map +1 -0
- package/dist/src/slack/manifest.js +2 -1
- package/dist/src/slack/manifest.js.map +1 -1
- package/dist/src/slack/progress.js +98 -0
- package/dist/src/slack/progress.js.map +1 -0
- package/dist/src/slack/send-only-client.js +3 -2
- package/dist/src/slack/send-only-client.js.map +1 -1
- package/dist/src/slack/slack-file.js +4 -2
- package/dist/src/slack/slack-file.js.map +1 -1
- package/package.json +3 -1
- package/public/css/sidebar.css +200 -0
- package/public/dist/assets/Agent-BjbZVZ9p.js +1 -0
- package/public/dist/assets/CodeCanvas-CbfPP7Ad.js +3 -0
- package/public/dist/assets/{DocPanel-DtYwv3n3.js → DocPanel-Dz-J_l5M.js} +1 -1
- package/public/dist/assets/{Heartbeat-vDGhPfct.js → Heartbeat-DDmZARWw.js} +1 -1
- package/public/dist/assets/MarkdownRenderer-CXrilOsG.js +15 -0
- package/public/dist/assets/MarkdownRenderer-DZVh_xX2.js +1 -0
- package/public/dist/assets/{Memory-B_UZ-iCA.js → Memory-CUbviW7N.js} +1 -1
- package/public/dist/assets/{MilkdownWysiwygEditor-BNoLGbFC.js → MilkdownWysiwygEditor-Em7iC6y9.js} +8 -8
- package/public/dist/assets/ModelProvider-ngg8xTuB.js +1 -0
- package/public/dist/assets/{agent-meta-C8DqYXM6.js → agent-meta-Y3DE6sxh.js} +1 -1
- package/public/dist/assets/app-BzD_ZLvt.js +55 -0
- package/public/dist/assets/{app-Nu2VPaO5.css → app-DX4e6isX.css} +1 -1
- package/public/dist/assets/bgtask-badge-Dqbp-Y4e.js +1 -0
- package/public/dist/assets/{bgtask-badge-DXca8E7c.js → bgtask-badge-qMkKOZx0.js} +1 -1
- package/public/dist/assets/{react-dom-AWKMTIe7.js → bounded-set-CFlZiEF4.js} +1 -1
- package/public/dist/assets/{constants-CSZ011-j.js → constants-Df7-7Rky.js} +1 -1
- package/public/dist/assets/{employees-BL4qMxJj.js → employees-BnobWM_2.js} +1 -1
- package/public/dist/assets/{iframe-renderer-DUI0LYBy.js → iframe-renderer-C5vRbbl9.js} +2 -2
- package/public/dist/assets/iframe-renderer-Df4KIVyx.js +1 -0
- package/public/dist/assets/manager-DaN201mN.js +13 -0
- package/public/dist/assets/memory-D-bULTHl.js +1 -0
- package/public/dist/assets/{memory-B_Y0L0KD.js → memory-DF4kPwwC.js} +1 -1
- package/public/dist/assets/{message-history-Dl8dJzez.js → message-history-C4WOisGx.js} +1 -1
- package/public/dist/assets/message-history-ZBoza6ew.js +1 -0
- package/public/dist/assets/{render-BI1aqKoc.js → render-DYX6GRQ0.js} +1 -1
- package/public/dist/assets/{settings-B0Sj4sUH.js → settings-DbJpGoaX.js} +1 -1
- package/public/dist/assets/settings-SreihUje.js +1 -0
- package/public/dist/assets/settings-core-B1Y5Nb4Z.js +1 -0
- package/public/dist/assets/settings-core-DobZWIZ7.js +140 -0
- package/public/dist/assets/{sidebar-DOR9fTgN.js → sidebar-Cp22g0Gv.js} +3 -3
- package/public/dist/assets/skills-DwPIP08e.js +1 -0
- package/public/dist/assets/{skills-wt0fkV9Y.js → skills-IGquen_j.js} +1 -1
- package/public/dist/assets/slash-commands-BBVfwcnW.js +1 -0
- package/public/dist/assets/{slash-commands-BZbqTg3v.js → slash-commands-ZRDOL99E.js} +1 -1
- package/public/dist/assets/{trace-drawer-kMYzaVFW.js → trace-drawer-D8To8fYt.js} +1 -1
- package/public/dist/assets/ui-CAicpUZc.js +1 -0
- package/public/dist/assets/{ui-D4D5HUfo.js → ui-Hx_mNoDf.js} +1 -1
- package/public/dist/assets/{wiki-link-resolver-BfNXN9px.js → wiki-link-resolver-DyFzBTIQ.js} +1 -1
- package/public/dist/index.html +90 -47
- package/public/dist/manager/index.html +1 -1
- package/public/index.html +88 -45
- package/public/js/constants.ts +50 -0
- package/public/js/features/channel-onboarding-flow.ts +197 -0
- package/public/js/features/channel-onboarding.ts +322 -0
- package/public/js/features/channel-setup-guide.ts +26 -0
- package/public/js/features/channel-setup-rules.ts +32 -0
- package/public/js/features/notifications.ts +38 -0
- package/public/js/features/settings-channel.ts +4 -0
- package/public/js/features/settings-core.ts +73 -9
- package/public/js/features/settings-discord.ts +2 -0
- package/public/js/features/settings-slack.ts +60 -2
- package/public/js/features/settings-telegram.ts +2 -0
- package/public/js/features/settings-types.ts +1 -1
- package/public/js/features/settings.ts +1 -1
- package/public/js/features/transport-status-row.ts +7 -3
- package/public/js/main.ts +5 -1
- package/public/locales/en.json +65 -3
- package/public/locales/ja.json +76 -3
- package/public/locales/ko.json +65 -3
- package/public/locales/zh.json +76 -3
- package/public/manager/src/SidebarRailRouter.tsx +9 -3
- package/public/manager/src/browser-panel/use-embedded-target-sync.ts +19 -1
- package/public/manager/src/code/CodeCanvas.tsx +14 -2
- package/public/manager/src/code/CodeTranscript.tsx +33 -9
- package/public/manager/src/code/CodeWorkbench.tsx +1 -1
- package/public/manager/src/code/code-event-dedupe.ts +27 -3
- package/public/manager/src/code/use-code-transcript-scroll.ts +28 -3
- package/public/manager/src/code/use-throttled-markdown.ts +75 -0
- package/public/manager/src/code/useCodeTranscriptVirtualRows.ts +19 -0
- package/public/manager/src/electron-metrics.tsx +7 -0
- package/public/manager/src/jaw-ceo/useJawCeo.ts +6 -1
- package/public/manager/src/jaw-ceo/useJawCeoVirtualTimeline.ts +5 -0
- package/public/manager/src/lib/bounded-set.ts +15 -0
- package/public/manager/src/lib/fnv1a.ts +14 -0
- package/public/manager/src/notes/rendering/CodeBlock.tsx +13 -4
- package/public/manager/src/notes/rendering/MarkdownRenderer.tsx +14 -2
- package/public/manager/src/notes/rendering/highlight-cache.ts +111 -0
- package/public/manager/src/notes/useNotesExternalSync.ts +6 -1
- package/public/manager/src/settings/pages/Agent.tsx +25 -4
- package/public/manager/src/settings/pages/components/PerCliRow.tsx +13 -5
- package/public/manager/src/settings/pages/components/agent/agent-meta.ts +98 -0
- package/scripts/bundle-sidecar.sh +8 -0
- package/scripts/check-electron-no-native.cjs +90 -4
- package/scripts/check-native-load.cjs +157 -0
- package/scripts/check-sidecar-smoke.mjs +151 -0
- package/scripts/ensure-native-modules.cjs +222 -18
- package/scripts/release-gates.mjs +29 -0
- package/public/dist/assets/Agent-BgkP4EnS.js +0 -1
- package/public/dist/assets/CodeCanvas-BZo3dohZ.js +0 -3
- package/public/dist/assets/MarkdownRenderer-CHacL2M_.js +0 -15
- package/public/dist/assets/MarkdownRenderer-DyrB9FbZ.js +0 -1
- package/public/dist/assets/ModelProvider-CgUvs6pE.js +0 -1
- package/public/dist/assets/app-BGIAy4he.js +0 -55
- package/public/dist/assets/bgtask-badge-GRSiNILQ.js +0 -1
- package/public/dist/assets/iframe-renderer-BUSk0Rw9.js +0 -1
- package/public/dist/assets/manager-B-gpf-3j.js +0 -13
- package/public/dist/assets/memory-CX6YahTc.js +0 -1
- package/public/dist/assets/message-history-Det7u76S.js +0 -1
- package/public/dist/assets/settings-C7NutP6X.js +0 -1
- package/public/dist/assets/settings-core-CyX-px6_.js +0 -100
- package/public/dist/assets/settings-core-DVpFmrhY.js +0 -1
- package/public/dist/assets/skills-BWhKreQ2.js +0 -1
- package/public/dist/assets/slash-commands-Di4NDA4w.js +0 -1
- package/public/dist/assets/ui-BghexWrB.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-render-Bjnw0wQ6.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./state-DxpgDKMO.js";import{i as t,t as n}from"./api-tVoG39dL.js";import{t as r}from"./preload-helper-DFYRRz9w.js";import{O as i,T as a,b as o,j as s,n as c,x as l}from"./render-
|
|
2
|
+
import{t as e}from"./state-DxpgDKMO.js";import{i as t,t as n}from"./api-tVoG39dL.js";import{t as r}from"./preload-helper-DFYRRz9w.js";import{O as i,T as a,b as o,j as s,n as c,x as l}from"./render-DYX6GRQ0.js";import{_ as ee,g as te,p as ne}from"./iframe-renderer-C5vRbbl9.js";import{_ as re,d as ie,u,v as d}from"./message-history-C4WOisGx.js";import{a as ae,d as oe,i as se,l as f,n as ce,r as le,s as ue,t as de,u as fe}from"./ui-Hx_mNoDf.js";var p=null,m=0,h=[],g=2e3,pe=3e4,me=1.5,_=null,he=4e4,ge=1e4,_e=0,ve=!1,ye=null;function be(){ye||=setInterval(()=>{!p||!v||!ve||Date.now()-_e<=he||(console.warn(`[sse] stalled channel (no ping in`,he,`ms) — forcing reconnect`),p.close(),p=null,v=!1,y?.(),b(xe))},ge)}var xe=``,v=!1,Se=!1,Ce=!1,we=!1,Te=!1,Ee=null,y=null,De=null;function Oe(e){Ee=e}function ke(e){y=e}function Ae(e){De=e}function je(e,t,n){let r={topic:e,event:t,handler:n};return h.push(r),()=>{let e=h.indexOf(r);e>=0&&h.splice(e,1)}}function Me(e,t,n){for(let r of h)if((r.topic===`*`||r.topic===e)&&(r.event===null||r.event===t))try{r.handler(n)}catch(e){console.warn(`[sse] handler error:`,e.message)}}function Ne(){Se||_||(_=setTimeout(()=>{_=null,b(xe)},g),g=Math.min(g*me,pe))}function b(e){xe=e,Se=!1,_&&=(clearTimeout(_),null),p&&p.close();let t=`${n}/api/events?lang=${encodeURIComponent(e)}`+(m?`&lastEventId=${m}`:``);we=!1,Te=!1,p=new EventSource(t),be(),p.onopen=()=>{g=2e3,v=!0,Ce=!0,we=!0,_e=Date.now(),Ee?.()},p.onerror=()=>{if(p?.close(),p=null,!we&&!Ce&&De){Te||(Te=!0,De());return}v&&(v=!1,y?.()),Ne()},p.onmessage=e=>{m=parseInt(e.lastEventId||`0`,10)||m;let t;try{t=JSON.parse(e.data)}catch{console.warn(`[sse] malformed message:`,e.data);return}if(!t||typeof t!=`object`||typeof t.topic!=`string`||typeof t.event!=`string`){console.warn(`[sse] invalid message shape:`,t);return}if(_e=Date.now(),t.topic===`system`&&t.event===`ping`){ve=!0;return}Me(t.topic,t.event,t)}}var Pe=3e3,x=new Map,S=[],C=(e,t)=>`${e}:${t}`;function w(e=[]){let t=document.getElementById(`pendingQueue`);if(t){if(S=e.slice(),!e.length){ze(new Set),t.classList.remove(`visible`),t.innerHTML=``;return}t.classList.add(`visible`),t.innerHTML=`
|
|
3
3
|
<div class="pending-queue-header">
|
|
4
4
|
<span class="pending-queue-title">${l.hourglass} <span data-i18n="queue.pendingTitle">${a(s(`queue.pendingTitle`))}</span> <span class="pending-queue-count">${e.length}</span></span>
|
|
5
5
|
</div>
|
|
@@ -12,7 +12,7 @@ import{t as e}from"./state-DxpgDKMO.js";import{i as t,t as n}from"./api-tVoG39dL
|
|
|
12
12
|
<button class="pending-row-btn pending-row-copy" data-pending-action="copy" title="${i}" aria-label="${i}"><span class="pending-btn-content">${l.copy}</span></button>
|
|
13
13
|
<button class="pending-row-btn pending-row-steer" data-pending-action="steer" data-i18n-title="queue.steer" title="${o}" aria-label="${o}"><span class="pending-arm-fill" aria-hidden="true"></span><span class="pending-btn-content"><span class="pending-steer-arrow" aria-hidden="true">↳</span><span class="pending-steer-label">${o}</span></span></button>
|
|
14
14
|
<button class="pending-row-btn pending-row-delete" data-pending-action="delete" data-i18n-title="queue.delete" title="${c}" aria-label="${c}"><span class="pending-arm-fill" aria-hidden="true"></span><span class="pending-btn-content">${l.trash}</span></button>
|
|
15
|
-
</div>`}function T(e,t){let n=document.querySelector(`.pending-row[data-pending-id="${CSS.escape(e)}"]`);return n?n.querySelector(`[data-pending-action="${t}"]`):null}function Ie(e,t){let n=T(e,t);if(!n)return;n.classList.add(`armed`),n.setAttribute(`title`,s(`queue.cancelArm`));let r=n.querySelector(`.pending-arm-fill`);r&&(r.style.animation=`none`,r.offsetWidth,r.style.animation=``)}function Le(e,t){let n=T(e,t);n&&(n.classList.remove(`armed`),n.setAttribute(`title`,s(t===`steer`?`queue.steer`:`queue.delete`)))}function Re(){for(let e of x.values()){let t=T(e.id,e.action);t&&(t.classList.add(`armed`),t.setAttribute(`title`,s(`queue.cancelArm`)))}}function ze(e){for(let[t,n]of x)e.has(n.id)||(clearTimeout(n.timerId),x.delete(t))}function Be(e,n){let r=C(e,n),i=setTimeout(()=>He(e,n),Pe);x.set(r,{id:e,action:n,timerId:i}),Ie(e,n),n===`steer`&&t(`/api/orchestrate/queue/${encodeURIComponent(e)}/hold`,`POST`,{}).catch(()=>{})}function Ve(e,n){let r=C(e,n),i=x.get(r);i&&(clearTimeout(i.timerId),x.delete(r),Le(e,n),n===`steer`&&t(`/api/orchestrate/queue/${encodeURIComponent(e)}/hold`,`DELETE`,{}).catch(()=>{}))}async function He(e,n){x.delete(C(e,n));let r=n===`steer`?`/api/orchestrate/queue/${encodeURIComponent(e)}/steer`:`/api/orchestrate/queue/${encodeURIComponent(e)}`,i=n===`steer`?`POST`:`DELETE`;if(n===`steer`&&u(`running`),await t(r,i,{})==null){S=S.filter(t=>t.id!==e),w(S),n===`steer`&&U(`steer-fire-miss`).catch(()=>{});return}S=S.filter(t=>t.id!==e),w(S)}function Ue(e,t){if(x.has(C(e,t))){Ve(e,t);return}Be(e,t)}function We(){let e=document.getElementById(`pendingQueue`);e&&e.addEventListener(`click`,async e=>{let t=e.target?.closest(`[data-pending-action]`);if(!t)return;let n=t.closest(`.pending-row`)?.dataset.pendingId;if(!n)return;let r=t.dataset.pendingAction;if(r===`copy`){let e=S.find(e=>e.id===n);if(e?.prompt&&(await o(e.prompt)).ok){let e=t.querySelector(`.pending-btn-content`);e&&(e.innerHTML=l.checkSimple,setTimeout(()=>{e.innerHTML=l.copy},600))}return}Ue(n,r===`steer`?`steer`:`delete`)})}var Ge=800,E=64,Ke=`CLI-JAW`,D=!1,O=0,k=Ke,A=null,j=``,M=!1,N=0;function qe(){return navigator}function Je(){return document.visibilityState!==`visible`||!document.hasFocus()}function Ye(e){return e-N<Ge}function Xe(){if(A)return A;let e=document.querySelector(`link[rel~="icon"]`);if(e)return A=e,j=e.href||e.getAttribute(`href`)||``,e;let t=document.createElement(`link`);return t.rel=`icon`,document.head.appendChild(t),A=t,M=!0,t}function Ze(e){let t=document.createElement(`canvas`);t.width=E,t.height=E;let n=t.getContext(`2d`);return n?(n.clearRect(0,0,E,E),n.font=`44px "Apple Color Emoji", "Segoe UI Emoji", sans-serif`,n.textAlign=`center`,n.textBaseline=`middle`,n.fillText(`🦈`,28,36),n.beginPath(),n.arc(50,15,e>1?12:9,0,Math.PI*2),n.fillStyle=`#ff335f`,n.fill(),n.lineWidth=4,n.strokeStyle=`#ffffff`,n.stroke(),e>1&&(n.fillStyle=`#ffffff`,n.font=`bold 15px sans-serif`,n.textAlign=`center`,n.textBaseline=`middle`,n.fillText(String(Math.min(e,9)),50,16)),t.toDataURL(`image/png`)):j}async function Qe(e){let t=qe();if(typeof t.setAppBadge==`function`)try{await t.setAppBadge(e)}catch{}}async function $e(){let e=qe();if(typeof e.clearAppBadge==`function`)try{await e.clearAppBadge()}catch{}}function et(){document.title=`(${O}) ${k}`;let e=Xe();e&&(e.href=Ze(O)),Qe(O)}function tt(){document.title=k}function nt(){if(A){if(M){A.remove(),A=null,M=!1;return}A.href=j}}function rt(){D||(D=!0,k=document.title||Ke,Xe(),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&at()}),window.addEventListener(`focus`,()=>at()))}function it(){if(!D||!Je())return;let e=Date.now();Ye(e)||(N=e,O+=1,et())}function at(){!D||O===0||(O=0,N=0,tt(),nt(),$e())}function ot(e,t){return!e||!t?!0:e===`all`||e===t}var P=[`I`,`P`,`A`,`B`,`C`],F=null;function st(e,t,n){let r=P.indexOf(n);if(r<0)return;let i=e.getBoundingClientRect(),a=t.offsetWidth||36,o=document.getElementById(`dot-${n}`);if(!o)return;let s=P[r+1],c=s?document.getElementById(`dot-${s}`):null;if(c){let e=o.getBoundingClientRect(),n=c.getBoundingClientRect(),r=(e.right+n.left)/2;t.style.transform=`translateX(${r-i.left-a/2}px)`}else{let e=o.getBoundingClientRect();t.style.transform=`translateX(${e.left-i.left+e.width/2-a/2}px)`}}var I={},ct=8,lt=64,L=null,R=0,z=[],B=new Map;function ut(e){return e!==null&&z.includes(e)}function dt(e){let t=Number(e);return Number.isFinite(t)&&t>0?Math.floor(t):null}function ft(e,t){if(!(!e||t==null))for(t>(B.get(e)||0)&&B.set(e,t);B.size>lt;){let e=null;for(let t of B.keys())if(t!==L){e=t;break}if(!e)break;B.delete(e)}}function pt(e){let t=new Map;for(let n of e?.toolLog||[]){let e=typeof n?.traceRunId==`string`&&n.traceRunId?n.traceRunId:null,r=dt(n?.traceSeq);!e||r==null||r>(t.get(e)||0)&&t.set(e,r)}return t}function mt(e,t,n){return!n||!e||t==null?!1:t<=(B.get(e)||0)}function ht(e){let t=e??L;L=null,R=0,t&&!z.includes(t)&&(z.push(t),z.length>ct&&z.shift())}function gt(e){!e||e===L||(L=e,R=0)}function _t(e){if(e?.running){typeof e.traceRunId==`string`&&e.traceRunId&&(L=e.traceRunId),R=typeof e.textLen==`number`?e.textLen:(e.text||``).length;for(let[t,n]of pt(e))ft(t,n)}}var vt=``,V=0,H=null,yt=0,bt=!1,xt=0,St=750,Ct=750;async function wt(e={}){let t=await(await fetch(`${n}/api/orchestrate/snapshot`)).json();vt=String(t.orc.scope||``),Rt(t.orc.state),jt(t.orc.ctx||null),At(t.heartbeat||{pending:0,deferredPending:0}),kt(t.workers),ie(t.runtime.queuePending),ce(t.queued||[]),w(t.queued||[]),e.hydrateRun&&(ue(t.activeRun),_t(t.activeRun)),It(),t.runtime.busy?u(`running`):f()||u(`idle`),r(()=>import(`./employees-
|
|
15
|
+
</div>`}function T(e,t){let n=document.querySelector(`.pending-row[data-pending-id="${CSS.escape(e)}"]`);return n?n.querySelector(`[data-pending-action="${t}"]`):null}function Ie(e,t){let n=T(e,t);if(!n)return;n.classList.add(`armed`),n.setAttribute(`title`,s(`queue.cancelArm`));let r=n.querySelector(`.pending-arm-fill`);r&&(r.style.animation=`none`,r.offsetWidth,r.style.animation=``)}function Le(e,t){let n=T(e,t);n&&(n.classList.remove(`armed`),n.setAttribute(`title`,s(t===`steer`?`queue.steer`:`queue.delete`)))}function Re(){for(let e of x.values()){let t=T(e.id,e.action);t&&(t.classList.add(`armed`),t.setAttribute(`title`,s(`queue.cancelArm`)))}}function ze(e){for(let[t,n]of x)e.has(n.id)||(clearTimeout(n.timerId),x.delete(t))}function Be(e,n){let r=C(e,n),i=setTimeout(()=>He(e,n),Pe);x.set(r,{id:e,action:n,timerId:i}),Ie(e,n),n===`steer`&&t(`/api/orchestrate/queue/${encodeURIComponent(e)}/hold`,`POST`,{}).catch(()=>{})}function Ve(e,n){let r=C(e,n),i=x.get(r);i&&(clearTimeout(i.timerId),x.delete(r),Le(e,n),n===`steer`&&t(`/api/orchestrate/queue/${encodeURIComponent(e)}/hold`,`DELETE`,{}).catch(()=>{}))}async function He(e,n){x.delete(C(e,n));let r=n===`steer`?`/api/orchestrate/queue/${encodeURIComponent(e)}/steer`:`/api/orchestrate/queue/${encodeURIComponent(e)}`,i=n===`steer`?`POST`:`DELETE`;if(n===`steer`&&u(`running`),await t(r,i,{})==null){S=S.filter(t=>t.id!==e),w(S),n===`steer`&&U(`steer-fire-miss`).catch(()=>{});return}S=S.filter(t=>t.id!==e),w(S)}function Ue(e,t){if(x.has(C(e,t))){Ve(e,t);return}Be(e,t)}function We(){let e=document.getElementById(`pendingQueue`);e&&e.addEventListener(`click`,async e=>{let t=e.target?.closest(`[data-pending-action]`);if(!t)return;let n=t.closest(`.pending-row`)?.dataset.pendingId;if(!n)return;let r=t.dataset.pendingAction;if(r===`copy`){let e=S.find(e=>e.id===n);if(e?.prompt&&(await o(e.prompt)).ok){let e=t.querySelector(`.pending-btn-content`);e&&(e.innerHTML=l.checkSimple,setTimeout(()=>{e.innerHTML=l.copy},600))}return}Ue(n,r===`steer`?`steer`:`delete`)})}var Ge=800,E=64,Ke=`CLI-JAW`,D=!1,O=0,k=Ke,A=null,j=``,M=!1,N=0;function qe(){return navigator}function Je(){return document.visibilityState!==`visible`||!document.hasFocus()}function Ye(e){return e-N<Ge}function Xe(){if(A)return A;let e=document.querySelector(`link[rel~="icon"]`);if(e)return A=e,j=e.href||e.getAttribute(`href`)||``,e;let t=document.createElement(`link`);return t.rel=`icon`,document.head.appendChild(t),A=t,M=!0,t}function Ze(e){let t=document.createElement(`canvas`);t.width=E,t.height=E;let n=t.getContext(`2d`);return n?(n.clearRect(0,0,E,E),n.font=`44px "Apple Color Emoji", "Segoe UI Emoji", sans-serif`,n.textAlign=`center`,n.textBaseline=`middle`,n.fillText(`🦈`,28,36),n.beginPath(),n.arc(50,15,e>1?12:9,0,Math.PI*2),n.fillStyle=`#ff335f`,n.fill(),n.lineWidth=4,n.strokeStyle=`#ffffff`,n.stroke(),e>1&&(n.fillStyle=`#ffffff`,n.font=`bold 15px sans-serif`,n.textAlign=`center`,n.textBaseline=`middle`,n.fillText(String(Math.min(e,9)),50,16)),t.toDataURL(`image/png`)):j}async function Qe(e){let t=qe();if(typeof t.setAppBadge==`function`)try{await t.setAppBadge(e)}catch{}}async function $e(){let e=qe();if(typeof e.clearAppBadge==`function`)try{await e.clearAppBadge()}catch{}}function et(){document.title=`(${O}) ${k}`;let e=Xe();e&&(e.href=Ze(O)),Qe(O)}function tt(){document.title=k}function nt(){if(A){if(M){A.remove(),A=null,M=!1;return}A.href=j}}function rt(){D||(D=!0,k=document.title||Ke,Xe(),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&at()}),window.addEventListener(`focus`,()=>at()))}function it(){if(!D||!Je())return;let e=Date.now();Ye(e)||(N=e,O+=1,et())}function at(){!D||O===0||(O=0,N=0,tt(),nt(),$e())}function ot(e,t){return!e||!t?!0:e===`all`||e===t}var P=[`I`,`P`,`A`,`B`,`C`],F=null;function st(e,t,n){let r=P.indexOf(n);if(r<0)return;let i=e.getBoundingClientRect(),a=t.offsetWidth||36,o=document.getElementById(`dot-${n}`);if(!o)return;let s=P[r+1],c=s?document.getElementById(`dot-${s}`):null;if(c){let e=o.getBoundingClientRect(),n=c.getBoundingClientRect(),r=(e.right+n.left)/2;t.style.transform=`translateX(${r-i.left-a/2}px)`}else{let e=o.getBoundingClientRect();t.style.transform=`translateX(${e.left-i.left+e.width/2-a/2}px)`}}var I={},ct=8,lt=64,L=null,R=0,z=[],B=new Map;function ut(e){return e!==null&&z.includes(e)}function dt(e){let t=Number(e);return Number.isFinite(t)&&t>0?Math.floor(t):null}function ft(e,t){if(!(!e||t==null))for(t>(B.get(e)||0)&&B.set(e,t);B.size>lt;){let e=null;for(let t of B.keys())if(t!==L){e=t;break}if(!e)break;B.delete(e)}}function pt(e){let t=new Map;for(let n of e?.toolLog||[]){let e=typeof n?.traceRunId==`string`&&n.traceRunId?n.traceRunId:null,r=dt(n?.traceSeq);!e||r==null||r>(t.get(e)||0)&&t.set(e,r)}return t}function mt(e,t,n){return!n||!e||t==null?!1:t<=(B.get(e)||0)}function ht(e){let t=e??L;L=null,R=0,t&&!z.includes(t)&&(z.push(t),z.length>ct&&z.shift())}function gt(e){!e||e===L||(L=e,R=0)}function _t(e){if(e?.running){typeof e.traceRunId==`string`&&e.traceRunId&&(L=e.traceRunId),R=typeof e.textLen==`number`?e.textLen:(e.text||``).length;for(let[t,n]of pt(e))ft(t,n)}}var vt=``,V=0,H=null,yt=0,bt=!1,xt=0,St=750,Ct=750;async function wt(e={}){let t=await(await fetch(`${n}/api/orchestrate/snapshot`)).json();vt=String(t.orc.scope||``),Rt(t.orc.state),jt(t.orc.ctx||null),At(t.heartbeat||{pending:0,deferredPending:0}),kt(t.workers),ie(t.runtime.queuePending),ce(t.queued||[]),w(t.queued||[]),e.hydrateRun&&(ue(t.activeRun),_t(t.activeRun)),It(),t.runtime.busy?u(`running`):f()||u(`idle`),r(()=>import(`./employees-BnobWM_2.js`).then(e=>{typeof e.renderEmployees==`function`&&e.renderEmployees()}),__vite__mapDeps([0]))}function U(e=`manual`,t={}){let n=Date.now();return t.hydrateRun?wt(t):H||(n-yt<St?Promise.resolve():(yt=n,H=wt(t).catch(t=>{throw console.warn(`[ws] orchestrate snapshot sync failed (${e})`,t),t}).finally(()=>{H=null}),H))}function Tt(e){return e===`iframe-visible`||e===`pageshow`||e===`discard`||e===`visibilitychange`}function Et(e){te(e),r(()=>import(`./ui-CAicpUZc.js`).then(async t=>{if(Tt(e)&&V>0)try{await t.loadMessages(),V=Date.now()}catch(t){console.warn(`[ws] restore loadMessages failed (${e})`,t)}await U(e,{hydrateRun:!0})}),__vite__mapDeps([0])).catch(()=>{}).finally(()=>{ne(e)})}function W(e){let t=Date.now();!Tt(e)&&t-xt<Ct||(xt=t,Et(e))}function Dt(e){let t=Array.isArray(e.changedKeys)?e.changedKeys:[];t.includes(`workingDir`)||t.includes(`projectDirs`)?r(()=>import(`./ui-CAicpUZc.js`).then(async e=>{try{await e.loadMessages(),V=Date.now()}catch(e){console.warn(`[ws] settings scope loadMessages failed`,e)}await U(`settings_change`).catch(()=>{}).finally(()=>e.reconcileChatBottomAfterRestore(`settings_change`))}),__vite__mapDeps([0])):U(`settings_change`).catch(()=>{}),r(()=>import(`./settings-core-B1Y5Nb4Z.js`).then(t=>t.refreshHeaderFromSettingsChange(e)),__vite__mapDeps([0])).catch(()=>{})}function Ot(){bt||(bt=!0,window.addEventListener(`focus`,()=>{W(`focus`)}),window.addEventListener(`pageshow`,e=>{e.persisted&&W(`pageshow`)}),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&W(`visibilitychange`)}),document.addEventListener(`resume`,()=>{W(`resume`)}),`wasDiscarded`in document&&document.wasDiscarded&&W(`discard`),window.addEventListener(`message`,e=>{e.data?.type===`jaw-preview-visibility`&&e.data.visible&&W(`iframe-visible`)}))}function kt(e){for(let e of Object.keys(I))delete I[e];for(let t of e)t.state===`running`&&t.phase&&(I[t.agentId]={phase:t.phase,phaseLabel:t.phaseLabel||``})}function At(t){let n={pending:Number(t?.pending||0),deferredPending:Number(t?.deferredPending||0),...t?.reason?{reason:t.reason}:{},...t?.policy?{policy:t.policy}:{},...t?.jobId?{jobId:t.jobId}:{},...t?.jobName?{jobName:t.jobName}:{}};e.heartbeatRuntime=n;let r=document.getElementById(`pabcHeartbeatStatus`);if(r)if(n.reason===`pabcd_active`&&n.deferredPending>0){let e=n.jobName?`: ${n.jobName}`:``;r.textContent=`heartbeat deferred (${n.deferredPending})${e}`,r.hidden=!1}else r.textContent=``,r.hidden=!0}function jt(t){e.orcTaskAnchor=String(t?.taskAnchor||``).trim(),e.orcResolvedSelection=t?.resolvedSelection||null;let n=document.getElementById(`pabcTaskAnchor`);n&&(e.orcTaskAnchor?(n.textContent=`anchor: ${e.orcResolvedSelection?.index?`${e.orcResolvedSelection.index}. `:``}${e.orcTaskAnchor}`,n.hidden=!1):(n.textContent=``,n.hidden=!0),Pt(t?.interview||null))}var G=(()=>{try{return localStorage.getItem(`jaw:interviewCollapsed`)===`1`}catch{return!1}})();function Mt(e){G=e;try{localStorage.setItem(`jaw:interviewCollapsed`,e?`1`:`0`)}catch{}let t=document.getElementById(`interviewPanel`);if(!t)return;t.classList.toggle(`collapsed`,e);let n=t.querySelector(`.iv-toggle`);n&&n.setAttribute(`aria-expanded`,String(!e))}function Nt(e){let t=e=>{switch(e){case`max`:return 1;case`xhigh`:return .8;case`high`:return .6;case`medium`:return .4;default:return .2}},n=e=>{switch(e){case`max`:return`#2196f3`;case`xhigh`:return`#4caf50`;case`high`:return`#8bc34a`;case`medium`:return`#ff9800`;default:return`#f44336`}},r=[t(e.goal),t(e.constraint),t(e.success),t(e.ontology)],i=1-r.reduce((e,t)=>e+t,0)/r.length,a=Object.values(e).every(e=>e===`max`)||i<=.2?`🟢 Ready`:i<=.4?`🟡 Almost`:`🔴 Needs work`,o=(e,r)=>{let i=t(r);return`<div style="display:flex;align-items:center;gap:6px;font-size:12px">
|
|
16
16
|
<span style="width:70px;color:var(--text-secondary)">${e}</span>
|
|
17
17
|
<div style="flex:1;height:5px;background:var(--bg-tertiary);border-radius:3px">
|
|
18
18
|
<div style="width:${i*100}%;height:100%;background:${n(r)};border-radius:3px;transition:width .3s"></div>
|
|
@@ -46,4 +46,4 @@ import{t as e}from"./state-DxpgDKMO.js";import{i as t,t as n}from"./api-tVoG39dL
|
|
|
46
46
|
</div>`};n.innerHTML=`<div style="font-size:11px;font-weight:600;margin-bottom:4px;color:var(--text-secondary)">Build Budget</div>
|
|
47
47
|
${r(`Workers`,e.spent.workerDispatches,e.maxWorkerDispatches)}
|
|
48
48
|
${r(`Self-heal`,e.spent.selfHealRetries,e.maxSelfHealRetries)}
|
|
49
|
-
${r(`Verify`,e.spent.verificationRounds,e.maxVerificationRounds)}`}async function It(){try{let t=await fetch(`${n}/api/goal`);if(!t.ok)return;let r=await t.json();r.goal?e.activeGoal={id:r.goal.id,objective:r.goal.objective,status:r.goal.status,createdAt:r.goal.createdAt,updatedAt:r.goal.updatedAt,lastCheckpointSummary:r.goal.lastCheckpoint?.summary,nextAction:r.goal.lastCheckpoint?.nextAction}:e.activeGoal=null,Lt()}catch{}}function Lt(){let t=document.getElementById(`goalCockpit`);if(!t)return;let n=e.activeGoal;if(!n||n.status===`complete`||n.status===`cancelled`){t.hidden=!0,t.innerHTML=``;return}t.hidden=!1,t.replaceChildren();let r=n.status===`paused`?`paused`:n.status===`blocked`?`blocked`:`active`,i=document.createElement(`span`);i.className=`goal-objective`,i.title=n.objective,i.textContent=n.objective;let a=document.createElement(`span`);if(a.className=`goal-status goal-status--${r}`,a.textContent=n.status,t.append(i,a),n.nextAction){let e=document.createElement(`span`);e.className=`goal-next`,e.textContent=n.nextAction,t.append(e)}}function Rt(t,n){let r=new Set([`IDLE`,`I`,`P`,`A`,`B`,`C`,`D`]).has(t)?t:`IDLE`;if(e.orcState=r,r===`IDLE`||r===`D`)document.body.removeAttribute(`data-orc-state`),document.body.style.removeProperty(`--orc-glow`);else{document.body.setAttribute(`data-orc-state`,r);let e=`--orc-glow-${r}`,t=getComputedStyle(document.documentElement).getPropertyValue(e).trim();document.body.style.setProperty(`--orc-glow`,t)}document.body.classList.add(`orc-pulse`),setTimeout(()=>document.body.classList.remove(`orc-pulse`),700);let i=document.getElementById(`orcStateBadge`);i&&(i.textContent={IDLE:``,I:`INTERVIEW`,P:`PLAN`,A:`AUDIT`,B:`BUILD`,C:`CHECK`,D:`DONE`}[r],i.style.display=r===`IDLE`?`none`:`inline-block`);let a=document.getElementById(`pabcRoadmap`),o=document.getElementById(`sharkRunner`),s=document.getElementById(`pabcBrand`);if(a&&o){if(!a.dataset.resizeObserved){a.dataset.resizeObserved=`1`,new ResizeObserver(()=>{F&&o.classList.contains(`running`)&&st(a,o,F)}).observe(a);let e=0;window.addEventListener(`resize`,()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{F&&o.classList.contains(`running`)&&st(a,o,F)})})}if(r===`IDLE`)a.classList.remove(`visible`,`shimmer-out`),o.classList.remove(`running`),F=null;else if(r===`D`){P.forEach(e=>{let t=document.getElementById(`dot-${e}`);t&&(t.className=`pabc-dot done`,t.setAttribute(`data-phase`,e))});for(let e=0;e<P.length;e++){let t=document.getElementById(`pabc-conn-${e}`);t&&(t.className=`pabc-connector done`)}o.classList.remove(`running`),F=null,a.classList.add(`shimmer-out`),setTimeout(()=>a.classList.remove(`visible`,`shimmer-out`),1e3)}else{a.classList.remove(`shimmer-out`),a.classList.add(`visible`),o.classList.add(`running`);let e=P.indexOf(r);P.forEach((t,n)=>{let r=document.getElementById(`dot-${t}`);r&&(r.className=`pabc-dot ${n<e?`done`:n===e?`active`:`future`}`,r.setAttribute(`data-phase`,t))});for(let t=0;t<P.length;t++){let n=document.getElementById(`pabc-conn-${t}`);n&&(n.className=`pabc-connector ${t<e?`done`:``}`)}F=r,requestAnimationFrame(()=>st(a,o,r))}s&&n&&(s.textContent=n)}}var zt=!1,Bt=Promise.resolve(),Vt=0;function K(){Ot(),zt||(zt=!0,Zt()),Yt(),b(i())}var Ht=K;function Ut(e){console.log(`[${e}] connected`),X=2e3,Kt();let t=Date.now()-V<1e4;Bt=r(()=>import(`./ui-BghexWrB.js`).then(async n=>{if(n.cleanupToolActivity(),!t)try{await n.loadMessages(),V=Date.now()}catch(t){console.error(`[${e}] loadMessages failed`,t)}await U(`reconnect`,{hydrateRun:!0}).catch(()=>{}).finally(()=>n.reconcileChatBottomAfterRestore(`reconnect`)),r(()=>import(`./memory-CX6YahTc.js`).then(e=>e.refreshMemorySidebar()),__vite__mapDeps([0])).catch(()=>{}),r(()=>import(`./bgtask-badge-GRSiNILQ.js`).then(e=>e.refreshBgtaskBadge()),__vite__mapDeps([0])).catch(()=>{})}),void 0)}function Wt(){te(`replay_gap`),Bt=r(()=>import(`./ui-BghexWrB.js`).then(async e=>{try{await e.loadMessages(),V=Date.now()}catch(e){console.error(`[sse] replay gap loadMessages failed`,e)}await U(`replay_gap`,{hydrateRun:!0}).catch(()=>{}).finally(()=>e.reconcileChatBottomAfterRestore(`replay_gap`))}),__vite__mapDeps([0]))}var Gt=8e3,q=null;function Kt(){q!==null&&(window.clearTimeout(q),q=null)}function qt(){console.log(`[channel] disconnected`),r(()=>import(`./ui-BghexWrB.js`).then(e=>e.cleanupToolActivity()),__vite__mapDeps([0])),q===null&&(q=window.setTimeout(()=>{q=null,u(`idle`),d(`${l.exec} ${s(`ws.disconnected`)}`,`tool-activity`)},Gt))}var J=null,Y=!1,X=2e3,Jt=3e4;function Yt(){if(J){Y=!0;try{J.close()}catch{}J=null}}function Xt(){if(J)return;console.warn(`[channel] /api/events unavailable — falling back to legacy WebSocket`);let e=`ws://${location.host}`,t=new WebSocket(`${e}${n}/?lang=${i()}`);J=t,Y=!1,t.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{console.warn(`[ws] malformed message:`,e.data);return}if(!t||typeof t!=`object`||typeof t.type!=`string`){console.warn(`[ws] invalid message shape:`,t);return}Qt(t)};let r=!1;t.onopen=()=>{r=!0,X=2e3,Ut(`ws`)},t.onclose=()=>{if(J===t&&(J=null),Y){Y=!1;return}if(r){qt(),setTimeout(K,2e3);return}X=Math.min(X*2,Jt),setTimeout(K,X)}}function Zt(){je(`widget`,`widget_updated`,e=>{let t=e.chatId,n=e.widgetId;typeof t!=`string`||typeof n!=`string`||r(()=>import(`./iframe-renderer-BUSk0Rw9.js`).then(e=>e.refreshFileWidget(t,n)),__vite__mapDeps([0])).catch(e=>console.warn(`[widget] refresh failed:`,e.message))}),je(`*`,null,e=>{Qt({...e,type:e.event})}),Oe(()=>Ut(`sse`)),ke(()=>qt()),Ae(()=>Xt())}function Qt(t){if(t.type===`agent_tool`){if(f())return;let e=typeof t.traceRunId==`string`&&t.traceRunId?t.traceRunId:null,n=dt(t.traceSeq);if(ut(e)||mt(e,n,t.sseReplay===!0))return;t.isEmployee!==!0&>(e);let r=t.toolType===`thinking`?`thinking`:t.toolType===`search`?`search`:t.toolType===`subagent`?`subagent`:`tool`;oe({id:`step-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,type:r,icon:t.icon||l.tool,rawIcon:t.rawIcon||t.icon||``,label:t.label||``,isEmployee:t.isEmployee===!0,detail:t.detail||``,stepRef:t.stepRef||``,traceRunId:t.traceRunId||``,traceSeq:t.traceSeq,detailAvailable:t.detailAvailable,detailBytes:t.detailBytes,rawRetentionStatus:t.rawRetentionStatus,status:t.status||`running`,startTime:typeof t.startedAt==`number`&&t.startedAt>0?t.startedAt:Date.now()},typeof t.startedAt==`number`&&t.startedAt>0?t.startedAt:void 0),ft(e,n)}else if(t.type===`agent_output`||t.type===`agent_chunk`){if(f())return;let e=typeof t.traceRunId==`string`&&t.traceRunId?t.traceRunId:null;if(ut(e))return;gt(e);let n=t.text||``;if(e&&typeof t.textLen==`number`){if(t.textLen<=R){t.sseReplay!==!0&&t.textLen<R&&(console.warn(`[ws] live agent_output behind applied cursor — resync (${t.textLen} < ${R})`),R=t.textLen);return}let e=t.textLen-R;e<n.length&&(n=n.slice(-e)),R=t.textLen}de(n)}else if(t.type===`agent_status`){if(!t.running&&f())return;t.running&&f()&&se(),t.running===void 0?u(t.status||`idle`):u(t.running?`running`:`idle`),t.agentId&&t.phase&&(I[t.agentId]={phase:t.phase,phaseLabel:t.phaseLabel||``},r(()=>import(`./employees-BL4qMxJj.js`).then(e=>e.loadEmployees()),__vite__mapDeps([0])))}else if(t.type===`bgtask_update`)r(()=>import(`./bgtask-badge-GRSiNILQ.js`).then(e=>e.applyBgtaskUpdate(t)),__vite__mapDeps([0])).catch(()=>{});else if(t.type===`queue_update`)ie(t.pending||0),Array.isArray(t.queued)&&w(t.queued),U(`queue_update`).catch(()=>{});else if(t.type===`agent_retry`){let e=Number(t.delay??0),n=t.reason,r=a(String(n||`429`));d(s(e>0?`ws.retry`:`ws.retryNow`,{cli:a(t.cli||``),reason:r,delay:e}),`tool-activity`)}else if(t.type===`agent_fallback`)d(s(`ws.fallback`,{from:a(t.from||``),to:a(t.to||``)}),`tool-activity`);else if(t.type===`agent_smoke`)d(`${l.warning} ${a(t.cli||`agent`)}: smoke response detected — auto-continuing`,`tool-activity`);else if(t.type===`goal_done`)e.activeGoal=null,Lt(),d(`🎯 Goal completed${t.source===`ai_output`?` (detected from AI output)`:``}`,`tool-activity`);else if(t.type===`goal_cancel`)e.activeGoal=null,Lt(),d(`🎯 Goal cancelled`,`tool-activity`);else if(t.type===`schedule_wakeup`)d(`⏰ Wakeup scheduled in ${t.delaySeconds}s — ${a(String(t.reason||``))}`,`tool-activity`);else if(t.type===`goal_continuation_limit`)d(`⚠️ Goal continuation limit reached (${t.attempts} attempts)`,`tool-activity`);else if(t.type===`goal_continuation`)d(`🎯 Active goal — auto-continuing`,`tool-activity`);else if(t.type===`agent_done`){if(!(t.steered||f())){let e=typeof t.traceRunId==`string`&&t.traceRunId?t.traceRunId:null;if(ut(e)||e&&L&&e!==L)return;ht(e),ae(t.text||``,t.toolLog),it()}}else if(t.type===`orchestrate_done`)ht(null),ae(t.text||``),it();else if(t.type===`clear`){c(),le(),ee().clear();let e=document.getElementById(`chatMessages`);e&&(e.innerHTML=``),r(()=>import(`./idb-cache-ZH6lOebk.js`).then(e=>e.clearCache()),[]).catch(()=>{})}else if(t.type===`session_reset`)d(`${l.refresh} Session reset — history preserved`,`tool-activity`);else if(t.type===`agent_added`||t.type===`agent_updated`||t.type===`agent_deleted`)r(()=>import(`./employees-BL4qMxJj.js`).then(e=>e.loadEmployees()),__vite__mapDeps([0]));else if(t.type===`heartbeat_pending`){let e={pending:t.pending||0,deferredPending:t.deferredPending||0};t.reason!==void 0&&(e.reason=t.reason),t.policy!==void 0&&(e.policy=t.policy),t.jobId!==void 0&&(e.jobId=t.jobId),t.jobName!==void 0&&(e.jobName=t.jobName),At(e)}else if(t.type===`orc_state`)$t(t);else if(t.type===`memory_status`)r(()=>import(`./memory-CX6YahTc.js`).then(e=>e.refreshMemorySidebar()),__vite__mapDeps([0]));else if(t.type===`steer_started`)fe(),ht(null),ae(``),u(`steering`);else if(t.type===`new_message`&&(t.source===`telegram`||t.source===`discord`||t.source===`slack`||t.source===`bgtask`||t.source===`cli`||t.source===`goal`||t.external===!0||t.fromQueue===!0)){let e=t.role===`assistant`?`agent`:t.role||`user`,n=t.content||``,i=t.cli;r(()=>import(`./message-history-Det7u76S.js`).then(t=>{if(t.historyReloadInFlight()){t.loadMessages().then(()=>t.loadMessages()).catch(e=>console.warn(`[ws] new_message reload after in-flight failed`,e));return}re(e,n,i)}),__vite__mapDeps([0]))}else t.type===`system_notice`?d(`ℹ️ ${a(t.text||``)}`,`tool-activity`):t.type===`replay_gap`?Wt():t.type===`worker_stalled`?d(`⚠️ Worker stalled: ${a(t.employeeName||t.agentId||``)}`,`tool-activity`):t.type===`worker_disconnected`?d(`🔌 Worker disconnected: ${a(t.agentId||``)} (exit ${a(String(t.exitCode??`?`))})`,`tool-activity`):t.type===`worker_timeout`?d(`⏱️ Worker timed out: ${a(t.employeeName||t.agentId||``)}`,`tool-activity`):t.type===`alert_escalation`?d(a(t.message||``),`tool-activity`):t.type===`schedule_wakeup_failed`?d(`⚠️ Wakeup failed — ${a(String(t.reason||``))}: ${a(t.error||``)}`,`tool-activity`):t.type===`goal_continuation_failed`?d(`⚠️ Goal continuation failed: ${a(t.error||``)}`,`tool-activity`):t.type===`settings_change`?Dt(t):(t.type===`session_switched`||t.type===`session_created`)&&window.location.reload()}function $t(e){let t=++Vt;Bt.then(()=>{t===Vt&&ot(e.scope,vt)&&(Rt(typeof e.state==`string`?e.state:`IDLE`,e.title),jt({taskAnchor:e.taskAnchor||null,resolvedSelection:e.resolvedSelection||null,interview:e.interview||null}),Ft(e.buildBudget||null,typeof e.state==`string`?e.state:`IDLE`))})}function en(e){return I[e]||null}var tn=`sidebarState`,Z=900,nn=768;function rn(){return window.innerWidth<=nn}function an(){document.body.classList.remove(`left-expanded`,`right-expanded`)}function on(e){let t=`${e}-expanded`,n=e===`left`?`right-expanded`:`left-expanded`,r=!document.body.classList.contains(t);document.body.classList.remove(n),document.body.classList.toggle(t,r)}function sn(){let e={};try{e=JSON.parse(localStorage.getItem(tn)||`{}`)}catch{}e.left&&document.body.classList.add(`left-collapsed`),e.right&&document.body.classList.add(`right-collapsed`);let t=rn();document.getElementById(`toggleLeft`)?.addEventListener(`click`,cn),document.getElementById(`toggleRight`)?.addEventListener(`click`,ln),window.addEventListener(`resize`,()=>{let e=rn();if(window.innerWidth>Z){an();let e={};try{e=JSON.parse(localStorage.getItem(tn)||`{}`)}catch{}document.body.classList.toggle(`left-collapsed`,!!e.left),document.body.classList.toggle(`right-collapsed`,!!e.right)}else document.body.classList.remove(`left-collapsed`,`right-collapsed`),e!==t&&an();t=e,$()}),window.innerWidth<=Z&&(document.body.classList.remove(`left-collapsed`,`right-collapsed`),rn()&&an()),$()}function Q(){return window.innerWidth<=Z}function cn(){Q()?on(`left`):document.body.classList.toggle(`left-collapsed`),fn(),$()}function ln(){Q()?on(`right`):document.body.classList.toggle(`right-collapsed`),dn()&&document.getElementById(`tabAgents`)?.classList.contains(`active`)&&r(()=>import(`./employees-BL4qMxJj.js`).then(e=>e.loadEmployees(!0)),__vite__mapDeps([0])),fn(),$()}function un(){return Q()?document.body.classList.contains(`left-expanded`):!document.body.classList.contains(`left-collapsed`)}function dn(){return Q()?document.body.classList.contains(`right-expanded`):!document.body.classList.contains(`right-collapsed`)}function $(){let e=document.getElementById(`toggleLeft`),t=document.getElementById(`toggleRight`);e&&(e.innerHTML=un()?l.chevronLeft:l.chevronRight),t&&(t.innerHTML=dn()?l.chevronRight:l.chevronLeft)}function fn(){localStorage.setItem(tn,JSON.stringify({left:document.body.classList.contains(`left-collapsed`),right:document.body.classList.contains(`right-collapsed`)}))}export{K as a,U as c,We as d,ln as i,at as l,dn as n,en as o,cn as r,Ht as s,sn as t,rt as u};
|
|
49
|
+
${r(`Verify`,e.spent.verificationRounds,e.maxVerificationRounds)}`}async function It(){try{let t=await fetch(`${n}/api/goal`);if(!t.ok)return;let r=await t.json();r.goal?e.activeGoal={id:r.goal.id,objective:r.goal.objective,status:r.goal.status,createdAt:r.goal.createdAt,updatedAt:r.goal.updatedAt,lastCheckpointSummary:r.goal.lastCheckpoint?.summary,nextAction:r.goal.lastCheckpoint?.nextAction}:e.activeGoal=null,Lt()}catch{}}function Lt(){let t=document.getElementById(`goalCockpit`);if(!t)return;let n=e.activeGoal;if(!n||n.status===`complete`||n.status===`cancelled`){t.hidden=!0,t.innerHTML=``;return}t.hidden=!1,t.replaceChildren();let r=n.status===`paused`?`paused`:n.status===`blocked`?`blocked`:`active`,i=document.createElement(`span`);i.className=`goal-objective`,i.title=n.objective,i.textContent=n.objective;let a=document.createElement(`span`);if(a.className=`goal-status goal-status--${r}`,a.textContent=n.status,t.append(i,a),n.nextAction){let e=document.createElement(`span`);e.className=`goal-next`,e.textContent=n.nextAction,t.append(e)}}function Rt(t,n){let r=new Set([`IDLE`,`I`,`P`,`A`,`B`,`C`,`D`]).has(t)?t:`IDLE`;if(e.orcState=r,r===`IDLE`||r===`D`)document.body.removeAttribute(`data-orc-state`),document.body.style.removeProperty(`--orc-glow`);else{document.body.setAttribute(`data-orc-state`,r);let e=`--orc-glow-${r}`,t=getComputedStyle(document.documentElement).getPropertyValue(e).trim();document.body.style.setProperty(`--orc-glow`,t)}document.body.classList.add(`orc-pulse`),setTimeout(()=>document.body.classList.remove(`orc-pulse`),700);let i=document.getElementById(`orcStateBadge`);i&&(i.textContent={IDLE:``,I:`INTERVIEW`,P:`PLAN`,A:`AUDIT`,B:`BUILD`,C:`CHECK`,D:`DONE`}[r],i.style.display=r===`IDLE`?`none`:`inline-block`);let a=document.getElementById(`pabcRoadmap`),o=document.getElementById(`sharkRunner`),s=document.getElementById(`pabcBrand`);if(a&&o){if(!a.dataset.resizeObserved){a.dataset.resizeObserved=`1`,new ResizeObserver(()=>{F&&o.classList.contains(`running`)&&st(a,o,F)}).observe(a);let e=0;window.addEventListener(`resize`,()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{F&&o.classList.contains(`running`)&&st(a,o,F)})})}if(r===`IDLE`)a.classList.remove(`visible`,`shimmer-out`),o.classList.remove(`running`),F=null;else if(r===`D`){P.forEach(e=>{let t=document.getElementById(`dot-${e}`);t&&(t.className=`pabc-dot done`,t.setAttribute(`data-phase`,e))});for(let e=0;e<P.length;e++){let t=document.getElementById(`pabc-conn-${e}`);t&&(t.className=`pabc-connector done`)}o.classList.remove(`running`),F=null,a.classList.add(`shimmer-out`),setTimeout(()=>a.classList.remove(`visible`,`shimmer-out`),1e3)}else{a.classList.remove(`shimmer-out`),a.classList.add(`visible`),o.classList.add(`running`);let e=P.indexOf(r);P.forEach((t,n)=>{let r=document.getElementById(`dot-${t}`);r&&(r.className=`pabc-dot ${n<e?`done`:n===e?`active`:`future`}`,r.setAttribute(`data-phase`,t))});for(let t=0;t<P.length;t++){let n=document.getElementById(`pabc-conn-${t}`);n&&(n.className=`pabc-connector ${t<e?`done`:``}`)}F=r,requestAnimationFrame(()=>st(a,o,r))}s&&n&&(s.textContent=n)}}var zt=!1,Bt=Promise.resolve(),Vt=0;function K(){Ot(),zt||(zt=!0,Zt()),Yt(),b(i())}var Ht=K;function Ut(e){console.log(`[${e}] connected`),X=2e3,Kt();let t=Date.now()-V<1e4;Bt=r(()=>import(`./ui-CAicpUZc.js`).then(async n=>{if(n.cleanupToolActivity(),!t)try{await n.loadMessages(),V=Date.now()}catch(t){console.error(`[${e}] loadMessages failed`,t)}await U(`reconnect`,{hydrateRun:!0}).catch(()=>{}).finally(()=>n.reconcileChatBottomAfterRestore(`reconnect`)),r(()=>import(`./memory-D-bULTHl.js`).then(e=>e.refreshMemorySidebar()),__vite__mapDeps([0])).catch(()=>{}),r(()=>import(`./bgtask-badge-Dqbp-Y4e.js`).then(e=>e.refreshBgtaskBadge()),__vite__mapDeps([0])).catch(()=>{})}),void 0)}function Wt(){te(`replay_gap`),Bt=r(()=>import(`./ui-CAicpUZc.js`).then(async e=>{try{await e.loadMessages(),V=Date.now()}catch(e){console.error(`[sse] replay gap loadMessages failed`,e)}await U(`replay_gap`,{hydrateRun:!0}).catch(()=>{}).finally(()=>e.reconcileChatBottomAfterRestore(`replay_gap`))}),__vite__mapDeps([0]))}var Gt=8e3,q=null;function Kt(){q!==null&&(window.clearTimeout(q),q=null)}function qt(){console.log(`[channel] disconnected`),r(()=>import(`./ui-CAicpUZc.js`).then(e=>e.cleanupToolActivity()),__vite__mapDeps([0])),q===null&&(q=window.setTimeout(()=>{q=null,u(`idle`),d(`${l.exec} ${s(`ws.disconnected`)}`,`tool-activity`)},Gt))}var J=null,Y=!1,X=2e3,Jt=3e4;function Yt(){if(J){Y=!0;try{J.close()}catch{}J=null}}function Xt(){if(J)return;console.warn(`[channel] /api/events unavailable — falling back to legacy WebSocket`);let e=`ws://${location.host}`,t=new WebSocket(`${e}${n}/?lang=${i()}`);J=t,Y=!1,t.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{console.warn(`[ws] malformed message:`,e.data);return}if(!t||typeof t!=`object`||typeof t.type!=`string`){console.warn(`[ws] invalid message shape:`,t);return}Qt(t)};let r=!1;t.onopen=()=>{r=!0,X=2e3,Ut(`ws`)},t.onclose=()=>{if(J===t&&(J=null),Y){Y=!1;return}if(r){qt(),setTimeout(K,2e3);return}X=Math.min(X*2,Jt),setTimeout(K,X)}}function Zt(){je(`widget`,`widget_updated`,e=>{let t=e.chatId,n=e.widgetId;typeof t!=`string`||typeof n!=`string`||r(()=>import(`./iframe-renderer-Df4KIVyx.js`).then(e=>e.refreshFileWidget(t,n)),__vite__mapDeps([0])).catch(e=>console.warn(`[widget] refresh failed:`,e.message))}),je(`*`,null,e=>{Qt({...e,type:e.event})}),Oe(()=>Ut(`sse`)),ke(()=>qt()),Ae(()=>Xt())}function Qt(t){if(t.type===`agent_tool`){if(f())return;let e=typeof t.traceRunId==`string`&&t.traceRunId?t.traceRunId:null,n=dt(t.traceSeq);if(ut(e)||mt(e,n,t.sseReplay===!0))return;t.isEmployee!==!0&>(e);let r=t.toolType===`thinking`?`thinking`:t.toolType===`search`?`search`:t.toolType===`subagent`?`subagent`:`tool`;oe({id:`step-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,type:r,icon:t.icon||l.tool,rawIcon:t.rawIcon||t.icon||``,label:t.label||``,isEmployee:t.isEmployee===!0,detail:t.detail||``,stepRef:t.stepRef||``,traceRunId:t.traceRunId||``,traceSeq:t.traceSeq,detailAvailable:t.detailAvailable,detailBytes:t.detailBytes,rawRetentionStatus:t.rawRetentionStatus,status:t.status||`running`,startTime:typeof t.startedAt==`number`&&t.startedAt>0?t.startedAt:Date.now()},typeof t.startedAt==`number`&&t.startedAt>0?t.startedAt:void 0),ft(e,n)}else if(t.type===`agent_output`||t.type===`agent_chunk`){if(f())return;let e=typeof t.traceRunId==`string`&&t.traceRunId?t.traceRunId:null;if(ut(e))return;gt(e);let n=t.text||``;if(e&&typeof t.textLen==`number`){if(t.textLen<=R){t.sseReplay!==!0&&t.textLen<R&&(console.warn(`[ws] live agent_output behind applied cursor — resync (${t.textLen} < ${R})`),R=t.textLen);return}let e=t.textLen-R;e<n.length&&(n=n.slice(-e)),R=t.textLen}de(n)}else if(t.type===`agent_status`){if(!t.running&&f())return;t.running&&f()&&se(),t.running===void 0?u(t.status||`idle`):u(t.running?`running`:`idle`),t.agentId&&t.phase&&(I[t.agentId]={phase:t.phase,phaseLabel:t.phaseLabel||``},r(()=>import(`./employees-BnobWM_2.js`).then(e=>e.loadEmployees()),__vite__mapDeps([0])))}else if(t.type===`bgtask_update`)r(()=>import(`./bgtask-badge-Dqbp-Y4e.js`).then(e=>e.applyBgtaskUpdate(t)),__vite__mapDeps([0])).catch(()=>{});else if(t.type===`queue_update`)ie(t.pending||0),Array.isArray(t.queued)&&w(t.queued),U(`queue_update`).catch(()=>{});else if(t.type===`agent_retry`){let e=Number(t.delay??0),n=t.reason,r=a(String(n||`429`));d(s(e>0?`ws.retry`:`ws.retryNow`,{cli:a(t.cli||``),reason:r,delay:e}),`tool-activity`)}else if(t.type===`agent_fallback`)d(s(`ws.fallback`,{from:a(t.from||``),to:a(t.to||``)}),`tool-activity`);else if(t.type===`agent_smoke`)d(`${l.warning} ${a(t.cli||`agent`)}: smoke response detected — auto-continuing`,`tool-activity`);else if(t.type===`goal_done`)e.activeGoal=null,Lt(),d(`🎯 Goal completed${t.source===`ai_output`?` (detected from AI output)`:``}`,`tool-activity`);else if(t.type===`goal_cancel`)e.activeGoal=null,Lt(),d(`🎯 Goal cancelled`,`tool-activity`);else if(t.type===`schedule_wakeup`)d(`⏰ Wakeup scheduled in ${t.delaySeconds}s — ${a(String(t.reason||``))}`,`tool-activity`);else if(t.type===`goal_continuation_limit`)d(`⚠️ Goal continuation limit reached (${t.attempts} attempts)`,`tool-activity`);else if(t.type===`goal_continuation`)d(`🎯 Active goal — auto-continuing`,`tool-activity`);else if(t.type===`agent_done`){if(!(t.steered||f())){let e=typeof t.traceRunId==`string`&&t.traceRunId?t.traceRunId:null;if(ut(e)||e&&L&&e!==L)return;ht(e),ae(t.text||``,t.toolLog),it()}}else if(t.type===`orchestrate_done`)ht(null),ae(t.text||``),it();else if(t.type===`clear`){c(),le(),ee().clear();let e=document.getElementById(`chatMessages`);e&&(e.innerHTML=``),r(()=>import(`./idb-cache-ZH6lOebk.js`).then(e=>e.clearCache()),[]).catch(()=>{})}else if(t.type===`session_reset`)d(`${l.refresh} Session reset — history preserved`,`tool-activity`);else if(t.type===`agent_added`||t.type===`agent_updated`||t.type===`agent_deleted`)r(()=>import(`./employees-BnobWM_2.js`).then(e=>e.loadEmployees()),__vite__mapDeps([0]));else if(t.type===`heartbeat_pending`){let e={pending:t.pending||0,deferredPending:t.deferredPending||0};t.reason!==void 0&&(e.reason=t.reason),t.policy!==void 0&&(e.policy=t.policy),t.jobId!==void 0&&(e.jobId=t.jobId),t.jobName!==void 0&&(e.jobName=t.jobName),At(e)}else if(t.type===`orc_state`)$t(t);else if(t.type===`memory_status`)r(()=>import(`./memory-D-bULTHl.js`).then(e=>e.refreshMemorySidebar()),__vite__mapDeps([0]));else if(t.type===`steer_started`)fe(),ht(null),ae(``),u(`steering`);else if(t.type===`new_message`&&(t.source===`telegram`||t.source===`discord`||t.source===`slack`||t.source===`bgtask`||t.source===`cli`||t.source===`goal`||t.external===!0||t.fromQueue===!0)){let e=t.role===`assistant`?`agent`:t.role||`user`,n=t.content||``,i=t.cli;r(()=>import(`./message-history-ZBoza6ew.js`).then(t=>{if(t.historyReloadInFlight()){t.loadMessages().then(()=>t.loadMessages()).catch(e=>console.warn(`[ws] new_message reload after in-flight failed`,e));return}re(e,n,i)}),__vite__mapDeps([0]))}else t.type===`system_notice`?d(`ℹ️ ${a(t.text||``)}`,`tool-activity`):t.type===`replay_gap`?Wt():t.type===`worker_stalled`?d(`⚠️ Worker stalled: ${a(t.employeeName||t.agentId||``)}`,`tool-activity`):t.type===`worker_disconnected`?d(`🔌 Worker disconnected: ${a(t.agentId||``)} (exit ${a(String(t.exitCode??`?`))})`,`tool-activity`):t.type===`worker_timeout`?d(`⏱️ Worker timed out: ${a(t.employeeName||t.agentId||``)}`,`tool-activity`):t.type===`alert_escalation`?d(a(t.message||``),`tool-activity`):t.type===`schedule_wakeup_failed`?d(`⚠️ Wakeup failed — ${a(String(t.reason||``))}: ${a(t.error||``)}`,`tool-activity`):t.type===`goal_continuation_failed`?d(`⚠️ Goal continuation failed: ${a(t.error||``)}`,`tool-activity`):t.type===`settings_change`?Dt(t):(t.type===`session_switched`||t.type===`session_created`)&&window.location.reload()}function $t(e){let t=++Vt;Bt.then(()=>{t===Vt&&ot(e.scope,vt)&&(Rt(typeof e.state==`string`?e.state:`IDLE`,e.title),jt({taskAnchor:e.taskAnchor||null,resolvedSelection:e.resolvedSelection||null,interview:e.interview||null}),Ft(e.buildBudget||null,typeof e.state==`string`?e.state:`IDLE`))})}function en(e){return I[e]||null}var tn=`sidebarState`,Z=900,nn=768;function rn(){return window.innerWidth<=nn}function an(){document.body.classList.remove(`left-expanded`,`right-expanded`)}function on(e){let t=`${e}-expanded`,n=e===`left`?`right-expanded`:`left-expanded`,r=!document.body.classList.contains(t);document.body.classList.remove(n),document.body.classList.toggle(t,r)}function sn(){let e={};try{e=JSON.parse(localStorage.getItem(tn)||`{}`)}catch{}e.left&&document.body.classList.add(`left-collapsed`),e.right&&document.body.classList.add(`right-collapsed`);let t=rn();document.getElementById(`toggleLeft`)?.addEventListener(`click`,cn),document.getElementById(`toggleRight`)?.addEventListener(`click`,ln),window.addEventListener(`resize`,()=>{let e=rn();if(window.innerWidth>Z){an();let e={};try{e=JSON.parse(localStorage.getItem(tn)||`{}`)}catch{}document.body.classList.toggle(`left-collapsed`,!!e.left),document.body.classList.toggle(`right-collapsed`,!!e.right)}else document.body.classList.remove(`left-collapsed`,`right-collapsed`),e!==t&&an();t=e,$()}),window.innerWidth<=Z&&(document.body.classList.remove(`left-collapsed`,`right-collapsed`),rn()&&an()),$()}function Q(){return window.innerWidth<=Z}function cn(){Q()?on(`left`):document.body.classList.toggle(`left-collapsed`),fn(),$()}function ln(){Q()?on(`right`):document.body.classList.toggle(`right-collapsed`),dn()&&document.getElementById(`tabAgents`)?.classList.contains(`active`)&&r(()=>import(`./employees-BnobWM_2.js`).then(e=>e.loadEmployees(!0)),__vite__mapDeps([0])),fn(),$()}function un(){return Q()?document.body.classList.contains(`left-expanded`):!document.body.classList.contains(`left-collapsed`)}function dn(){return Q()?document.body.classList.contains(`right-expanded`):!document.body.classList.contains(`right-collapsed`)}function $(){let e=document.getElementById(`toggleLeft`),t=document.getElementById(`toggleRight`);e&&(e.innerHTML=un()?l.chevronLeft:l.chevronRight),t&&(t.innerHTML=dn()?l.chevronRight:l.chevronLeft)}function fn(){localStorage.setItem(tn,JSON.stringify({left:document.body.classList.contains(`left-collapsed`),right:document.body.classList.contains(`right-collapsed`)}))}export{K as a,U as c,We as d,ln as i,at as l,dn as n,en as o,cn as r,Ht as s,sn as t,rt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./skills-IGquen_j.js";export{e as loadSkills};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./state-DxpgDKMO.js";import{i as t}from"./api-tVoG39dL.js";import{D as n,T as r,j as i,w as a,x as o}from"./render-
|
|
1
|
+
import{t as e}from"./state-DxpgDKMO.js";import{i as t}from"./api-tVoG39dL.js";import{D as n,T as r,j as i,w as a,x as o}from"./render-DYX6GRQ0.js";var s=[`productivity`,`communication`,`devtools`,`ai-media`,`utility`,`smarthome`,`automation`];function c(e,t){return t?[e.id,e.name,e.description,e.category,e.requires?.env?.join(` `),e.requires?.bins?.join(` `),e.install].filter(Boolean).join(` `).toLowerCase().includes(t):!0}async function l(){try{e.allSkills=await(await n(`/api/skills`)).json(),u()}catch{let e=document.getElementById(`skillsList`);e&&(e.innerHTML=`<div style="color:var(--text-dim);font-size:11px">${i(`skill.loadFail`)}</div>`)}}function u(){let t=document.getElementById(`skillsList`),n=document.getElementById(`skillsCount`);if(!t||!n)return;let l=e.allSkills,u=l;e.currentSkillFilter===`installed`?u=l.filter(e=>e.enabled):e.currentSkillFilter===`other`?u=l.filter(e=>!s.includes(e.category||``)):e.currentSkillFilter!==`all`&&(u=l.filter(t=>t.category===e.currentSkillFilter));let d=e.currentSkillSearch.trim().toLowerCase();u=u.filter(e=>c(e,d));let f=l.filter(e=>e.enabled).length;if(n.textContent=d?i(`skill.countFiltered`,{shown:u.length,active:f,total:l.length}):i(`skill.count`,{active:f,total:l.length}),!u.length){t.innerHTML=`<div class="skill-empty">${r(i(`skill.search.empty`))}</div>`;return}t.innerHTML=u.map(e=>{let t=[];return e.requires?.env&&t.push(`${o.key} `+e.requires.env.map(e=>r(e)).join(`, `)),e.requires?.bins&&t.push(`${o.settings} `+e.requires.bins.map(e=>r(e)).join(`, `)),e.install&&t.push(r(e.install)),`
|
|
2
2
|
<div class="skill-card ${e.enabled?`enabled`:``}">
|
|
3
3
|
<div class="skill-card-header">
|
|
4
4
|
<span class="skill-emoji">${e.emoji?a(e.emoji):o.tool}</span>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./slash-commands-ZRDOL99E.js";export{e as loadCommands};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./api-tVoG39dL.js";import{T as t,j as n}from"./render-
|
|
1
|
+
import{n as e}from"./api-tVoG39dL.js";import{T as t,j as n}from"./render-DYX6GRQ0.js";import{t as r}from"./locale-DC-ZsWOf.js";var i={activeCli:o(`activeCli`,2,1,2,2,1,3),model:o(`model`,2,1,1,2,1,2),effort:o(`effort`,2,1,1),permissions:o(`permissions`,2,1,1),flushAgent:o(`flushAgent`,2,1,1,2,1,3),employees:o(`employees`,3,3,2,4,1,2),skills:o(`skills`,2,1,1,4,1,3),activeChannel:o(`activeChannel`,2,1,1),telegram:{...o(`telegram`,2,1,2,8),docLinks:[{url:`https://t.me/BotFather`,labelKey:`help.telegram.link.botfather`},{url:`https://core.telegram.org/bots/tutorial`,labelKey:`help.telegram.link.docs`}]},discord:{...o(`discord`,2,1,2,9),docLinks:[{url:`https://discord.com/developers/applications`,labelKey:`help.discord.link.portal`},{url:`https://discord.com/developers/docs/getting-started`,labelKey:`help.discord.link.docs`}]},slack:{...o(`slack`,2,1,2,9),docLinks:[{url:`https://api.slack.com/apps`,labelKey:`help.slack.link.portal`},{url:`https://docs.slack.dev/apis/events-api/using-socket-mode/`,labelKey:`help.slack.link.docs`}]},fallbackOrder:o(`fallbackOrder`,2,1,1,2,1,3),mcp:o(`mcp`,2,1,1,4,1,5),memory:o(`memory`,2,1,2,4,1,2),stt:o(`stt`,2,1,1),promptTemplates:o(`promptTemplates`,2,1,1),chatInput:o(`chatInput`,3,2,2),orchestration:o(`orchestration`,3,2,2,8,1,8),attachments:o(`attachments`,3,2,2),diagrams:o(`diagrams`,3,2,2),keyboardShortcuts:o(`keyboardShortcuts`,3,2,2,3,2,3),session:o(`session`,3,1,2,8,1,9),cliTools:o(`cliTools`,3,1,2,6,1,9),agentControl:o(`agentControl`,3,1,2,6,1,6),goals:o(`goals`,3,1,2,10,1,25)};function a(e){return typeof e==`string`&&Object.prototype.hasOwnProperty.call(i,e)}function o(e,t,n,r,i=2,a=1,o=0){return{titleKey:`help.${e}.title`,introKey:`help.${e}.intro`,effectKey:`help.${e}.effect`,useWhenKeys:s(`help.${e}.use`,t),howToKeys:s(`help.${e}.howTo`,i),exampleKeys:s(`help.${e}.example`,a),avoidWhenKeys:s(`help.${e}.avoid`,n),relatedKeys:s(`help.${e}.related`,r),...o>0?{subcmdKeys:s(`help.${e}.subcmd`,o)}:{}}}function s(e,t){return Array.from({length:t},(t,n)=>`${e}.${n+1}`)}var c=!1,l=null,u=null,d=null,f=null,p=null,m=!1;function h(){c||(c=!0,document.addEventListener(`click`,v),document.addEventListener(`keydown`,y,!0))}function g(e,t=null,n=[e]){if(!i[e]){console.warn(`[help-dialog] unknown topic:`,e);return}b(),p=t,x(e,T(n,e)),l?.classList.add(`open`),l?.setAttribute(`aria-hidden`,`false`),m=!0,requestAnimationFrame(()=>f?.focus())}function _(){if(!m)return;l?.classList.remove(`open`),l?.setAttribute(`aria-hidden`,`true`),m=!1;let e=p;p=null,e?.focus()}function v(e){let t=e.target?.closest(`[data-help-topic]`);if(!t)return;let n=t.getAttribute(`data-help-topic`);if(!a(n)){console.warn(`[help-dialog] invalid topic:`,n);return}e.preventDefault(),g(n,t,w(t.getAttribute(`data-help-topics`),n))}function y(e){!m||e.key!==`Escape`||(e.preventDefault(),e.stopImmediatePropagation(),_())}function b(){if(l&&u&&d&&f)return;l=document.createElement(`div`),l.id=`helpDialog`,l.className=`modal-overlay help-dialog-overlay`,l.setAttribute(`role`,`presentation`),l.setAttribute(`aria-hidden`,`true`),l.addEventListener(`click`,e=>{e.target===l&&_()});let e=document.createElement(`div`);e.className=`modal-box help-dialog-box`,e.setAttribute(`role`,`dialog`),e.setAttribute(`aria-modal`,`true`),e.setAttribute(`aria-labelledby`,`helpDialogTitle`),e.addEventListener(`click`,e=>e.stopPropagation());let t=document.createElement(`div`);t.className=`modal-header help-dialog-header`,u=document.createElement(`span`),u.id=`helpDialogTitle`,f=document.createElement(`button`),f.type=`button`,f.className=`btn-modal-close help-dialog-close`,f.setAttribute(`aria-label`,n(`help.close`)),f.textContent=`x`,f.addEventListener(`click`,()=>_()),d=document.createElement(`div`),d.className=`help-dialog-body`;let r=document.createElement(`div`);r.className=`modal-footer help-dialog-footer`;let i=document.createElement(`button`);i.type=`button`,i.className=`btn-save help-dialog-done`,i.textContent=n(`help.close`),i.addEventListener(`click`,()=>_()),t.append(u,f),r.append(i),e.append(t,d,r),l.append(e),document.body.append(l)}function x(e,t=[e]){if(!u||!d||!f)return;let r=i[e];u.textContent=n(r.titleKey),f.setAttribute(`aria-label`,n(`help.close`)),d.replaceChildren();let a=document.createElement(`div`);if(a.className=`help-dialog-content`,S(a,r),t.length<=1){d.append(a);return}let o=document.createElement(`div`);o.className=`help-dialog-layout`,o.append(C(t,e),a),d.append(o)}function S(e,t){t.docLinks?.length&&E(e,t.docLinks),D(e,n(`help.section.what`),n(t.introKey)),D(e,n(`help.section.effect`),n(t.effectKey),`help-effect-text`),O(e,n(`help.section.useWhen`),t.useWhenKeys),A(e,n(`help.section.howTo`),t.howToKeys),O(e,n(`help.section.example`),t.exampleKeys,!1,`help-example-list`),t.avoidWhenKeys?.length&&O(e,n(`help.section.avoidWhen`),t.avoidWhenKeys),t.subcmdKeys?.length&&j(e,n(`help.section.commands`),t.subcmdKeys),t.relatedKeys?.length&&O(e,n(`help.section.related`),t.relatedKeys,!0)}function C(e,t){let r=document.createElement(`nav`);r.className=`help-dialog-nav`,r.setAttribute(`aria-label`,n(`help.section.related`));for(let a of e){let o=i[a],s=document.createElement(`button`);s.type=`button`,s.className=`help-dialog-nav-item`,s.textContent=n(o.titleKey),a===t&&(s.classList.add(`active`),s.setAttribute(`aria-current`,`page`)),s.addEventListener(`click`,()=>x(a,e)),r.append(s)}return r}function w(e,t){return T(e?.split(/[\s,]+/).filter(Boolean)??[],t)}function T(e,t){let n=[];for(let t of e)a(t)&&!n.includes(t)&&n.push(t);return n.includes(t)||n.unshift(t),n}function E(e,t){let r=document.createElement(`section`);r.className=`help-dialog-section help-doc-links`;let i=document.createElement(`nav`);i.className=`help-doc-links-nav`;for(let e of t){let t=document.createElement(`a`);t.href=e.url,t.target=`_blank`,t.rel=`noopener noreferrer`,t.className=`help-doc-link`,t.textContent=n(e.labelKey);let r=document.createElement(`span`);r.className=`help-doc-link-icon`,r.textContent=`↗`,t.append(r),i.append(t)}r.append(i),e.append(r)}function D(e,t,n,r){let i=k(t),a=document.createElement(`p`);r&&(a.className=r),a.textContent=n,i.append(a),e.append(i)}function O(e,t,r,i=!1,a){let o=k(t),s=document.createElement(`ul`);s.className=a??(i?`help-related-list`:`help-dialog-list`);for(let e of r){let t=document.createElement(`li`);t.textContent=n(e),s.append(t)}o.append(s),e.append(o)}function k(e){let t=document.createElement(`section`);t.className=`help-dialog-section`;let n=document.createElement(`h3`);return n.textContent=e,t.append(n),t}function A(e,t,r){let i=k(t),a=document.createElement(`ol`);a.className=`help-dialog-list help-howto-list`;for(let e of r){let t=document.createElement(`li`);t.textContent=n(e),a.append(t)}i.append(a),e.append(i)}function j(e,t,r){let i=k(t),a=document.createElement(`dl`);a.className=`help-subcmd-list`;for(let e of r){let t=n(e),r=t.indexOf(` — `),i=r>=0?t.slice(0,r):t,o=r>=0?t.slice(r+3):``,s=document.createElement(`dt`);s.className=`help-subcmd-cmd`;let c=document.createElement(`code`);c.textContent=i,s.append(c);let l=document.createElement(`dd`);l.className=`help-subcmd-desc`,l.textContent=o,a.append(s,l)}i.append(a),e.append(i)}var M={mcp:`mcp`,memory:`memory`,model:`model`,effort:`effort`,cli:`activeCli`,skill:`skills`,employee:`employees`,orchestrate:`orchestration`,pabcd:`orchestration`,flush:`flushAgent`,fallback:`fallbackOrder`,prompt:`promptTemplates`,browser:`mcp`,status:`activeCli`,steer:`chatInput`,clear:`session`,compact:`session`,reset:`session`,purge:`session`,new:`session`,switch:`session`,sw:`session`,sessions:`session`,ss:`session`,version:`cliTools`,project:`cliTools`,proj:`cliTools`,ide:`cliTools`,file:`cliTools`,forward:`agentControl`,thought:`agentControl`,goal:`goals`,goalplan:`goals`,gd:`goals`,plan:`goals`,interview:`goals`,deliberate:`goals`,planaudit:`goals`,review:`goals`,search:`mcp`,team:`goals`,task:`goals`,help:`keyboardShortcuts`,h:`keyboardShortcuts`,commands:`keyboardShortcuts`,cmd:`keyboardShortcuts`,fork:`session`,quit:`session`,q:`session`,exit:`session`,telegram:`telegram`,discord:`discord`,slack:`slack`,stt:`stt`,attachments:`attachments`,diagrams:`diagrams`};function N(e){let t=e.replace(/^\//,``).trim().split(/\s+/);if(t.length<2||t[t.length-1].toLowerCase()!==`info`)return!1;let n=M[t[0].toLowerCase()];return n?(g(n),!0):!1}var P=[],F=[],I=-1,L=!1,R=null;function z(e){let t=String(e||``).slice(1).trim().split(/\s+/)[0]||``;return t.includes(`/`)||t.includes(`\\`)}var B=()=>document.getElementById(`cmdDropdown`),V=()=>document.getElementById(`chatInput`);function H(e){let t=String(e||``).toLowerCase();return P.filter(e=>`/${e.name}`.startsWith(t))}function U(e){let t=e.workflow?.workflowArgs||[];return t.length?t.map(e=>e.required?`<${e.name}>`:`[${e.name}]`).join(` `):e.args||``}function W(e){let n=e.workflow;return n?`<span class="cmd-meta">
|
|
2
2
|
<span class="cmd-chip">${t(n.phase)}</span>
|
|
3
3
|
<span class="cmd-chip cmd-risk-${t(n.risk)}">${t(n.risk)}</span>
|
|
4
4
|
<span class="cmd-chip">${t(n.output)}</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./api-tVoG39dL.js";import{T as t}from"./render-
|
|
1
|
+
import{n as e}from"./api-tVoG39dL.js";import{T as t}from"./render-DYX6GRQ0.js";import{r as n}from"./provider-icons-VDfahiUp.js";var r=80,i=``,a=0,o=0,s=!1,c=0,l=null;function u(e){return e.eventType||e.event_type||`event`}function d(e,t=i){return e===c&&t===i}function f(e){return!e||!Number.isInteger(e)||e<1?0:Math.floor((e-1)/r)*r}function p(){let e=document.getElementById(`traceDrawerOverlay`);return e||(e=document.createElement(`div`),e.id=`traceDrawerOverlay`,e.className=`trace-drawer-overlay`,e.innerHTML=`<aside class="trace-drawer" role="dialog" aria-modal="true" aria-labelledby="traceDrawerTitle">
|
|
2
2
|
<header class="trace-drawer-header">
|
|
3
3
|
<div><p class="trace-drawer-kicker">Raw trace</p><h2 id="traceDrawerTitle">Trace</h2></div>
|
|
4
4
|
<button class="trace-drawer-close" type="button" aria-label="Close trace drawer">×</button>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e}from"./iframe-renderer-C5vRbbl9.js";import{d as t,o as n}from"./message-history-C4WOisGx.js";import{r}from"./ui-Hx_mNoDf.js";export{r as cleanupToolActivity,n as loadMessages,e as reconcileChatBottomAfterRestore,t as updateQueueBadge};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-render-Bjnw0wQ6.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./state-DxpgDKMO.js";import{t}from"./preload-helper-DFYRRz9w.js";import{E as n,S as r,t as i,v as a,w as o}from"./render-BI1aqKoc.js";import{A as s,C as c,D as l,N as u,O as d,S as f,_ as ee,b as te,k as p,m,t as ne,v as h,w as g,x as re}from"./iframe-renderer-DUI0LYBy.js";import{C as _,D as v,E as y,S as b,_ as x,b as S,f as ie,g as C,h as w,l as T,m as E,p as D,u as ae,v as oe,w as se,x as O,y as k}from"./message-history-Dl8dJzez.js";import{o as ce}from"./idb-cache-BzzftUET.js";var A=2e3,j=80,le=400;function ue(e){if(e<=A)return j;let t=e/A*j;return Math.min(le,Math.round(t))}function M(e){return{chunks:[],fullText:``,textDirty:!1,element:e,pendingRAF:null,isFinalized:!1,lastRenderTime:0}}function N(e,t=``){let n=M(e);return t?(n.chunks=[t],n.fullText=t,n.textDirty=!1,n.element.innerHTML=i(t,!0)+`<span class="stream-cursor" aria-hidden="true"></span>`):n.element.innerHTML=`<span class="stream-cursor" aria-hidden="true"></span>`,n}function P(e){return e.textDirty&&=(e.fullText=e.chunks.join(``),!1),e.fullText}function F(e,t){e.chunks.push(t),e.textDirty=!0,!e.pendingRAF&&!e.isFinalized&&(e.pendingRAF=requestAnimationFrame(()=>{if(e.pendingRAF=null,e.isFinalized)return;let t=performance.now(),n=P(e);n.length<A||t-e.lastRenderTime>ue(n.length)?(e.element.innerHTML=i(n,!0)+`<span class="stream-cursor" aria-hidden="true"></span>`,e.lastRenderTime=t):e.pendingRAF=requestAnimationFrame(()=>{e.pendingRAF=null,!e.isFinalized&&(e.element.innerHTML=i(P(e),!0)+`<span class="stream-cursor" aria-hidden="true"></span>`,e.lastRenderTime=performance.now())})}))}function I(e,t=!1){e.isFinalized=!0,e.pendingRAF&&=(cancelAnimationFrame(e.pendingRAF),null);let n=P(e);return t||(e.element.innerHTML=i(n)),n}function L(e){return typeof e.traceSeq==`number`&&Number.isFinite(e.traceSeq)&&e.traceSeq>0}function R(e,t){return!!t.traceRunId&&!!e.traceRunId&&t.traceRunId===e.traceRunId&&L(t)&&L(e)&&t.traceSeq===e.traceSeq&&t.type===e.type&&t.label===e.label&&!!t.isEmployee==!!e.isEmployee}function z(e,t){return t.stepRef&&e.stepRef===t.stepRef?!0:R(e,t)}function B(e,t,n={}){return[...e].reverse().filter(e=>n.includeDone||e.status===`running`).find(e=>z(e,t))??null}function V(e,t){let n=e.filter(e=>e.status===`running`&&!e.stepRef&&e.label===t.label&&e.type===t.type&&!!e.isEmployee==!!t.isEmployee);return n.length===1?n[0]:null}function H(e,t){let n=[...e].reverse().filter(e=>e.status===`running`);return B(n,t)||V(n,t)}function U(){e.currentProcessBlock&&l(e.currentProcessBlock),e.currentAgentDiv instanceof HTMLElement&&l(e.currentAgentDiv),v(),s(),e.currentAgentDiv=null,e.currentProcessBlock=null,q=null}var W=0;function de(){W=Date.now()}function fe(){W=0}function pe(){return Date.now()-W<8e3}function G(e){for(let t of document.querySelectorAll(`.msg-user`))if(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)return!0;return!1}function K(){let t=e.currentAgentDiv&&e.currentAgentDiv.isConnected?e.currentAgentDiv:null;return t?G(t)?(e.currentAgentDiv=null,e.currentProcessBlock=null,q=null,null):t:null}function me(){let e=Array.from(document.querySelectorAll(`.msg-agent`)).at(-1)??null;return!e||G(e)?null:e}function he(t,n){k();let i=K();if(i||(i=x(`agent`,``),e.currentAgentDiv=i,e.currentProcessBlock=null),b(i),!e.currentProcessBlock){let t=i.querySelector(`.agent-body`);t&&(e.currentProcessBlock=S(i)),!e.currentProcessBlock&&t&&(_(i),e.currentProcessBlock=f(t))}if(n&&e.currentProcessBlock&&!e.currentProcessBlock.startedAt&&(e.currentProcessBlock.startedAt=n),e.currentProcessBlock){let n=t.rawIcon||t.icon,i=t.status||r(t.icon)||`running`;if(i===`done`||i===`error`){let r=H(e.currentProcessBlock.steps,t);if(r){t.icon=o(t.icon);let a=t.type===`thinking`?p(r.id,t.detail):g(r.id,t.detail);d(e.currentProcessBlock,r.id,{...r,...t,id:r.id,rawIcon:n,detail:a,detailPreview:a,label:t.label||r.label,status:i,startTime:r.startTime}),m();return}if(t.stepRef&&(i===`done`||i===`error`)){let r=[...e.currentProcessBlock.steps].reverse().find(e=>e.stepRef===t.stepRef&&(e.status===`done`||e.status===`error`));if(r){t.icon=o(t.icon);let a=t.type===`thinking`?p(r.id,t.detail):g(r.id,t.detail);d(e.currentProcessBlock,r.id,{...r,...t,id:r.id,rawIcon:n,status:i,detail:a,detailPreview:a,startTime:r.startTime}),m();return}}}if(t.stepRef&&i===`running`){let r=[...e.currentProcessBlock.steps].reverse().find(e=>e.stepRef===t.stepRef&&e.status===`running`);if(r){t.rawIcon=n,t.icon=o(t.icon);let i=p(r.id,t.detail);d(e.currentProcessBlock,r.id,{...r,...t,id:r.id,rawIcon:n,status:`running`,detail:i,detailPreview:i,label:t.label||r.label,startTime:r.startTime}),m();return}}let a=B(e.currentProcessBlock.steps,t,{includeDone:!0});if(a){t.rawIcon=n,t.icon=o(t.icon);let r=t.detail||``,s=c(a.id)||a.detail||a.detailPreview||``,l=r.length>=s.length?r:s,u=p(a.id,l),f=(a.status===`done`||a.status===`error`)&&i===`running`?a.status:i;d(e.currentProcessBlock,a.id,{...a,...t,id:a.id,rawIcon:n,status:f,detail:u,detailPreview:u,label:t.label||a.label,startTime:a.startTime}),m();return}if(t.detail){let n=[...e.currentProcessBlock.steps].reverse().find(e=>e.status===`running`&&e.label===t.label&&e.type===t.type&&!!e.isEmployee==!!t.isEmployee&&!e.detail);if(n){d(e.currentProcessBlock,n.id,t),m();return}}t.rawIcon=n,t.icon=o(t.icon),h(e.currentProcessBlock,t)}m()}var q=null,J=`data-active-run-hydrated`;function Y(e){document.querySelectorAll(`[${J}="true"]`).forEach(t=>{e&&t===e||t.remove()})}function ge(e){let t=K()??me();Y(t);let n=t||x(`agent`,``,e||null);return n.setAttribute(J,`true`),n}function _e(e,t){let n=c(e.id)||e.detail||e.detailPreview||``,r=t.detail||t.detailPreview||``;return r.length>=n.length?r:n}function X(e){return e.stepRef?!0:!!e.traceRunId&&typeof e.traceSeq==`number`&&Number.isFinite(e.traceSeq)&&e.traceSeq>0}function ve(e,t){let n=e.steps.filter(e=>!X(e)),r=0,i=!0;for(let a of t){let t=e.steps.find(e=>z(e,a))??null;if(!t&&!X(a)&&i){let e=n[r]??null;e?e.type===a.type&&!!e.isEmployee==!!a.isEmployee?(t=e,r++):i=!1:r++}if(!t){let n=e.steps.filter(e=>e.label===a.label&&e.type===a.type&&!!e.isEmployee==!!a.isEmployee);t=n.length===1?n[0]:null}if(!t){if(h(e,a),!X(a)&&i){let t=e.steps[e.steps.length-1];t&&n.push(t)}continue}let o=p(t.id,_e(t,a));d(e,t.id,{...t,...a,id:t.id,detail:o,detailPreview:o,label:a.label||t.label})}}function ye(e=[]){document.querySelectorAll(`[data-queued-overlay="true"]`).forEach(e=>e.remove())}var Z=``;function be(e){let t=Array.isArray(e.toolLog)?e.toolLog:[],n=t.map(e=>`${e.stepRef||``}~${e.traceRunId||``}~${e.traceSeq??``}~${e.status||``}~${e.label||``}~${(e.detail||``).length}`).join(`|`);return`${e.traceRunId||``}:${e.cli||``}:${(e.text||``).length}:${t.length}:${n}`}function xe(t){if(!t?.running){Z=``,Y();return}let n=be(t);if(n===Z&&K())return;v(),k(),e.currentAgentDiv=ge(t.cli||null);let r=e.currentAgentDiv.querySelector(`.agent-body`),i=E(t.toolLog||[]);b(e.currentAgentDiv),e.currentProcessBlock=S(e.currentAgentDiv),r&&i.length?(e.currentProcessBlock||=(_(e.currentAgentDiv),f(r)),t.startedAt&&(e.currentProcessBlock.startedAt=t.startedAt),ve(e.currentProcessBlock,C(i,t.startedAt))):e.currentProcessBlock=S(e.currentAgentDiv);let a=e.currentAgentDiv.querySelector(`.msg-content`);a&&(q=N(a,t.text||``)),Z=n}function Q(t){if(!t)return;k(),K()||(e.currentAgentDiv=x(`agent`,``),q=null);let n=e.currentAgentDiv?.querySelector(`.msg-content`);n&&(q||=M(n),F(q,t)),m()}var $=0;function Se(e){e.querySelectorAll(`.mermaid-pending`).forEach(e=>{delete e.dataset.mermaidQueued,delete e.dataset.mermaidQueuedAt})}function Ce(t,r){let o=Date.now();if(!e.currentAgentDiv&&o-$<500)return;Z=``,v(),k(),e.currentAgentDiv&&b(e.currentAgentDiv);let s=se(e.currentProcessBlock??e.currentAgentDiv,!0),c=E(D(Array.isArray(r)?r:[],s)),d=w(c),f=!!e.currentProcessBlock||!!(e.currentAgentDiv&&O(e.currentAgentDiv));e.currentProcessBlock&&=(re(e.currentProcessBlock),null);let p=c.length>0;if(t||p){(!e.currentAgentDiv||!e.currentAgentDiv.isConnected)&&(e.currentAgentDiv=x(`agent`,``)),e.currentAgentDiv.removeAttribute(J);let r=e.currentAgentDiv?.querySelector(`.msg-content`),o=q?I(q,!0):``,s=t||o;if(q=null,r&&(r.innerHTML=i(s)),p&&e.currentAgentDiv&&!f&&!O(e.currentAgentDiv)){let t=e.currentAgentDiv.querySelector(`.msg-content`);t&&t.insertAdjacentHTML(`beforebegin`,te(C(c),!0))}e.currentAgentDiv&&b(e.currentAgentDiv),r&&r.setAttribute(`data-raw`,n(s)),r&&ne(r);let m=ee(),h=!!(m.active&&e.currentAgentDiv&&e.currentAgentDiv.isConnected);if(r&&!h&&a(r,{immediate:!0}),h){let t=e.currentAgentDiv;Se(t),t.querySelectorAll(`.diagram-widget`).forEach(e=>{let t=e,n=t.dataset.widgetHtml,r=t.dataset.widgetId;if(!n&&!r)return;let i=document.createElement(`div`);i.className=`diagram-widget-pending`,r?i.dataset.widgetId=r:n&&(i.dataset.diagramHtml=n),e.replaceWith(i)}),d?(m.appendItem(ie({role:`assistant`,content:s,cli:null,tool_log:d},m.count)),l(t),m.scrollToBottom()):(t.dataset.turnIndex=String(m.count),t.dataset.messageId||(t.dataset.messageId=u()),m.appendLiveItem(t)),t.remove()}s&&ce({role:`assistant`,content:s,tool_log:d,timestamp:Date.now()}).catch(()=>{})}q=null,e.currentAgentDiv=null,$=Date.now(),ae(`idle`),T()}function we(e,n){document.querySelectorAll(`.tab-btn`).forEach(e=>{e.classList.remove(`active`),e.setAttribute(`aria-selected`,`false`)}),document.querySelectorAll(`.tab-content`).forEach(e=>e.classList.remove(`active`)),document.getElementById({agents:`tabAgents`,settings:`tabSettings`,skills:`tabSkills`}[e])?.classList.add(`active`),n&&(n.classList.add(`active`),n.setAttribute(`aria-selected`,`true`)),e===`settings`&&t(()=>import(`./settings-C7NutP6X.js`).then(e=>e.loadSettings()),__vite__mapDeps([0])),e===`agents`&&t(()=>import(`./employees-BL4qMxJj.js`).then(e=>e.loadEmployees()),__vite__mapDeps([0])),e===`skills`&&t(()=>import(`./skills-BWhKreQ2.js`).then(e=>e.loadSkills()),__vite__mapDeps([0]))}function Te(){let e=document.getElementById(`tabSettings`)?.classList.contains(`active`);t(()=>import(`./settings-C7NutP6X.js`).then(t=>e?t.savePerCli():t.updateSettings()),__vite__mapDeps([0]))}function Ee(){y({onStatus:oe})}export{Ce as a,Ee as c,he as d,we as f,fe as i,pe as l,ye as n,Te as o,U as r,xe as s,Q as t,de as u};
|
|
2
|
+
import{t as e}from"./state-DxpgDKMO.js";import{t}from"./preload-helper-DFYRRz9w.js";import{E as n,S as r,t as i,v as a,w as o}from"./render-DYX6GRQ0.js";import{A as s,C as c,D as l,N as u,O as d,S as f,_ as ee,b as te,k as p,m,t as ne,v as h,w as g,x as re}from"./iframe-renderer-C5vRbbl9.js";import{C as _,D as v,E as y,S as b,_ as x,b as S,f as ie,g as C,h as w,l as T,m as E,p as D,u as ae,v as oe,w as se,x as O,y as k}from"./message-history-C4WOisGx.js";import{o as ce}from"./idb-cache-BzzftUET.js";var A=2e3,j=80,le=400;function ue(e){if(e<=A)return j;let t=e/A*j;return Math.min(le,Math.round(t))}function M(e){return{chunks:[],fullText:``,textDirty:!1,element:e,pendingRAF:null,isFinalized:!1,lastRenderTime:0}}function N(e,t=``){let n=M(e);return t?(n.chunks=[t],n.fullText=t,n.textDirty=!1,n.element.innerHTML=i(t,!0)+`<span class="stream-cursor" aria-hidden="true"></span>`):n.element.innerHTML=`<span class="stream-cursor" aria-hidden="true"></span>`,n}function P(e){return e.textDirty&&=(e.fullText=e.chunks.join(``),!1),e.fullText}function F(e,t){e.chunks.push(t),e.textDirty=!0,!e.pendingRAF&&!e.isFinalized&&(e.pendingRAF=requestAnimationFrame(()=>{if(e.pendingRAF=null,e.isFinalized)return;let t=performance.now(),n=P(e);n.length<A||t-e.lastRenderTime>ue(n.length)?(e.element.innerHTML=i(n,!0)+`<span class="stream-cursor" aria-hidden="true"></span>`,e.lastRenderTime=t):e.pendingRAF=requestAnimationFrame(()=>{e.pendingRAF=null,!e.isFinalized&&(e.element.innerHTML=i(P(e),!0)+`<span class="stream-cursor" aria-hidden="true"></span>`,e.lastRenderTime=performance.now())})}))}function I(e,t=!1){e.isFinalized=!0,e.pendingRAF&&=(cancelAnimationFrame(e.pendingRAF),null);let n=P(e);return t||(e.element.innerHTML=i(n)),n}function L(e){return typeof e.traceSeq==`number`&&Number.isFinite(e.traceSeq)&&e.traceSeq>0}function R(e,t){return!!t.traceRunId&&!!e.traceRunId&&t.traceRunId===e.traceRunId&&L(t)&&L(e)&&t.traceSeq===e.traceSeq&&t.type===e.type&&t.label===e.label&&!!t.isEmployee==!!e.isEmployee}function z(e,t){return t.stepRef&&e.stepRef===t.stepRef?!0:R(e,t)}function B(e,t,n={}){return[...e].reverse().filter(e=>n.includeDone||e.status===`running`).find(e=>z(e,t))??null}function V(e,t){let n=e.filter(e=>e.status===`running`&&!e.stepRef&&e.label===t.label&&e.type===t.type&&!!e.isEmployee==!!t.isEmployee);return n.length===1?n[0]:null}function H(e,t){let n=[...e].reverse().filter(e=>e.status===`running`);return B(n,t)||V(n,t)}function U(){e.currentProcessBlock&&l(e.currentProcessBlock),e.currentAgentDiv instanceof HTMLElement&&l(e.currentAgentDiv),v(),s(),e.currentAgentDiv=null,e.currentProcessBlock=null,q=null}var W=0;function de(){W=Date.now()}function fe(){W=0}function pe(){return Date.now()-W<8e3}function G(e){for(let t of document.querySelectorAll(`.msg-user`))if(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)return!0;return!1}function K(){let t=e.currentAgentDiv&&e.currentAgentDiv.isConnected?e.currentAgentDiv:null;return t?G(t)?(e.currentAgentDiv=null,e.currentProcessBlock=null,q=null,null):t:null}function me(){let e=Array.from(document.querySelectorAll(`.msg-agent`)).at(-1)??null;return!e||G(e)?null:e}function he(t,n){k();let i=K();if(i||(i=x(`agent`,``),e.currentAgentDiv=i,e.currentProcessBlock=null),b(i),!e.currentProcessBlock){let t=i.querySelector(`.agent-body`);t&&(e.currentProcessBlock=S(i)),!e.currentProcessBlock&&t&&(_(i),e.currentProcessBlock=f(t))}if(n&&e.currentProcessBlock&&!e.currentProcessBlock.startedAt&&(e.currentProcessBlock.startedAt=n),e.currentProcessBlock){let n=t.rawIcon||t.icon,i=t.status||r(t.icon)||`running`;if(i===`done`||i===`error`){let r=H(e.currentProcessBlock.steps,t);if(r){t.icon=o(t.icon);let a=t.type===`thinking`?p(r.id,t.detail):g(r.id,t.detail);d(e.currentProcessBlock,r.id,{...r,...t,id:r.id,rawIcon:n,detail:a,detailPreview:a,label:t.label||r.label,status:i,startTime:r.startTime}),m();return}if(t.stepRef&&(i===`done`||i===`error`)){let r=[...e.currentProcessBlock.steps].reverse().find(e=>e.stepRef===t.stepRef&&(e.status===`done`||e.status===`error`));if(r){t.icon=o(t.icon);let a=t.type===`thinking`?p(r.id,t.detail):g(r.id,t.detail);d(e.currentProcessBlock,r.id,{...r,...t,id:r.id,rawIcon:n,status:i,detail:a,detailPreview:a,startTime:r.startTime}),m();return}}}if(t.stepRef&&i===`running`){let r=[...e.currentProcessBlock.steps].reverse().find(e=>e.stepRef===t.stepRef&&e.status===`running`);if(r){t.rawIcon=n,t.icon=o(t.icon);let i=p(r.id,t.detail);d(e.currentProcessBlock,r.id,{...r,...t,id:r.id,rawIcon:n,status:`running`,detail:i,detailPreview:i,label:t.label||r.label,startTime:r.startTime}),m();return}}let a=B(e.currentProcessBlock.steps,t,{includeDone:!0});if(a){t.rawIcon=n,t.icon=o(t.icon);let r=t.detail||``,s=c(a.id)||a.detail||a.detailPreview||``,l=r.length>=s.length?r:s,u=p(a.id,l),f=(a.status===`done`||a.status===`error`)&&i===`running`?a.status:i;d(e.currentProcessBlock,a.id,{...a,...t,id:a.id,rawIcon:n,status:f,detail:u,detailPreview:u,label:t.label||a.label,startTime:a.startTime}),m();return}if(t.detail){let n=[...e.currentProcessBlock.steps].reverse().find(e=>e.status===`running`&&e.label===t.label&&e.type===t.type&&!!e.isEmployee==!!t.isEmployee&&!e.detail);if(n){d(e.currentProcessBlock,n.id,t),m();return}}t.rawIcon=n,t.icon=o(t.icon),h(e.currentProcessBlock,t)}m()}var q=null,J=`data-active-run-hydrated`;function Y(e){document.querySelectorAll(`[${J}="true"]`).forEach(t=>{e&&t===e||t.remove()})}function ge(e){let t=K()??me();Y(t);let n=t||x(`agent`,``,e||null);return n.setAttribute(J,`true`),n}function _e(e,t){let n=c(e.id)||e.detail||e.detailPreview||``,r=t.detail||t.detailPreview||``;return r.length>=n.length?r:n}function X(e){return e.stepRef?!0:!!e.traceRunId&&typeof e.traceSeq==`number`&&Number.isFinite(e.traceSeq)&&e.traceSeq>0}function ve(e,t){let n=e.steps.filter(e=>!X(e)),r=0,i=!0;for(let a of t){let t=e.steps.find(e=>z(e,a))??null;if(!t&&!X(a)&&i){let e=n[r]??null;e?e.type===a.type&&!!e.isEmployee==!!a.isEmployee?(t=e,r++):i=!1:r++}if(!t){let n=e.steps.filter(e=>e.label===a.label&&e.type===a.type&&!!e.isEmployee==!!a.isEmployee);t=n.length===1?n[0]:null}if(!t){if(h(e,a),!X(a)&&i){let t=e.steps[e.steps.length-1];t&&n.push(t)}continue}let o=p(t.id,_e(t,a));d(e,t.id,{...t,...a,id:t.id,detail:o,detailPreview:o,label:a.label||t.label})}}function ye(e=[]){document.querySelectorAll(`[data-queued-overlay="true"]`).forEach(e=>e.remove())}var Z=``;function be(e){let t=Array.isArray(e.toolLog)?e.toolLog:[],n=t.map(e=>`${e.stepRef||``}~${e.traceRunId||``}~${e.traceSeq??``}~${e.status||``}~${e.label||``}~${(e.detail||``).length}`).join(`|`);return`${e.traceRunId||``}:${e.cli||``}:${(e.text||``).length}:${t.length}:${n}`}function xe(t){if(!t?.running){Z=``,Y();return}let n=be(t);if(n===Z&&K())return;v(),k(),e.currentAgentDiv=ge(t.cli||null);let r=e.currentAgentDiv.querySelector(`.agent-body`),i=E(t.toolLog||[]);b(e.currentAgentDiv),e.currentProcessBlock=S(e.currentAgentDiv),r&&i.length?(e.currentProcessBlock||=(_(e.currentAgentDiv),f(r)),t.startedAt&&(e.currentProcessBlock.startedAt=t.startedAt),ve(e.currentProcessBlock,C(i,t.startedAt))):e.currentProcessBlock=S(e.currentAgentDiv);let a=e.currentAgentDiv.querySelector(`.msg-content`);a&&(q=N(a,t.text||``)),Z=n}function Q(t){if(!t)return;k(),K()||(e.currentAgentDiv=x(`agent`,``),q=null);let n=e.currentAgentDiv?.querySelector(`.msg-content`);n&&(q||=M(n),F(q,t)),m()}var $=0;function Se(e){e.querySelectorAll(`.mermaid-pending`).forEach(e=>{delete e.dataset.mermaidQueued,delete e.dataset.mermaidQueuedAt})}function Ce(t,r){let o=Date.now();if(!e.currentAgentDiv&&o-$<500)return;Z=``,v(),k(),e.currentAgentDiv&&b(e.currentAgentDiv);let s=se(e.currentProcessBlock??e.currentAgentDiv,!0),c=E(D(Array.isArray(r)?r:[],s)),d=w(c),f=!!e.currentProcessBlock||!!(e.currentAgentDiv&&O(e.currentAgentDiv));e.currentProcessBlock&&=(re(e.currentProcessBlock),null);let p=c.length>0;if(t||p){(!e.currentAgentDiv||!e.currentAgentDiv.isConnected)&&(e.currentAgentDiv=x(`agent`,``)),e.currentAgentDiv.removeAttribute(J);let r=e.currentAgentDiv?.querySelector(`.msg-content`),o=q?I(q,!0):``,s=t||o;if(q=null,r&&(r.innerHTML=i(s)),p&&e.currentAgentDiv&&!f&&!O(e.currentAgentDiv)){let t=e.currentAgentDiv.querySelector(`.msg-content`);t&&t.insertAdjacentHTML(`beforebegin`,te(C(c),!0))}e.currentAgentDiv&&b(e.currentAgentDiv),r&&r.setAttribute(`data-raw`,n(s)),r&&ne(r);let m=ee(),h=!!(m.active&&e.currentAgentDiv&&e.currentAgentDiv.isConnected);if(r&&!h&&a(r,{immediate:!0}),h){let t=e.currentAgentDiv;Se(t),t.querySelectorAll(`.diagram-widget`).forEach(e=>{let t=e,n=t.dataset.widgetHtml,r=t.dataset.widgetId;if(!n&&!r)return;let i=document.createElement(`div`);i.className=`diagram-widget-pending`,r?i.dataset.widgetId=r:n&&(i.dataset.diagramHtml=n),e.replaceWith(i)}),d?(m.appendItem(ie({role:`assistant`,content:s,cli:null,tool_log:d},m.count)),l(t),m.scrollToBottom()):(t.dataset.turnIndex=String(m.count),t.dataset.messageId||(t.dataset.messageId=u()),m.appendLiveItem(t)),t.remove()}s&&ce({role:`assistant`,content:s,tool_log:d,timestamp:Date.now()}).catch(()=>{})}q=null,e.currentAgentDiv=null,$=Date.now(),ae(`idle`),T()}function we(e,n){document.querySelectorAll(`.tab-btn`).forEach(e=>{e.classList.remove(`active`),e.setAttribute(`aria-selected`,`false`)}),document.querySelectorAll(`.tab-content`).forEach(e=>e.classList.remove(`active`)),document.getElementById({agents:`tabAgents`,settings:`tabSettings`,skills:`tabSkills`}[e])?.classList.add(`active`),n&&(n.classList.add(`active`),n.setAttribute(`aria-selected`,`true`)),e===`settings`&&t(()=>import(`./settings-SreihUje.js`).then(e=>e.loadSettings()),__vite__mapDeps([0])),e===`agents`&&t(()=>import(`./employees-BnobWM_2.js`).then(e=>e.loadEmployees()),__vite__mapDeps([0])),e===`skills`&&t(()=>import(`./skills-DwPIP08e.js`).then(e=>e.loadSkills()),__vite__mapDeps([0]))}function Te(){let e=document.getElementById(`tabSettings`)?.classList.contains(`active`);t(()=>import(`./settings-SreihUje.js`).then(t=>e?t.savePerCli():t.updateSettings()),__vite__mapDeps([0]))}function Ee(){y({onStatus:oe})}export{Ce as a,Ee as c,he as d,we as f,fe as i,pe as l,ye as n,Te as o,U as r,xe as s,Q as t,de as u};
|
package/public/dist/assets/{wiki-link-resolver-BfNXN9px.js → wiki-link-resolver-DyFzBTIQ.js}
RENAMED
|
@@ -19,4 +19,4 @@ import{n as e,r as t,t as n}from"./rolldown-runtime-XQCOJYun.js";import{_ as r,a
|
|
|
19
19
|
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(Oi(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
|
|
20
20
|
`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
|
|
21
21
|
`),i&&(c+=a.move(i+`
|
|
22
|
-
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var Ao={tokenize:Mo,concrete:!0,name:`mathFlow`},jo={tokenize:No,partial:!0};function Mo(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),G(e,l,`whitespace`)(t))}function l(t){return t===null||B(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||B(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(jo,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?G(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):B(t)?e.attempt(jo,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||B(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return G(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),G(e,c,`whitespace`)(t))}function c(r){return r===null||B(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function No(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Po(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:Fo,previous:Io,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||B(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function Fo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Io(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Lo(e){return{flow:{36:Ao},text:{36:Po(e)}}}var Ro={};function zo(e){let t=this,n=e||Ro,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Lo(n)),a.push(Oo()),o.push(ko(n))}var Bo=[[`javascript`,a],[`js`,a],[`typescript`,b],[`ts`,b],[`python`,v],[`py`,v],[`bash`,r],[`shell`,l],[`sh`,l],[`json`,u],[`css`,p],[`xml`,h],[`html`,h],[`markdown`,c],[`md`,c],[`yaml`,s],[`yml`,s],[`sql`,_],[`rust`,f],[`rs`,f],[`go`,o],[`java`,g],[`cpp`,m],[`c`,m],[`diff`,i],[`plaintext`,d],[`text`,d]],Vo=!1;function Ho(){Vo||=(Bo.forEach(([e,t])=>{y.registerLanguage(e,t)}),!0)}function Uo(e){return e?.trim().toLowerCase().replace(/^language-/,``)||`text`}function Wo(e,t){Ho();let n=Uo(t);if(!y.getLanguage(n))return{html:e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]??e),language:n,highlighted:!1};try{return{html:y.highlight(e,{language:n,ignoreIllegals:!0}).value,language:n,highlighted:!0}}catch{return{html:e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]??e),language:n,highlighted:!1}}}var Go=new Set([`http:`,`https:`,`mailto:`]);function Ko(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin&&!e.startsWith(`file:`)?!0:Go.has(t.protocol)}catch{return!1}}function qo(e){return Ko(e)?e:``}function Jo(e){let t=e.trim();if(!t||/^(?:javascript|data|file):/i.test(t)||/^\/(?:Users|home|var|tmp|private|etc)\//i.test(t))return``;let n=t.startsWith(`./.assets/`)?t.slice(2):t.startsWith(`.assets/`)?t:null;return n?n.includes(`\\`)||n.split(`/`).some(e=>!e||e===`.`||e===`..`)?``:`/api/dashboard/notes/asset?path=${encodeURIComponent(n)}`:Ko(t)?t:``}var Yo={...kr,attributes:{...kr.attributes,code:[...kr.attributes?.code??[],[`className`,/^language-./,`math-inline`,`math-display`]]}},Xo=/\[\[([^\[\]\n]+)\]\]/g,Zo=/^\[\[([^\[\]\n]+)\]\]$/,Qo=`.md`,$o=new Set([`.git`,`.assets`,`_templates`,`_snippets`,`_plugins`]);function es(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1}function ts(e,t){for(let n=0;n<e.length;n++)if(e[n]===t&&!es(e,n))return n;return-1}function ns(e){let t=e.match(Zo);if(!t)return null;let n=t[1]?.trim()??``;if(!n)return null;let r=ts(n,`|`),i=(r===-1?n:n.slice(0,r)).trim(),a=r===-1?``:n.slice(r+1).trim(),o=ts(i,`#`),s=(o===-1?i:i.slice(0,o)).trim(),c=o===-1?``:i.slice(o+1).trim();return s?{raw:e,inner:n,target:s,heading:c||null,displayText:a||null}:null}function rs(e){let t=new Map;if(!e)return t;for(let n of e)t.has(n.raw)||t.set(n.raw,{...n,source:`outgoing`});return t}function is(e,t,n){let r=e.get(t)??[];r.push(n),e.set(t,r)}function as(e){return e.endsWith(Qo)?e.slice(0,-3):e}function os(e){return as(e.split(`/`).at(-1)||e)}function ss(e){let t={byPath:new Map,byPathNoExt:new Map,byAlias:new Map,byStem:new Map};for(let n of e??[]){t.byPath.set(n.path,n),t.byPathNoExt.set(as(n.path),n);for(let e of n.aliases)is(t.byAlias,e,n);is(t.byStem,os(n.path),n)}return t}function cs(e){return e.map(e=>e.path).sort((e,t)=>e.localeCompare(t))}function ls(e){return e.split(`/`).some(e=>$o.has(e))}function us(e){return!e||e.includes(`\0`)||e.includes(`\\`)||e.startsWith(`/`)||e.split(`/`).some(e=>!e||e===`.`||e===`..`)?!0:ls(e)}function ds(e,t){return{source:`notes-fallback`,sourcePath:``,raw:e.raw,target:e.target,...e.displayText?{displayText:e.displayText}:{},...e.heading?{heading:e.heading}:{},line:0,column:0,startOffset:t,endOffset:t+e.raw.length,status:`missing`,reason:`not_found`}}function fs(e,t){let{candidatePaths:n,reason:r,...i}=e;return{...i,status:`resolved`,resolvedPath:t}}function ps(e,t){let{candidatePaths:n,resolvedPath:r,...i}=e;return{...i,status:`missing`,reason:t}}function ms(e,t){let{resolvedPath:n,...r}=e;return{...r,status:`ambiguous`,reason:`ambiguous`,candidatePaths:cs(t)}}function hs(e,t){if(t.length===0)return null;let[n]=t;return t.length===1&&n?fs(e,n.path):ms(e,t)}function gs(e,t,n,r=0){let i=rs(t).get(e);if(i)return i;let a=ns(e);if(!a)return null;let o=ds(a,r),s=a.target.trim();if(us(s))return ps(o,`invalid_target`);let c=ss(n),l=c.byPath.get(s);if(l)return fs(o,l.path);if(!s.endsWith(Qo)){let e=c.byPath.get(`${s}${Qo}`);if(e)return fs(o,e.path);let t=c.byPathNoExt.get(s);if(t)return fs(o,t.path)}let u=hs(o,c.byAlias.get(s)??[]);if(u)return u;if(!s.includes(`/`)){let e=hs(o,c.byStem.get(s)??[]);if(e)return e}return o}function _s(e,t){let n=ns(t);return e.displayText||n?.displayText||n?.inner||e.target||t}function vs(e){return e.reason===`ambiguous`?`Ambiguous link target`:e.reason===`invalid_target`?`Invalid link target`:`No matching note`}export{
|
|
22
|
+
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var Ao={tokenize:Mo,concrete:!0,name:`mathFlow`},jo={tokenize:No,partial:!0};function Mo(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),G(e,l,`whitespace`)(t))}function l(t){return t===null||B(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||B(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(jo,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?G(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):B(t)?e.attempt(jo,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||B(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return G(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),G(e,c,`whitespace`)(t))}function c(r){return r===null||B(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function No(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Po(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:Fo,previous:Io,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||B(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function Fo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Io(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Lo(e){return{flow:{36:Ao},text:{36:Po(e)}}}var Ro={};function zo(e){let t=this,n=e||Ro,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Lo(n)),a.push(Oo()),o.push(ko(n))}var Bo=[[`javascript`,a],[`js`,a],[`typescript`,b],[`ts`,b],[`python`,v],[`py`,v],[`bash`,r],[`shell`,l],[`sh`,l],[`json`,u],[`css`,p],[`xml`,h],[`html`,h],[`markdown`,c],[`md`,c],[`yaml`,s],[`yml`,s],[`sql`,_],[`rust`,f],[`rs`,f],[`go`,o],[`java`,g],[`cpp`,m],[`c`,m],[`diff`,i],[`plaintext`,d],[`text`,d]],Vo=!1;function Ho(){Vo||=(Bo.forEach(([e,t])=>{y.registerLanguage(e,t)}),!0)}function Uo(e){return e?.trim().toLowerCase().replace(/^language-/,``)||`text`}function Wo(e,t){Ho();let n=Uo(t);if(!y.getLanguage(n))return{html:e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]??e),language:n,highlighted:!1};try{return{html:y.highlight(e,{language:n,ignoreIllegals:!0}).value,language:n,highlighted:!0}}catch{return{html:e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]??e),language:n,highlighted:!1}}}var Go=new Set([`http:`,`https:`,`mailto:`]);function Ko(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin&&!e.startsWith(`file:`)?!0:Go.has(t.protocol)}catch{return!1}}function qo(e){return Ko(e)?e:``}function Jo(e){let t=e.trim();if(!t||/^(?:javascript|data|file):/i.test(t)||/^\/(?:Users|home|var|tmp|private|etc)\//i.test(t))return``;let n=t.startsWith(`./.assets/`)?t.slice(2):t.startsWith(`.assets/`)?t:null;return n?n.includes(`\\`)||n.split(`/`).some(e=>!e||e===`.`||e===`..`)?``:`/api/dashboard/notes/asset?path=${encodeURIComponent(n)}`:Ko(t)?t:``}var Yo={...kr,attributes:{...kr.attributes,code:[...kr.attributes?.code??[],[`className`,/^language-./,`math-inline`,`math-display`]]}},Xo=/\[\[([^\[\]\n]+)\]\]/g,Zo=/^\[\[([^\[\]\n]+)\]\]$/,Qo=`.md`,$o=new Set([`.git`,`.assets`,`_templates`,`_snippets`,`_plugins`]);function es(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1}function ts(e,t){for(let n=0;n<e.length;n++)if(e[n]===t&&!es(e,n))return n;return-1}function ns(e){let t=e.match(Zo);if(!t)return null;let n=t[1]?.trim()??``;if(!n)return null;let r=ts(n,`|`),i=(r===-1?n:n.slice(0,r)).trim(),a=r===-1?``:n.slice(r+1).trim(),o=ts(i,`#`),s=(o===-1?i:i.slice(0,o)).trim(),c=o===-1?``:i.slice(o+1).trim();return s?{raw:e,inner:n,target:s,heading:c||null,displayText:a||null}:null}function rs(e){let t=new Map;if(!e)return t;for(let n of e)t.has(n.raw)||t.set(n.raw,{...n,source:`outgoing`});return t}function is(e,t,n){let r=e.get(t)??[];r.push(n),e.set(t,r)}function as(e){return e.endsWith(Qo)?e.slice(0,-3):e}function os(e){return as(e.split(`/`).at(-1)||e)}function ss(e){let t={byPath:new Map,byPathNoExt:new Map,byAlias:new Map,byStem:new Map};for(let n of e??[]){t.byPath.set(n.path,n),t.byPathNoExt.set(as(n.path),n);for(let e of n.aliases)is(t.byAlias,e,n);is(t.byStem,os(n.path),n)}return t}function cs(e){return e.map(e=>e.path).sort((e,t)=>e.localeCompare(t))}function ls(e){return e.split(`/`).some(e=>$o.has(e))}function us(e){return!e||e.includes(`\0`)||e.includes(`\\`)||e.startsWith(`/`)||e.split(`/`).some(e=>!e||e===`.`||e===`..`)?!0:ls(e)}function ds(e,t){return{source:`notes-fallback`,sourcePath:``,raw:e.raw,target:e.target,...e.displayText?{displayText:e.displayText}:{},...e.heading?{heading:e.heading}:{},line:0,column:0,startOffset:t,endOffset:t+e.raw.length,status:`missing`,reason:`not_found`}}function fs(e,t){let{candidatePaths:n,reason:r,...i}=e;return{...i,status:`resolved`,resolvedPath:t}}function ps(e,t){let{candidatePaths:n,resolvedPath:r,...i}=e;return{...i,status:`missing`,reason:t}}function ms(e,t){let{resolvedPath:n,...r}=e;return{...r,status:`ambiguous`,reason:`ambiguous`,candidatePaths:cs(t)}}function hs(e,t){if(t.length===0)return null;let[n]=t;return t.length===1&&n?fs(e,n.path):ms(e,t)}function gs(e,t,n,r=0){let i=rs(t).get(e);if(i)return i;let a=ns(e);if(!a)return null;let o=ds(a,r),s=a.target.trim();if(us(s))return ps(o,`invalid_target`);let c=ss(n),l=c.byPath.get(s);if(l)return fs(o,l.path);if(!s.endsWith(Qo)){let e=c.byPath.get(`${s}${Qo}`);if(e)return fs(o,e.path);let t=c.byPathNoExt.get(s);if(t)return fs(o,t.path)}let u=hs(o,c.byAlias.get(s)??[]);if(u)return u;if(!s.includes(`/`)){let e=hs(o,c.byStem.get(s)??[]);if(e)return e}return o}function _s(e,t){let n=ns(t);return e.displayText||n?.displayText||n?.inner||e.target||t}function vs(e){return e.reason===`ambiguous`?`Ambiguous link target`:e.reason===`invalid_target`?`Invalid link target`:`No matching note`}export{z as A,fr as C,Fn as D,Gn as E,x as M,S as N,Pn as O,yr as S,Wn as T,Ii as _,_s as a,jr as b,Yo as c,Wo as d,Uo as f,Bi as g,_a as h,gs as i,D as j,En as k,Jo as l,Do as m,rs as n,vs as o,zo as p,es as r,Ko as s,Xo as t,qo as u,ki as v,qn as w,kr as x,Ti as y};
|
package/public/dist/index.html
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
href="https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap"
|
|
32
32
|
rel="stylesheet">
|
|
33
33
|
<!-- Vite handles module bundling in dev (HMR) and production (build) -->
|
|
34
|
-
<script type="module" crossorigin src="/dist/assets/app-
|
|
34
|
+
<script type="module" crossorigin src="/dist/assets/app-BzD_ZLvt.js"></script>
|
|
35
35
|
<link rel="stylesheet" crossorigin href="/dist/assets/vendor-render-Bjnw0wQ6.css">
|
|
36
|
-
<link rel="stylesheet" crossorigin href="/dist/assets/app-
|
|
36
|
+
<link rel="stylesheet" crossorigin href="/dist/assets/app-DX4e6isX.css">
|
|
37
37
|
</head>
|
|
38
38
|
|
|
39
39
|
<body>
|
|
@@ -459,8 +459,12 @@
|
|
|
459
459
|
<div id="channelTelegramSettings" class="settings-group">
|
|
460
460
|
<h4 class="section-title-row">
|
|
461
461
|
<span><span data-provider="telegram"></span> Telegram</span>
|
|
462
|
-
<
|
|
463
|
-
|
|
462
|
+
<span class="section-title-actions">
|
|
463
|
+
<button class="perm-btn onboard-trigger" type="button" data-onboard-channel="telegram"
|
|
464
|
+
data-i18n="onboarding.open">설정 마법사</button>
|
|
465
|
+
<button class="help-trigger" type="button" data-help-topic="telegram"
|
|
466
|
+
data-i18n-aria="help.telegram.aria" aria-label="Telegram 도움말">?</button>
|
|
467
|
+
</span>
|
|
464
468
|
</h4>
|
|
465
469
|
<div class="settings-row">
|
|
466
470
|
<label data-i18n="label.enabled">활성화</label>
|
|
@@ -498,8 +502,12 @@
|
|
|
498
502
|
<div id="channelDiscordSettings" class="settings-group" style="display:none">
|
|
499
503
|
<h4 class="section-title-row">
|
|
500
504
|
<span><span data-provider="discord"></span> Discord</span>
|
|
501
|
-
<
|
|
502
|
-
|
|
505
|
+
<span class="section-title-actions">
|
|
506
|
+
<button class="perm-btn onboard-trigger" type="button" data-onboard-channel="discord"
|
|
507
|
+
data-i18n="onboarding.open">설정 마법사</button>
|
|
508
|
+
<button class="help-trigger" type="button" data-help-topic="discord"
|
|
509
|
+
data-i18n-aria="help.discord.aria" aria-label="Discord 도움말">?</button>
|
|
510
|
+
</span>
|
|
503
511
|
</h4>
|
|
504
512
|
<div class="settings-row">
|
|
505
513
|
<label data-i18n="label.enabled">활성화</label>
|
|
@@ -547,8 +555,12 @@
|
|
|
547
555
|
<div id="channelSlackSettings" class="settings-group" style="display:none">
|
|
548
556
|
<h4 class="section-title-row">
|
|
549
557
|
<span><span data-provider="slack"></span> Slack</span>
|
|
550
|
-
<
|
|
551
|
-
|
|
558
|
+
<span class="section-title-actions">
|
|
559
|
+
<button class="perm-btn onboard-trigger" type="button" data-onboard-channel="slack"
|
|
560
|
+
data-i18n="onboarding.open">설정 마법사</button>
|
|
561
|
+
<button class="help-trigger" type="button" data-help-topic="slack"
|
|
562
|
+
data-i18n-aria="help.slack.aria" aria-label="Slack 도움말">?</button>
|
|
563
|
+
</span>
|
|
552
564
|
</h4>
|
|
553
565
|
<div class="settings-row">
|
|
554
566
|
<label data-i18n="label.enabled">활성화</label>
|
|
@@ -557,50 +569,81 @@
|
|
|
557
569
|
<button id="slOn" class="perm-btn" data-i18n="btn.on">켬</button>
|
|
558
570
|
</div>
|
|
559
571
|
</div>
|
|
560
|
-
<div class="
|
|
561
|
-
<
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
</div>
|
|
572
|
-
<div class="settings-row sub-row">
|
|
573
|
-
<label>Channel IDs</label>
|
|
574
|
-
<input type="text" id="slChannelIds" placeholder="콤마 구분 (비워두면 전체 허용)" class="input-sm">
|
|
575
|
-
</div>
|
|
576
|
-
<div class="settings-row sub-row">
|
|
577
|
-
<label data-i18n="label.mentionOnly">Mention Only</label>
|
|
578
|
-
<div>
|
|
579
|
-
<button id="slMentionOff" class="perm-btn" data-i18n="btn.off">끔</button>
|
|
580
|
-
<button id="slMentionOn" class="perm-btn active" data-i18n="btn.on">켬</button>
|
|
572
|
+
<div class="slack-setup-card">
|
|
573
|
+
<div class="slack-setup-step">
|
|
574
|
+
<span class="slack-step-num">1</span>
|
|
575
|
+
<div class="slack-step-body">
|
|
576
|
+
<div class="slack-step-title" data-i18n="settings.slack.guide.step1Title">Slack 앱 만들기</div>
|
|
577
|
+
<div class="slack-step-desc" data-i18n="settings.slack.guide.step1Desc">Create an App → From an app manifest → 워크스페이스 선택 → 붙여넣기</div>
|
|
578
|
+
<div class="slack-step-actions">
|
|
579
|
+
<button id="slack-copy-manifest" class="perm-btn" type="button" data-i18n="settings.slack.guide.copyManifest">매니페스트 복사</button>
|
|
580
|
+
<button id="slack-open-apps" class="perm-btn" type="button" data-i18n="settings.slack.guide.openApps">앱 페이지 열기</button>
|
|
581
|
+
</div>
|
|
582
|
+
</div>
|
|
581
583
|
</div>
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
584
|
+
<div class="slack-setup-step">
|
|
585
|
+
<span class="slack-step-num">2</span>
|
|
586
|
+
<div class="slack-step-body">
|
|
587
|
+
<div class="slack-step-title" data-i18n="settings.slack.guide.step2Title">봇 토큰 붙여넣기</div>
|
|
588
|
+
<div class="slack-step-desc" data-i18n="settings.slack.guide.step2Desc">앱 설정 → OAuth & Permissions → Install to Workspace → Bot User OAuth Token 복사</div>
|
|
589
|
+
<input type="password" id="slBotToken" placeholder="xoxb-..." class="input-sm">
|
|
590
|
+
<div class="slack-field-error" id="slack-bot-token-error" style="display:none" data-i18n="settings.slack.guide.botTokenError">xoxb-로 시작하는 봇 토큰이어야 합니다</div>
|
|
591
|
+
</div>
|
|
588
592
|
</div>
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
593
|
+
<div class="slack-setup-step">
|
|
594
|
+
<span class="slack-step-num">3</span>
|
|
595
|
+
<div class="slack-step-body">
|
|
596
|
+
<div class="slack-step-title" data-i18n="settings.slack.guide.step3Title">수신용 앱 토큰 (선택)</div>
|
|
597
|
+
<div class="slack-step-desc" data-i18n="settings.slack.guide.step3Location">앱 설정 → Basic Information → App-Level Tokens → Generate Token (connections:write)</div>
|
|
598
|
+
<input type="password" id="slAppToken" placeholder="xapp-... (Socket Mode)" class="input-sm">
|
|
599
|
+
<div class="slack-field-error" id="slack-app-token-error" style="display:none" data-i18n="settings.slack.guide.appTokenError">xapp-로 시작하는 앱 레벨 토큰이어야 합니다</div>
|
|
600
|
+
<div class="slack-step-desc" data-i18n="settings.slack.guide.step3Desc">비워두면 전송 전용(outbound-only)으로 동작합니다</div>
|
|
601
|
+
</div>
|
|
595
602
|
</div>
|
|
596
603
|
</div>
|
|
597
|
-
<
|
|
598
|
-
<
|
|
599
|
-
<div>
|
|
600
|
-
<
|
|
601
|
-
<
|
|
604
|
+
<details class="slack-advanced">
|
|
605
|
+
<summary data-i18n="settings.slack.advanced">고급 설정</summary>
|
|
606
|
+
<div class="settings-row sub-row">
|
|
607
|
+
<label>Team ID</label>
|
|
608
|
+
<input type="text" id="slTeamId" placeholder="T... (검증 시 자동 입력)" class="input-sm">
|
|
602
609
|
</div>
|
|
603
|
-
|
|
610
|
+
<div class="settings-row sub-row">
|
|
611
|
+
<label>Channel IDs</label>
|
|
612
|
+
<input type="text" id="slChannelIds" placeholder="콤마 구분 (비워두면 전체 허용)" class="input-sm">
|
|
613
|
+
</div>
|
|
614
|
+
<div class="settings-row sub-row">
|
|
615
|
+
<label data-i18n="settings.slack.attachPort">연결 인스턴스 포트</label>
|
|
616
|
+
<input type="text" id="slAttachPort" placeholder="3457 (이 포트의 인스턴스만 연결)" class="input-sm">
|
|
617
|
+
</div>
|
|
618
|
+
<div class="settings-row sub-row">
|
|
619
|
+
<label data-i18n="label.mentionOnly">Mention Only</label>
|
|
620
|
+
<div>
|
|
621
|
+
<button id="slMentionOff" class="perm-btn" data-i18n="btn.off">끔</button>
|
|
622
|
+
<button id="slMentionOn" class="perm-btn active" data-i18n="btn.on">켬</button>
|
|
623
|
+
</div>
|
|
624
|
+
</div>
|
|
625
|
+
<div class="settings-row sub-row">
|
|
626
|
+
<label>Reply in Thread</label>
|
|
627
|
+
<div>
|
|
628
|
+
<button id="slThreadOff" class="perm-btn" data-i18n="btn.off">끔</button>
|
|
629
|
+
<button id="slThreadOn" class="perm-btn active" data-i18n="btn.on">켬</button>
|
|
630
|
+
</div>
|
|
631
|
+
</div>
|
|
632
|
+
<div class="settings-row sub-row">
|
|
633
|
+
<label data-i18n="label.forwardAll">자동 전송</label>
|
|
634
|
+
<div>
|
|
635
|
+
<button id="slForwardOff" class="perm-btn" data-i18n="btn.off">끔</button>
|
|
636
|
+
<button id="slForwardOn" class="perm-btn active" data-i18n="btn.on">켬</button>
|
|
637
|
+
</div>
|
|
638
|
+
</div>
|
|
639
|
+
<div class="settings-row sub-row">
|
|
640
|
+
<label>Allow Bots</label>
|
|
641
|
+
<div>
|
|
642
|
+
<button id="slAllowBotsOff" class="perm-btn active" data-i18n="btn.off">끔</button>
|
|
643
|
+
<button id="slAllowBotsOn" class="perm-btn" data-i18n="btn.on">켬</button>
|
|
644
|
+
</div>
|
|
645
|
+
</div>
|
|
646
|
+
</details>
|
|
604
647
|
</div>
|
|
605
648
|
|
|
606
649
|
<!-- MCP Servers -->
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<link rel="icon" type="image/png" href="/dist/assets/icon-192-CwXPIYF5.png">
|
|
7
7
|
<title>Jaw Manager</title>
|
|
8
8
|
<script src="/manager/theme-boot.js"></script>
|
|
9
|
-
<script type="module" crossorigin src="/dist/assets/manager-
|
|
9
|
+
<script type="module" crossorigin src="/dist/assets/manager-DaN201mN.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/dist/assets/vendor-render-Bjnw0wQ6.css">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/dist/assets/manager-C4eNDNFt.css">
|
|
12
12
|
</head>
|