@yuriai/web 0.2.0 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AssistantView-C67p8xuJ.js → AssistantView-B1-ZOPte.js} +3 -3
- package/dist/assets/{DiagramView-DPcsLliB.js → DiagramView-byPKPO9k.js} +1 -1
- package/dist/assets/GuiPluginLoadingNotice-Ctwyj_6m.js +1 -0
- package/dist/assets/{GuiPluginSurface-DYQotofG.js → GuiPluginSurface-BTmJlTp9.js} +1 -1
- package/dist/assets/{MarkdownRenderer-Qqpr2mPH.js → MarkdownRenderer-dWW52CAV.js} +2 -2
- package/dist/assets/{MarkdownRendererImpl-NsSkRpGi.js → MarkdownRendererImpl-DNDAYS1N.js} +2 -2
- package/dist/assets/{MarkstreamRendererImpl-DQpFxOfX.js → MarkstreamRendererImpl-D5Gf8Fja.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-BaXXR9xC.js → MobileDetailNavigation-BxOYRnDk.js} +1 -1
- package/dist/assets/{MobileShareBridge-CbmVqEAx.js → MobileShareBridge-CXqDXHZG.js} +1 -1
- package/dist/assets/{MobileTabPageHeader-BIAkmiCb.js → MobileTabPageHeader-C7cX5eld.js} +1 -1
- package/dist/assets/{MultiRunWindow-B_ptQuKi.js → MultiRunWindow-CaHNOGs2.js} +1 -1
- package/dist/assets/{SettingsView-BbzGMK_z.js → SettingsView-DNNscLOq.js} +1 -1
- package/dist/assets/{SettingsWindow-h25-n1wB.js → SettingsWindow-Bbq4v4yl.js} +1 -1
- package/dist/assets/{TerminalView-DCQATs7S.js → TerminalView-LW5vUwDA.js} +1 -1
- package/dist/assets/{ToolOutputDialog-Bm2kSYCn.js → ToolOutputDialog-BoAGzjT3.js} +1 -1
- package/dist/assets/{appThemeRegistry-DNb0Emjp.js → appThemeRegistry-BzU8zJgk.js} +1 -1
- package/dist/assets/{capgoAdapter-vYSlprFh.js → capgoAdapter-CrBccKXY.js} +1 -1
- package/dist/assets/{fileMentionTouchSelection-BkCvPXYn.js → fileMentionTouchSelection-C4zBwV8-.js} +1 -1
- package/dist/assets/{fileReferenceActions-CgsqIeIM.js → fileReferenceActions-ui8464r-.js} +1 -1
- package/dist/assets/{gitApi-DdK0IlIM.js → gitApi-DqX-QV_L.js} +1 -1
- package/dist/assets/{insertionBoundaries-B28Dk8Dp.js → insertionBoundaries-C1W-RfK6.js} +1 -1
- package/dist/assets/{main-hwetTT7m.js → main-CqoNDCJj.js} +2 -2
- package/dist/assets/{main-BqrjAS06.js → main-UG2rPfaK.js} +21 -21
- package/dist/assets/{mcpQueries-DTbwg6z6.js → mcpQueries-DXYEazhg.js} +1 -1
- package/dist/assets/{miniChat-BMNB2ztD.js → miniChat-DaI0JRe4.js} +2 -2
- package/dist/assets/{mobile-BdQMBg5f.js → mobile-BMlE5RBZ.js} +2 -2
- package/dist/assets/{mobileBackNavigation-CaxJVILv.js → mobileBackNavigation-Dq7VGDkh.js} +1 -1
- package/dist/assets/{multirun-CpWGs_sU.js → multirun-CPqjkmDv.js} +1 -1
- package/dist/assets/{native-config-BfIzLvxi.js → native-config-CbLOUYef.js} +1 -1
- package/dist/assets/{projectMeta-DZFuF8rn.js → projectMeta-Bouw3u_q.js} +1 -1
- package/dist/assets/{readiness-CdLdF_Pp.js → readiness--FInk_Rv.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-C_MTyWYO.js → renderElectronMiniChatApp-DR2wc2oc.js} +2 -2
- package/dist/assets/renderMobileApp-CaBsjJFs.js +28 -0
- package/dist/assets/{runtimeConfig-BA2rxwwc.js → runtimeConfig-DO1kqEsE.js} +1 -1
- package/dist/assets/runtimeEndpointReset-D5q3N28H.js +149 -0
- package/dist/assets/{sessionChangeSummary-2Bt21ayX.js → sessionChangeSummary-DS-Su8YI.js} +1 -1
- package/dist/assets/{sessionLookup-C1nNfbh0.js → sessionLookup-DBlBJhz5.js} +1 -1
- package/dist/assets/{speechSettingsQueries-B6_7YC3O.js → speechSettingsQueries-BB9b5zyK.js} +1 -1
- package/dist/assets/src-hVfg6BZK.css +2 -0
- package/dist/assets/{types-CfsdaRmC.js → types-Cjsqoaj2.js} +1 -1
- package/dist/assets/{useAppFontEffects-dB996j53.js → useAppFontEffects-DzyOIRw0.js} +5 -5
- package/dist/assets/{useDesktopWindowControlsLayout-DyTyv6Rk.js → useDesktopWindowControlsLayout-DtdFMwzW.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-Cxkuxd4u.js → useEffectiveDirectory-DC4oSzha.js} +1 -1
- package/dist/assets/{useMobileNavigationStore-M61L6rKt.js → useMobileNavigationStore-DDIFIAUa.js} +3 -3
- package/dist/assets/{useWorkerHighlightedLines-BjUDrhqD.js → useWorkerHighlightedLines-BNm0Snzz.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/mini-chat.html +6 -6
- package/dist/mobile.html +6 -6
- package/package.json +1 -1
- package/server/lib/llm/DOCUMENTATION.md +7 -0
- package/server/lib/llm/generate.js +33 -13
- package/server/lib/llm/generate.test.js +79 -2
- package/dist/assets/GuiPluginLoadingNotice-DjO_uy_0.js +0 -1
- package/dist/assets/renderMobileApp-B-tmvQxg.js +0 -28
- package/dist/assets/runtimeEndpointReset-BxlxF5X2.js +0 -149
- package/dist/assets/scheduling-DCTDfxV-.js +0 -1
- package/dist/assets/src-D3pZqEZM.css +0 -2
package/dist/assets/{useWorkerHighlightedLines-BjUDrhqD.js → useWorkerHighlightedLines-BNm0Snzz.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from"./vendor-base-ui-CdzJ6My_.js";import{v as r}from"./useUIStore-DqtgX2FB.js";import{n as i}from"./vendor-react-BP2cRVqX.js";import{d as a,r as o,t as s}from"./button-CT7WL0lp.js";import{n as c}from"./useThemeSystem-8jhE4Zyk.js";import{n as l}from"./Icon-DofI60x2.js";import{i as u,n as d,t as f}from"./tooltip-CnIKZ6bg.js";import{n as p}from"./MarkdownRenderer-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from"./vendor-base-ui-CdzJ6My_.js";import{v as r}from"./useUIStore-DqtgX2FB.js";import{n as i}from"./vendor-react-BP2cRVqX.js";import{d as a,r as o,t as s}from"./button-CT7WL0lp.js";import{n as c}from"./useThemeSystem-8jhE4Zyk.js";import{n as l}from"./Icon-DofI60x2.js";import{i as u,n as d,t as f}from"./tooltip-CnIKZ6bg.js";import{n as p}from"./MarkdownRenderer-dWW52CAV.js";import{n as m,r as h}from"./toolHelpers-DL452NVK.js";import{t as g}from"./vendor-tanstack-react-virtual-B_EO--9t.js";import{n as _}from"./markdownTheme-DHoKvD6O.js";import{n as v,t as y}from"./markdown-worker-oBGEB9Eg.js";var b=e(t(),1),x=i(),S=n(),C=`w-[min(30rem,calc(100cqw-1rem))] min-w-[280px] max-w-full overflow-hidden rounded-xl shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,w={maxWidth:`min(28rem, calc(100cqw - 4ch))`,backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`},T=`flex items-center justify-between gap-3 border-b border-[var(--surface-subtle)] px-3 py-2.5`,E=`text-xs font-medium leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,D=`text-xs tabular-nums leading-4 text-muted-foreground md:text-[0.8125rem] md:leading-5`,O=`m-0 list-none divide-y divide-[var(--surface-subtle)] p-0`,k=`${O} max-h-[min(22rem,50vh)] overflow-y-auto`,A=`${O} w-full`,ee={className:`p-0 rounded-none`,maxHeightClass:`max-h-[46vh]`,disableHorizontal:!0},j=`px-2.5 py-1.5 text-xs leading-4 md:py-2 md:text-[0.8125rem] md:leading-5`,M=`flex min-w-0 items-center gap-1 text-xs leading-4 text-muted-foreground md:gap-1.5 md:text-[0.8125rem] md:leading-5`,te=`min-w-0 truncate text-xs leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,ne=`inline-flex shrink-0 items-center gap-1 text-xs leading-4 tabular-nums text-muted-foreground md:text-[0.8125rem] md:leading-5`,re=`h-3 w-3 shrink-0 md:h-3.5 md:w-3.5`,ie={in_progress:`text-foreground`,pending:`text-foreground`,completed:`text-muted-foreground line-through`,cancelled:`text-muted-foreground line-through`},ae={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},N=e=>{let t=(0,x.c)(26),{todo:n,isActive:r,activeRef:i}=e,{t:s}=a(),c=oe.has(n.status)?n.status:`pending`,p=ae[c],m;t[0]!==s||t[1]!==p?(m=s(p),t[0]=s,t[1]=p,t[2]=m):m=t[2];let h=m,g;t[3]===c?g=t[4]:(g=c===`in_progress`?(0,S.jsx)(l,{name:`record-circle`,className:`h-3.5 w-3.5 text-[var(--status-info)]`,"aria-hidden":`true`}):c===`completed`?(0,S.jsx)(l,{name:`checkbox-circle`,className:`h-3.5 w-3.5 text-[var(--status-success)]`,"aria-hidden":`true`}):(0,S.jsx)(l,{name:`time`,className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":`true`}),t[3]=c,t[4]=g);let _=g,v=r?`step`:void 0,y=r&&`bg-[var(--surface-muted)] before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-[var(--status-info)]`,b;t[5]===y?b=t[6]:(b=o(`group relative grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] items-start gap-2.5`,j,y),t[5]=y,t[6]=b);let C;t[7]!==_||t[8]!==h?(C=(0,S.jsx)(u,{asChild:!0,children:(0,S.jsx)(`span`,{className:`flex size-4 items-center justify-center`,"aria-label":h,children:_})}),t[7]=_,t[8]=h,t[9]=C):C=t[9];let w;t[10]===h?w=t[11]:(w=(0,S.jsx)(d,{side:`left`,sideOffset:6,children:h}),t[10]=h,t[11]=w);let T;t[12]!==C||t[13]!==w?(T=(0,S.jsxs)(f,{children:[C,w]}),t[12]=C,t[13]=w,t[14]=T):T=t[14];let E=ie[c],D;t[15]===E?D=t[16]:(D=o(`block whitespace-normal break-words`,E),t[15]=E,t[16]=D);let O;t[17]!==D||t[18]!==n.content?(O=(0,S.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,S.jsx)(`span`,{className:D,children:n.content})}),t[17]=D,t[18]=n.content,t[19]=O):O=t[19];let k;return t[20]!==i||t[21]!==O||t[22]!==v||t[23]!==b||t[24]!==T?(k=(0,S.jsxs)(`li`,{ref:i,"aria-current":v,className:b,children:[T,O]}),t[20]=i,t[21]=O,t[22]=v,t[23]=b,t[24]=T,t[25]=k):k=t[25],k},oe=new Set([`in_progress`,`pending`,`completed`,`cancelled`]),P=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),F=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,I=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=F(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},L=e=>`<pre><code>${P(e)}</code></pre>`,R=e=>{let t=(0,x.c)(21),{code:n,language:r,className:i,style:a,codeStyle:s,wrap:l}=e,u=l!==void 0&&l,{currentTheme:d}=c(),f=b.useRef(null),p;t[0]===d?p=t[1]:(p=_(d),t[0]=d,t[1]=p);let m=p,h,g;t[2]!==n||t[3]!==s||t[4]!==u?(h=()=>{let e=f.current;e&&(e.innerHTML=L(n),I(e,u,s))},g=[n,u,s],t[2]=n,t[3]=s,t[4]=u,t[5]=h,t[6]=g):(h=t[5],g=t[6]),b.useLayoutEffect(h,g);let v,C;t[7]!==n||t[8]!==s||t[9]!==r||t[10]!==u?(v=()=>{let e=f.current;if(!e)return;let t=!0,i=new AbortController;return y(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,I(e,u,s))}),()=>{t=!1,i.abort()}},C=[n,r,u,s],t[7]=n,t[8]=s,t[9]=r,t[10]=u,t[11]=v,t[12]=C):(v=t[11],C=t[12]),b.useEffect(v,C);let w;t[13]===i?w=t[14]:(w=o(`typography-code`,i),t[13]=i,t[14]=w);let T=m,E;t[15]!==a||t[16]!==T?(E={...T,...a},t[15]=a,t[16]=T,t[17]=E):E=t[17];let D;return t[18]!==w||t[19]!==E?(D=(0,S.jsx)(`div`,{ref:f,className:w,style:E}),t[18]=w,t[19]=E,t[20]=D):D=t[20],D},z=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},B=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},V=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,H=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,U=(e,t)=>!e||typeof e!=`object`?String(e):h(e,t||``),W=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},G=e=>{if(!e||typeof e!=`object`)return;let t=W(e.patch)??W(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=W(e.patch)??W(e.diff);if(t)return t}},K=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},q=(e,t,n)=>{let r=z(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&V(r)&&(r=H(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=G(n);if(e)return e}return r},se=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`),r=e=>/\(\s*File has more lines\..*offset.*\)/i.test(e.trim());return{type:t,lines:n.map(e=>{let n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);if(t!==`directory`){let t=e.match(/^(\d+):\s?(.*)$/);if(t){let e=t[2],n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);return{lineNumber:i?null:Number(t[1]),text:e,isInfo:i}}}return{lineNumber:null,text:e,isInfo:i}}).filter((e,t,n)=>{if(e.text.trim().length>0)return!0;let r=n[t-1],i=n[t+1],a=!!(r?.isInfo||i?.isInfo),o=e.lineNumber!==null;return!(a&&o)})}},ce=(e,t)=>{try{let n=e.trim().split(`
|
|
4
4
|
`).filter(Boolean);if(n.length===0)return null;let i=[];return n.forEach(e=>{let t=e.match(/^(\s*)(.+)$/);if(t){let[,e,n]=t,r=Math.floor(e.length/2),a=!n.endsWith(`/`);i.push({name:n.replace(/\/$/,``),depth:r,isFile:a})}}),(0,S.jsx)(`div`,{className:o(`w-full min-w-0 font-mono space-y-0.5`,t?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/30`),style:r.tool.popup,children:i.map((e,t)=>(0,S.jsx)(`div`,{className:`min-w-0`,style:{paddingLeft:`${e.depth*20}px`},children:e.isFile?(0,S.jsx)(`span`,{className:`text-foreground/90 block truncate`,children:e.name}):(0,S.jsxs)(`span`,{className:`font-semibold text-foreground block truncate`,children:[e.name,`/`]})},t))})}catch{return null}},le={backgroundColor:`var(--status-info)`,opacity:.6},ue=(e,t,n)=>{try{let i=e.trim().split(`
|
package/dist/index.html
CHANGED
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
opacity: 0.72;
|
|
561
561
|
}
|
|
562
562
|
</style>
|
|
563
|
-
<script type="module" crossorigin src="/assets/main-
|
|
563
|
+
<script type="module" crossorigin src="/assets/main-CqoNDCJj.js"></script>
|
|
564
564
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
565
565
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-ef9W7A43.js">
|
|
566
566
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-WzPG6NMR.js">
|
|
@@ -593,11 +593,11 @@
|
|
|
593
593
|
<link rel="modulepreload" crossorigin href="/assets/terminalApi-B_oHorrS.js">
|
|
594
594
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-J_Vcm3tT.js">
|
|
595
595
|
<link rel="modulepreload" crossorigin href="/assets/platform-kv0OsX45.js">
|
|
596
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
597
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
598
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
599
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
600
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
596
|
+
<link rel="modulepreload" crossorigin href="/assets/types-Cjsqoaj2.js">
|
|
597
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-CrBccKXY.js">
|
|
598
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-CbLOUYef.js">
|
|
599
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-DO1kqEsE.js">
|
|
600
|
+
<link rel="stylesheet" crossorigin href="/assets/src-hVfg6BZK.css">
|
|
601
601
|
</head>
|
|
602
602
|
<body class="h-full bg-background text-foreground">
|
|
603
603
|
<!-- Keep the startup layer outside #root. React replaces every child of
|
package/dist/mini-chat.html
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
.dark #initial-loading img { filter: invert(1); }
|
|
78
78
|
</style>
|
|
79
79
|
|
|
80
|
-
<script type="module" crossorigin src="/assets/miniChat-
|
|
80
|
+
<script type="module" crossorigin src="/assets/miniChat-DaI0JRe4.js"></script>
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-ef9W7A43.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-WzPG6NMR.js">
|
|
@@ -110,11 +110,11 @@
|
|
|
110
110
|
<link rel="modulepreload" crossorigin href="/assets/terminalApi-B_oHorrS.js">
|
|
111
111
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-J_Vcm3tT.js">
|
|
112
112
|
<link rel="modulepreload" crossorigin href="/assets/platform-kv0OsX45.js">
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
114
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
116
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
117
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
113
|
+
<link rel="modulepreload" crossorigin href="/assets/types-Cjsqoaj2.js">
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-CrBccKXY.js">
|
|
115
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-CbLOUYef.js">
|
|
116
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-DO1kqEsE.js">
|
|
117
|
+
<link rel="stylesheet" crossorigin href="/assets/src-hVfg6BZK.css">
|
|
118
118
|
</head>
|
|
119
119
|
<body class="h-full bg-background text-foreground">
|
|
120
120
|
<div id="root" class="h-full">
|
package/dist/mobile.html
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
66
|
<style>.dark #mobile-startup-logo img { filter: invert(1); }</style>
|
|
67
|
-
<script type="module" crossorigin src="/assets/mobile-
|
|
67
|
+
<script type="module" crossorigin src="/assets/mobile-BMlE5RBZ.js"></script>
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/runtime-auth-ef9W7A43.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="/assets/runtime-switch-WzPG6NMR.js">
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
<link rel="modulepreload" crossorigin href="/assets/terminalApi-B_oHorrS.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="/assets/runtime-file-download-J_Vcm3tT.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="/assets/platform-kv0OsX45.js">
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/types-
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/native-config-
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
104
|
-
<link rel="stylesheet" crossorigin href="/assets/src-
|
|
100
|
+
<link rel="modulepreload" crossorigin href="/assets/types-Cjsqoaj2.js">
|
|
101
|
+
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-CrBccKXY.js">
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/native-config-CbLOUYef.js">
|
|
103
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-DO1kqEsE.js">
|
|
104
|
+
<link rel="stylesheet" crossorigin href="/assets/src-hVfg6BZK.css">
|
|
105
105
|
</head>
|
|
106
106
|
<body class="h-full bg-background text-foreground">
|
|
107
107
|
<div id="root" class="h-full">
|
package/package.json
CHANGED
|
@@ -47,6 +47,13 @@ call Anthropic/OpenAI/plugin SDKs, and does not use the `openai` npm package.
|
|
|
47
47
|
text is prepended into `prompt`.
|
|
48
48
|
4. Always `session.remove` in `finally` (interrupt first on abort/timeout).
|
|
49
49
|
|
|
50
|
+
Empty text responses are retried at most twice, after 500ms and 1000ms, in the
|
|
51
|
+
same throwaway session with the same prompt. All attempts and backoff share the
|
|
52
|
+
original generation deadline (90s by default); cancellation interrupts backoff
|
|
53
|
+
immediately. Only empty responses are retried, not thrown upstream errors or
|
|
54
|
+
attachment/tool execution. Exhaustion preserves the explicit upstream error.
|
|
55
|
+
Application tools execute outside this text-only call and are not replayed.
|
|
56
|
+
|
|
50
57
|
`generate.text` (sessionless) is not used: session-scoped providers such as
|
|
51
58
|
OpenCode Go reject calls without a session (`x-opencode-session`).
|
|
52
59
|
`onTextDelta` is skipped honestly (no fake typewriter).
|
|
@@ -7,6 +7,7 @@ const TEXT_AGENT_NAME = 'yuri-text';
|
|
|
7
7
|
const GENERATE_TIMEOUT_MS = 90_000;
|
|
8
8
|
const AGENT_READY_WAIT_MS = 5_000;
|
|
9
9
|
const AGENT_READY_POLL_MS = 250;
|
|
10
|
+
const EMPTY_TEXT_RETRY_DELAYS_MS = [500, 1_000];
|
|
10
11
|
/** Single attachment payload cap (decoded bytes). Composer UI allows larger drafts; gateway enforces this. */
|
|
11
12
|
export const MAX_ATTACHMENT_BYTES = 20 * 1024 * 1024;
|
|
12
13
|
const MAX_INLINE_FILE_CHARS = 100_000;
|
|
@@ -485,20 +486,39 @@ async function withThrowawaySession({
|
|
|
485
486
|
*/
|
|
486
487
|
async function generateViaSessionGenerate({ client, prompt, signal, ...sessionOptions }) {
|
|
487
488
|
return withThrowawaySession({ client, signal, ...sessionOptions }, async (sessionID) => {
|
|
488
|
-
let
|
|
489
|
-
|
|
490
|
-
result
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
489
|
+
for (let attempt = 0; ; attempt += 1) {
|
|
490
|
+
signal?.throwIfAborted();
|
|
491
|
+
let result;
|
|
492
|
+
try {
|
|
493
|
+
result = await client.session.generate({ sessionID, prompt }, { signal });
|
|
494
|
+
} catch (error) {
|
|
495
|
+
rethrowIfAborted(error, signal);
|
|
496
|
+
failGenerate(clientErrorMessage(error, 'OpenCode session.generate failed'));
|
|
497
|
+
}
|
|
498
|
+
signal?.throwIfAborted();
|
|
499
|
+
const text = typeof result?.text === 'string'
|
|
500
|
+
? result.text.trim()
|
|
501
|
+
: typeof result?.data?.text === 'string'
|
|
502
|
+
? result.data.text.trim()
|
|
503
|
+
: '';
|
|
504
|
+
if (text) return { text, source: 'session.generate' };
|
|
505
|
+
const delayMs = EMPTY_TEXT_RETRY_DELAYS_MS[attempt];
|
|
506
|
+
if (delayMs === undefined) failGenerate('OpenCode session.generate returned no text');
|
|
507
|
+
// This call produces text only; retrying it cannot replay application tools.
|
|
508
|
+
await new Promise((resolve, reject) => {
|
|
509
|
+
const onAbort = () => {
|
|
510
|
+
clearTimeout(timer);
|
|
511
|
+
signal.removeEventListener('abort', onAbort);
|
|
512
|
+
reject(signal.reason);
|
|
513
|
+
};
|
|
514
|
+
const timer = setTimeout(() => {
|
|
515
|
+
signal?.removeEventListener('abort', onAbort);
|
|
516
|
+
resolve();
|
|
517
|
+
}, delayMs);
|
|
518
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
519
|
+
if (signal?.aborted) onAbort();
|
|
520
|
+
});
|
|
494
521
|
}
|
|
495
|
-
const text = typeof result?.text === 'string'
|
|
496
|
-
? result.text.trim()
|
|
497
|
-
: typeof result?.data?.text === 'string'
|
|
498
|
-
? result.data.text.trim()
|
|
499
|
-
: '';
|
|
500
|
-
if (!text) failGenerate('OpenCode session.generate returned no text');
|
|
501
|
-
return { text, source: 'session.generate' };
|
|
502
522
|
});
|
|
503
523
|
}
|
|
504
524
|
|
|
@@ -259,7 +259,7 @@ describe('generateOpenCodeText — text path', () => {
|
|
|
259
259
|
})
|
|
260
260
|
|
|
261
261
|
it('surfaces session.generate errors and still removes the session', async () => {
|
|
262
|
-
const { client, remove } = textSessionClient({
|
|
262
|
+
const { client, remove, generate } = textSessionClient({
|
|
263
263
|
generate: vi.fn(async () => { throw new Error('Request is missing x-opencode-session') }),
|
|
264
264
|
})
|
|
265
265
|
await expect(generateOpenCodeText({
|
|
@@ -271,11 +271,86 @@ describe('generateOpenCodeText — text path', () => {
|
|
|
271
271
|
clientFactory: () => client,
|
|
272
272
|
ensureTempDirectory: async () => '/tmp/yuri-text',
|
|
273
273
|
})).rejects.toMatchObject({ code: 'upstream_error', message: 'Request is missing x-opencode-session' })
|
|
274
|
+
expect(generate).toHaveBeenCalledTimes(1)
|
|
274
275
|
expect(remove).toHaveBeenCalledWith({ sessionID: 'ses_text' })
|
|
275
276
|
})
|
|
276
277
|
|
|
278
|
+
it('retries empty text with backoff in the same session and returns only the successful reply', async () => {
|
|
279
|
+
vi.useFakeTimers()
|
|
280
|
+
try {
|
|
281
|
+
const generate = vi.fn()
|
|
282
|
+
.mockResolvedValueOnce({ text: ' ' })
|
|
283
|
+
.mockResolvedValueOnce({ data: { text: '' } })
|
|
284
|
+
.mockResolvedValueOnce({ text: 'updated' })
|
|
285
|
+
const { client, create, remove, prompt } = textSessionClient({ generate })
|
|
286
|
+
const result = generateOpenCodeText({
|
|
287
|
+
buildOpenCodeUrl: () => 'http://127.0.0.1:4096',
|
|
288
|
+
getOpenCodeAuthHeaders: () => ({}),
|
|
289
|
+
providerID: 'opencode-go',
|
|
290
|
+
modelID: 'deepseek-v4-flash',
|
|
291
|
+
messages: [{ role: 'user', content: 'update schedule' }],
|
|
292
|
+
clientFactory: () => client,
|
|
293
|
+
ensureTempDirectory: async () => '/tmp/yuri-text',
|
|
294
|
+
})
|
|
295
|
+
const outcome = result.then(value => ({ value }), error => ({ error }))
|
|
296
|
+
await vi.advanceTimersByTimeAsync(499)
|
|
297
|
+
expect(generate).toHaveBeenCalledTimes(1)
|
|
298
|
+
await vi.advanceTimersByTimeAsync(1)
|
|
299
|
+
expect(generate).toHaveBeenCalledTimes(2)
|
|
300
|
+
await vi.advanceTimersByTimeAsync(999)
|
|
301
|
+
expect(generate).toHaveBeenCalledTimes(2)
|
|
302
|
+
await vi.advanceTimersByTimeAsync(1)
|
|
303
|
+
expect(await outcome).toMatchObject({ value: { text: 'updated' } })
|
|
304
|
+
expect(generate).toHaveBeenCalledTimes(3)
|
|
305
|
+
expect(generate.mock.calls[1]).toEqual(generate.mock.calls[0])
|
|
306
|
+
expect(generate.mock.calls[2]).toEqual(generate.mock.calls[0])
|
|
307
|
+
expect(create).toHaveBeenCalledTimes(1)
|
|
308
|
+
expect(remove).toHaveBeenCalledTimes(1)
|
|
309
|
+
expect(prompt).not.toHaveBeenCalled()
|
|
310
|
+
expect(vi.getTimerCount()).toBe(0)
|
|
311
|
+
} finally {
|
|
312
|
+
vi.useRealTimers()
|
|
313
|
+
}
|
|
314
|
+
})
|
|
315
|
+
|
|
316
|
+
it.each(['cancel', 'deadline'])('stops empty-text backoff on %s and cleans up', async (mode) => {
|
|
317
|
+
vi.useFakeTimers()
|
|
318
|
+
try {
|
|
319
|
+
const controller = new AbortController()
|
|
320
|
+
const { client, generate, remove, interrupt } = textSessionClient({
|
|
321
|
+
generate: vi.fn(async () => ({ text: '' })),
|
|
322
|
+
})
|
|
323
|
+
const result = generateOpenCodeText({
|
|
324
|
+
buildOpenCodeUrl: () => 'http://127.0.0.1:4096',
|
|
325
|
+
getOpenCodeAuthHeaders: () => ({}),
|
|
326
|
+
providerID: 'opencode-go',
|
|
327
|
+
modelID: 'deepseek-v4-flash',
|
|
328
|
+
messages: [{ role: 'user', content: 'hi' }],
|
|
329
|
+
clientFactory: () => client,
|
|
330
|
+
ensureTempDirectory: async () => '/tmp/yuri-text',
|
|
331
|
+
signal: controller.signal,
|
|
332
|
+
timeoutMs: 750,
|
|
333
|
+
})
|
|
334
|
+
const outcome = result.then(value => ({ value }), error => ({ error }))
|
|
335
|
+
await vi.advanceTimersByTimeAsync(500)
|
|
336
|
+
expect(generate).toHaveBeenCalledTimes(2)
|
|
337
|
+
if (mode === 'cancel') controller.abort()
|
|
338
|
+
else await vi.advanceTimersByTimeAsync(250)
|
|
339
|
+
expect(await outcome).toMatchObject({ error: mode === 'cancel'
|
|
340
|
+
? { name: 'AbortError' }
|
|
341
|
+
: { message: 'OpenCode LLM generate timed out after 750ms' } })
|
|
342
|
+
await vi.advanceTimersByTimeAsync(2_000)
|
|
343
|
+
expect(generate).toHaveBeenCalledTimes(2)
|
|
344
|
+
expect(interrupt).toHaveBeenCalledExactlyOnceWith({ sessionID: 'ses_text', continue: false })
|
|
345
|
+
expect(remove).toHaveBeenCalledTimes(1)
|
|
346
|
+
expect(vi.getTimerCount()).toBe(0)
|
|
347
|
+
} finally {
|
|
348
|
+
vi.useRealTimers()
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
|
|
277
352
|
it('rejects an empty session.generate reply instead of returning blank success', async () => {
|
|
278
|
-
const { client } = textSessionClient({ generate: vi.fn(async () => ({ text: ' ' })) })
|
|
353
|
+
const { client, generate, remove } = textSessionClient({ generate: vi.fn(async () => ({ text: ' ' })) })
|
|
279
354
|
await expect(generateOpenCodeText({
|
|
280
355
|
buildOpenCodeUrl: () => 'http://127.0.0.1:4096',
|
|
281
356
|
getOpenCodeAuthHeaders: () => ({}),
|
|
@@ -285,6 +360,8 @@ describe('generateOpenCodeText — text path', () => {
|
|
|
285
360
|
clientFactory: () => client,
|
|
286
361
|
ensureTempDirectory: async () => '/tmp/yuri-text',
|
|
287
362
|
})).rejects.toMatchObject({ message: 'OpenCode session.generate returned no text' })
|
|
363
|
+
expect(generate).toHaveBeenCalledTimes(3)
|
|
364
|
+
expect(remove).toHaveBeenCalledTimes(1)
|
|
288
365
|
})
|
|
289
366
|
|
|
290
367
|
it('does not invent deltas on the session.generate path', async () => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from"./vendor-base-ui-CdzJ6My_.js";import{n as r}from"./vendor-react-BP2cRVqX.js";import{r as i}from"./vendor-sonner-ZS8XIOVl.js";import{d as a,t as o}from"./button-CT7WL0lp.js";import{a as s,n as c,o as l,t as u}from"./dialog-BpsbJk8Y.js";import{r as d}from"./device-BDrEmxBm.js";import{t as f}from"./MobileResizableSheet-CuRgnS-k.js";import{t as p}from"./scheduling-DCTDfxV-.js";var m=r(),h=e(t(),1),g=n();function _(e){let t=(0,m.c)(40),{pending:n,error:r,inventory:_}=e,{t:x}=a(),{isMobile:S}=d(),[C,w]=h.useState(!1),[T,E]=h.useState(!1),D,O;t[0]!==C||t[1]!==n?(D=()=>{if(!n||C){E(!1);return}let e=new AbortController;return p(e.signal).then(()=>{e.signal.aborted||E(!0)}).catch(b),()=>e.abort()},O=[n,C],t[0]=C,t[1]=n,t[2]=D,t[3]=O):(D=t[2],O=t[3]),h.useEffect(D,O);let k;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(k=new Set,t[4]=k):k=t[4];let A=h.useRef(k),j,M;t[5]!==r||t[6]!==_||t[7]!==x?(j=()=>{let e=[r,..._.map(y)].filter(v);for(let t of e)A.current.has(t)||i.error(x(`guiPlugins.failed`),{description:t});A.current=new Set(e)},M=[r,_,x],t[5]=r,t[6]=_,t[7]=x,t[8]=j,t[9]=M):(j=t[8],M=t[9]),h.useEffect(j,M);let N=n&&T&&!C,P;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{e||w(!0)},t[10]=P):P=t[10];let F=P,I;t[11]===x?I=t[12]:(I=x(`guiPlugins.loadingNecessary`),t[11]=x,t[12]=I);let L=I,R;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>w(!0),t[13]=R):R=t[13];let z;t[14]===x?z=t[15]:(z=x(`guiPlugins.continueBackground`),t[14]=x,t[15]=z);let B;t[16]===z?B=t[17]:(B=(0,g.jsx)(o,{onClick:R,children:z}),t[16]=z,t[17]=B);let V=B;if(S){let e;t[18]===x?e=t[19]:(e=x(`guiPlugins.close`),t[18]=x,t[19]=e);let n;t[20]===x?n=t[21]:(n=x(`guiPlugins.resize`),t[20]=x,t[21]=n);let r;t[22]===V?r=t[23]:(r=(0,g.jsx)(`div`,{className:`flex justify-end p-4`,children:V}),t[22]=V,t[23]=r);let i;return t[24]!==N||t[25]!==e||t[26]!==n||t[27]!==r||t[28]!==L?(i=(0,g.jsx)(f,{id:`gui-plugin-loading`,open:N,onOpenChange:F,fitContent:!0,title:L,ariaLabel:L,closeAriaLabel:e,resizeAriaLabel:n,children:r}),t[24]=N,t[25]=e,t[26]=n,t[27]=r,t[28]=L,t[29]=i):i=t[29],i}let H;t[30]===L?H=t[31]:(H=(0,g.jsx)(s,{children:(0,g.jsx)(l,{children:L})}),t[30]=L,t[31]=H);let U;t[32]===V?U=t[33]:(U=(0,g.jsx)(`div`,{className:`flex justify-end`,children:V}),t[32]=V,t[33]=U);let W;t[34]!==H||t[35]!==U?(W=(0,g.jsxs)(c,{className:`max-w-sm`,"aria-describedby":void 0,children:[H,U]}),t[34]=H,t[35]=U,t[36]=W):W=t[36];let G;return t[37]!==N||t[38]!==W?(G=(0,g.jsx)(u,{open:N,onOpenChange:F,children:W}),t[37]=N,t[38]=W,t[39]=G):G=t[39],G}function v(e){return!!e}function y(e){return e.error?`${e.id}: ${e.error}`:null}function b(){}export{_ as GuiPluginLoadingNotice};
|