dsh-thoughtdag 0.5.8 → 0.5.9
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-app/assets/{canonical-C3OufoVo.js → canonical-BuO7_FJb.js} +2 -2
- package/dist-app/assets/{canvas-record-BlrHolpM.js → canvas-record-D3HdLWps.js} +1 -1
- package/dist-app/assets/{claude-code-session-D8efciRN.js → claude-code-session-DA4UoHlf.js} +1 -1
- package/dist-app/assets/{codex-session-BfatCn8z.js → codex-session-CTdwdWhJ.js} +1 -1
- package/dist-app/assets/{dsh-session-DrCSvtGN.js → dsh-session-4Ul6Mxx8.js} +1 -1
- package/dist-app/assets/{experiment-loop-XuEe5blq.js → experiment-loop-t0sYsW2J.js} +1 -1
- package/dist-app/assets/{http-bridge-BFpCh3Q7.js → http-bridge-DOGmFOH2.js} +1 -1
- package/dist-app/assets/{index-goc_KBNk.js → index-BbbLhjvs.js} +3 -3
- package/dist-app/assets/{index-CFc2wOkT.js → index-CGGP8_QX.js} +164 -164
- package/dist-app/assets/index-CvcT19An.css +1 -0
- package/dist-app/assets/{index-AyluzteA.js → index-DYL_9PJ-.js} +1 -1
- package/dist-app/assets/{index-BYreuYHM.js → index-DpEbRp_J.js} +1 -1
- package/dist-app/assets/{pi-session-geFUlvR4.js → pi-session-CYGbudh0.js} +1 -1
- package/dist-app/assets/{sensitive-scan-CB-wz7Ro.js → sensitive-scan-C8VYATus.js} +1 -1
- package/dist-app/assets/{session-handoff-DbK-2F0z.js → session-handoff-AggmklDT.js} +2 -2
- package/dist-app/assets/{shared-CeeIorPo.js → shared-DSCz0Bq4.js} +1 -1
- package/dist-app/assets/{turndown-plugin-gfm.cjs-CWPGp6Gs.js → turndown-plugin-gfm.cjs-DwpDMrH3.js} +1 -1
- package/dist-app/assets/{update-check-D-Q8qeFG.js → update-check-KJ2ZKsng.js} +1 -1
- package/dist-app/index.html +2 -2
- package/lib/why.mjs +5 -4
- package/package.json +1 -1
- package/dist-app/assets/index-H1F6jL5D.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{c as _,b as y,_ as k,p as D,r as O,g as R,a as K,u as C,h as Q,s as z,j as $,k as W,f as V,l as Y,m as Z,t as tt,n as M,o as et,q as st}from"./index-CFc2wOkT.js";const ot=190;async function ct(n){const{anyRunnerSessionConversation:d}=await k(async()=>{const{anyRunnerSessionConversation:r}=await import("./index-goc_KBNk.js");return{anyRunnerSessionConversation:r}},__vite__mapDeps([0,1,2])),t=await d(n);return J(t)}function ut(n,d){let r=0,s=!1;return async()=>{if(s)return null;const a=await window.desktopSessions.readRange(n,d,r,8388608);return r=a.nextStart,a.eof&&(s=!0),a.text}}function L(n){if(!n)return null;for(const d of _.getState().projects){const t=d.sourceSession;if(!t)continue;if(t.sessionId===n)return{project:d,entry:t};const r=t.chapters?.find(a=>a.sessionId===n);if(r)return{project:d,entry:r};const s=t.branches?.find(a=>a.sessionId===n);if(s)return{project:d,entry:s}}return null}function H(n,d,t,r,s){const a=r.position.x+(s?560:0),f=a-40,c=a+580,e=n.nodes.reduce((g,w)=>{const b=w.width??w.measured?.width??540;if(w.position.x+b<f||w.position.x>c)return g;const x=w.height??w.measured?.height??300;return Math.max(g,w.position.y+x)},s?r.position.y-300:r.position.y+(r.height??140)),i=a-d[0].position.x,m=Math.max(e+ot,s?r.position.y:-1/0)-d[0].position.y,u=d.map(g=>({...g,position:{x:g.position.x+i,y:g.position.y+m}})),l=[{id:M(),source:r.id,target:u[0].id,type:"smoothstep"},...t];return{moved:u,edges:l}}async function J(n,d={}){if(!n)return null;const t=n.build(),r=t.nodes.filter(c=>c.data.importSource),s=r.at(-1)?.id??t.nodes.at(-1)?.id??"";if(t.nodes.length===0)return null;const a=L(n.sessionId);if(a)return U(n,t,r,s,a,d);if(n.sessionId){const c=await nt(n.sessionId);if(c){let e=-1,i="";if(r.forEach((m,u)=>{const l=m.data.importSource?.itemIds?.[0],g=l?c.byFirstId.get(l):void 0;g&&(e=u,i=g)}),e>=0){await O(c.projectId,"chapter",{sessionId:n.sessionId,runner:n.source,importedCount:e+1,tailNodeId:i});const m=L(n.sessionId);if(m)return U(n,t,r,s,m,d)}}}if(n.sessionId&&r.length>0){const{parseAnchor:c}=await k(async()=>{const{parseAnchor:i}=await import("./experiment-loop-XuEe5blq.js");return{parseAnchor:i}},__vite__mapDeps([3,1,2])),e=c(r[0].data.question??"");if(e&&_.getState().projects.some(i=>i.id===e.project)){await R(e.project);const i=y.getState(),m=_.getState().projects.find(l=>l.id===e.project);let u=i.nodes.find(l=>l.id===e.node)??null;if(!u&&e.mode==="continue"&&m.sourceSession?.sessionId){const l=m.sourceSession;u=i.nodes.find(g=>g.id===l.tailNodeId)??i.nodes.filter(g=>g.data.importSource?.sessionId===l.sessionId).at(-1)??null}if(u){const l=t.nodes.find(h=>h.data.importSource&&h.data.stepKind!=="note");if(l&&c(l.data.question??"")){const h=K("exp.openerMark");l.data={...l.data,question:h,source:l.data.source?{...l.data.source,question:h}:l.data.source}}const g=new Set(t.nodes.map(h=>h.id)),w=t.edges.filter(h=>g.has(h.source)&&g.has(h.target)),b=e.mode!=="continue",x=H(i,t.nodes,w,u,b);if(b){const h=x.moved.find(N=>N.data.importSource&&N.data.stepKind!=="note");h&&(h.data={...h.data,isBranch:!0})}return i.pushHistory(),y.setState(h=>({nodes:[...h.nodes,...x.moved],edges:[...h.edges,...x.edges]})),await O(e.project,b?"branch":"chapter",{sessionId:n.sessionId,runner:n.source,importedCount:r.length,tailNodeId:s,anchorNodeId:u.id}),C.getState().setArrivalFocusNodeId(x.moved[x.moved.length-1].id),{kind:"mounted",mode:b?"branch":"continue",turns:r.length}}}}const f=crypto.randomUUID();return await Q(D(f),JSON.stringify({state:{nodes:z(t.nodes),edges:t.edges},version:1})),C.getState().setArrivalFocusNodeId(t.nodes[t.nodes.length-1].id),await $(f,n.title.slice(0,60),"chat",n.sessionId?{sourceSession:{sessionId:n.sessionId,runner:n.source,importedCount:r.length,tailNodeId:s}}:void 0),{kind:"imported",nodeCount:t.nodes.length}}async function pt(n,d){if(!n||!n.sessionId)return null;if(L(n.sessionId))return J(n);const t=n.build(),r=t.nodes.filter(u=>u.data.importSource);if(t.nodes.length===0)return null;await R(d);const s=y.getState(),a=_.getState().projects.find(u=>u.id===d);if(!a)return null;const f=a.sourceSession,c=(f?.sessionId?s.nodes.find(u=>u.id===f.tailNodeId)??s.nodes.filter(u=>u.data.importSource?.sessionId===f.sessionId).at(-1):null)??s.nodes.at(-1)??null;if(!c)return null;const e=new Set(t.nodes.map(u=>u.id)),i=t.edges.filter(u=>e.has(u.source)&&e.has(u.target)),m=H(s,t.nodes,i,c,!1);return s.pushHistory(),y.setState(u=>({nodes:[...u.nodes,...m.moved],edges:[...u.edges,...m.edges]})),await O(d,"chapter",{sessionId:n.sessionId,runner:n.source,importedCount:r.length,tailNodeId:r.at(-1)?.id??t.nodes.at(-1).id,anchorNodeId:c.id}),C.getState().setArrivalFocusNodeId(m.moved[m.moved.length-1].id),{kind:"mounted",mode:"continue",turns:r.length}}async function nt(n){const{projects:d,activeId:t}=_.getState(),r=[...d].sort((s,a)=>s.id===t?-1:a.id===t?1:a.updatedAt-s.updatedAt);for(const s of r){if(s.id!==t&&s.provenanceSessions&&!s.provenanceSessions.includes(n))continue;let a;if(s.id===t)a=y.getState().nodes;else try{const{get:c}=await k(async()=>{const{get:m}=await import("./index-CFc2wOkT.js").then(u=>u.D);return{get:m}},__vite__mapDeps([1,2])),e=await c(D(s.id));a=(typeof e=="string"?JSON.parse(e):e)?.state?.nodes??[]}catch{continue}if(s.id!==t&&!s.provenanceSessions){const c=[...new Set(a.map(e=>e.data.importSource?.sessionId).filter(e=>!!e))];_.setState(e=>({projects:e.projects.map(i=>i.id===s.id?{...i,provenanceSessions:c}:i)}))}const f=new Map;for(const c of a)if(c.data.importSource?.sessionId===n&&c.data.stepKind!=="note"){const e=c.data.importSource.itemIds?.[0];e&&f.set(e,c.id)}if(f.size>0)return{projectId:s.id,byFirstId:f}}return null}async function U(n,d,t,r,s,a={}){await R(s.project.id);const f=y.getState(),c=f.nodes.filter(o=>o.data.importSource?.sessionId===n.sessionId),e=f.nodes.find(o=>o.id===s.entry.tailNodeId)??c.at(-1)??null,i=s.entry.importedCount>0&&t.length>=s.entry.importedCount?t[s.entry.importedCount-1]:null;if(i){const o=i.data.importSource?.itemIds?.[0],p=o?c.find(E=>E.data.importSource?.itemIds?.[0]===o):void 0,S=p?.data.source,A=!!S&&p.data.question===S.question&&(p.data.response??"")===(S.response??""),I=i.data,X=!!p&&(I.response??"").trim()===""&&(p.data.response??"").trim()!=="",G=!!p&&!X&&(I.question!==p.data.question||(I.response??"")!==(p.data.response??"")),P=p?.data.attachments??[],T=I.attachments??[],B=!!p&&T.length>P.length&&P.every((E,q)=>T[q]?.name===E.name);if(p&&A&&(G||B)){const E=G?I.attachments:[...P,...T.slice(P.length)];y.setState(q=>({nodes:q.nodes.map(F=>F.id===p.id?{...F,data:{...F.data,question:I.question,response:I.response,responses:I.responses,responseIndex:I.responseIndex,tokenCount:I.tokenCount,attachments:E,importSource:I.importSource,source:I.source}}:F)})),y.getState().recomputeStaleness()}}if(t.length<=s.entry.importedCount)return a.focusOnRefresh!==!1&&C.getState().setArrivalFocusNodeId(e?.id??null),{kind:"opened"};const m=t[s.entry.importedCount],u=d.nodes.findIndex(o=>o.id===m.id),l=d.nodes.slice(u),g=new Set(l.map(o=>o.id)),w=d.edges.filter(o=>g.has(o.source)&&g.has(o.target)),b=new Map;for(const o of c){const p=o.data.importSource?.itemIds?.[0];p&&b.set(p,o.id)}const x=new Map;for(const o of d.nodes){const p=o.data.importSource?.itemIds?.[0];p&&!g.has(o.id)&&x.set(o.id,p)}const h=[];for(const o of d.edges){if(!g.has(o.target)||g.has(o.source))continue;const p=x.get(o.source),S=p?b.get(p):void 0;S&&h.push({...o,id:M(),source:S})}const N=new Set(h.map(o=>o.target));let v,j;if(e){const o=H(f,l,w,e,!1);v=o.moved;const p=new Set(w.map(S=>S.target));j=o.edges.filter(S=>!(S.source===e.id&&N.has(S.target)));for(const S of v)S.id!==v[0].id&&!p.has(S.id)&&!N.has(S.id)&&S.data.stepKind!=="note"&&j.push({id:M(),source:e.id,target:S.id,type:"smoothstep"});j=[...j,...h]}else{const p=(f.nodes.length?Math.max(...f.nodes.map(I=>I.position.x)):0)+560-l[0].position.x,S=-l[0].position.y;v=l.map(I=>({...I,position:{x:I.position.x+p,y:I.position.y+S}}));const A=rt(it(t.length-s.entry.importedCount),v[0]);v=[A,...v],j=[{id:M(),source:A.id,target:v[1].id,type:"smoothstep"},...w]}return f.pushHistory(),y.setState(o=>({nodes:[...o.nodes,...v],edges:[...o.edges,...j]})),await et(s.project.id,n.sessionId,{importedCount:t.length,tailNodeId:r}),C.getState().setArrivalFocusNodeId(v[e?0:1].id),{kind:"appended",turns:t.length-s.entry.importedCount}}function it(n){return`[Mirror] The source session grew by ${n} turn(s); the earlier mirrored turns were removed from this canvas by hand, so the new turns land here on their own.`}function rt(n,d){const t=st(n,"",!1);return t.data.stepKind="note",t.data.importSource=d.data.importSource?{...d.data.importSource,itemIds:[]}:void 0,t.width=460,t.position={x:d.position.x-520,y:d.position.y},t}async function ft(n){const{projects:d,activeId:t}=_.getState(),r=d.find(e=>e.id===n);if(!r?.sourceSession)return"native";if((r.sourceSession.chapters?.length??0)>0||(r.sourceSession.branches?.length??0)>0)return"diverged-mirror";let s;if(n===t)s=y.getState().nodes;else{const{get:e}=await k(async()=>{const{get:m}=await import("./index-CFc2wOkT.js").then(u=>u.D);return{get:m}},__vite__mapDeps([1,2])),i=await e(D(n));try{s=(typeof i=="string"?JSON.parse(i):i)?.state?.nodes??[]}catch{return"diverged-mirror"}}const a=r.sourceSession.sessionId,f=s.filter(e=>e.data.importSource?.sessionId===a);return s.some(e=>!e.data.importSource)||s.some(e=>e.data.importSource&&e.data.importSource.sessionId!==a)||f.filter(e=>e.data.source).length<r.sourceSession.importedCount||f.some(e=>e.data.source&&(e.data.question!==e.data.source.question||e.data.response!==e.data.source.response))?"diverged-mirror":"pristine-mirror"}async function mt(){const{bootProjects:n}=await k(async()=>{const{bootProjects:i}=await import("./index-CFc2wOkT.js").then(m=>m.F);return{bootProjects:i}},__vite__mapDeps([1,2]));await n();const{projects:d,activeId:t}=_.getState(),r=d.find(i=>i.id===t);if(!r?.sourceSession)return;const s=Y(r);if(s.length===0)return;const a=new Set;for(const i of y.getState().nodes){const m=i.data.importSource?.sessionId;m&&a.add(m)}const f=s.filter(i=>!a.has(i));if(f.length===0)return;for(const i of f)await Z(r.id,i);const e=_.getState().projects.find(i=>i.id===r.id)?.sourceSession?"toast.unsubscribed":"toast.unsubscribedNative";tt("info",V(K(e),{n:f.length}),8e3)}async function lt(n,d){const t=n.filter(c=>!!c&&!!c.sessionId);if(t.length===0)return null;const r=d??await W(V(K("atlas.mergedName"),{title:t[0].title.slice(0,24),n:t.length}));await R(r),y.getState().pushHistory();let s=0,a=0;for(const c of t){const e=c.sessionId;if(L(e)){a++;continue}const i=c.build();if(i.nodes.length===0){a++;continue}const m=i.nodes.filter(o=>o.data.importSource),u=y.getState().nodes,l=u.reduce((o,p)=>Math.max(o,p.position.x+(p.width??p.measured?.width??540)),-1/0),g=u.reduce((o,p)=>Math.min(o,p.position.y),1/0),w=Math.min(...i.nodes.map(o=>o.position.x)),b=Math.min(...i.nodes.map(o=>o.position.y)),x=(Number.isFinite(l)?l+180:0)-w,h=(Number.isFinite(g)?g:0)-b,N=i.nodes.map(o=>({...o,position:{x:o.position.x+x,y:o.position.y+h}})),v=new Set(N.map(o=>o.id)),j=i.edges.filter(o=>v.has(o.source)&&v.has(o.target));y.setState(o=>({nodes:[...o.nodes,...N],edges:[...o.edges,...j]})),await O(r,"chapter",{sessionId:e,runner:c.source,importedCount:m.length,tailNodeId:m.at(-1)?.id??N[N.length-1].id}),s++}y.getState().pushHistory();const f=y.getState().nodes.at(-1);return s>0&&f&&C.getState().setArrivalFocusNodeId(f.id),{mounted:s,skipped:a,projectId:r}}export{ft as canvasUniqueness,J as importOrAppendConversation,ct as importOrAppendSession,lt as mergeSessionsIntoProject,pt as mountConversationToProject,ut as shellSessionReader,Y as subscribedSessionIds,mt as unsubscribeOrphanedSessions};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BbbLhjvs.js","assets/index-CGGP8_QX.js","assets/index-CvcT19An.css","assets/experiment-loop-t0sYsW2J.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as _,b as y,_ as k,p as D,r as O,g as R,a as K,u as C,h as Q,s as z,j as $,k as W,f as V,l as Y,m as Z,t as tt,n as M,o as et,q as st}from"./index-CGGP8_QX.js";const ot=190;async function ct(n){const{anyRunnerSessionConversation:d}=await k(async()=>{const{anyRunnerSessionConversation:r}=await import("./index-BbbLhjvs.js");return{anyRunnerSessionConversation:r}},__vite__mapDeps([0,1,2])),t=await d(n);return J(t)}function ut(n,d){let r=0,s=!1;return async()=>{if(s)return null;const a=await window.desktopSessions.readRange(n,d,r,8388608);return r=a.nextStart,a.eof&&(s=!0),a.text}}function L(n){if(!n)return null;for(const d of _.getState().projects){const t=d.sourceSession;if(!t)continue;if(t.sessionId===n)return{project:d,entry:t};const r=t.chapters?.find(a=>a.sessionId===n);if(r)return{project:d,entry:r};const s=t.branches?.find(a=>a.sessionId===n);if(s)return{project:d,entry:s}}return null}function H(n,d,t,r,s){const a=r.position.x+(s?560:0),f=a-40,c=a+580,e=n.nodes.reduce((g,w)=>{const b=w.width??w.measured?.width??540;if(w.position.x+b<f||w.position.x>c)return g;const x=w.height??w.measured?.height??300;return Math.max(g,w.position.y+x)},s?r.position.y-300:r.position.y+(r.height??140)),i=a-d[0].position.x,m=Math.max(e+ot,s?r.position.y:-1/0)-d[0].position.y,u=d.map(g=>({...g,position:{x:g.position.x+i,y:g.position.y+m}})),l=[{id:M(),source:r.id,target:u[0].id,type:"smoothstep"},...t];return{moved:u,edges:l}}async function J(n,d={}){if(!n)return null;const t=n.build(),r=t.nodes.filter(c=>c.data.importSource),s=r.at(-1)?.id??t.nodes.at(-1)?.id??"";if(t.nodes.length===0)return null;const a=L(n.sessionId);if(a)return U(n,t,r,s,a,d);if(n.sessionId){const c=await nt(n.sessionId);if(c){let e=-1,i="";if(r.forEach((m,u)=>{const l=m.data.importSource?.itemIds?.[0],g=l?c.byFirstId.get(l):void 0;g&&(e=u,i=g)}),e>=0){await O(c.projectId,"chapter",{sessionId:n.sessionId,runner:n.source,importedCount:e+1,tailNodeId:i});const m=L(n.sessionId);if(m)return U(n,t,r,s,m,d)}}}if(n.sessionId&&r.length>0){const{parseAnchor:c}=await k(async()=>{const{parseAnchor:i}=await import("./experiment-loop-t0sYsW2J.js");return{parseAnchor:i}},__vite__mapDeps([3,1,2])),e=c(r[0].data.question??"");if(e&&_.getState().projects.some(i=>i.id===e.project)){await R(e.project);const i=y.getState(),m=_.getState().projects.find(l=>l.id===e.project);let u=i.nodes.find(l=>l.id===e.node)??null;if(!u&&e.mode==="continue"&&m.sourceSession?.sessionId){const l=m.sourceSession;u=i.nodes.find(g=>g.id===l.tailNodeId)??i.nodes.filter(g=>g.data.importSource?.sessionId===l.sessionId).at(-1)??null}if(u){const l=t.nodes.find(h=>h.data.importSource&&h.data.stepKind!=="note");if(l&&c(l.data.question??"")){const h=K("exp.openerMark");l.data={...l.data,question:h,source:l.data.source?{...l.data.source,question:h}:l.data.source}}const g=new Set(t.nodes.map(h=>h.id)),w=t.edges.filter(h=>g.has(h.source)&&g.has(h.target)),b=e.mode!=="continue",x=H(i,t.nodes,w,u,b);if(b){const h=x.moved.find(N=>N.data.importSource&&N.data.stepKind!=="note");h&&(h.data={...h.data,isBranch:!0})}return i.pushHistory(),y.setState(h=>({nodes:[...h.nodes,...x.moved],edges:[...h.edges,...x.edges]})),await O(e.project,b?"branch":"chapter",{sessionId:n.sessionId,runner:n.source,importedCount:r.length,tailNodeId:s,anchorNodeId:u.id}),C.getState().setArrivalFocusNodeId(x.moved[x.moved.length-1].id),{kind:"mounted",mode:b?"branch":"continue",turns:r.length}}}}const f=crypto.randomUUID();return await Q(D(f),JSON.stringify({state:{nodes:z(t.nodes),edges:t.edges},version:1})),C.getState().setArrivalFocusNodeId(t.nodes[t.nodes.length-1].id),await $(f,n.title.slice(0,60),"chat",n.sessionId?{sourceSession:{sessionId:n.sessionId,runner:n.source,importedCount:r.length,tailNodeId:s}}:void 0),{kind:"imported",nodeCount:t.nodes.length}}async function pt(n,d){if(!n||!n.sessionId)return null;if(L(n.sessionId))return J(n);const t=n.build(),r=t.nodes.filter(u=>u.data.importSource);if(t.nodes.length===0)return null;await R(d);const s=y.getState(),a=_.getState().projects.find(u=>u.id===d);if(!a)return null;const f=a.sourceSession,c=(f?.sessionId?s.nodes.find(u=>u.id===f.tailNodeId)??s.nodes.filter(u=>u.data.importSource?.sessionId===f.sessionId).at(-1):null)??s.nodes.at(-1)??null;if(!c)return null;const e=new Set(t.nodes.map(u=>u.id)),i=t.edges.filter(u=>e.has(u.source)&&e.has(u.target)),m=H(s,t.nodes,i,c,!1);return s.pushHistory(),y.setState(u=>({nodes:[...u.nodes,...m.moved],edges:[...u.edges,...m.edges]})),await O(d,"chapter",{sessionId:n.sessionId,runner:n.source,importedCount:r.length,tailNodeId:r.at(-1)?.id??t.nodes.at(-1).id,anchorNodeId:c.id}),C.getState().setArrivalFocusNodeId(m.moved[m.moved.length-1].id),{kind:"mounted",mode:"continue",turns:r.length}}async function nt(n){const{projects:d,activeId:t}=_.getState(),r=[...d].sort((s,a)=>s.id===t?-1:a.id===t?1:a.updatedAt-s.updatedAt);for(const s of r){if(s.id!==t&&s.provenanceSessions&&!s.provenanceSessions.includes(n))continue;let a;if(s.id===t)a=y.getState().nodes;else try{const{get:c}=await k(async()=>{const{get:m}=await import("./index-CGGP8_QX.js").then(u=>u.D);return{get:m}},__vite__mapDeps([1,2])),e=await c(D(s.id));a=(typeof e=="string"?JSON.parse(e):e)?.state?.nodes??[]}catch{continue}if(s.id!==t&&!s.provenanceSessions){const c=[...new Set(a.map(e=>e.data.importSource?.sessionId).filter(e=>!!e))];_.setState(e=>({projects:e.projects.map(i=>i.id===s.id?{...i,provenanceSessions:c}:i)}))}const f=new Map;for(const c of a)if(c.data.importSource?.sessionId===n&&c.data.stepKind!=="note"){const e=c.data.importSource.itemIds?.[0];e&&f.set(e,c.id)}if(f.size>0)return{projectId:s.id,byFirstId:f}}return null}async function U(n,d,t,r,s,a={}){await R(s.project.id);const f=y.getState(),c=f.nodes.filter(o=>o.data.importSource?.sessionId===n.sessionId),e=f.nodes.find(o=>o.id===s.entry.tailNodeId)??c.at(-1)??null,i=s.entry.importedCount>0&&t.length>=s.entry.importedCount?t[s.entry.importedCount-1]:null;if(i){const o=i.data.importSource?.itemIds?.[0],p=o?c.find(E=>E.data.importSource?.itemIds?.[0]===o):void 0,S=p?.data.source,A=!!S&&p.data.question===S.question&&(p.data.response??"")===(S.response??""),I=i.data,X=!!p&&(I.response??"").trim()===""&&(p.data.response??"").trim()!=="",G=!!p&&!X&&(I.question!==p.data.question||(I.response??"")!==(p.data.response??"")),P=p?.data.attachments??[],T=I.attachments??[],B=!!p&&T.length>P.length&&P.every((E,q)=>T[q]?.name===E.name);if(p&&A&&(G||B)){const E=G?I.attachments:[...P,...T.slice(P.length)];y.setState(q=>({nodes:q.nodes.map(F=>F.id===p.id?{...F,data:{...F.data,question:I.question,response:I.response,responses:I.responses,responseIndex:I.responseIndex,tokenCount:I.tokenCount,attachments:E,importSource:I.importSource,source:I.source}}:F)})),y.getState().recomputeStaleness()}}if(t.length<=s.entry.importedCount)return a.focusOnRefresh!==!1&&C.getState().setArrivalFocusNodeId(e?.id??null),{kind:"opened"};const m=t[s.entry.importedCount],u=d.nodes.findIndex(o=>o.id===m.id),l=d.nodes.slice(u),g=new Set(l.map(o=>o.id)),w=d.edges.filter(o=>g.has(o.source)&&g.has(o.target)),b=new Map;for(const o of c){const p=o.data.importSource?.itemIds?.[0];p&&b.set(p,o.id)}const x=new Map;for(const o of d.nodes){const p=o.data.importSource?.itemIds?.[0];p&&!g.has(o.id)&&x.set(o.id,p)}const h=[];for(const o of d.edges){if(!g.has(o.target)||g.has(o.source))continue;const p=x.get(o.source),S=p?b.get(p):void 0;S&&h.push({...o,id:M(),source:S})}const N=new Set(h.map(o=>o.target));let v,j;if(e){const o=H(f,l,w,e,!1);v=o.moved;const p=new Set(w.map(S=>S.target));j=o.edges.filter(S=>!(S.source===e.id&&N.has(S.target)));for(const S of v)S.id!==v[0].id&&!p.has(S.id)&&!N.has(S.id)&&S.data.stepKind!=="note"&&j.push({id:M(),source:e.id,target:S.id,type:"smoothstep"});j=[...j,...h]}else{const p=(f.nodes.length?Math.max(...f.nodes.map(I=>I.position.x)):0)+560-l[0].position.x,S=-l[0].position.y;v=l.map(I=>({...I,position:{x:I.position.x+p,y:I.position.y+S}}));const A=rt(it(t.length-s.entry.importedCount),v[0]);v=[A,...v],j=[{id:M(),source:A.id,target:v[1].id,type:"smoothstep"},...w]}return f.pushHistory(),y.setState(o=>({nodes:[...o.nodes,...v],edges:[...o.edges,...j]})),await et(s.project.id,n.sessionId,{importedCount:t.length,tailNodeId:r}),C.getState().setArrivalFocusNodeId(v[e?0:1].id),{kind:"appended",turns:t.length-s.entry.importedCount}}function it(n){return`[Mirror] The source session grew by ${n} turn(s); the earlier mirrored turns were removed from this canvas by hand, so the new turns land here on their own.`}function rt(n,d){const t=st(n,"",!1);return t.data.stepKind="note",t.data.importSource=d.data.importSource?{...d.data.importSource,itemIds:[]}:void 0,t.width=460,t.position={x:d.position.x-520,y:d.position.y},t}async function ft(n){const{projects:d,activeId:t}=_.getState(),r=d.find(e=>e.id===n);if(!r?.sourceSession)return"native";if((r.sourceSession.chapters?.length??0)>0||(r.sourceSession.branches?.length??0)>0)return"diverged-mirror";let s;if(n===t)s=y.getState().nodes;else{const{get:e}=await k(async()=>{const{get:m}=await import("./index-CGGP8_QX.js").then(u=>u.D);return{get:m}},__vite__mapDeps([1,2])),i=await e(D(n));try{s=(typeof i=="string"?JSON.parse(i):i)?.state?.nodes??[]}catch{return"diverged-mirror"}}const a=r.sourceSession.sessionId,f=s.filter(e=>e.data.importSource?.sessionId===a);return s.some(e=>!e.data.importSource)||s.some(e=>e.data.importSource&&e.data.importSource.sessionId!==a)||f.filter(e=>e.data.source).length<r.sourceSession.importedCount||f.some(e=>e.data.source&&(e.data.question!==e.data.source.question||e.data.response!==e.data.source.response))?"diverged-mirror":"pristine-mirror"}async function mt(){const{bootProjects:n}=await k(async()=>{const{bootProjects:i}=await import("./index-CGGP8_QX.js").then(m=>m.F);return{bootProjects:i}},__vite__mapDeps([1,2]));await n();const{projects:d,activeId:t}=_.getState(),r=d.find(i=>i.id===t);if(!r?.sourceSession)return;const s=Y(r);if(s.length===0)return;const a=new Set;for(const i of y.getState().nodes){const m=i.data.importSource?.sessionId;m&&a.add(m)}const f=s.filter(i=>!a.has(i));if(f.length===0)return;for(const i of f)await Z(r.id,i);const e=_.getState().projects.find(i=>i.id===r.id)?.sourceSession?"toast.unsubscribed":"toast.unsubscribedNative";tt("info",V(K(e),{n:f.length}),8e3)}async function lt(n,d){const t=n.filter(c=>!!c&&!!c.sessionId);if(t.length===0)return null;const r=d??await W(V(K("atlas.mergedName"),{title:t[0].title.slice(0,24),n:t.length}));await R(r),y.getState().pushHistory();let s=0,a=0;for(const c of t){const e=c.sessionId;if(L(e)){a++;continue}const i=c.build();if(i.nodes.length===0){a++;continue}const m=i.nodes.filter(o=>o.data.importSource),u=y.getState().nodes,l=u.reduce((o,p)=>Math.max(o,p.position.x+(p.width??p.measured?.width??540)),-1/0),g=u.reduce((o,p)=>Math.min(o,p.position.y),1/0),w=Math.min(...i.nodes.map(o=>o.position.x)),b=Math.min(...i.nodes.map(o=>o.position.y)),x=(Number.isFinite(l)?l+180:0)-w,h=(Number.isFinite(g)?g:0)-b,N=i.nodes.map(o=>({...o,position:{x:o.position.x+x,y:o.position.y+h}})),v=new Set(N.map(o=>o.id)),j=i.edges.filter(o=>v.has(o.source)&&v.has(o.target));y.setState(o=>({nodes:[...o.nodes,...N],edges:[...o.edges,...j]})),await O(r,"chapter",{sessionId:e,runner:c.source,importedCount:m.length,tailNodeId:m.at(-1)?.id??N[N.length-1].id}),s++}y.getState().pushHistory();const f=y.getState().nodes.at(-1);return s>0&&f&&C.getState().setArrivalFocusNodeId(f.id),{mounted:s,skipped:a,projectId:r}}export{ft as canvasUniqueness,J as importOrAppendConversation,ct as importOrAppendSession,lt as mergeSessionsIntoProject,pt as mountConversationToProject,ut as shellSessionReader,Y as subscribedSessionIds,mt as unsubscribeOrphanedSessions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c,c as p,E as m,s as v,d as w,i as h,e as g}from"./index-
|
|
1
|
+
import{b as c,c as p,E as m,s as v,d as w,i as h,e as g}from"./index-CGGP8_QX.js";const S=6e4,T=4e3;function y(e){const s=(e.data.attachments??[]).map(t=>({id:t.id,name:t.name,type:t.type,size:t.size,content:"",...t.addedAt?{addedAt:t.addedAt}:{},...t.extractedText?{extractedText:t.extractedText.slice(0,T)}:{},...t.paths?{paths:t.paths}:{},...t.op?{op:t.op}:{}}));return{...e,data:{...e.data,attachments:s}}}function j(){const{nodes:e,edges:s,events:t}=c.getState(),{projects:u,activeId:a}=p.getState();if(!a||e.length===0)return null;const i=u.find(l=>l.id===a),f=JSON.stringify({version:m,name:w(),projectId:a,exportedAt:new Date().toISOString(),record:"thoughtdag-canvas-record",instantiatedFrom:i?.instantiatedFrom,sourceSession:i?.sourceSession,nodes:v(e).map(y),edges:s,events:t});return{projectId:a,json:f}}let n=null,o=!1;async function d(){n&&(clearTimeout(n),n=null),o=!1;const e=window.desktopCanvas;if(!e)return!1;const s=j();return s?!!(await e.write(s.projectId,s.json).catch(()=>({ok:!1}))).ok:!1}function x(){o=!0,n&&clearTimeout(n),n=setTimeout(()=>{n=null,o&&d().catch(e=>console.warn("[thoughtdag] canvas record write failed:",e))},S)}let r=!1;function E(){r||h||typeof window>"u"||!window.desktopCanvas||(r=!0,c.subscribe((e,s)=>{(e.nodes!==s.nodes||e.edges!==s.edges||e.events!==s.events)&&x()}),g.push(async()=>{o&&await d()}),window.addEventListener("pagehide",()=>{o&&d()}))}async function R(e){await window.desktopCanvas?.remove(e).catch(()=>{})}export{j as canvasRecordPayload,d as flushCanvasRecord,R as removeCanvasRecord,E as startCanvasRecord};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as y,B as w,n as C}from"./index-
|
|
1
|
+
import{q as y,B as w,n as C}from"./index-CGGP8_QX.js";import{t as _,a as S,r as x,b as A,c as L,d as b,e as k,f as v,s as O,g as q,h as B,m as M,T as N,A as f,i as Q}from"./shared-DSCz0Bq4.js";const $=16e3;function g(o){return typeof o=="string"?o:Array.isArray(o)?o.filter(t=>t.type==="text"&&t.text).map(t=>t.text).join(`
|
|
2
2
|
`):""}function I(o){return typeof o=="string"?o:Array.isArray(o)?o.map(t=>t.type==="text"&&t.text?t.text:t.type==="image"?"[image result omitted]":"").filter(Boolean).join(`
|
|
3
3
|
`):""}const m=v;class F{turns=[];pendingTools=new Map;current=null;pendingCompaction;sessionId=null;customTitle=null;summary=null;slug=null;firstQuestion=null;cwd=null;mode=null;feedLine(t){const s=t.trim();if(!s)return;let i;try{i=JSON.parse(s)}catch{return}this.feed(i)}flush(){const t=this.current;t&&(t.question||t.response||t.tools.length)&&this.turns.push(t),this.current=null}feed(t){if(t.type==="custom-title"&&t.customTitle&&(this.customTitle=t.customTitle),t.type==="summary"&&t.summary&&!this.summary&&(this.summary=t.summary),t.slug&&!this.slug&&(this.slug=t.slug),t.cwd&&!this.cwd&&(this.cwd=t.cwd),this.mode===null&&(t.type==="user"||t.type==="assistant")&&t.uuid&&(this.mode=t.isSidechain&&t.agentId?"sidechain":"main",this.mode==="sidechain"&&(this.sessionId=t.agentId)),!!t.isSidechain==(this.mode==="sidechain")){if(t.type==="system"&&t.subtype==="compact_boundary"){this.flush();const s=t.compactMetadata;this.pendingCompaction=`[Compaction] The source runner compacted its history here${s?.preTokens?` (${s.preTokens} → ${s.postTokens??"?"} tokens)`:""}. Everything above this point reached later turns only as a summary.`;return}if((t.type==="user"||t.type==="assistant")&&t.uuid&&t.sessionId&&!this.sessionId&&(this.sessionId=t.sessionId),t.type==="user"){const s=t.message?.content;if(Array.isArray(s)){for(const e of s)if(e.type==="tool_result"&&e.tool_use_id){const n=this.pendingTools.get(e.tool_use_id);if(n&&this.current){const u=m(I(e.content),N);if(this.current.tools.push({name:n.name,call:n.call,result:u.text,truncated:u.truncated,...n.paths.length?{paths:n.paths}:{},op:n.op,nativeCallId:e.tool_use_id,...n.url?{url:n.url}:{},...n.locator?{locator:n.locator}:{}}),n.spawn){const c=m(I(e.content),f);(this.current.subagents??=[]).push({agent:n.spawn.agent,task:n.spawn.task,output:c.text,itemIds:[e.tool_use_id],match:n.spawn.prompt,...t.timestamp?{at:t.timestamp}:{}})}this.pendingTools.delete(e.tool_use_id)}}}const i=g(s);if(!i.trim())return;if(/^\s*<task-notification>/.test(i)){if(this.current){const e=m(i,$);this.current.tools.push({name:"Agent",call:"(task notification)",result:e.text,truncated:e.truncated,op:"agent"})}return}this.flush(),this.firstQuestion||(this.firstQuestion=i.trim()),this.current={question:i,response:"",itemIds:t.uuid?[t.uuid]:[],tools:[],parentItemId:t.parentUuid??void 0,...t.timestamp?{at:t.timestamp}:{}},this.pendingCompaction&&(this.current.compactionBefore=this.pendingCompaction,this.pendingCompaction=void 0);return}if(t.type==="assistant"&&this.current){t.uuid&&this.current.itemIds.push(t.uuid);const s=t.message?.content,i=g(s);if(i.trim()&&(this.current.response=this.current.response?`${this.current.response}
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as d,n as p,B as m}from"./index-
|
|
1
|
+
import{q as d,n as p,B as m}from"./index-CGGP8_QX.js";import{t as g,a as y,d as I,e as _,m as x,g as T,s as C,h as w,f as S,A,i as v,T as B}from"./shared-DSCz0Bq4.js";function L(n){const t=[];for(const e of n.matchAll(/^\*\*\* (?:Add|Update|Delete) File: (.+)$/gm))t.push(e[1].trim());return t}const h=S,q=n=>(n??[]).filter(t=>t.text&&(t.type==="input_text"||t.type==="output_text"||t.type==="text")).map(t=>t.text).join(`
|
|
2
2
|
`),O=/^\s*<\/?[a-zA-Z_][\w-]*[^>]*>/,b=n=>O.test(n)||n.trimStart().startsWith("# AGENTS.md instructions for "),N=n=>(n??[]).filter(t=>t.text&&(t.type==="input_text"||t.type==="text")&&!b(t.text)).map(t=>t.text).join(`
|
|
3
3
|
`),$=n=>typeof n=="string"?n:Array.isArray(n)?n.map(t=>t?.text??"").filter(Boolean).join(`
|
|
4
4
|
`):n==null?"":JSON.stringify(n);class Q{turns=[];pendingCalls=new Map;current=null;pendingCompaction;sessionId=null;cwd="";day="";sawItems=!1;firstQuestion=null;parentThreadId=null;startedAt=null;feedLine(t){const e=t.trim();if(!e)return;let s;try{s=JSON.parse(e)}catch{return}this.feed(s)}flush(){const t=this.current;t&&(t.question||t.response||t.tools.length)&&this.turns.push(t),this.current=null}ensure(){return this.current||(this.current={question:"",response:"",itemIds:[],tools:[]},this.pendingCompaction&&(this.current.compactionBefore=this.pendingCompaction,this.pendingCompaction=void 0)),this.current}feed(t){const e=t.payload??{};if(t.type==="session_meta"&&e.id&&!this.sessionId){this.sessionId=e.id,this.cwd=e.cwd??"",this.day=e.timestamp?.slice(0,10)??"",this.parentThreadId=e.parent_thread_id??null,this.startedAt=e.timestamp??t.timestamp??null;return}if((t.type==="response_item"||t.type==="event_msg")&&(this.sawItems=!0),t.type==="compacted"){this.flush(),this.pendingCompaction="[Compaction] The source runner compacted its history here. Everything above this point reached later turns only as a summary.";return}if(t.type==="turn_context"||t.type==="event_msg"&&e.type==="task_started"){this.flush();const s=this.ensure();e.turn_id&&s.itemIds.push(e.turn_id);return}if(t.type==="response_item"){if(e.type==="message"){if(e.role==="user"){const s=N(e.content);if(s.trim()){this.firstQuestion||(this.firstQuestion=s.trim());const o=this.ensure();!o.at&&t.timestamp&&(o.at=t.timestamp),o.question=o.question?`${o.question}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as C,B as x,n as w}from"./index-
|
|
1
|
+
import{q as C,B as x,n as w}from"./index-CGGP8_QX.js";import{t as L,a as h,b as I,c as y,f as c,r as f,d as A,T as d,i as p,A as m,g as S,s as b}from"./shared-DSCz0Bq4.js";function q(r){if(!r)return!1;if(r.error)return!0;const s=r.message?.content;return Array.isArray(s)&&s.some(t=>!!t&&typeof t=="object"&&t.isError===!0)}function l(r,s=0){return typeof r=="string"?r:!Array.isArray(r)||s>2?"":r.map(t=>{if(!t||typeof t!="object")return"";const e=t;return e.type==="text"&&typeof e.text=="string"?e.text:e.type==="image"?"[image omitted]":e.type==="reasoning"?"":l(e.text??e.content,s+1)}).filter(Boolean).join(`
|
|
2
2
|
`)}function O(r,s,t){const e=h(r);if(e==="run"||/^run_code$/i.test(r)){const o=t??{};return c(typeof o.code=="string"?o.code:s,m)}const n=t&&typeof t=="object"?f(r,t):s;return c(n,e==="write"||e==="edit"?m:p)}const v=r=>{try{return JSON.parse(r??"")}catch{return}};class _{turns=[];pendingTools=new Map;current=null;sessionId=null;cwd=null;title=null;firstQuestion=null;feedLine(s){const t=s.trim();if(!t)return;let e;try{e=JSON.parse(t)}catch{return}this.feed(e)}flush(){const s=this.current;s&&(s.question||s.response||s.tools.length)&&this.turns.push(s),this.current=null}ensure(){return this.current||(this.current={question:"",response:"",itemIds:[],tools:[]}),this.current}feed(s){if(s.type==="session"&&s.id&&!("timestamp"in s)){this.sessionId||(this.sessionId=s.id),s.cwd&&!this.cwd&&(this.cwd=s.cwd);return}if(s.type==="session/title"&&s.data?.title&&!this.title){this.title=s.data.title;return}if(s.type==="user/message"){const t=s,e=t.data?.source?.kind;if(e&&e!=="user")return;const n=l(t.data?.content).trim();if(!n)return;this.firstQuestion||(this.firstQuestion=n.split(`
|
|
3
3
|
`)[0].slice(0,80)),this.flush();const o=this.ensure();o.question=n,o.itemIds=[t.data?.id??`u${t.seq}`],t.time&&(o.at=new Date(t.time).toISOString());return}if(s.type==="assistant/message"&&this.current){const t=s,e=t.data?.message?.content,n=l(e).trim(),o=t.data?.message?.id;o&&this.current.itemIds.push(o),n&&(this.current.response=this.current.response?`${this.current.response}
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c,b as h,c as l,w as p,x as m,t as u,f as b}from"./index-
|
|
1
|
+
import{a as c,b as h,c as l,w as p,x as m,t as u,f as b}from"./index-CGGP8_QX.js";const g=/\[ThoughtDAG anchor: project=([\w-]+) node=([\w-]+) bundle=([\w-]+)(?: mode=(branch|continue))?\]/;function w(o){const n=o.match(g);return n?{project:n[1],node:n[2],bundle:n[3],mode:n[4]==="continue"?"continue":"branch"}:null}function x(o,n){const e=[];e.push(c("exp.mdIntro")),e.push("");for(const s of o.context.messages){const t=s.content[0].text;switch(s.source.layer){case"system":e.push(`**${c("exp.mdRole")}** ${t}`);break;case"chain":e.push(s.role==="assistant"?`**A:** ${t}`:`**Q:** ${t}`);break;default:e.push(t)}e.push("")}return e.push("---"),e.push(c("exp.mdOutro")),e.push(""),e.push(`[ThoughtDAG anchor: project=${n.project} node=${n.node} bundle=${n.bundle}${n.mode==="continue"?" mode=continue":""}]`),e.join(`
|
|
2
2
|
`)}async function j(o,n="branch"){const e=h.getState(),s=l.getState().activeId??"default",t=await p(o,e.nodes,e.edges,{now:new Date().toISOString(),projectId:s,staleIds:m(e)}),d={project:s,node:o,bundle:t.id,mode:n},i=x(t,d);try{await navigator.clipboard.writeText(i)}catch{return u("error",c("exp.clipboardFailed")),!1}{const a=[...new Set(t.context.messages.map(r=>r.source?.node_id).filter(r=>!!r))];e.logEvent("commit",o,{kind:"bundle",sha:t.integrity.content_hash,bundle:t.id,n:t.context.messages.length,...a.length?{m:a.slice(0,200).join(",")}:{},...a.length>200?{more:!0}:{}})}return u("success",b(c("exp.copied"),{n:t.context.messages.length,tok:t.budget.estimated_tokens}),12e3),!0}export{w as parseAnchor,x as renderHandoffMarkdown,j as takeToExperiment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as f}from"./index-
|
|
1
|
+
import{I as f}from"./index-CGGP8_QX.js";async function y(l){if(window.desktopAgents)return!0;const r=l.replace(/\/+$/,"");let i;try{const e=await fetch(r+"/agents/available",{credentials:"same-origin"});if(!e.ok)return!1;i=await e.json()}catch{return!1}const s=async(e,t)=>{const n=await fetch(r+e,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t??{})});if(!n.ok)throw new Error(`${e}: ${n.status}`);return n.json()},c=[];let o=null;const d=()=>{o||(o=new EventSource(r+"/agents/events"),o.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of c)n(t)}catch{}})},w=f,g={nativePicker:w},p=()=>new Promise(e=>{if(!w)return e(null);const t=`cwd-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=u=>{const a=u.data;u.origin!==window.location.origin||a?.source!=="dsh-thoughtdag"||a.type!=="td:picked-cwd"||a.requestId!==t||(window.removeEventListener("message",n),a.unsupported&&(g.nativePicker=!1),e(typeof a.path=="string"&&a.path?a.path:null))};window.addEventListener("message",n),window.parent.postMessage({source:"dsh-thoughtdag",type:"td:pick-cwd",requestId:t},window.location.origin)});return window.desktopAgents={capabilities:g,available:async()=>i,models:async e=>(await fetch(r+"/agents/models"+(e?`?runtime=${encodeURIComponent(e)}`:""),{credentials:"same-origin"})).json(),run:async e=>(d(),(await s("/agents/run",e)).runId),abort:async e=>(await s("/agents/abort",{runId:e})).ok,answer:async(e,t,n)=>(await s("/agents/answer",{runId:e,requestId:t,response:n})).ok,workspace:async e=>(await s("/agents/workspace",{canvasId:e})).dir,pickCwd:()=>p(),guardWrite:async(e,t)=>(await s("/agents/guard",{cwd:e,config:t})).ok,writeMaterials:async(e,t)=>s("/agents/materials",{cwd:e,files:t}),onEvent:e=>{c.push(e),d()}},!0}export{y as installAgentsHttpBridge};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/claude-code-session-
|
|
2
|
-
import{_ as e}from"./index-
|
|
3
|
-
`);n=w.pop()??"";for(const l of w)r.feedLine(l),a.feedLine(l),c.feedLine(l),o.feedLine(l)}return n&&(r.feedLine(n),a.feedLine(n),c.feedLine(n),o.feedLine(n)),r.toConversation()??a.toConversation()??c.toConversation()??o.toConversation()}async function f(s,i){const{claudeCodeSessionAsBranch:_}=await e(async()=>{const{claudeCodeSessionAsBranch:n}=await import("./claude-code-session-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/claude-code-session-DA4UoHlf.js","assets/index-CGGP8_QX.js","assets/index-CvcT19An.css","assets/shared-DSCz0Bq4.js","assets/codex-session-CTdwdWhJ.js","assets/dsh-session-4Ul6Mxx8.js","assets/pi-session-CYGbudh0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"./index-CGGP8_QX.js";async function S(s){const{claudeCodeSessionConversation:i}=await e(async()=>{const{claudeCodeSessionConversation:o}=await import("./claude-code-session-DA4UoHlf.js");return{claudeCodeSessionConversation:o}},__vite__mapDeps([0,1,2,3])),_=i(s);if(_)return _;const{codexSessionConversation:u}=await e(async()=>{const{codexSessionConversation:o}=await import("./codex-session-CTdwdWhJ.js");return{codexSessionConversation:o}},__vite__mapDeps([4,1,2,3])),d=u(s);if(d)return d;const{dshSessionConversation:r}=await e(async()=>{const{dshSessionConversation:o}=await import("./dsh-session-4Ul6Mxx8.js");return{dshSessionConversation:o}},__vite__mapDeps([5,1,2,3])),a=r(s);if(a)return a;const{piSessionConversation:c}=await e(async()=>{const{piSessionConversation:o}=await import("./pi-session-CYGbudh0.js");return{piSessionConversation:o}},__vite__mapDeps([6,1,2,3]));return c(s)}async function E(s){const{ClaudeSessionCollector:i}=await e(async()=>{const{ClaudeSessionCollector:t}=await import("./claude-code-session-DA4UoHlf.js");return{ClaudeSessionCollector:t}},__vite__mapDeps([0,1,2,3])),{CodexSessionCollector:_}=await e(async()=>{const{CodexSessionCollector:t}=await import("./codex-session-CTdwdWhJ.js");return{CodexSessionCollector:t}},__vite__mapDeps([4,1,2,3])),{DshSessionCollector:u}=await e(async()=>{const{DshSessionCollector:t}=await import("./dsh-session-4Ul6Mxx8.js");return{DshSessionCollector:t}},__vite__mapDeps([5,1,2,3])),{PiSessionCollector:d}=await e(async()=>{const{PiSessionCollector:t}=await import("./pi-session-CYGbudh0.js");return{PiSessionCollector:t}},__vite__mapDeps([6,1,2,3])),r=new i,a=new _,c=new u,o=new d;let n="";for(let t=await s();t!==null;t=await s()){if(!t)continue;const w=(n+t).split(`
|
|
3
|
+
`);n=w.pop()??"";for(const l of w)r.feedLine(l),a.feedLine(l),c.feedLine(l),o.feedLine(l)}return n&&(r.feedLine(n),a.feedLine(n),c.feedLine(n),o.feedLine(n)),r.toConversation()??a.toConversation()??c.toConversation()??o.toConversation()}async function f(s,i){const{claudeCodeSessionAsBranch:_}=await e(async()=>{const{claudeCodeSessionAsBranch:n}=await import("./claude-code-session-DA4UoHlf.js");return{claudeCodeSessionAsBranch:n}},__vite__mapDeps([0,1,2,3])),u=_(s,i);if(u)return u;const{codexSessionAsBranch:d}=await e(async()=>{const{codexSessionAsBranch:n}=await import("./codex-session-CTdwdWhJ.js");return{codexSessionAsBranch:n}},__vite__mapDeps([4,1,2,3])),r=d(s,i);if(r)return r;const{dshSessionAsBranch:a}=await e(async()=>{const{dshSessionAsBranch:n}=await import("./dsh-session-4Ul6Mxx8.js");return{dshSessionAsBranch:n}},__vite__mapDeps([5,1,2,3])),c=a(s,i);if(c)return c;const{piSessionAsBranch:o}=await e(async()=>{const{piSessionAsBranch:n}=await import("./pi-session-CYGbudh0.js");return{piSessionAsBranch:n}},__vite__mapDeps([6,1,2,3]));return o(s,i)}export{f as anyRunnerSessionAsBranch,S as anyRunnerSessionConversation,E as streamRunnerConversation};
|