litepaseo 0.9.0 → 0.9.2

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +25 -8
  3. package/dist/server/cli.mjs +8 -2
  4. package/dist/server/{worker-CmsAgviJ.mjs → worker-Cq2Lf-Zo.mjs} +169 -21
  5. package/dist/web/assets/{ChangesPanel-DdtJswMt.js → ChangesPanel-BXtRMTqp.js} +1 -1
  6. package/dist/web/assets/ChangesPanel-BXtRMTqp.js.br +0 -0
  7. package/dist/web/assets/ChangesPanel-BXtRMTqp.js.gz +0 -0
  8. package/dist/web/assets/{CodeBlockNode-BOeBLCjf.js → CodeBlockNode-B9X7WZtj.js} +1 -1
  9. package/dist/web/assets/CodeBlockNode-B9X7WZtj.js.br +0 -0
  10. package/dist/web/assets/CodeBlockNode-B9X7WZtj.js.gz +0 -0
  11. package/dist/web/assets/{ConversationSearch-BXfGhrtx.js → ConversationSearch-DgRoYzWP.js} +1 -1
  12. package/dist/web/assets/ConversationSearch-DgRoYzWP.js.br +0 -0
  13. package/dist/web/assets/ConversationSearch-DgRoYzWP.js.gz +0 -0
  14. package/dist/web/assets/{FileViewer-C93qu9YH.js → FileViewer-B-N8t-A2.js} +1 -1
  15. package/dist/web/assets/FileViewer-B-N8t-A2.js.br +0 -0
  16. package/dist/web/assets/FileViewer-B-N8t-A2.js.gz +0 -0
  17. package/dist/web/assets/{FilesPanel-DyqtBDO_.js → FilesPanel-By85fwCy.js} +1 -1
  18. package/dist/web/assets/FilesPanel-By85fwCy.js.br +0 -0
  19. package/dist/web/assets/FilesPanel-By85fwCy.js.gz +0 -0
  20. package/dist/web/assets/{HostSettings-BCsvyF_3.js → HostSettings-Bzv1FBbL.js} +1 -1
  21. package/dist/web/assets/HostSettings-Bzv1FBbL.js.br +0 -0
  22. package/dist/web/assets/HostSettings-Bzv1FBbL.js.gz +0 -0
  23. package/dist/web/assets/{MarkdownMessage-CejBvgRc.js → MarkdownMessage-DbSS5ULZ.js} +5 -5
  24. package/dist/web/assets/MarkdownMessage-DbSS5ULZ.js.br +0 -0
  25. package/dist/web/assets/MarkdownMessage-DbSS5ULZ.js.gz +0 -0
  26. package/dist/web/assets/{PreCodeBlock-BBTzkaAH.js → PreCodeBlock-B-6jTSFa.js} +1 -1
  27. package/dist/web/assets/{PreCodeBlock.vue_vue_type_style_index_0_lang-4BQzC8nU.js → PreCodeBlock.vue_vue_type_style_index_0_lang-CunCuyah.js} +1 -1
  28. package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-CunCuyah.js.br +0 -0
  29. package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-CunCuyah.js.gz +0 -0
  30. package/dist/web/assets/{SubagentsPanel-D1bEm5QC.js → SubagentsPanel-CdZce3Xr.js} +1 -1
  31. package/dist/web/assets/SubagentsPanel-CdZce3Xr.js.br +0 -0
  32. package/dist/web/assets/SubagentsPanel-CdZce3Xr.js.gz +0 -0
  33. package/dist/web/assets/{TerminalPanel-wazWBZjN.js → TerminalPanel-iBK2wpI0.js} +1 -1
  34. package/dist/web/assets/TerminalPanel-iBK2wpI0.js.br +0 -0
  35. package/dist/web/assets/TerminalPanel-iBK2wpI0.js.gz +0 -0
  36. package/dist/web/assets/{Tooltip-CrG6tFax.js → Tooltip-DLPAOJ1c.js} +1 -1
  37. package/dist/web/assets/Tooltip-DLPAOJ1c.js.br +0 -0
  38. package/dist/web/assets/Tooltip-DLPAOJ1c.js.gz +0 -0
  39. package/dist/web/assets/index-DV5BdS_U.js +35 -0
  40. package/dist/web/assets/index-DV5BdS_U.js.br +0 -0
  41. package/dist/web/assets/index-DV5BdS_U.js.gz +0 -0
  42. package/dist/web/assets/{index10-C9Xw5wOS.js → index10-DgcnbLc5.js} +1 -1
  43. package/dist/web/assets/index10-DgcnbLc5.js.br +0 -0
  44. package/dist/web/assets/index10-DgcnbLc5.js.gz +0 -0
  45. package/dist/web/assets/index3-BdNVIlGK.js +1 -0
  46. package/dist/web/assets/index4-DnuPr-1i.js +1 -0
  47. package/dist/web/assets/{index5-Cxc_iCM3.js → index5-Bp-1tRh4.js} +1 -1
  48. package/dist/web/assets/index5-Bp-1tRh4.js.br +0 -0
  49. package/dist/web/assets/index5-Bp-1tRh4.js.gz +0 -0
  50. package/dist/web/assets/{index6-DsTT-iog.js → index6-B8l4-gzx.js} +1 -1
  51. package/dist/web/assets/index6-B8l4-gzx.js.br +0 -0
  52. package/dist/web/assets/index6-B8l4-gzx.js.gz +0 -0
  53. package/dist/web/assets/{index7-Bgw61c0t.js → index7-CIxLf3CP.js} +1 -1
  54. package/dist/web/assets/index7-CIxLf3CP.js.br +0 -0
  55. package/dist/web/assets/index7-CIxLf3CP.js.gz +0 -0
  56. package/dist/web/assets/{index8-DLEM8iM5.js → index8-CnHhIOzI.js} +1 -1
  57. package/dist/web/assets/index8-CnHhIOzI.js.br +0 -0
  58. package/dist/web/assets/index8-CnHhIOzI.js.gz +0 -0
  59. package/dist/web/assets/{index9-CUy1AFI-.js → index9-B_ZyF9x1.js} +1 -1
  60. package/dist/web/assets/index9-B_ZyF9x1.js.br +0 -0
  61. package/dist/web/assets/index9-B_ZyF9x1.js.gz +0 -0
  62. package/dist/web/index.html +1 -1
  63. package/dist/web/index.html.br +0 -0
  64. package/dist/web/index.html.gz +0 -0
  65. package/package.json +1 -1
  66. package/dist/web/assets/ChangesPanel-DdtJswMt.js.br +0 -0
  67. package/dist/web/assets/ChangesPanel-DdtJswMt.js.gz +0 -0
  68. package/dist/web/assets/CodeBlockNode-BOeBLCjf.js.br +0 -0
  69. package/dist/web/assets/CodeBlockNode-BOeBLCjf.js.gz +0 -0
  70. package/dist/web/assets/ConversationSearch-BXfGhrtx.js.br +0 -0
  71. package/dist/web/assets/ConversationSearch-BXfGhrtx.js.gz +0 -0
  72. package/dist/web/assets/FileViewer-C93qu9YH.js.br +0 -0
  73. package/dist/web/assets/FileViewer-C93qu9YH.js.gz +0 -0
  74. package/dist/web/assets/FilesPanel-DyqtBDO_.js.br +0 -0
  75. package/dist/web/assets/FilesPanel-DyqtBDO_.js.gz +0 -0
  76. package/dist/web/assets/HostSettings-BCsvyF_3.js.br +0 -0
  77. package/dist/web/assets/HostSettings-BCsvyF_3.js.gz +0 -0
  78. package/dist/web/assets/MarkdownMessage-CejBvgRc.js.br +0 -0
  79. package/dist/web/assets/MarkdownMessage-CejBvgRc.js.gz +0 -0
  80. package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-4BQzC8nU.js.br +0 -0
  81. package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-4BQzC8nU.js.gz +0 -0
  82. package/dist/web/assets/SubagentsPanel-D1bEm5QC.js.br +0 -0
  83. package/dist/web/assets/SubagentsPanel-D1bEm5QC.js.gz +0 -0
  84. package/dist/web/assets/TerminalPanel-wazWBZjN.js.br +0 -0
  85. package/dist/web/assets/TerminalPanel-wazWBZjN.js.gz +0 -0
  86. package/dist/web/assets/Tooltip-CrG6tFax.js.br +0 -0
  87. package/dist/web/assets/Tooltip-CrG6tFax.js.gz +0 -0
  88. package/dist/web/assets/index-Cmpdc3EH.js +0 -35
  89. package/dist/web/assets/index-Cmpdc3EH.js.br +0 -0
  90. package/dist/web/assets/index-Cmpdc3EH.js.gz +0 -0
  91. package/dist/web/assets/index10-C9Xw5wOS.js.br +0 -0
  92. package/dist/web/assets/index10-C9Xw5wOS.js.gz +0 -0
  93. package/dist/web/assets/index3-dduGUVTy.js +0 -1
  94. package/dist/web/assets/index4-qdeznE4u.js +0 -1
  95. package/dist/web/assets/index5-Cxc_iCM3.js.br +0 -0
  96. package/dist/web/assets/index5-Cxc_iCM3.js.gz +0 -0
  97. package/dist/web/assets/index6-DsTT-iog.js.br +0 -0
  98. package/dist/web/assets/index6-DsTT-iog.js.gz +0 -0
  99. package/dist/web/assets/index7-Bgw61c0t.js.br +0 -0
  100. package/dist/web/assets/index7-Bgw61c0t.js.gz +0 -0
  101. package/dist/web/assets/index8-DLEM8iM5.js.br +0 -0
  102. package/dist/web/assets/index8-DLEM8iM5.js.gz +0 -0
  103. package/dist/web/assets/index9-CUy1AFI-.js.br +0 -0
  104. package/dist/web/assets/index9-CUy1AFI-.js.gz +0 -0
@@ -1,2 +1,2 @@
1
- import{C as e,N as t,R as n,S as r,T as i,W as a,_ as o,ct as s,f as ee,g as c,h as l,it as u,j as d,q as f,st as p,tt as m,v as h,y as g}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{a as _,d as te,i as v,l as y,m as b,p as x,u as S}from"./index-Cmpdc3EH.js";import{n as C,t as ne}from"./highlight-BnTrj1LT.js";var re={class:`file-view`},ie={class:`file-bar`},ae=[`title`],w={key:0,class:`file-bar-meta`},T=[`title`],E=[`title`],D={key:0,class:`timeline-empty`},O={key:1,class:`file-error`},oe=[`src`,`alt`],se={key:0,class:`file-link-notice`,role:`status`},ce={key:2,class:`file-text wrap`},le={class:`code-wrap`},ue={class:`code-gutter`,"aria-hidden":`true`},de=[`innerHTML`],k={key:2,class:`file-text`},A={key:0,class:`file-note`},j={key:5,class:`file-note`},M=x(i({__name:`FileViewer`,props:{hostId:{},cwd:{},path:{},api:{type:Function},session:{},jump:{},view:{},viewKey:{}},emits:[`open`,`reveal`,`view`],setup(i,{emit:x}){let M=i,N=x,P=m(null),F=m(``),I=m(!1),L=m(M.view?.rendered??!0),R=l(()=>`/hosts/${encodeURIComponent(M.hostId)}/fs`),z=l(()=>`cwd=${encodeURIComponent(M.cwd)}&path=${encodeURIComponent(M.path)}`),B=l(()=>/\.(png|jpe?g|webp|gif|bmp|avif)$/i.test(M.path)),V=l(()=>/\.(md|markdown|mdx)$/i.test(M.path)&&P.value?.text!==void 0);async function H(){I.value=!0,F.value=``;try{P.value=await M.api(`${R.value}/read?${z.value}`),V.value&&v()}catch(e){F.value=e.message}finally{I.value=!1}}f(()=>[M.hostId,M.cwd,M.path],H,{immediate:!0});let U=l(()=>M.path.startsWith(`/`)||M.path.startsWith(`~`)?M.path:`${M.cwd.replace(/\/$/,``)}/${M.path}`),fe=l(()=>{let e=P.value?.text??``;if(!M.session)return e;let t=U.value.slice(0,U.value.lastIndexOf(`/`))||`/`,n={session:M.session,cwd:t,workspace:M.cwd};return te(S(e,{...n,rawBase:`/api${R.value}`}),n)}),W=m(``),G;function K(e){W.value=e,clearTimeout(G),G=setTimeout(()=>W.value=``,4e3)}function pe(e){let t=e.target?.closest?.(`a`),n=y(t?.getAttribute(`href`));if(n){if(n.kind===`copy`){e.preventDefault();let t=()=>K(`Can't open this here. Path: ${n.path}`);navigator.clipboard?navigator.clipboard.writeText(n.path).then(()=>K(`Copied path: ${n.path}`),t):t()}else e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),n.kind===`reveal`?N(`reveal`,n.path):N(`open`,n.path,n))}}let q=m(null),J=m(M.view?.mark??null),Y=M.view?.jumped??0,X=!1,Z=l(()=>{let e=P.value?.text??``,t=1;for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&t++;return t});f([()=>M.jump?.seq,()=>P.value],async()=>{if(!P.value)return;let e=M.jump;if(e&&e.seq!==Y&&P.value.text!==void 0){Y=e.seq,X=!0,/\.(md|markdown|mdx)$/i.test(M.path)&&(L.value=!1),await d();let t=q.value?.querySelector(`.code-gutter`);if(!q.value||!t)return;let n=getComputedStyle(t),r=parseFloat(n.lineHeight)||20,i=Math.min(e.line,Z.value),a=Math.min(Math.max(e.end??i,i),Z.value);J.value={top:parseFloat(n.paddingTop)+(i-1)*r,height:(a-i+1)*r},q.value.scrollTop=Math.max(0,J.value.top-q.value.clientHeight/3);return}if(X)return;X=!0;let t=M.view?.scrollTop??0;t&&(await d(),q.value&&(q.value.scrollTop=t),requestAnimationFrame(()=>{q.value&&q.value.scrollTop<t&&(q.value.scrollTop=t)}))},{immediate:!0}),t(()=>{M.viewKey&&N(`view`,M.viewKey,{rendered:L.value,scrollTop:q.value?.scrollTop??0,mark:J.value,jumped:Y})});let me=l(()=>`/api${R.value}/raw?${z.value}`),he=l(()=>Array.from({length:Z.value},(e,t)=>t+1).join(`
1
+ import{C as e,N as t,R as n,S as r,T as i,W as a,_ as o,ct as s,f as ee,g as c,h as l,it as u,j as d,q as f,st as p,tt as m,v as h,y as g}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{a as _,d as te,i as v,l as y,m as b,p as x,u as S}from"./index-DV5BdS_U.js";import{n as C,t as ne}from"./highlight-BnTrj1LT.js";var re={class:`file-view`},ie={class:`file-bar`},ae=[`title`],w={key:0,class:`file-bar-meta`},T=[`title`],E=[`title`],D={key:0,class:`timeline-empty`},O={key:1,class:`file-error`},oe=[`src`,`alt`],se={key:0,class:`file-link-notice`,role:`status`},ce={key:2,class:`file-text wrap`},le={class:`code-wrap`},ue={class:`code-gutter`,"aria-hidden":`true`},de=[`innerHTML`],k={key:2,class:`file-text`},A={key:0,class:`file-note`},j={key:5,class:`file-note`},M=x(i({__name:`FileViewer`,props:{hostId:{},cwd:{},path:{},api:{type:Function},session:{},jump:{},view:{},viewKey:{}},emits:[`open`,`reveal`,`view`],setup(i,{emit:x}){let M=i,N=x,P=m(null),F=m(``),I=m(!1),L=m(M.view?.rendered??!0),R=l(()=>`/hosts/${encodeURIComponent(M.hostId)}/fs`),z=l(()=>`cwd=${encodeURIComponent(M.cwd)}&path=${encodeURIComponent(M.path)}`),B=l(()=>/\.(png|jpe?g|webp|gif|bmp|avif)$/i.test(M.path)),V=l(()=>/\.(md|markdown|mdx)$/i.test(M.path)&&P.value?.text!==void 0);async function H(){I.value=!0,F.value=``;try{P.value=await M.api(`${R.value}/read?${z.value}`),V.value&&v()}catch(e){F.value=e.message}finally{I.value=!1}}f(()=>[M.hostId,M.cwd,M.path],H,{immediate:!0});let U=l(()=>M.path.startsWith(`/`)||M.path.startsWith(`~`)?M.path:`${M.cwd.replace(/\/$/,``)}/${M.path}`),fe=l(()=>{let e=P.value?.text??``;if(!M.session)return e;let t=U.value.slice(0,U.value.lastIndexOf(`/`))||`/`,n={session:M.session,cwd:t,workspace:M.cwd};return te(S(e,{...n,rawBase:`/api${R.value}`}),n)}),W=m(``),G;function K(e){W.value=e,clearTimeout(G),G=setTimeout(()=>W.value=``,4e3)}function pe(e){let t=e.target?.closest?.(`a`),n=y(t?.getAttribute(`href`));if(n){if(n.kind===`copy`){e.preventDefault();let t=()=>K(`Can't open this here. Path: ${n.path}`);navigator.clipboard?navigator.clipboard.writeText(n.path).then(()=>K(`Copied path: ${n.path}`),t):t()}else e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),n.kind===`reveal`?N(`reveal`,n.path):N(`open`,n.path,n))}}let q=m(null),J=m(M.view?.mark??null),Y=M.view?.jumped??0,X=!1,Z=l(()=>{let e=P.value?.text??``,t=1;for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&t++;return t});f([()=>M.jump?.seq,()=>P.value],async()=>{if(!P.value)return;let e=M.jump;if(e&&e.seq!==Y&&P.value.text!==void 0){Y=e.seq,X=!0,/\.(md|markdown|mdx)$/i.test(M.path)&&(L.value=!1),await d();let t=q.value?.querySelector(`.code-gutter`);if(!q.value||!t)return;let n=getComputedStyle(t),r=parseFloat(n.lineHeight)||20,i=Math.min(e.line,Z.value),a=Math.min(Math.max(e.end??i,i),Z.value);J.value={top:parseFloat(n.paddingTop)+(i-1)*r,height:(a-i+1)*r},q.value.scrollTop=Math.max(0,J.value.top-q.value.clientHeight/3);return}if(X)return;X=!0;let t=M.view?.scrollTop??0;t&&(await d(),q.value&&(q.value.scrollTop=t),requestAnimationFrame(()=>{q.value&&q.value.scrollTop<t&&(q.value.scrollTop=t)}))},{immediate:!0}),t(()=>{M.viewKey&&N(`view`,M.viewKey,{rendered:L.value,scrollTop:q.value?.scrollTop??0,mark:J.value,jumped:Y})});let me=l(()=>`/api${R.value}/raw?${z.value}`),he=l(()=>Array.from({length:Z.value},(e,t)=>t+1).join(`
2
2
  `)),Q=l(()=>P.value?.text===void 0?null:ne(P.value.text,C(M.path))),ge=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`,$=m(!1);async function _e(){await navigator.clipboard?.writeText(U.value).catch(()=>{}),$.value=!0,setTimeout(()=>$.value=!1,1200)}return(t,l)=>(n(),g(`div`,re,[c(`div`,ie,[e(b,{name:`file`,size:14,class:`file-bar-icon`}),c(`span`,{class:`file-bar-path`,title:i.path},s(i.path),9,ae),P.value?(n(),g(`span`,w,s(ge(P.value.size)),1)):h(``,!0),V.value?(n(),g(`button`,{key:1,class:`icon-btn`,title:L.value?`Show source`:`Show rendered`,onClick:l[0]||=e=>L.value=!L.value},[e(b,{name:L.value?`terminal`:`eye`,size:14},null,8,[`name`])],8,T)):h(``,!0),c(`button`,{class:`icon-btn`,title:`Reload`,"aria-label":`Reload file`,onClick:H},[e(b,{name:`refresh`,size:14})]),c(`button`,{class:`icon-btn`,title:$.value?`Copied`:`Copy path`,"aria-label":`Copy path`,onClick:_e},[e(b,{name:$.value?`check`:`copy`,size:14},null,8,[`name`])],8,E)]),c(`div`,{ref_key:`body`,ref:q,class:`file-body`},[I.value&&!P.value?(n(),g(`div`,D,[...l[1]||=[c(`span`,{class:`spinner`},null,-1)]])):F.value?(n(),g(`p`,O,[e(b,{name:`alert`,size:13}),r(s(F.value),1)])):B.value?(n(),g(`img`,{key:2,src:me.value,alt:i.path,class:`file-image`},null,8,oe)):V.value&&L.value?(n(),g(`div`,{key:3,class:`file-markdown`,onClick:pe},[W.value?(n(),g(`p`,se,s(W.value),1)):h(``,!0),u(_)?(n(),o(a(u(_)),{key:1,content:fe.value,final:!0},null,8,[`content`])):(n(),g(`pre`,ce,s(P.value?.text),1))])):P.value?.text===void 0?P.value?(n(),g(`p`,j,s(P.value.mime||P.value.kind)+` · not shown as text`,1)):h(``,!0):(n(),g(ee,{key:4},[c(`div`,le,[J.value?(n(),g(`div`,{key:0,class:`line-mark`,style:p({top:J.value.top+`px`,height:J.value.height+`px`}),"aria-hidden":`true`},null,4)):h(``,!0),c(`pre`,ue,s(he.value),1),Q.value===null?(n(),g(`pre`,k,s(P.value.text),1)):(n(),g(`pre`,{key:1,class:`file-text hljs`,innerHTML:Q.value},null,8,de))]),P.value.truncated?(n(),g(`p`,A,`Showing the first 1 MB.`)):h(``,!0)],64))],512)]))}}),[[`__scopeId`,`data-v-b6228f15`]]);export{M as default};
@@ -1 +1 @@
1
- import{C as e,R as t,S as n,T as r,V as i,_ as a,at as o,ct as s,f as c,g as l,h as u,j as d,nt as f,q as p,st as m,tt as h,v as g,y as _}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{m as v,p as y}from"./index-Cmpdc3EH.js";var b={class:`files`},x={class:`files-head`},S=[`title`],C={key:0,class:`files-error`},w=[`data-path`,`aria-expanded`,`title`,`onClick`],T={key:1,class:`tree-caret`},E={class:`tree-name`},D={key:2,class:`spinner spinner-sm`},O={key:0,class:`files-empty`},k=y(r({__name:`FilesPanel`,props:{hostId:{},cwd:{},api:{type:Function},activePath:{},reveal:{}},emits:[`open`],setup(r,{emit:y}){let k=r,A=y,j=f(new Map),M=h(new Set),N=h(new Set),P=h(``),F=u(()=>`/hosts/${encodeURIComponent(k.hostId)}/fs`),I=e=>`cwd=${encodeURIComponent(k.cwd)}&path=${encodeURIComponent(e)}`,L=new Map;function R(e){let t=L.get(e);if(t)return t;let n=z(e).finally(()=>L.delete(e));return L.set(e,n),n}async function z(e){N.value=new Set(N.value).add(e);try{let t=await k.api(`${F.value}/list?${I(e)}`),n=new Map(j.value);n.set(e,t.entries),j.value=n,P.value=``}catch(e){P.value=e.message}finally{let t=new Set(N.value);t.delete(e),N.value=t}}p(()=>[k.hostId,k.cwd],()=>{j.value=new Map,M.value=new Set,R(`.`)},{immediate:!0});function B(e){let t=new Set(M.value);t.has(e.path)?t.delete(e.path):(t.add(e.path),j.value.has(e.path)||R(e.path)),M.value=t}let V=u(()=>{let e=[],t=(n,r)=>{for(let i of j.value.get(n)??[])e.push({entry:i,depth:r}),i.kind===`directory`&&M.value.has(i.path)&&t(i.path,r+1)};return t(`.`,0),e}),H=h(null),U=h(null);return p(()=>k.activePath,()=>U.value=null),p(()=>k.reveal?.seq,async()=>{let e=k.reveal?.path;if(!e)return;let t=e===`.`?[]:e.split(`/`).filter(Boolean);await R(`.`);for(let e=1;e<=t.length;e++){let n=t.slice(0,e).join(`/`);j.value.has(n)||await R(n),M.value=new Set(M.value).add(n)}U.value=t.join(`/`)||null,await d();let n=Array.from(H.value?.querySelectorAll(`.tree-row`)??[]).find(e=>e.dataset.path===U.value);n?.scrollIntoView({block:`center`}),n?.focus({preventScroll:!0})},{immediate:!0}),(u,d)=>(t(),_(`div`,b,[l(`div`,x,[l(`span`,{class:`files-root`,title:r.cwd},s(r.cwd.split(`/`).filter(Boolean).pop()||r.cwd),9,S),l(`button`,{class:`icon-btn`,title:`Refresh`,"aria-label":`Refresh files`,onClick:d[0]||=e=>{j.value=new Map,M.value=new Set,R(`.`)}},[e(v,{name:`refresh`,size:14})])]),P.value?(t(),_(`p`,C,[e(v,{name:`alert`,size:13}),n(s(P.value),1)])):g(``,!0),l(`div`,{ref_key:`tree`,ref:H,class:`tree`,role:`tree`},[(t(!0),_(c,null,i(V.value,n=>(t(),_(`button`,{key:n.entry.path,class:o([`tree-row`,{chosen:n.entry.path===r.activePath||n.entry.path===U.value}]),"data-path":n.entry.path,role:`treeitem`,"aria-expanded":n.entry.kind===`directory`?M.value.has(n.entry.path):void 0,style:m({paddingLeft:8+n.depth*14+`px`}),title:n.entry.path,onClick:e=>n.entry.kind===`directory`?B(n.entry):A(`open`,n.entry.path)},[n.entry.kind===`directory`?(t(),a(v,{key:0,name:`chevron`,size:11,class:o([`tree-caret`,{open:M.value.has(n.entry.path)}])},null,8,[`class`])):(t(),_(`span`,T)),e(v,{name:n.entry.kind===`directory`?`folder`:`file`,size:14,class:`tree-icon`},null,8,[`name`]),l(`span`,E,s(n.entry.name),1),N.value.has(n.entry.path)?(t(),_(`span`,D)):g(``,!0)],14,w))),128)),!V.value.length&&N.value.has(`.`)?(t(),_(`div`,O,[...d[1]||=[l(`span`,{class:`spinner`},null,-1)]])):g(``,!0)],512)]))}}),[[`__scopeId`,`data-v-4159b030`]]);export{k as default};
1
+ import{C as e,R as t,S as n,T as r,V as i,_ as a,at as o,ct as s,f as c,g as l,h as u,j as d,nt as f,q as p,st as m,tt as h,v as g,y as _}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{m as v,p as y}from"./index-DV5BdS_U.js";var b={class:`files`},x={class:`files-head`},S=[`title`],C={key:0,class:`files-error`},w=[`data-path`,`aria-expanded`,`title`,`onClick`],T={key:1,class:`tree-caret`},E={class:`tree-name`},D={key:2,class:`spinner spinner-sm`},O={key:0,class:`files-empty`},k=y(r({__name:`FilesPanel`,props:{hostId:{},cwd:{},api:{type:Function},activePath:{},reveal:{}},emits:[`open`],setup(r,{emit:y}){let k=r,A=y,j=f(new Map),M=h(new Set),N=h(new Set),P=h(``),F=u(()=>`/hosts/${encodeURIComponent(k.hostId)}/fs`),I=e=>`cwd=${encodeURIComponent(k.cwd)}&path=${encodeURIComponent(e)}`,L=new Map;function R(e){let t=L.get(e);if(t)return t;let n=z(e).finally(()=>L.delete(e));return L.set(e,n),n}async function z(e){N.value=new Set(N.value).add(e);try{let t=await k.api(`${F.value}/list?${I(e)}`),n=new Map(j.value);n.set(e,t.entries),j.value=n,P.value=``}catch(e){P.value=e.message}finally{let t=new Set(N.value);t.delete(e),N.value=t}}p(()=>[k.hostId,k.cwd],()=>{j.value=new Map,M.value=new Set,R(`.`)},{immediate:!0});function B(e){let t=new Set(M.value);t.has(e.path)?t.delete(e.path):(t.add(e.path),j.value.has(e.path)||R(e.path)),M.value=t}let V=u(()=>{let e=[],t=(n,r)=>{for(let i of j.value.get(n)??[])e.push({entry:i,depth:r}),i.kind===`directory`&&M.value.has(i.path)&&t(i.path,r+1)};return t(`.`,0),e}),H=h(null),U=h(null);return p(()=>k.activePath,()=>U.value=null),p(()=>k.reveal?.seq,async()=>{let e=k.reveal?.path;if(!e)return;let t=e===`.`?[]:e.split(`/`).filter(Boolean);await R(`.`);for(let e=1;e<=t.length;e++){let n=t.slice(0,e).join(`/`);j.value.has(n)||await R(n),M.value=new Set(M.value).add(n)}U.value=t.join(`/`)||null,await d();let n=Array.from(H.value?.querySelectorAll(`.tree-row`)??[]).find(e=>e.dataset.path===U.value);n?.scrollIntoView({block:`center`}),n?.focus({preventScroll:!0})},{immediate:!0}),(u,d)=>(t(),_(`div`,b,[l(`div`,x,[l(`span`,{class:`files-root`,title:r.cwd},s(r.cwd.split(`/`).filter(Boolean).pop()||r.cwd),9,S),l(`button`,{class:`icon-btn`,title:`Refresh`,"aria-label":`Refresh files`,onClick:d[0]||=e=>{j.value=new Map,M.value=new Set,R(`.`)}},[e(v,{name:`refresh`,size:14})])]),P.value?(t(),_(`p`,C,[e(v,{name:`alert`,size:13}),n(s(P.value),1)])):g(``,!0),l(`div`,{ref_key:`tree`,ref:H,class:`tree`,role:`tree`},[(t(!0),_(c,null,i(V.value,n=>(t(),_(`button`,{key:n.entry.path,class:o([`tree-row`,{chosen:n.entry.path===r.activePath||n.entry.path===U.value}]),"data-path":n.entry.path,role:`treeitem`,"aria-expanded":n.entry.kind===`directory`?M.value.has(n.entry.path):void 0,style:m({paddingLeft:8+n.depth*14+`px`}),title:n.entry.path,onClick:e=>n.entry.kind===`directory`?B(n.entry):A(`open`,n.entry.path)},[n.entry.kind===`directory`?(t(),a(v,{key:0,name:`chevron`,size:11,class:o([`tree-caret`,{open:M.value.has(n.entry.path)}])},null,8,[`class`])):(t(),_(`span`,T)),e(v,{name:n.entry.kind===`directory`?`folder`:`file`,size:14,class:`tree-icon`},null,8,[`name`]),l(`span`,E,s(n.entry.name),1),N.value.has(n.entry.path)?(t(),_(`span`,D)):g(``,!0)],14,w))),128)),!V.value.length&&N.value.has(`.`)?(t(),_(`div`,O,[...d[1]||=[l(`span`,{class:`spinner`},null,-1)]])):g(``,!0)],512)]))}}),[[`__scopeId`,`data-v-4159b030`]]);export{k as default};
@@ -1,4 +1,4 @@
1
- import{C as e,F as t,I as n,R as r,S as i,T as a,V as o,X as s,_ as ee,a as c,at as l,c as u,ct as d,d as te,f,g as p,h as m,it as ne,q as re,s as h,tt as g,u as ie,v as _,y as v}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{m as y,n as ae,p as oe}from"./index-Cmpdc3EH.js";var se=[`claude`,`codex`,`copilot`,`opencode`,`pi`,`omp`,`acp`],ce=/^[a-z][a-z0-9-]*$/,b=[`agentProfiles`,`terminalProfiles`,`metadataGeneration`,`providers`],le=e=>e===void 0?e:JSON.parse(JSON.stringify(e)),x=0,S=()=>`k${++x}`,C=()=>globalThis.crypto?.randomUUID?.()??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}-${Math.random().toString(36).slice(2,10)}`,w=e=>e.split(`
1
+ import{C as e,F as t,I as n,R as r,S as i,T as a,V as o,X as s,_ as ee,a as c,at as l,c as u,ct as d,d as te,f,g as p,h as m,it as ne,q as re,s as h,tt as g,u as ie,v as _,y as v}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{m as y,n as ae,p as oe}from"./index-DV5BdS_U.js";var se=[`claude`,`codex`,`copilot`,`opencode`,`pi`,`omp`,`acp`],ce=/^[a-z][a-z0-9-]*$/,b=[`agentProfiles`,`terminalProfiles`,`metadataGeneration`,`providers`],le=e=>e===void 0?e:JSON.parse(JSON.stringify(e)),x=0,S=()=>`k${++x}`,C=()=>globalThis.crypto?.randomUUID?.()??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}-${Math.random().toString(36).slice(2,10)}`,w=e=>e.split(`
2
2
  `).map(e=>e.trim()).filter(Boolean);function T(e,t){return Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e)))}function E(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e.trim()!==``).map(([e,t])=>[e,t.trim()]))}function ue(e){let t=le(e),n=T(t,b),r={};for(let[e,n]of Object.entries(t.providers??{}))r[e]={...T(n,[`command`,`additionalModels`]),commandText:(n.command??[]).join(`
3
3
  `),additionalModels:(n.additionalModels??[]).map(e=>({id:e.id??``,label:e.label??``,isDefault:e.isDefault===!0,rest:T(e,[`id`,`label`,`isDefault`])}))};return{values:n,providers:r,removeProviders:[],agentProfiles:t.agentProfiles?t.agentProfiles.map(e=>({key:S(),id:e.id,name:e.name??``,provider:e.provider??``,model:e.model??``,modeId:e.modeId??``,thinkingOptionId:e.thinkingOptionId??``,notes:e.notes??``,rest:T(e,[`id`,`name`,`provider`,`model`,`modeId`,`thinkingOptionId`,`notes`])})):null,terminalProfiles:t.terminalProfiles?t.terminalProfiles.map(e=>({key:S(),id:e.id,name:e.name??``,command:e.command??``,argsText:(e.args??[]).join(`
4
4
  `),rest:T(e,[`id`,`name`,`command`,`args`])})):null,metadataProviders:t.metadataGeneration?(t.metadataGeneration.providers??[]).map(e=>({key:S(),provider:e.provider??``,model:e.model??``,thinkingOptionId:e.thinkingOptionId??``,rest:T(e,[`provider`,`model`,`thinkingOptionId`])})):null}}function D(e){let t=le(e.values),n={};for(let[t,r]of Object.entries(e.providers)){if(e.removeProviders.includes(t))continue;let{commandText:i,additionalModels:a,...o}=r,s={...le(o)};w(i).length&&(s.command=w(i)),a.length&&(s.additionalModels=a.map(e=>({...e.rest,id:e.id.trim(),label:e.label.trim(),...e.isDefault?{isDefault:!0}:{}}))),n[t]=s}return(Object.keys(n).length||Object.keys(e.providers).length)&&(t.providers=n),e.agentProfiles&&(t.agentProfiles=e.agentProfiles.map(e=>({...e.rest,id:e.id,name:e.name.trim(),provider:e.provider.trim(),...E({model:e.model,modeId:e.modeId,thinkingOptionId:e.thinkingOptionId}),...e.notes.trim()?{notes:e.notes.trim()}:{}}))),e.terminalProfiles&&(t.terminalProfiles=e.terminalProfiles.map(e=>({...e.rest,id:e.id,name:e.name.trim(),command:e.command.trim(),...w(e.argsText).length?{args:w(e.argsText)}:{}}))),e.metadataProviders&&(t.metadataGeneration={providers:e.metadataProviders.map(e=>({...e.rest,provider:e.provider.trim(),...E({model:e.model,thinkingOptionId:e.thinkingOptionId})}))}),t}function O(e){return Array.isArray(e)?`[`+e.map(O).join(`,`)+`]`:e&&typeof e==`object`?`{`+Object.entries(e).filter(([,e])=>e!==void 0).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>JSON.stringify(e)+`:`+O(t)).join(`,`)+`}`:JSON.stringify(e)??`null`}var k=(e,t)=>O(e)===O(t),A=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function de(e,t){let n=D(ue(e)),r=D(t),i={};for(let e of new Set([...Object.keys(n),...Object.keys(r)]))e===`providers`||r[e]===void 0||k(n[e],r[e])||(i[e]=A(n[e])&&A(r[e])?Object.fromEntries(Object.entries(r[e]).filter(([t,r])=>!k(n[e][t],r))):r[e]);let a={};for(let[e,t]of Object.entries(r.providers??{})){let r=n.providers?.[e]??{},i=Object.fromEntries(Object.entries(t).filter(([e,t])=>!k(r[e],t)));Object.keys(i).length&&(a[e]=i)}return Object.keys(a).length&&(i.providers=a),t.removeProviders.length&&(i.removeProviders=[...t.removeProviders]),i}function fe(e,t){let n=[];t.agentProfiles?.forEach((e,t)=>{let r=e.name.trim()||`Agent profile ${t+1}`;e.name.trim()||n.push(`${r} needs a name.`),e.provider.trim()||n.push(`${r} needs a provider.`)});let r=(t.agentProfiles??[]).map(e=>e.name.trim().toLowerCase()).filter(Boolean);new Set(r).size!==r.length&&n.push(`Agent profile names must be unique.`),t.terminalProfiles?.forEach((e,t)=>{let r=e.name.trim()||`Terminal profile ${t+1}`;e.name.trim()||n.push(`${r} needs a name.`),e.command.trim()||n.push(`${r} needs a command.`)}),t.metadataProviders?.forEach((e,t)=>{e.provider.trim()||n.push(`Metadata provider ${t+1} needs a provider.`)});for(let[r,i]of Object.entries(t.providers)){if(t.removeProviders.includes(r))continue;i.extends!==void 0&&!i.label?.trim()&&n.push(`${r} needs a display name.`),e.providers?.[r]?.command?.length&&!w(i.commandText).length&&n.push(`${r}: a command override cannot be cleared from here. Edit the host's config file instead.`);let a=i.additionalModels.map(e=>e.id.trim());i.additionalModels.some(e=>!e.id.trim()||!e.label.trim())?n.push(`${r}: every additional model needs an ID and a label.`):new Set(a).size!==a.length&&n.push(`${r}: additional model IDs must be unique.`),i.additionalModels.filter(e=>e.isDefault).length>1&&n.push(`${r}: only one additional model can be the default.`)}return n}function pe(e){return{key:S(),id:C(),name:``,provider:e,model:``,modeId:``,thinkingOptionId:``,notes:``,rest:{}}}function me(){return{key:S(),id:C(),name:``,command:``,argsText:``,rest:{}}}function he(e){return{key:S(),provider:e,model:``,thinkingOptionId:``,rest:{}}}function ge(e,t=Date.now()){if(!e)return`never`;let n=Math.max(0,(t-Date.parse(e))/1e3);if(!Number.isFinite(n))return`unknown`;if(n<60)return`just now`;if(n<3600)return`${Math.floor(n/60)} min ago`;if(n<86400)return`${Math.floor(n/3600)} h ago`;let r=Math.floor(n/86400);return r===1?`1 day ago`:`${r} days ago`}var _e={class:`page-head`},ve={class:`grow`},ye={class:`subtle`},be={key:0},xe=[`disabled`],Se={class:`page-body`},Ce={key:0,class:`subtle hs-loading`},we={key:1,class:`ps-callout is-error`,role:`alert`},Te={class:`hs-nav`,"aria-label":`Host settings sections`},Ee=[`onClick`],De={key:0,class:`ps-callout is-warn`,role:`status`},Oe=[`disabled`],ke={class:`card`},Ae={class:`grow`},je={class:`row-title`},Me={class:`row-sub`},Ne=[`onUpdate:modelValue`,`aria-label`],Pe={key:0,class:`card-row switch-row`},Fe={key:1,class:`card-row switch-row`},Ie={key:2,class:`card-row switch-row`},Le={class:`card form-card`},Re={class:`field`},ze={key:0,class:`field`},Be={class:`hs-head`},Ve=[`disabled`],He={key:0,class:`spinner`},Ue={key:1,class:`setting-note is-error`,role:`alert`},We={class:`card`},Ge={key:0,class:`card-row subtle`},Ke={class:`card-row hs-provider-row`},qe=[`aria-expanded`,`aria-label`,`onClick`],Je={class:`grow`},Ye={class:`row-title`},Xe={key:0,class:`hs-tag`},Ze=[`disabled`,`aria-label`,`title`,`onClick`],Qe={key:0,class:`spinner`},$e=[`onClick`],et=[`checked`,`aria-label`,`onChange`],tt={key:0,class:`hs-provider-body`},nt={key:1,class:`ps-callout is-error`},rt={key:2,class:`field`},it={class:`hs-models`},at=[`title`],ot={key:0,class:`hs-tag`},st={class:`hs-actions`},ct=[`disabled`,`onClick`],lt=[`disabled`,`onClick`],ut=[`onClick`],dt={key:3,class:`hs-output-wrap`},ft={class:`hs-output`},pt=[`onClick`],mt={key:4,class:`hs-grid`},ht={class:`field`},gt=[`onUpdate:modelValue`,`aria-invalid`],_t={class:`field`},vt=[`onUpdate:modelValue`],yt=[`value`],bt={class:`field`},xt=[`onUpdate:modelValue`],St={class:`switch-row hs-inline-switch`},Ct=[`checked`,`aria-label`,`onChange`],wt={class:`field`},Tt=[`onUpdate:modelValue`,`aria-label`,`aria-invalid`],Et=[`onUpdate:modelValue`,`aria-label`,`aria-invalid`],Dt={class:`hs-check`},Ot=[`onUpdate:modelValue`],kt=[`aria-label`,`onClick`],At=[`onClick`],jt={class:`card-row hs-add`},Mt=[`onKeydown`],Nt=[`value`],Pt=[`disabled`],Ft={key:2,class:`setting-note is-error`,role:`alert`},It={class:`hs-head`},Lt={class:`card`},Rt={key:0,class:`card-row subtle`},zt=[`aria-expanded`,`onClick`],Bt={class:`grow`},Vt={class:`row-title`},Ht={class:`row-sub`},Ut={key:0,class:`hs-item-body`},Wt={class:`hs-grid`},Gt={class:`field`},Kt=[`onUpdate:modelValue`,`aria-invalid`],qt={class:`field`},Jt=[`onUpdate:modelValue`,`onChange`],Yt=[`value`],Xt=[`value`],Zt={class:`field`},Qt=[`onUpdate:modelValue`,`onChange`],$t=[`value`],en=[`value`],tn={class:`field`},nn=[`onUpdate:modelValue`],rn=[`value`],an=[`value`],on={class:`field`},sn=[`onUpdate:modelValue`],cn=[`value`],ln=[`value`],un={class:`field`},dn=[`onUpdate:modelValue`],fn={class:`hs-actions`},pn=[`disabled`,`onClick`],mn=[`disabled`,`onClick`],hn=[`onClick`],gn={class:`hs-head`},_n={class:`card`},vn={key:0,class:`card-row subtle`},yn={class:`hs-order`},bn=[`onUpdate:modelValue`,`aria-label`,`onChange`],xn=[`value`],Sn=[`value`],Cn=[`onUpdate:modelValue`,`aria-label`,`onChange`],wn=[`value`],Tn=[`value`],En=[`onUpdate:modelValue`,`aria-label`],Dn=[`value`],On=[`value`],kn={class:`hs-row-actions`},An=[`disabled`,`onClick`],jn=[`onClick`],Mn={class:`hs-head`},Nn={class:`card`},Pn={key:0,class:`card-row subtle`},Fn=[`aria-expanded`,`onClick`],In={class:`grow`},Ln={class:`row-title`},Rn={class:`row-sub hs-mono`},zn={key:0,class:`hs-item-body`},Bn={class:`hs-grid`},Vn={class:`field`},Hn=[`onUpdate:modelValue`,`aria-invalid`],Un={class:`field`},Wn=[`onUpdate:modelValue`,`aria-invalid`],Gn={class:`field`},Kn=[`onUpdate:modelValue`],qn={class:`hs-actions`},Jn=[`disabled`,`onClick`],Yn=[`disabled`,`onClick`],Xn=[`onClick`],Zn={class:`card`},Qn={class:`card-row switch-row`},$n={key:0,class:`card-row switch-row`},er={class:`card form-card`},tr={class:`field`},nr=[`value`,`disabled`],rr={key:0,class:`hs-skill-list`},ir=[`value`,`disabled`],ar={class:`hs-actions`},or=[`disabled`],sr={class:`card`},cr={key:0,class:`card-row subtle`},lr={class:`grow`},ur={class:`row-title`},dr={key:0,class:`row-sub`},fr={key:1,class:`row-sub is-error`},pr={class:`hs-row-actions`},mr=[`disabled`,`onClick`],hr=[`disabled`,`onClick`],gr=[`disabled`,`aria-label`,`onClick`],_r={key:0,class:`spinner`},vr={key:1,class:`card-row hs-add`},yr=[`disabled`],br={class:`card`},xr={class:`card-row hs-daemon`},Sr={class:`grow`},Cr={class:`row-title`},wr={class:`row-sub`},Tr={class:`hs-row-actions`},Er=[`disabled`],Dr=[`disabled`],Or=[`disabled`],kr={key:0},Ar={key:1},jr={key:4,class:`setting-note is-error`,role:`alert`},Mr={key:5,class:`hs-output`},Nr={key:0,class:`hs-savebar`,role:`region`,"aria-label":`Save host settings`},Pr={class:`hs-savebar-inner`},Fr={class:`grow hs-savebar-text`},Ir={key:0,class:`is-error`,role:`alert`},Lr={class:`is-error`},Rr={key:0,class:`subtle`},zr={key:2,class:`is-ok`,role:`status`},Br={key:3},Vr=[`disabled`],Hr=[`disabled`],j=oe(a({__name:`HostSettings`,props:{host:{},api:{type:Function}},emits:[`back`],setup(a,{emit:oe}){let b=a,le=oe,x=`/hosts/${encodeURIComponent(b.host.id)}`,S=e=>e.message||`Request failed`,C=g(null),w=g(null),T=g(``),E=g({}),D=g(``),k=g(!1),A=g(!0),j=g(``),M=g(!1),N=g(``),P=g(!1),F=g(null),Ur=m(()=>C.value&&w.value?de(C.value,w.value):{}),I=m(()=>Object.keys(Ur.value).length>0),L=m(()=>C.value&&w.value?fe(C.value,w.value):[]),Wr=m(()=>F.value?.state===`running`),Gr=m(()=>M.value||Wr.value);re(I,e=>{e&&(P.value=!1)});function Kr(e){C.value=e.config,w.value=ue(e.config),T.value=e.revision,E.value=e.features??{},e.desktopManaged!==void 0&&(k.value=e.desktopManaged),e.version&&(D.value=e.version)}async function qr(e=!0){if(!(e&&I.value&&!confirm(`Discard unsaved host settings?`))){A.value=!0,j.value=N.value=``,P.value=!1;try{Kr(await b.api(x+`/settings`))}catch(e){j.value=S(e);return}finally{A.value=!1}await Promise.all([si(),Fi(),Bi()])}}async function Jr(){if(!(!I.value||L.value.length||Gr.value)){M.value=!0,N.value=``;try{Kr(await b.api(x+`/settings`,`PATCH`,{revision:T.value,patch:Ur.value})),P.value=!0,si()}catch(e){N.value=S(e)}finally{M.value=!1}}}function Yr(){C.value&&(w.value=ue(C.value)),N.value=``}function Xr(){(!I.value||confirm(`Discard unsaved host settings?`))&&le(`back`)}function Zr(e){(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),Jr())}function Qr(e){I.value&&e.preventDefault()}let $r=[[`idleRuntimeCleanup`,`Release idle agents`,`Free memory held by idle agents that can be resumed later.`,`idleRuntimeCleanupSetting`],[`resumeOnStartup`,`Resume agents after restart`,`Continue interrupted agents when the daemon starts.`,`resumeOnStartupSetting`],[`autoArchiveAfterMerge`,`Archive merged workspaces`,`Archive a workspace once its changes are merged.`,``],[`enableTerminalAgentHooks`,`Terminal agent hooks`,`Track supported agents launched from terminals.`,``],[`pluginsEnabled`,`Host plugins`,`Run the plugins configured on this host.`,`plugins`]],ei=m(()=>{let e=w.value?.values??{};return $r.filter(([t,,,n])=>n?E.value[n]:t in e)}),R=g([]),ti=g(``),ni=g(!1),z=g([]),B=g({}),V=g(null),ri=g({}),H=g([]),U=g({}),ii=g(``),ai=g(`codex`),oi=g(``);async function si(){try{R.value=await b.api(x+`/settings/providers`),ti.value=``}catch(e){ti.value=S(e)}finally{ni.value=!0}}let ci=e=>R.value.find(t=>t.id===e),li=m(()=>{let e=w.value;return e?[...R.value.map(e=>e.id),...Object.keys(e.providers).filter(e=>!ci(e))].map(t=>{let n=ci(t),r=e.providers[t],i=e.removeProviders.includes(t),a=r?.enabled??n?.enabled??!0;return{id:t,reported:n,conf:r,removed:i,enabled:a,custom:r?.extends!==void 0||n?.source===`custom`,saved:!!C.value?.providers?.[t]||!!n,label:r?.label?.trim()||n?.label||t,pendingToggle:n?a!==n.enabled:!1}}):[]});function ui(e){let t=e.reported;if(e.removed)return{text:`Removed when you save`,tone:`warn`};if(!t)return{text:`New · save to load its models`,tone:`warn`};if(e.pendingToggle)return{text:e.enabled?`Enabled when you save`:`Disabled when you save`,tone:`warn`};if(!t.enabled)return{text:`Disabled`,tone:`muted`};if(z.value.includes(e.id)||t.status===`loading`)return{text:`Loading models…`,tone:`running`};if(t.status===`unavailable`)return{text:`Not installed on this host`,tone:`muted`};if(t.status===`error`)return{text:`Could not load models`,tone:`error`};let n=t.models.length;return{text:`${n} model${n===1?``:`s`} · updated ${ge(t.fetchedAt)}`,tone:`ok`}}let di=e=>!!e.reported&&e.reported.enabled&&!e.pendingToggle&&!e.removed;async function fi(e){let t=e??R.value.filter(e=>e.enabled).map(e=>e.id);if(!t.length)return;let n=new Map(R.value.map(e=>[e.id,new Set(e.models.map(e=>e.id))]));z.value=[...z.value,...t],e||(V.value=null);try{let r=await b.api(x+`/settings/providers/refresh`,`POST`,e?{providers:e}:{},15e4);R.value=r,ti.value=``;let i=0,a=0;for(let e of t){let t=r.find(t=>t.id===e);if(!t||!t.enabled)continue;if(t.status===`error`){a++,B.value[e]={text:t.error??`Could not load models`,error:!0};continue}let o=t.models.filter(t=>!n.get(e)?.has(t.id));i+=o.length,B.value[e]={text:o.length?`New: ${o.map(e=>e.label).join(`, `)}`:`Model list is up to date`}}e||(V.value=a?{text:`${a} provider${a===1?``:`s`} could not load models.`,error:!0}:{text:i?`Found ${i} new model${i===1?``:`s`}.`:`Every model list is up to date.`})}catch(t){let n={text:`Refresh failed: `+S(t),error:!0};if(e)for(let t of e)B.value[t]=n;else V.value=n}finally{z.value=z.value.filter(e=>!t.includes(e))}}async function pi(e){H.value=[...H.value,e];try{let t=await b.api(x+`/provider-diagnostic/`+encodeURIComponent(e),`GET`,void 0,6e4);ri.value[e]=t.diagnostic??JSON.stringify(t,null,2)}catch(t){ri.value[e]=`Diagnostic failed: `+S(t)}finally{H.value=H.value.filter(t=>t!==e)}}function mi(e){delete ri.value[e]}function hi(e){return w.value.providers[e]??={commandText:``,additionalModels:[]}}function gi(e){U.value[e]||hi(e),U.value[e]=!U.value[e]}function _i(e,t){let n=hi(e.id);C.value?.providers?.[e.id]?.enabled===void 0&&e.reported&&t===e.reported.enabled?delete n.enabled:n.enabled=t}function vi(e,t){let n=hi(e);n.paseoTools={...n.paseoTools,enabled:t}}function yi(){let e=ii.value.trim();oi.value=``,ce.test(e)?li.value.some(t=>t.id===e)?oi.value=`${e} already exists on this host.`:(w.value.providers[e]={extends:ai.value,label:e,enabled:!0,commandText:``,additionalModels:[]},U.value[e]=!0,ii.value=``):oi.value=`Use lowercase letters, digits and hyphens, starting with a letter.`}function bi(e){let t=w.value;e.saved?confirm(`Remove ${e.label} from this host when you save? Metadata generation stops using it.`)&&(t.removeProviders.push(e.id),t.metadataProviders&&=t.metadataProviders.filter(t=>t.provider!==e.id),U.value[e.id]=!1):delete t.providers[e.id]}function xi(e){let t=w.value;t.removeProviders=t.removeProviders.filter(t=>t!==e),C.value&&(t.metadataProviders=ue(C.value).metadataProviders)}let W=m(()=>li.value.filter(e=>!e.removed&&e.enabled).map(e=>({id:e.id,label:e.label}))),G=e=>ci(e)?.models??[],Si=e=>ci(e)?.modes??[];function K(e,t){let n=G(e);return(n.find(e=>e.id===t)??n.find(e=>e.isDefault)??n[0])?.thinking??[]}let Ci=(e,t)=>e.find(e=>e.id===t)?.label??t;function wi(e){e.model=e.thinkingOptionId=``,e.modeId!==void 0&&(e.modeId=``)}function Ti(e){e.thinkingOptionId&&!K(e.provider,e.model).some(t=>t.id===e.thinkingOptionId)&&(e.thinkingOptionId=``)}let q=g({});function Ei(e,t,n){let r=t+n;r>=0&&r<e.length&&([e[t],e[r]]=[e[r],e[t]])}function Di(){let e=pe(W.value[0]?.id??`codex`);(w.value.agentProfiles??=[]).push(e),q.value[e.key]=!0}function Oi(){let e=me();(w.value.terminalProfiles??=[]).push(e),q.value[e.key]=!0}function ki(){(w.value.metadataProviders??=[]).push(he(W.value[0]?.id??`codex`))}function Ai(e,t,n){let r=e[t]?.name?.trim();(!r||confirm(`Remove ${n} ${r}?`))&&e.splice(t,1)}function ji(e){let t=[Ci(W.value,e.provider)||`No provider`,e.model?Ci(G(e.provider),e.model):`Default model`];return e.thinkingOptionId&&t.push(Ci(K(e.provider,e.model),e.thinkingOptionId)),e.modeId&&t.push(Ci(Si(e.provider),e.modeId)),t.join(` · `)}let J=g(null),Mi=g(``),Y=g(!1),X=g(null),Ni=m(()=>!!J.value&&O(Pi())!==Mi.value);function Pi(){let e=J.value.selection;return e.mode===`all`?{mode:`all`}:{mode:`custom`,skills:[...e.skills??[]].sort()}}async function Fi(){if(E.value.skillManagement)try{J.value=await b.api(x+`/skills`),Mi.value=O(Pi())}catch(e){X.value={text:S(e),error:!0}}}function Ii(e){J.value.selection=e===`custom`?{mode:e,skills:J.value.selection.skills??[...J.value.installed]}:{mode:e}}async function Li(){Y.value=!0,X.value=null;try{let e=await b.api(x+`/skills`,`PUT`,{selection:Pi()});if(e.confirmationRequired){if(!confirm(`Remove these Paseo skills from this host? `+e.confirmationRequired.removals.join(`, `)))return;e=await b.api(x+`/skills`,`PUT`,{selection:Pi(),confirmedRemovals:e.confirmationRequired.removals})}J.value=e,Mi.value=O(Pi()),X.value={text:`Skill selection applied.`}}catch(e){X.value={text:S(e),error:!0}}finally{Y.value=!1}}let Ri=g([]),Z=g(``),Q=g(null),$=g(null),zi=m(()=>!!E.value.pluginManagement);async function Bi(){if(zi.value)try{Ri.value=await b.api(x+`/plugins`)}catch(e){$.value={text:S(e),error:!0}}}async function Vi(e,t){let n=Ri.value.find(t=>t.id===e)?.name??e;if(t!==`remove`||confirm(`Remove plugin ${n} from this host?`)){Q.value=e||`install`,$.value=null;try{await b.api(x+`/plugins`+(e?`/`+encodeURIComponent(e)+`/`+t:``),`POST`,e?{}:{source:Z.value.trim()},12e4),e||(Z.value=``),$.value={text:e?`${n}: ${t===`remove`?`removed`:t+`d`}.`:`Plugin installed.`},Ri.value=await b.api(x+`/plugins`)}catch(e){$.value={text:S(e),error:!0}}finally{Q.value=null}}}let Hi=g(``),Ui=g(!1),Wi=g(``),Gi,Ki=!1;async function qi(){clearTimeout(Gi);try{let e=await b.api(x+`/lifecycle`);if(Ki)return;let t=F.value?.state===`running`;F.value=e,e?.state===`running`?Gi=setTimeout(()=>void qi(),2e3):t&&e?.state===`complete`&&(e.version&&(D.value=e.version),I.value||qr(!1))}catch{Ki||(Wi.value=`Could not check the operation. Reopen this page to see its outcome.`)}}async function Ji(e){if(confirm(`${e===`restart`?`Restart`:`Update and restart`} the daemon on ${b.host.label}? Running agents may be interrupted and the host disconnects briefly.`)){Wi.value=``;try{F.value=await b.api(x+`/lifecycle/`+e,`POST`,{}),qi()}catch(e){Wi.value=S(e)+`. Check the host's status before retrying.`}}}async function Yi(){if(Hi.value)Hi.value=``;else{Ui.value=!0;try{Hi.value=JSON.stringify(await b.api(x+`/status`),null,2)}catch(e){Wi.value=S(e)}finally{Ui.value=!1}}}let Xi=m(()=>[[`general`,`General`,!0],[`providers`,`Providers`,!0],[`profiles`,`Agent profiles`,!!E.value.agentProfiles],[`metadata`,`Metadata`,!!w.value?.metadataProviders],[`terminals`,`Terminals`,!0],[`skills`,`Skills`,!!J.value],[`plugins`,`Plugins`,zi.value],[`relay`,`Relay`,!!w.value?.values.relay&&!!E.value.relayConfig],[`daemon`,`Daemon`,!0]].filter(([,,e])=>e));function Zi(e){document.getElementById(`hs-`+e)?.scrollIntoView({behavior:`smooth`,block:`start`})}return t(()=>{window.addEventListener(`beforeunload`,Qr),qr(!1),qi()}),n(()=>{Ki=!0,clearTimeout(Gi),window.removeEventListener(`beforeunload`,Qr)}),(t,n)=>(r(),v(`section`,{class:`page host-settings`,onKeydown:Zr},[p(`header`,_e,[p(`button`,{class:`icon-btn`,"aria-label":`Back to hosts`,onClick:Xr},[e(y,{name:`back`,size:18})]),p(`div`,ve,[p(`h1`,null,d(a.host.label),1),p(`p`,ye,[n[21]||=i(` Host settings · apply to every client of this daemon`,-1),D.value?(r(),v(`span`,be,` · Paseo `+d(D.value),1)):_(``,!0)])]),p(`button`,{class:`btn btn-outline btn-sm hs-reload`,disabled:A.value||Gr.value,onClick:n[0]||=e=>qr()},[e(y,{name:`refresh`,size:13}),n[22]||=i(`Reload `,-1)],8,xe)]),p(`div`,Se,[A.value&&!w.value?(r(),v(`p`,Ce,[...n[23]||=[p(`span`,{class:`spinner`},null,-1),i(` Reading host settings…`,-1)]])):j.value?(r(),v(`div`,we,[p(`p`,null,[e(y,{name:`alert`,size:14}),i(`Could not read this host's settings: `+d(j.value),1)]),p(`button`,{class:`btn btn-outline`,onClick:n[1]||=e=>qr(!1)},`Try again`)])):_(``,!0),w.value&&!j.value?(r(),v(f,{key:2},[p(`nav`,Te,[(r(!0),v(f,null,o(Xi.value,([e,t])=>(r(),v(`button`,{key:e,type:`button`,class:`hs-chip`,onClick:t=>Zi(e)},d(t),9,Ee))),128))]),Wr.value?(r(),v(`div`,De,[p(`p`,null,[n[24]||=p(`span`,{class:`spinner`},null,-1),i(d(F.value.phase)+`… settings are locked until the daemon is back.`,1)])])):_(``,!0),p(`fieldset`,{disabled:Gr.value,class:`hs-fields`},[n[68]||=p(`h2`,{id:`hs-general`,class:`section-label`},`General`,-1),p(`div`,ke,[(r(!0),v(f,null,o(ei.value,([e,t,n])=>(r(),v(`label`,{key:e,class:`card-row switch-row`},[p(`div`,Ae,[p(`div`,je,d(t),1),p(`div`,Me,d(n),1)]),s(p(`input`,{"onUpdate:modelValue":t=>w.value.values[e]=t,type:`checkbox`,class:`switch`,"aria-label":t},null,8,Ne),[[c,w.value.values[e]]])]))),128)),w.value.values.mcp?(r(),v(`label`,Pe,[n[25]||=p(`div`,{class:`grow`},[p(`div`,{class:`row-title`},`Paseo orchestration tools`),p(`div`,{class:`row-sub`},`Give agents Paseo's tools for starting and managing other agents.`)],-1),s(p(`input`,{"onUpdate:modelValue":n[2]||=e=>w.value.values.mcp.injectIntoAgents=e,type:`checkbox`,class:`switch`,"aria-label":`Paseo orchestration tools`},null,512),[[c,w.value.values.mcp.injectIntoAgents]])])):_(``,!0),w.value.values.browserTools?(r(),v(`label`,Fe,[n[26]||=p(`div`,{class:`grow`},[p(`div`,{class:`row-title`},`Browser tools`),p(`div`,{class:`row-sub`},`Let agents automate a browser on this host.`)],-1),s(p(`input`,{"onUpdate:modelValue":n[3]||=e=>w.value.values.browserTools.enabled=e,type:`checkbox`,class:`switch`,"aria-label":`Browser tools`},null,512),[[c,w.value.values.browserTools.enabled]])])):_(``,!0),w.value.values.usage?(r(),v(`label`,Ie,[n[27]||=p(`div`,{class:`grow`},[p(`div`,{class:`row-title`},`Provider usage`),p(`div`,{class:`row-sub`},`Collect usage limits from providers for the usage panel.`)],-1),s(p(`input`,{"onUpdate:modelValue":n[4]||=e=>w.value.values.usage.enabled=e,type:`checkbox`,class:`switch`,"aria-label":`Provider usage`},null,512),[[c,w.value.values.usage.enabled]])])):_(``,!0)]),p(`div`,Le,[p(`label`,Re,[n[28]||=p(`span`,null,`Additional system instructions`,-1),s(p(`textarea`,{"onUpdate:modelValue":n[5]||=e=>w.value.values.appendSystemPrompt=e,rows:`4`,placeholder:`Appended to every agent's instructions on this host`},null,512),[[u,w.value.values.appendSystemPrompt]])]),E.value.resumeOnStartupSetting?(r(),v(`label`,ze,[n[29]||=p(`span`,null,`Restart recovery prompt`,-1),s(p(`textarea`,{"onUpdate:modelValue":n[6]||=e=>w.value.values.resumePrompt=e,rows:`2`,placeholder:`Sent to agents resumed after a restart`},null,512),[[u,w.value.values.resumePrompt]])])):_(``,!0)]),p(`div`,Be,[n[30]||=p(`h2`,{id:`hs-providers`,class:`section-label`},`Providers`,-1),p(`button`,{type:`button`,class:`btn btn-outline btn-sm`,disabled:!!z.value.length||!R.value.some(e=>e.enabled),onClick:n[7]||=e=>fi()},[z.value.length?(r(),v(`span`,He)):(r(),ee(y,{key:1,name:`refresh`,size:13})),i(` `+d(z.value.length?`Refreshing…`:`Refresh models`),1)],8,Ve)]),n[69]||=p(`p`,{class:`subtle hs-hint`},` The daemon caches each provider's model list. Refresh to pick up models released since it last checked. `,-1),V.value?(r(),v(`p`,{key:0,class:l([`setting-note`,{"is-error":V.value.error}]),role:`status`},d(V.value.text),3)):_(``,!0),ti.value?(r(),v(`p`,Ue,`Could not read providers: `+d(ti.value),1)):_(``,!0),p(`div`,We,[ni.value?_(``,!0):(r(),v(`p`,Ge,[...n[31]||=[p(`span`,{class:`spinner`},null,-1),i(` Reading providers…`,-1)]])),(r(!0),v(f,null,o(li.value,t=>(r(),v(`div`,{key:t.id,class:l([`hs-provider`,{"is-open":U.value[t.id],"is-removed":t.removed}])},[p(`div`,Ke,[p(`button`,{type:`button`,class:`hs-provider-main`,"aria-expanded":!!U.value[t.id],"aria-label":(U.value[t.id]?`Collapse `:`Configure `)+t.label,onClick:e=>gi(t.id)},[e(ae,{provider:t.conf?.extends??t.id},null,8,[`provider`]),p(`span`,Je,[p(`span`,Ye,[i(d(t.label),1),t.custom?(r(),v(`span`,Xe,`custom`)):_(``,!0)]),p(`span`,{class:l([`row-sub hs-status`,`is-`+ui(t).tone])},d(ui(t).text),3)]),e(y,{name:`chevron`,size:15,class:`hs-chevron`})],8,qe),di(t)?(r(),v(`button`,{key:0,type:`button`,class:`icon-btn`,disabled:z.value.includes(t.id),"aria-label":`Refresh `+t.label+` models`,title:`Refresh `+t.label+` models`,onClick:e=>fi([t.id])},[z.value.includes(t.id)?(r(),v(`span`,Qe)):(r(),ee(y,{key:1,name:`refresh`,size:15}))],8,Ze)):_(``,!0),t.removed?(r(),v(`button`,{key:1,type:`button`,class:`btn btn-outline btn-sm`,onClick:e=>xi(t.id)},`Undo`,8,$e)):(r(),v(`input`,{key:2,type:`checkbox`,class:`switch`,checked:t.enabled,"aria-label":`Enable `+t.label,onChange:e=>_i(t,e.target.checked)},null,40,et))]),U.value[t.id]&&t.conf&&!t.removed?(r(),v(`div`,tt,[B.value[t.id]?(r(),v(`p`,{key:0,class:l([`setting-note`,{"is-error":B.value[t.id].error}]),role:`status`},d(B.value[t.id].text),3)):_(``,!0),t.reported?.status===`error`&&t.reported.error?(r(),v(`div`,nt,[p(`p`,null,[e(y,{name:`alert`,size:14}),i(d(t.reported.error),1)])])):_(``,!0),t.reported?.models.length?(r(),v(`div`,rt,[n[32]||=p(`span`,null,`Models reported by the host`,-1),p(`ul`,it,[(r(!0),v(f,null,o(t.reported.models,e=>(r(),v(`li`,{key:e.id,title:e.description||e.id},[i(d(e.label),1),e.isDefault?(r(),v(`span`,ot,`default`)):_(``,!0)],8,at))),128))])])):_(``,!0),p(`div`,st,[di(t)?(r(),v(`button`,{key:0,type:`button`,class:`btn btn-outline btn-sm`,disabled:z.value.includes(t.id),onClick:e=>fi([t.id])},[e(y,{name:`refresh`,size:13}),i(d(z.value.includes(t.id)?`Refreshing…`:`Refresh models`),1)],8,ct)):_(``,!0),t.reported?(r(),v(`button`,{key:1,type:`button`,class:`btn btn-outline btn-sm`,disabled:H.value.includes(t.id),onClick:e=>pi(t.id)},d(H.value.includes(t.id)?`Checking…`:`Run diagnostic`),9,lt)):_(``,!0),t.custom&&(!t.saved||E.value.providerRemoval)?(r(),v(`button`,{key:2,type:`button`,class:`btn btn-outline btn-sm hs-danger`,onClick:e=>bi(t)},[e(y,{name:`trash`,size:13}),n[33]||=i(`Remove provider `,-1)],8,ut)):_(``,!0)]),ri.value[t.id]?(r(),v(`div`,dt,[p(`pre`,ft,d(ri.value[t.id]),1),p(`button`,{type:`button`,class:`link-btn`,onClick:e=>mi(t.id)},`Hide diagnostic`,8,pt)])):_(``,!0),t.conf.extends===void 0?_(``,!0):(r(),v(`div`,mt,[p(`label`,ht,[n[34]||=p(`span`,null,`Display name`,-1),s(p(`input`,{"onUpdate:modelValue":e=>t.conf.label=e,"aria-invalid":!t.conf.label?.trim()},null,8,gt),[[u,t.conf.label]])]),p(`label`,_t,[n[35]||=p(`span`,null,`Based on`,-1),s(p(`select`,{"onUpdate:modelValue":e=>t.conf.extends=e,"aria-label":`Based on`},[(r(!0),v(f,null,o(ne(se),e=>(r(),v(`option`,{key:e,value:e},d(e),9,yt))),128))],8,vt),[[h,t.conf.extends]])])])),p(`label`,bt,[n[36]||=p(`span`,null,[i(`Command override `),p(`small`,{class:`subtle`},`· optional, one argument per line`)],-1),s(p(`textarea`,{"onUpdate:modelValue":e=>t.conf.commandText=e,rows:`2`,class:`hs-mono`,spellcheck:`false`,placeholder:`Uses the provider's default command`},null,8,xt),[[u,t.conf.commandText]])]),p(`label`,St,[n[37]||=p(`span`,{class:`grow`},[p(`span`,{class:`row-title`},`Paseo tools`),p(`span`,{class:`row-sub`},`Offer Paseo's orchestration tools to agents of this provider.`)],-1),p(`input`,{type:`checkbox`,class:`switch`,checked:t.conf.paseoTools?.enabled!==!1,"aria-label":`Paseo tools for `+t.label,onChange:e=>vi(t.id,e.target.checked)},null,40,Ct)]),p(`div`,wt,[n[40]||=p(`span`,null,[i(`Additional models `),p(`small`,{class:`subtle`},`· offered even if the provider does not list them`)],-1),(r(!0),v(f,null,o(t.conf.additionalModels,(a,o)=>(r(),v(`div`,{key:o,class:`hs-model-row`},[s(p(`input`,{"onUpdate:modelValue":e=>a.id=e,placeholder:`Model ID`,"aria-label":`Model ID `+(o+1),"aria-invalid":!a.id.trim()},null,8,Tt),[[u,a.id]]),s(p(`input`,{"onUpdate:modelValue":e=>a.label=e,placeholder:`Label`,"aria-label":`Model label `+(o+1),"aria-invalid":!a.label.trim()},null,8,Et),[[u,a.label]]),p(`label`,Dt,[s(p(`input`,{"onUpdate:modelValue":e=>a.isDefault=e,type:`checkbox`},null,8,Ot),[[c,a.isDefault]]),n[38]||=i(`Default`,-1)]),p(`button`,{type:`button`,class:`icon-btn`,"aria-label":`Remove model `+(a.id||o+1),onClick:e=>t.conf.additionalModels.splice(o,1)},[e(y,{name:`close`,size:14})],8,kt)]))),128)),p(`button`,{type:`button`,class:`link-btn`,onClick:e=>t.conf.additionalModels.push({id:``,label:``,isDefault:!1,rest:{}})},[e(y,{name:`plus`,size:13}),n[39]||=i(`Add model `,-1)],8,At)])])):_(``,!0)],2))),128)),p(`div`,jt,[s(p(`input`,{"onUpdate:modelValue":n[8]||=e=>ii.value=e,placeholder:`New custom provider ID, e.g. my-codex`,"aria-label":`New custom provider ID`,onKeydown:ie(te(yi,[`prevent`]),[`enter`])},null,40,Mt),[[u,ii.value]]),s(p(`select`,{"onUpdate:modelValue":n[9]||=e=>ai.value=e,"aria-label":`New provider based on`},[(r(!0),v(f,null,o(ne(se),e=>(r(),v(`option`,{key:e,value:e},`based on `+d(e),9,Nt))),128))],512),[[h,ai.value]]),p(`button`,{type:`button`,class:`btn btn-outline btn-sm`,disabled:!ii.value.trim(),onClick:yi},`Add`,8,Pt)])]),oi.value?(r(),v(`p`,Ft,d(oi.value),1)):_(``,!0),E.value.agentProfiles?(r(),v(f,{key:3},[p(`div`,It,[n[42]||=p(`h2`,{id:`hs-profiles`,class:`section-label`},`Agent profiles`,-1),p(`button`,{type:`button`,class:`btn btn-outline btn-sm`,onClick:Di},[e(y,{name:`plus`,size:13}),n[41]||=i(`Add agent profile`,-1)])]),n[53]||=p(`p`,{class:`subtle hs-hint`},`Named launch settings, also offered to orchestrating agents.`,-1),p(`div`,Lt,[w.value.agentProfiles?.length?_(``,!0):(r(),v(`p`,Rt,`No agent profiles yet.`)),(r(!0),v(f,null,o(w.value.agentProfiles??[],(t,a)=>(r(),v(`div`,{key:t.key,class:l([`hs-item`,{"is-open":q.value[t.key]}])},[p(`button`,{type:`button`,class:`card-row hs-item-head`,"aria-expanded":!!q.value[t.key],onClick:e=>q.value[t.key]=!q.value[t.key]},[p(`span`,Bt,[p(`span`,Vt,d(t.name.trim()||`Untitled profile`),1),p(`span`,Ht,d(ji(t)),1)]),e(y,{name:`chevron`,size:15,class:`hs-chevron`})],8,zt),q.value[t.key]?(r(),v(`div`,Ut,[p(`div`,Wt,[p(`label`,Gt,[n[43]||=p(`span`,null,`Name`,-1),s(p(`input`,{"onUpdate:modelValue":e=>t.name=e,"aria-invalid":!t.name.trim(),placeholder:`Review`},null,8,Kt),[[u,t.name]])]),p(`label`,qt,[n[44]||=p(`span`,null,`Provider`,-1),s(p(`select`,{"onUpdate:modelValue":e=>t.provider=e,"aria-label":`Provider`,onChange:e=>wi(t)},[t.provider&&!W.value.some(e=>e.id===t.provider)?(r(),v(`option`,{key:0,value:t.provider},d(t.provider)+` (not enabled)`,9,Yt)):_(``,!0),(r(!0),v(f,null,o(W.value,e=>(r(),v(`option`,{key:e.id,value:e.id},d(e.label),9,Xt))),128))],40,Jt),[[h,t.provider]])]),p(`label`,Zt,[n[46]||=p(`span`,null,`Model`,-1),s(p(`select`,{"onUpdate:modelValue":e=>t.model=e,"aria-label":`Model`,onChange:e=>Ti(t)},[n[45]||=p(`option`,{value:``},`Provider default`,-1),t.model&&!G(t.provider).some(e=>e.id===t.model)?(r(),v(`option`,{key:0,value:t.model},d(t.model)+` (not reported)`,9,$t)):_(``,!0),(r(!0),v(f,null,o(G(t.provider),e=>(r(),v(`option`,{key:e.id,value:e.id},d(e.label),9,en))),128))],40,Qt),[[h,t.model]])]),p(`label`,tn,[n[48]||=p(`span`,null,`Thinking`,-1),s(p(`select`,{"onUpdate:modelValue":e=>t.thinkingOptionId=e,"aria-label":`Thinking`},[n[47]||=p(`option`,{value:``},`Model default`,-1),t.thinkingOptionId&&!K(t.provider,t.model).some(e=>e.id===t.thinkingOptionId)?(r(),v(`option`,{key:0,value:t.thinkingOptionId},d(t.thinkingOptionId)+` (not reported) `,9,rn)):_(``,!0),(r(!0),v(f,null,o(K(t.provider,t.model),e=>(r(),v(`option`,{key:e.id,value:e.id},d(e.label),9,an))),128))],8,nn),[[h,t.thinkingOptionId]])]),p(`label`,on,[n[50]||=p(`span`,null,`Mode`,-1),s(p(`select`,{"onUpdate:modelValue":e=>t.modeId=e,"aria-label":`Mode`},[n[49]||=p(`option`,{value:``},`Provider default`,-1),t.modeId&&!Si(t.provider).some(e=>e.id===t.modeId)?(r(),v(`option`,{key:0,value:t.modeId},d(t.modeId)+` (not reported)`,9,cn)):_(``,!0),(r(!0),v(f,null,o(Si(t.provider),e=>(r(),v(`option`,{key:e.id,value:e.id},d(e.label),9,ln))),128))],8,sn),[[h,t.modeId]])])]),p(`label`,un,[n[51]||=p(`span`,null,`When to use`,-1),s(p(`textarea`,{"onUpdate:modelValue":e=>t.notes=e,rows:`4`,placeholder:`Shown to orchestrating agents choosing a profile`},null,8,dn),[[u,t.notes]])]),p(`div`,fn,[p(`button`,{type:`button`,class:`btn btn-outline btn-sm`,disabled:a===0,onClick:e=>Ei(w.value.agentProfiles,a,-1)},`Move up`,8,pn),p(`button`,{type:`button`,class:`btn btn-outline btn-sm`,disabled:a===w.value.agentProfiles.length-1,onClick:e=>Ei(w.value.agentProfiles,a,1)},` Move down `,8,mn),p(`button`,{type:`button`,class:`btn btn-outline btn-sm hs-danger`,onClick:e=>Ai(w.value.agentProfiles,a,`agent profile`)},[e(y,{name:`trash`,size:13}),n[52]||=i(`Remove `,-1)],8,hn)])])):_(``,!0)],2))),128))])],64)):_(``,!0),w.value.metadataProviders?(r(),v(f,{key:4},[p(`div`,gn,[n[55]||=p(`h2`,{id:`hs-metadata`,class:`section-label`},`Metadata generation`,-1),p(`button`,{type:`button`,class:`btn btn-outline btn-sm`,onClick:ki},[e(y,{name:`plus`,size:13}),n[54]||=i(`Add provider`,-1)])]),n[58]||=p(`p`,{class:`subtle hs-hint`},`Providers tried in order for branch names, commit messages and pull requests. None: Paseo picks automatically.`,-1),p(`div`,_n,[w.value.metadataProviders.length?_(``,!0):(r(),v(`p`,vn,`Automatic selection.`)),(r(!0),v(f,null,o(w.value.metadataProviders,(t,i)=>(r(),v(`div`,{key:t.key,class:`card-row hs-meta-row`},[p(`span`,yn,d(i+1),1),s(p(`select`,{"onUpdate:modelValue":e=>t.provider=e,"aria-label":`Metadata provider `+(i+1),onChange:e=>wi(t)},[t.provider&&!W.value.some(e=>e.id===t.provider)?(r(),v(`option`,{key:0,value:t.provider},d(t.provider)+` (not enabled)`,9,xn)):_(``,!0),(r(!0),v(f,null,o(W.value,e=>(r(),v(`option`,{key:e.id,value:e.id},d(e.label),9,Sn))),128))],40,bn),[[h,t.provider]]),s(p(`select`,{"onUpdate:modelValue":e=>t.model=e,"aria-label":`Metadata model `+(i+1),onChange:e=>Ti(t)},[n[56]||=p(`option`,{value:``},`Default model`,-1),t.model&&!G(t.provider).some(e=>e.id===t.model)?(r(),v(`option`,{key:0,value:t.model},d(t.model)+` (not reported)`,9,wn)):_(``,!0),(r(!0),v(f,null,o(G(t.provider),e=>(r(),v(`option`,{key:e.id,value:e.id},d(e.label),9,Tn))),128))],40,Cn),[[h,t.model]]),s(p(`select`,{"onUpdate:modelValue":e=>t.thinkingOptionId=e,"aria-label":`Metadata thinking `+(i+1)},[n[57]||=p(`option`,{value:``},`Default thinking`,-1),t.thinkingOptionId&&!K(t.provider,t.model).some(e=>e.id===t.thinkingOptionId)?(r(),v(`option`,{key:0,value:t.thinkingOptionId},d(t.thinkingOptionId),9,Dn)):_(``,!0),(r(!0),v(f,null,o(K(t.provider,t.model),e=>(r(),v(`option`,{key:e.id,value:e.id},d(e.label),9,On))),128))],8,En),[[h,t.thinkingOptionId]]),p(`span`,kn,[p(`button`,{type:`button`,class:`icon-btn hs-up`,disabled:i===0,"aria-label":`Move up`,title:`Move up`,onClick:e=>Ei(w.value.metadataProviders,i,-1)},[e(y,{name:`chevron`,size:14})],8,An),p(`button`,{type:`button`,class:`icon-btn`,"aria-label":`Remove`,title:`Remove`,onClick:e=>w.value.metadataProviders.splice(i,1)},[e(y,{name:`close`,size:14})],8,jn)])]))),128))])],64)):_(``,!0),p(`div`,Mn,[n[60]||=p(`h2`,{id:`hs-terminals`,class:`section-label`},`Terminal profiles`,-1),p(`button`,{type:`button`,class:`btn btn-outline btn-sm`,onClick:Oi},[e(y,{name:`plus`,size:13}),n[59]||=i(`Add terminal profile`,-1)])]),n[70]||=p(`p`,{class:`subtle hs-hint`},`Commands offered when opening a new terminal on this host.`,-1),p(`div`,Nn,[w.value.terminalProfiles?.length?_(``,!0):(r(),v(`p`,Pn,`No terminal profiles yet.`)),(r(!0),v(f,null,o(w.value.terminalProfiles??[],(t,a)=>(r(),v(`div`,{key:t.key,class:l([`hs-item`,{"is-open":q.value[t.key]}])},[p(`button`,{type:`button`,class:`card-row hs-item-head`,"aria-expanded":!!q.value[t.key],onClick:e=>q.value[t.key]=!q.value[t.key]},[p(`span`,In,[p(`span`,Ln,d(t.name.trim()||`Untitled terminal`),1),p(`span`,Rn,d([t.command,...t.argsText.split(`