heyio 1.1.1 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyio",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "IO — a personal AI assistant daemon built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "io": "dist/index.js"
@@ -1,4 +1,4 @@
1
- import{f as v,j as h,r as d,i as _,o as b,m as o,e as c,a as n,u,d as y,F as k,p as w,E as S,z as M,b as g,n as C,k as x}from"./index-x4G-bL2N.js";import{c as D}from"./api-Bb5_Gvnf.js";import{_ as I}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-LK_1LFOW.js";/**
1
+ import{f as v,j as h,r as d,i as _,o as b,m as o,e as c,a as n,u,d as y,F as k,p as w,G as S,A as M,b as g,n as C,k as x}from"./index-CMctONs4.js";import{c as D}from"./api-GN_ZR-Nh.js";import{_ as I}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-Bo47khKQ.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,4 +8,4 @@ import{f as v,j as h,r as d,i as _,o as b,m as o,e as c,a as n,u,d as y,F as k,p
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const j=v("SquareIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),B=h("chat",()=>{const r=d([]),a=d(!1),i=d(null);function l(t){const e={id:crypto.randomUUID(),role:"user",content:t,timestamp:new Date};return r.value.push(e),e}async function m(t){l(t),a.value=!0;const e={id:crypto.randomUUID(),role:"assistant",content:"",timestamp:new Date,streaming:!0};r.value.push(e);try{const s=await D("/message",{prompt:t});e.content=s.content,e.streaming=!1}catch(s){e.content=`Error: ${s.message}`,e.streaming=!1}finally{a.value=!1}}function f(t){const e=r.value[r.value.length-1];e!=null&&e.streaming&&(e.content=t)}function p(){r.value=[]}return{messages:r,isStreaming:a,eventSource:i,sendMessage:m,updateStreamingMessage:f,clearMessages:p}}),z={class:"flex flex-col h-full"},E={key:0,class:"flex items-center justify-center h-full"},T={key:1,class:"text-muted-foreground"},V={key:2,class:"inline-block w-2 h-4 bg-current animate-pulse ml-1"},K={class:"border-t border-border p-4"},q={class:"flex gap-2 items-end"},F=["disabled"],H=_({__name:"ChatView",setup(r){const a=B(),i=d(""),l=d();async function m(){const t=i.value.trim();!t||a.isStreaming||(i.value="",await a.sendMessage(t),await C(),f())}function f(){l.value&&(l.value.scrollTop=l.value.scrollHeight)}function p(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),m())}return b(()=>f()),(t,e)=>(o(),c("div",z,[n("div",{ref_key:"messagesContainer",ref:l,class:"flex-1 overflow-y-auto p-4 space-y-4"},[u(a).messages.length===0?(o(),c("div",E,[...e[1]||(e[1]=[n("div",{class:"text-center text-muted-foreground"},[n("div",{class:"text-4xl mb-3"},"🤖"),n("p",{class:"text-lg font-medium"},"Welcome to IO"),n("p",{class:"text-sm mt-1"},"Send a message to get started.")],-1)])])):y("",!0),(o(!0),c(k,null,w(u(a).messages,s=>(o(),c("div",{key:s.id,class:x(["flex",s.role==="user"?"justify-end":"justify-start"])},[n("div",{class:x(["max-w-[75%] rounded-lg px-4 py-2 text-sm",s.role==="user"?"bg-blue-600 text-white":"bg-muted text-foreground"])},[s.content?(o(),g(I,{key:0,content:s.content,class:x(s.role==="user"?"prose-invert":"")},null,8,["content","class"])):(o(),c("span",T,"...")),s.streaming?(o(),c("div",V)):y("",!0)],2)],2))),128))],512),n("div",K,[n("div",q,[S(n("textarea",{"onUpdate:modelValue":e[0]||(e[0]=s=>i.value=s),onKeydown:p,placeholder:"Send a message...",rows:"1",class:"flex-1 resize-none rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring min-h-[40px] max-h-[120px]"},null,544),[[M,i.value]]),n("button",{onClick:m,disabled:!i.value.trim()||u(a).isStreaming,class:"rounded-md bg-primary text-primary-foreground p-2 hover:bg-primary/90 disabled:opacity-50 transition-colors"},[u(a).isStreaming?(o(),g(u(j),{key:1,class:"w-4 h-4"})):(o(),g(u(U),{key:0,class:"w-4 h-4"}))],8,F)])])]))}});export{H as default};
11
+ */const j=v("SquareIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),B=h("chat",()=>{const r=d([]),a=d(!1),i=d(null);function l(t){const e={id:crypto.randomUUID(),role:"user",content:t,timestamp:new Date};return r.value.push(e),e}async function m(t){l(t),a.value=!0;const e={id:crypto.randomUUID(),role:"assistant",content:"",timestamp:new Date,streaming:!0};r.value.push(e);try{const s=await D("/message",{prompt:t});e.content=s.content,e.streaming=!1}catch(s){e.content=`Error: ${s.message}`,e.streaming=!1}finally{a.value=!1}}function f(t){const e=r.value[r.value.length-1];e!=null&&e.streaming&&(e.content=t)}function p(){r.value=[]}return{messages:r,isStreaming:a,eventSource:i,sendMessage:m,updateStreamingMessage:f,clearMessages:p}}),T={class:"flex flex-col h-full"},V={key:0,class:"flex items-center justify-center h-full"},z={key:1,class:"text-muted-foreground"},E={key:2,class:"inline-block w-2 h-4 bg-current animate-pulse ml-1"},K={class:"border-t border-border p-4"},q={class:"flex gap-2 items-end"},F=["disabled"],A=_({__name:"ChatView",setup(r){const a=B(),i=d(""),l=d();async function m(){const t=i.value.trim();!t||a.isStreaming||(i.value="",await a.sendMessage(t),await C(),f())}function f(){l.value&&(l.value.scrollTop=l.value.scrollHeight)}function p(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),m())}return b(()=>f()),(t,e)=>(o(),c("div",T,[n("div",{ref_key:"messagesContainer",ref:l,class:"flex-1 overflow-y-auto p-4 space-y-4"},[u(a).messages.length===0?(o(),c("div",V,[...e[1]||(e[1]=[n("div",{class:"text-center text-muted-foreground"},[n("div",{class:"text-4xl mb-3"},"🤖"),n("p",{class:"text-lg font-medium"},"Welcome to IO"),n("p",{class:"text-sm mt-1"},"Send a message to get started.")],-1)])])):y("",!0),(o(!0),c(k,null,w(u(a).messages,s=>(o(),c("div",{key:s.id,class:x(["flex",s.role==="user"?"justify-end":"justify-start"])},[n("div",{class:x(["max-w-[75%] rounded-lg px-4 py-2 text-sm",s.role==="user"?"bg-blue-600 text-white":"bg-muted text-foreground"])},[s.content?(o(),g(I,{key:0,content:s.content,class:x(s.role==="user"?"prose-invert":"")},null,8,["content","class"])):(o(),c("span",z,"...")),s.streaming?(o(),c("div",E)):y("",!0)],2)],2))),128))],512),n("div",K,[n("div",q,[S(n("textarea",{"onUpdate:modelValue":e[0]||(e[0]=s=>i.value=s),onKeydown:p,placeholder:"Send a message...",rows:"1",class:"flex-1 resize-none rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring min-h-[40px] max-h-[120px]"},null,544),[[M,i.value]]),n("button",{onClick:m,disabled:!i.value.trim()||u(a).isStreaming,class:"rounded-md bg-primary text-primary-foreground p-2 hover:bg-primary/90 disabled:opacity-50 transition-colors"},[u(a).isStreaming?(o(),g(u(j),{key:1,class:"w-4 h-4"})):(o(),g(u(U),{key:0,class:"w-4 h-4"}))],8,F)])])]))}});export{A as default};
@@ -1,6 +1,6 @@
1
- import{f as $,i as I,o as F,m as a,e as n,a as o,F as b,p as g,h as i,u as _,I as M,r as d,k as m,t as u,H as y,d as k}from"./index-x4G-bL2N.js";import{b as N,c as V,a as B}from"./api-Bb5_Gvnf.js";import{_ as D}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-LK_1LFOW.js";import{T as L}from"./trash-2-BMzWlawI.js";/**
1
+ import{f as $,i as I,o as F,m as a,e as n,a as o,F as b,p as g,h as i,u as _,I as M,r as d,k as m,t as u,J as y,d as k}from"./index-CMctONs4.js";import{b as N,c as V,a as B}from"./api-GN_ZR-Nh.js";import{_ as D}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-Bo47khKQ.js";import{T as L}from"./trash-2-yEg_2EGm.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const T=$("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),j={class:"p-6"},z={class:"flex items-center justify-between mb-6"},A={class:"flex gap-2"},E=["onClick"],G={key:0,class:"text-muted-foreground"},H={key:1,class:"text-center py-12 text-muted-foreground"},P={key:2,class:"space-y-2"},R=["onClick"],S={class:"flex-1 min-w-0"},U={class:"flex items-center gap-2"},q={class:"text-xs bg-secondary text-secondary-foreground px-2 py-0.5 rounded-full"},J={class:"text-xs text-muted-foreground mt-0.5"},K={class:"flex gap-1"},O=["onClick"],Q=["onClick"],W={key:0,class:"px-4 pb-3 border-t border-border pt-3"},oe=I({__name:"FeedView",setup(X){const r=d([]),l=d(0),p=d("all"),f=d(!0),c=d(null);async function x(){f.value=!0;try{const t=await N(`/feed?unread=${p.value==="unread"}`);r.value=t.items,l.value=t.unreadCount}finally{f.value=!1}}async function h(t){await V(`/feed/${t}/read`);const s=r.value.find(e=>e.id===t);s&&(s.read=1,l.value=Math.max(0,l.value-1))}async function C(t){await B(`/feed/${t}`),r.value=r.value.filter(s=>s.id!==t)}function w(t){c.value=c.value===t?null:t,c.value===t&&h(t)}return F(x),(t,s)=>(a(),n("div",j,[o("div",z,[s[0]||(s[0]=o("h1",{class:"text-2xl font-bold"},"Feed",-1)),o("div",A,[(a(),n(b,null,g(["all","unread"],e=>o("button",{key:e,onClick:v=>{p.value=e,x()},class:m(["px-3 py-1.5 text-xs rounded-md border transition-colors",p.value===e?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-foreground"])},u(e==="all"?"All":`Unread (${l.value})`),11,E)),64))])]),f.value?(a(),n("div",G,"Loading...")):r.value.length===0?(a(),n("div",H,[i(_(M),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),s[1]||(s[1]=o("p",null,"No feed items.",-1))])):(a(),n("div",P,[(a(!0),n(b,null,g(r.value,e=>(a(),n("div",{key:e.id,class:m(["border border-border rounded-lg overflow-hidden",{"border-l-2 border-l-primary":!e.read}])},[o("div",{onClick:v=>w(e.id),class:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-muted/50 transition-colors"},[o("div",S,[o("div",U,[o("span",q,u(e.source),1),o("span",{class:m(["text-sm font-medium truncate",{"font-bold":!e.read}])},u(e.title),3)]),o("p",J,u(e.created_at),1)]),o("div",K,[e.read?k("",!0):(a(),n("button",{key:0,onClick:y(v=>h(e.id),["stop"]),class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Mark as read"},[i(_(T),{class:"w-3.5 h-3.5"})],8,O)),o("button",{onClick:y(v=>C(e.id),["stop"]),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",title:"Delete"},[i(_(L),{class:"w-3.5 h-3.5"})],8,Q)])],8,R),c.value===e.id?(a(),n("div",W,[i(D,{content:e.content},null,8,["content"])])):k("",!0)],2))),128))]))]))}});export{oe as default};
6
+ */const T=$("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),j={class:"p-6"},z={class:"flex items-center justify-between mb-6"},A={class:"flex gap-2"},E=["onClick"],G={key:0,class:"text-muted-foreground"},J={key:1,class:"text-center py-12 text-muted-foreground"},P={key:2,class:"space-y-2"},R=["onClick"],S={class:"flex-1 min-w-0"},U={class:"flex items-center gap-2"},q={class:"text-xs bg-secondary text-secondary-foreground px-2 py-0.5 rounded-full"},H={class:"text-xs text-muted-foreground mt-0.5"},K={class:"flex gap-1"},O=["onClick"],Q=["onClick"],W={key:0,class:"px-4 pb-3 border-t border-border pt-3"},oe=I({__name:"FeedView",setup(X){const r=d([]),l=d(0),p=d("all"),f=d(!0),c=d(null);async function x(){f.value=!0;try{const t=await N(`/feed?unread=${p.value==="unread"}`);r.value=t.items,l.value=t.unreadCount}finally{f.value=!1}}async function h(t){await V(`/feed/${t}/read`);const s=r.value.find(e=>e.id===t);s&&(s.read=1,l.value=Math.max(0,l.value-1))}async function C(t){await B(`/feed/${t}`),r.value=r.value.filter(s=>s.id!==t)}function w(t){c.value=c.value===t?null:t,c.value===t&&h(t)}return F(x),(t,s)=>(a(),n("div",j,[o("div",z,[s[0]||(s[0]=o("h1",{class:"text-2xl font-bold"},"Feed",-1)),o("div",A,[(a(),n(b,null,g(["all","unread"],e=>o("button",{key:e,onClick:v=>{p.value=e,x()},class:m(["px-3 py-1.5 text-xs rounded-md border transition-colors",p.value===e?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-foreground"])},u(e==="all"?"All":`Unread (${l.value})`),11,E)),64))])]),f.value?(a(),n("div",G,"Loading...")):r.value.length===0?(a(),n("div",J,[i(_(M),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),s[1]||(s[1]=o("p",null,"No feed items.",-1))])):(a(),n("div",P,[(a(!0),n(b,null,g(r.value,e=>(a(),n("div",{key:e.id,class:m(["border border-border rounded-lg overflow-hidden",{"border-l-2 border-l-primary":!e.read}])},[o("div",{onClick:v=>w(e.id),class:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-muted/50 transition-colors"},[o("div",S,[o("div",U,[o("span",q,u(e.source),1),o("span",{class:m(["text-sm font-medium truncate",{"font-bold":!e.read}])},u(e.title),3)]),o("p",H,u(e.created_at),1)]),o("div",K,[e.read?k("",!0):(a(),n("button",{key:0,onClick:y(v=>h(e.id),["stop"]),class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Mark as read"},[i(_(T),{class:"w-3.5 h-3.5"})],8,O)),o("button",{onClick:y(v=>C(e.id),["stop"]),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",title:"Delete"},[i(_(L),{class:"w-3.5 h-3.5"})],8,Q)])],8,R),c.value===e.id?(a(),n("div",W,[i(D,{content:e.content},null,8,["content"])])):k("",!0)],2))),128))]))]))}});export{oe as default};
@@ -0,0 +1 @@
1
+ import{i as b,v,m as d,e as u,a as e,J as y,G as m,A as p,t as c,d as w,u as f,r as i,x as h}from"./index-CMctONs4.js";const k={class:"min-h-screen flex items-center justify-center bg-background p-4"},S={class:"w-full max-w-sm space-y-6"},_={key:0,class:"text-sm text-destructive"},V=["disabled"],q=b({__name:"LoginView",setup(B){const o=v(),g=h(),n=i(""),r=i(""),s=i("");async function x(){s.value="";try{await o.login(n.value,r.value),g.push("/")}catch(l){s.value=l.message??"Login failed"}}return(l,t)=>(d(),u("div",k,[e("div",S,[t[4]||(t[4]=e("div",{class:"text-center"},[e("div",{class:"text-4xl mb-2"},"🤖"),e("h1",{class:"text-2xl font-bold"},"IO"),e("p",{class:"text-sm text-muted-foreground mt-1"},"Sign in to your dashboard")],-1)),e("form",{onSubmit:y(x,["prevent"]),class:"space-y-4"},[e("div",null,[t[2]||(t[2]=e("label",{class:"text-sm font-medium",for:"email"},"Email",-1)),m(e("input",{id:"email","onUpdate:modelValue":t[0]||(t[0]=a=>n.value=a),type:"email",required:"",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"you@example.com"},null,512),[[p,n.value]])]),e("div",null,[t[3]||(t[3]=e("label",{class:"text-sm font-medium",for:"password"},"Password",-1)),m(e("input",{id:"password","onUpdate:modelValue":t[1]||(t[1]=a=>r.value=a),type:"password",required:"",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"••••••••"},null,512),[[p,r.value]])]),s.value?(d(),u("div",_,c(s.value),1)):w("",!0),e("button",{type:"submit",disabled:f(o).loading,class:"w-full rounded-md bg-primary text-primary-foreground px-4 py-2 text-sm font-medium hover:bg-primary/90 disabled:opacity-50 transition-colors"},c(f(o).loading?"Signing in...":"Sign In"),9,V)],32)])]))}});export{q as default};
@@ -1,4 +1,4 @@
1
- var me=Object.defineProperty;var we=(n,e,t)=>e in n?me(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var d=(n,e,t)=>we(n,typeof e!="symbol"?e+"":e,t);import{i as ye,m as Re,e as Se,c as $e}from"./index-x4G-bL2N.js";function j(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $=j();function ae(n){$=n}var z={exec:()=>null};function u(n,e=""){let t=typeof n=="string"?n:n.source;const r={replace:(s,i)=>{let c=typeof i=="string"?i:i.source;return c=c.replace(b.caret,"$1"),t=t.replace(s,c),r},getRegex:()=>new RegExp(t,e)};return r}var b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},ve=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ze=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,H=/(?:[*+-]|\d{1,9}[.)])/,oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=u(oe).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ae=u(oe).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Q=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Le=/^[^\n]+/,F=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ce=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",F).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ie=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,H).getRegex(),E="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",U=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pe=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",U).replace("tag",E).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he=u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E).getRegex(),Be=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",he).getRegex(),X={blockquote:Be,code:Te,def:Ce,fences:_e,heading:ze,hr:A,html:Pe,lheading:ce,list:Ie,newline:ve,paragraph:he,table:z,text:Le},ne=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E).getRegex(),Ee={...X,lheading:Ae,table:ne,paragraph:u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E).getRegex()},qe={...X,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",U).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(Q).replace("hr",A).replace("heading",` *#{1,6} *[^
1
+ var me=Object.defineProperty;var we=(n,e,t)=>e in n?me(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var d=(n,e,t)=>we(n,typeof e!="symbol"?e+"":e,t);import{i as ye,m as Re,e as Se,c as $e}from"./index-CMctONs4.js";function j(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $=j();function ae(n){$=n}var z={exec:()=>null};function u(n,e=""){let t=typeof n=="string"?n:n.source;const r={replace:(s,i)=>{let c=typeof i=="string"?i:i.source;return c=c.replace(b.caret,"$1"),t=t.replace(s,c),r},getRegex:()=>new RegExp(t,e)};return r}var b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},ve=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ze=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,H=/(?:[*+-]|\d{1,9}[.)])/,oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=u(oe).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ae=u(oe).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Q=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Le=/^[^\n]+/,F=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ce=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",F).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ie=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,H).getRegex(),E="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",U=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pe=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",U).replace("tag",E).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he=u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E).getRegex(),Be=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",he).getRegex(),X={blockquote:Be,code:Te,def:Ce,fences:_e,heading:ze,hr:A,html:Pe,lheading:ce,list:Ie,newline:ve,paragraph:he,table:z,text:Le},ne=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E).getRegex(),Ee={...X,lheading:Ae,table:ne,paragraph:u(Q).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E).getRegex()},qe={...X,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",U).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(Q).replace("hr",A).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",ce).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ze=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,De=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pe=/^( {2,}|\\)\n(?!\s*$)/,Me=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,q=/[\p{P}\p{S}]/u,W=/[\s\p{P}\p{S}]/u,ue=/[^\s\p{P}\p{S}]/u,Ge=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,W).getRegex(),ge=/(?!~)[\p{P}\p{S}]/u,Oe=/(?!~)[\s\p{P}\p{S}]/u,Ne=/(?:[^\s\p{P}\p{S}]|~)/u,je=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,fe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,He=u(fe,"u").replace(/punct/g,q).getRegex(),Qe=u(fe,"u").replace(/punct/g,ge).getRegex(),de="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Fe=u(de,"gu").replace(/notPunctSpace/g,ue).replace(/punctSpace/g,W).replace(/punct/g,q).getRegex(),Ue=u(de,"gu").replace(/notPunctSpace/g,Ne).replace(/punctSpace/g,Oe).replace(/punct/g,ge).getRegex(),Xe=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ue).replace(/punctSpace/g,W).replace(/punct/g,q).getRegex(),We=u(/\\(punct)/,"gu").replace(/punct/g,q).getRegex(),Je=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ke=u(U).replace("(?:-->|$)","-->").getRegex(),Ve=u("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ke).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),I=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ye=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",I).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ke=u(/^!?\[(label)\]\[(ref)\]/).replace("label",I).replace("ref",F).getRegex(),xe=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",F).getRegex(),et=u("reflink|nolink(?!\\()","g").replace("reflink",ke).replace("nolink",xe).getRegex(),J={_backpedal:z,anyPunctuation:We,autolink:Je,blockSkip:je,br:pe,code:De,del:z,emStrongLDelim:He,emStrongRDelimAst:Fe,emStrongRDelimUnd:Xe,escape:Ze,link:Ye,nolink:xe,punctuation:Ge,reflink:ke,reflinkSearch:et,tag:Ve,text:Me,url:z},tt={...J,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",I).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",I).getRegex()},G={...J,emStrongRDelimAst:Ue,emStrongLDelim:Qe,url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},nt={...G,br:u(pe).replace("{2,}","*").getRegex(),text:u(G.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},L={normal:X,gfm:Ee,pedantic:qe},T={normal:J,gfm:G,breaks:nt,pedantic:tt},rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},re=n=>rt[n];function w(n,e){if(e){if(b.escapeTest.test(n))return n.replace(b.escapeReplace,re)}else if(b.escapeTestNoEncode.test(n))return n.replace(b.escapeReplaceNoEncode,re);return n}function se(n){try{n=encodeURI(n).replace(b.percentDecode,"%")}catch{return null}return n}function ie(n,e){var i;const t=n.replace(b.findPipe,(c,l,h)=>{let a=!1,o=l;for(;--o>=0&&h[o]==="\\";)a=!a;return a?"|":" |"}),r=t.split(b.splitPipe);let s=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(b.slashPipe,"|");return r}function _(n,e,t){const r=n.length;if(r===0)return"";let s=0;for(;s<r&&n.charAt(r-s-1)===e;)s++;return n.slice(0,r-s)}function st(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<n.length;r++)if(n[r]==="\\")r++;else if(n[r]===e[0])t++;else if(n[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function le(n,e,t,r,s){const i=e.href,c=e.title||null,l=n[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;const h={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:c,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,h}function it(n,e,t){const r=n.match(t.other.indentCodeCompensation);if(r===null)return e;const s=r[1];return e.split(`
3
3
  `).map(i=>{const c=i.match(t.other.beginningSpace);if(c===null)return i;const[l]=c;return l.length>=s.length?i.slice(s.length):i}).join(`
4
4
  `)}var P=class{constructor(n){d(this,"options");d(this,"rules");d(this,"lexer");this.options=n||$}space(n){const e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){const e=this.rules.block.code.exec(n);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:_(t,`
@@ -1 +1 @@
1
- import{i as w,o as C,m as a,e as n,a as t,h as m,u as p,g as h,E as u,z as v,y as S,d as _,S as V,F as M,p as N,r as i,t as b,k as y}from"./index-x4G-bL2N.js";import{b as P,c as T,d as U,a as $}from"./api-Bb5_Gvnf.js";import{P as B}from"./plus-Drw0JiiN.js";import{T as D}from"./trash-2-BMzWlawI.js";const L={class:"p-6"},j={class:"flex items-center justify-between mb-6"},z={key:0,class:"border border-border rounded-lg p-4 mb-6 space-y-3"},A={class:"grid grid-cols-2 gap-3"},E={key:0},F={key:1},G={key:1,class:"text-muted-foreground"},R={key:2,class:"text-center py-12 text-muted-foreground"},q={key:3,class:"space-y-2"},H={class:"font-medium text-sm"},I={class:"ml-2 text-xs text-muted-foreground bg-secondary px-1.5 py-0.5 rounded"},J={class:"flex items-center gap-3"},K=["onClick"],O=["onClick"],ee=w({__name:"McpView",setup(Q){const d=i([]),c=i(!0),r=i(!1),o=i({name:"",type:"stdio",command:"",url:""});C(async()=>{try{d.value=await P("/mcp")}finally{c.value=!1}});async function f(l){await U(`/mcp/${l.id}`,{enabled:!l.enabled}),l.enabled=!l.enabled}async function x(l){await $(`/mcp/${l}`),d.value=d.value.filter(e=>e.id!==l)}async function g(){const l={name:o.value.name,type:o.value.type};o.value.type==="stdio"?l.command=o.value.command:l.url=o.value.url;const e=await T("/mcp",l);d.value.push(e),r.value=!1,o.value={name:"",type:"stdio",command:"",url:""}}return(l,e)=>(a(),n("div",L,[t("div",j,[e[6]||(e[6]=t("h1",{class:"text-2xl font-bold"},"MCP Servers",-1)),t("button",{onClick:e[0]||(e[0]=s=>r.value=!r.value),class:"inline-flex items-center gap-1 px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors"},[m(p(B),{class:"w-4 h-4"}),e[5]||(e[5]=h(" Add Server ",-1))])]),r.value?(a(),n("div",z,[t("div",A,[t("div",null,[e[7]||(e[7]=t("label",{class:"text-sm font-medium"},"Name",-1)),u(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>o.value.name=s),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[v,o.value.name]])]),t("div",null,[e[9]||(e[9]=t("label",{class:"text-sm font-medium"},"Type",-1)),u(t("select",{"onUpdate:modelValue":e[2]||(e[2]=s=>o.value.type=s),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[8]||(e[8]=[t("option",{value:"stdio"},"stdio",-1),t("option",{value:"http"},"http",-1)])],512),[[S,o.value.type]])])]),o.value.type==="stdio"?(a(),n("div",E,[e[10]||(e[10]=t("label",{class:"text-sm font-medium"},"Command",-1)),u(t("input",{"onUpdate:modelValue":e[3]||(e[3]=s=>o.value.command=s),placeholder:"npx @my/mcp-server",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[v,o.value.command]])])):(a(),n("div",F,[e[11]||(e[11]=t("label",{class:"text-sm font-medium"},"URL",-1)),u(t("input",{"onUpdate:modelValue":e[4]||(e[4]=s=>o.value.url=s),placeholder:"https://...",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[v,o.value.url]])])),t("button",{onClick:g,class:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90"},"Save")])):_("",!0),c.value?(a(),n("div",G,"Loading...")):d.value.length===0?(a(),n("div",R,[m(p(V),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[12]||(e[12]=t("p",null,"No MCP servers configured.",-1))])):(a(),n("div",q,[(a(!0),n(M,null,N(d.value,s=>(a(),n("div",{key:s.id,class:"flex items-center justify-between border border-border rounded-lg px-4 py-3"},[t("div",null,[t("span",H,b(s.name),1),t("span",I,b(s.type),1)]),t("div",J,[t("button",{onClick:k=>f(s),class:y(["relative w-10 h-5 rounded-full transition-colors",s.enabled?"bg-primary":"bg-muted"])},[t("span",{class:y(["absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform",s.enabled?"translate-x-5":"translate-x-0.5"])},null,2)],10,K),t("button",{onClick:k=>x(s.id),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive"},[m(p(D),{class:"w-4 h-4"})],8,O)])]))),128))]))]))}});export{ee as default};
1
+ import{i as w,o as C,m as a,e as n,a as t,h as m,u as p,g as h,G as u,A as v,z as S,d as _,S as V,F as M,p as N,r as i,t as b,k as y}from"./index-CMctONs4.js";import{b as P,c as T,d as U,a as $}from"./api-GN_ZR-Nh.js";import{P as A}from"./plus-CObRuHy3.js";import{T as B}from"./trash-2-yEg_2EGm.js";const D={class:"p-6"},L={class:"flex items-center justify-between mb-6"},j={key:0,class:"border border-border rounded-lg p-4 mb-6 space-y-3"},z={class:"grid grid-cols-2 gap-3"},F={key:0},G={key:1},E={key:1,class:"text-muted-foreground"},R={key:2,class:"text-center py-12 text-muted-foreground"},q={key:3,class:"space-y-2"},H={class:"font-medium text-sm"},I={class:"ml-2 text-xs text-muted-foreground bg-secondary px-1.5 py-0.5 rounded"},J={class:"flex items-center gap-3"},K=["onClick"],O=["onClick"],ee=w({__name:"McpView",setup(Q){const d=i([]),c=i(!0),r=i(!1),o=i({name:"",type:"stdio",command:"",url:""});C(async()=>{try{d.value=await P("/mcp")}finally{c.value=!1}});async function f(l){await U(`/mcp/${l.id}`,{enabled:!l.enabled}),l.enabled=!l.enabled}async function x(l){await $(`/mcp/${l}`),d.value=d.value.filter(e=>e.id!==l)}async function g(){const l={name:o.value.name,type:o.value.type};o.value.type==="stdio"?l.command=o.value.command:l.url=o.value.url;const e=await T("/mcp",l);d.value.push(e),r.value=!1,o.value={name:"",type:"stdio",command:"",url:""}}return(l,e)=>(a(),n("div",D,[t("div",L,[e[6]||(e[6]=t("h1",{class:"text-2xl font-bold"},"MCP Servers",-1)),t("button",{onClick:e[0]||(e[0]=s=>r.value=!r.value),class:"inline-flex items-center gap-1 px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors"},[m(p(A),{class:"w-4 h-4"}),e[5]||(e[5]=h(" Add Server ",-1))])]),r.value?(a(),n("div",j,[t("div",z,[t("div",null,[e[7]||(e[7]=t("label",{class:"text-sm font-medium"},"Name",-1)),u(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>o.value.name=s),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[v,o.value.name]])]),t("div",null,[e[9]||(e[9]=t("label",{class:"text-sm font-medium"},"Type",-1)),u(t("select",{"onUpdate:modelValue":e[2]||(e[2]=s=>o.value.type=s),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[8]||(e[8]=[t("option",{value:"stdio"},"stdio",-1),t("option",{value:"http"},"http",-1)])],512),[[S,o.value.type]])])]),o.value.type==="stdio"?(a(),n("div",F,[e[10]||(e[10]=t("label",{class:"text-sm font-medium"},"Command",-1)),u(t("input",{"onUpdate:modelValue":e[3]||(e[3]=s=>o.value.command=s),placeholder:"npx @my/mcp-server",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[v,o.value.command]])])):(a(),n("div",G,[e[11]||(e[11]=t("label",{class:"text-sm font-medium"},"URL",-1)),u(t("input",{"onUpdate:modelValue":e[4]||(e[4]=s=>o.value.url=s),placeholder:"https://...",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[v,o.value.url]])])),t("button",{onClick:g,class:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90"},"Save")])):_("",!0),c.value?(a(),n("div",E,"Loading...")):d.value.length===0?(a(),n("div",R,[m(p(V),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[12]||(e[12]=t("p",null,"No MCP servers configured.",-1))])):(a(),n("div",q,[(a(!0),n(M,null,N(d.value,s=>(a(),n("div",{key:s.id,class:"flex items-center justify-between border border-border rounded-lg px-4 py-3"},[t("div",null,[t("span",H,b(s.name),1),t("span",I,b(s.type),1)]),t("div",J,[t("button",{onClick:k=>f(s),class:y(["relative w-10 h-5 rounded-full transition-colors",s.enabled?"bg-primary":"bg-muted"])},[t("span",{class:y(["absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform",s.enabled?"translate-x-5":"translate-x-0.5"])},null,2)],10,K),t("button",{onClick:k=>x(s.id),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive"},[m(p(B),{class:"w-4 h-4"})],8,O)])]))),128))]))]))}});export{ee as default};
@@ -1 +1 @@
1
- import{i as q,o as V,m as d,e as r,a as t,h as c,u as v,g as $,F as y,p as k,E as p,y as w,z as h,d as P,C as T,t as m,r as n,k as b}from"./index-x4G-bL2N.js";import{b as N,c as z,d as A,a as U}from"./api-Bb5_Gvnf.js";import{P as B}from"./plus-Drw0JiiN.js";import{T as D}from"./trash-2-BMzWlawI.js";const E={class:"p-6"},I={class:"flex items-center justify-between mb-6"},M={class:"flex gap-1 border-b border-border mb-4"},j=["onClick"],F={key:0,class:"border border-border rounded-lg p-4 mb-4 space-y-3"},L={class:"grid grid-cols-2 gap-3"},O={key:0},G={key:1},H={key:1,class:"text-muted-foreground"},J={key:2,class:"text-center py-12 text-muted-foreground"},K={key:3,class:"space-y-2"},Q={class:"text-sm font-medium font-mono"},R={class:"text-xs text-muted-foreground mt-0.5"},W={class:"flex items-center gap-3"},X=["onClick"],Y=["onClick"],ae=q({__name:"SchedulesView",setup(Z){const l=n([]),g=n(!0),u=n("squad"),i=n(!1),s=n({type:"squad",cron:"",squad_id:"",agenda:"triage",prompt:""});V(async()=>{try{l.value=await N("/schedules")}finally{g.value=!1}});const f=()=>l.value.filter(a=>a.type===u.value);async function _(){const a={type:s.value.type,cron:s.value.cron};s.value.type==="squad"?(a.squad_id=s.value.squad_id,a.agenda=s.value.agenda):a.prompt=s.value.prompt;const e=await z("/schedules",a);l.value.push(e),i.value=!1}async function S(a){const e=!a.enabled;await A(`/schedules/${a.id}`,{enabled:e}),a.enabled=e?1:0}async function C(a){await U(`/schedules/${a}`),l.value=l.value.filter(e=>e.id!==a)}return(a,e)=>(d(),r("div",E,[t("div",I,[e[6]||(e[6]=t("h1",{class:"text-2xl font-bold"},"Schedules",-1)),t("button",{onClick:e[0]||(e[0]=o=>i.value=!i.value),class:"inline-flex items-center gap-1 px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors"},[c(v(B),{class:"w-4 h-4"}),e[5]||(e[5]=$(" Add Schedule ",-1))])]),t("div",M,[(d(),r(y,null,k(["squad","io"],o=>t("button",{key:o,onClick:x=>u.value=o,class:b(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",u.value===o?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"])},m(o==="squad"?"Squad Schedules":"IO Schedules"),11,j)),64))]),i.value?(d(),r("div",F,[t("div",L,[t("div",null,[e[8]||(e[8]=t("label",{class:"text-sm font-medium"},"Type",-1)),p(t("select",{"onUpdate:modelValue":e[1]||(e[1]=o=>s.value.type=o),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[7]||(e[7]=[t("option",{value:"squad"},"Squad",-1),t("option",{value:"io"},"IO",-1)])],512),[[w,s.value.type]])]),t("div",null,[e[9]||(e[9]=t("label",{class:"text-sm font-medium"},"Cron Expression",-1)),p(t("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>s.value.cron=o),placeholder:"0 9 * * 1-5",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[h,s.value.cron]])])]),s.value.type==="squad"?(d(),r("div",O,[e[11]||(e[11]=t("label",{class:"text-sm font-medium"},"Agenda",-1)),p(t("select",{"onUpdate:modelValue":e[3]||(e[3]=o=>s.value.agenda=o),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[10]||(e[10]=[t("option",{value:"triage"},"Triage",-1),t("option",{value:"prioritize"},"Prioritize",-1),t("option",{value:"ideation"},"Ideation",-1)])],512),[[w,s.value.agenda]])])):(d(),r("div",G,[e[12]||(e[12]=t("label",{class:"text-sm font-medium"},"Prompt",-1)),p(t("textarea",{"onUpdate:modelValue":e[4]||(e[4]=o=>s.value.prompt=o),rows:"2",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[h,s.value.prompt]])])),t("button",{onClick:_,class:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90"},"Save")])):P("",!0),g.value?(d(),r("div",H,"Loading...")):f().length===0?(d(),r("div",J,[c(v(T),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),t("p",null,"No "+m(u.value)+" schedules configured.",1)])):(d(),r("div",K,[(d(!0),r(y,null,k(f(),o=>(d(),r("div",{key:o.id,class:"flex items-center justify-between border border-border rounded-lg px-4 py-3"},[t("div",null,[t("div",Q,m(o.cron),1),t("div",R,m(o.type==="squad"?`Agenda: ${o.agenda}`:o.prompt.slice(0,60)),1)]),t("div",W,[t("button",{onClick:x=>S(o),class:b(["relative w-10 h-5 rounded-full transition-colors",o.enabled?"bg-primary":"bg-muted"])},[t("span",{class:b(["absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform",o.enabled?"translate-x-5":"translate-x-0.5"])},null,2)],10,X),t("button",{onClick:x=>C(o.id),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive"},[c(v(D),{class:"w-4 h-4"})],8,Y)])]))),128))]))]))}});export{ae as default};
1
+ import{i as q,o as V,m as d,e as r,a as t,h as c,u as v,g as $,F as y,p as k,G as p,z as w,A as h,d as P,C as T,t as m,r as n,k as b}from"./index-CMctONs4.js";import{b as A,c as N,d as z,a as U}from"./api-GN_ZR-Nh.js";import{P as B}from"./plus-CObRuHy3.js";import{T as D}from"./trash-2-yEg_2EGm.js";const I={class:"p-6"},M={class:"flex items-center justify-between mb-6"},j={class:"flex gap-1 border-b border-border mb-4"},E=["onClick"],F={key:0,class:"border border-border rounded-lg p-4 mb-4 space-y-3"},G={class:"grid grid-cols-2 gap-3"},L={key:0},O={key:1},H={key:1,class:"text-muted-foreground"},J={key:2,class:"text-center py-12 text-muted-foreground"},K={key:3,class:"space-y-2"},Q={class:"text-sm font-medium font-mono"},R={class:"text-xs text-muted-foreground mt-0.5"},W={class:"flex items-center gap-3"},X=["onClick"],Y=["onClick"],ae=q({__name:"SchedulesView",setup(Z){const l=n([]),g=n(!0),u=n("squad"),i=n(!1),s=n({type:"squad",cron:"",squad_id:"",agenda:"triage",prompt:""});V(async()=>{try{l.value=await A("/schedules")}finally{g.value=!1}});const f=()=>l.value.filter(a=>a.type===u.value);async function _(){const a={type:s.value.type,cron:s.value.cron};s.value.type==="squad"?(a.squad_id=s.value.squad_id,a.agenda=s.value.agenda):a.prompt=s.value.prompt;const e=await N("/schedules",a);l.value.push(e),i.value=!1}async function S(a){const e=!a.enabled;await z(`/schedules/${a.id}`,{enabled:e}),a.enabled=e?1:0}async function C(a){await U(`/schedules/${a}`),l.value=l.value.filter(e=>e.id!==a)}return(a,e)=>(d(),r("div",I,[t("div",M,[e[6]||(e[6]=t("h1",{class:"text-2xl font-bold"},"Schedules",-1)),t("button",{onClick:e[0]||(e[0]=o=>i.value=!i.value),class:"inline-flex items-center gap-1 px-3 py-1.5 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors"},[c(v(B),{class:"w-4 h-4"}),e[5]||(e[5]=$(" Add Schedule ",-1))])]),t("div",j,[(d(),r(y,null,k(["squad","io"],o=>t("button",{key:o,onClick:x=>u.value=o,class:b(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",u.value===o?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"])},m(o==="squad"?"Squad Schedules":"IO Schedules"),11,E)),64))]),i.value?(d(),r("div",F,[t("div",G,[t("div",null,[e[8]||(e[8]=t("label",{class:"text-sm font-medium"},"Type",-1)),p(t("select",{"onUpdate:modelValue":e[1]||(e[1]=o=>s.value.type=o),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[7]||(e[7]=[t("option",{value:"squad"},"Squad",-1),t("option",{value:"io"},"IO",-1)])],512),[[w,s.value.type]])]),t("div",null,[e[9]||(e[9]=t("label",{class:"text-sm font-medium"},"Cron Expression",-1)),p(t("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>s.value.cron=o),placeholder:"0 9 * * 1-5",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[h,s.value.cron]])])]),s.value.type==="squad"?(d(),r("div",L,[e[11]||(e[11]=t("label",{class:"text-sm font-medium"},"Agenda",-1)),p(t("select",{"onUpdate:modelValue":e[3]||(e[3]=o=>s.value.agenda=o),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[10]||(e[10]=[t("option",{value:"triage"},"Triage",-1),t("option",{value:"prioritize"},"Prioritize",-1),t("option",{value:"ideation"},"Ideation",-1)])],512),[[w,s.value.agenda]])])):(d(),r("div",O,[e[12]||(e[12]=t("label",{class:"text-sm font-medium"},"Prompt",-1)),p(t("textarea",{"onUpdate:modelValue":e[4]||(e[4]=o=>s.value.prompt=o),rows:"2",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[h,s.value.prompt]])])),t("button",{onClick:_,class:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90"},"Save")])):P("",!0),g.value?(d(),r("div",H,"Loading...")):f().length===0?(d(),r("div",J,[c(v(T),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),t("p",null,"No "+m(u.value)+" schedules configured.",1)])):(d(),r("div",K,[(d(!0),r(y,null,k(f(),o=>(d(),r("div",{key:o.id,class:"flex items-center justify-between border border-border rounded-lg px-4 py-3"},[t("div",null,[t("div",Q,m(o.cron),1),t("div",R,m(o.type==="squad"?`Agenda: ${o.agenda}`:o.prompt.slice(0,60)),1)]),t("div",W,[t("button",{onClick:x=>S(o),class:b(["relative w-10 h-5 rounded-full transition-colors",o.enabled?"bg-primary":"bg-muted"])},[t("span",{class:b(["absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform",o.enabled?"translate-x-5":"translate-x-0.5"])},null,2)],10,X),t("button",{onClick:x=>C(o.id),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive"},[c(v(D),{class:"w-4 h-4"})],8,Y)])]))),128))]))]))}});export{ae as default};
@@ -1 +1 @@
1
- import{i as w,o as E,m as d,e as s,a as t,t as g,F as x,p as U,E as a,z as n,y as M,x as p,d as b,r,k as T}from"./index-x4G-bL2N.js";import{b as V,d as S}from"./api-Bb5_Gvnf.js";const z={class:"p-6"},A={class:"flex items-center justify-between mb-6"},B=["disabled"],N={key:0,class:"text-muted-foreground"},C={class:"flex gap-1 border-b border-border mb-6"},I=["onClick"],D={key:0,class:"space-y-4 max-w-lg"},K={class:"flex items-center gap-3"},L={key:1,class:"space-y-4 max-w-lg"},j={class:"flex items-center gap-3"},F={key:2,class:"space-y-4 max-w-lg"},G={key:3,class:"space-y-4 max-w-lg"},O={class:"flex items-center gap-3"},P={class:"flex items-center gap-3"},H=w({__name:"SettingsView",setup(R){const f=r(!0),i=r(!1),m=r(!1),u=r("general"),y=[{id:"general",label:"General"},{id:"telegram",label:"Telegram"},{id:"auth",label:"Auth"},{id:"advanced",label:"Advanced"}],o=r({defaultModel:"",port:3170,telegramEnabled:!1,telegramBotToken:"",authorizedUserId:null,supabaseUrl:"",supabaseAnonKey:"",authorizedEmail:"",backgroundNotifyMode:"meaningful",backgroundNotifyTelegram:!0,selfEditEnabled:!1,watchdogEnabled:!0});async function k(){f.value=!0;try{const v=await V("/settings");o.value=v}finally{f.value=!1}}async function c(){i.value=!0,m.value=!1;try{await S("/settings",o.value),m.value=!0,setTimeout(()=>m.value=!1,2e3)}finally{i.value=!1}}return E(k),(v,e)=>(d(),s("div",z,[t("div",A,[e[12]||(e[12]=t("h1",{class:"text-2xl font-bold"},"Settings",-1)),t("button",{onClick:c,disabled:i.value,class:"px-4 py-2 rounded-md bg-primary text-primary-foreground text-sm hover:bg-primary/90 disabled:opacity-50"},g(i.value?"Saving...":m.value?"Saved ✓":"Save"),9,B)]),f.value?(d(),s("div",N,"Loading...")):(d(),s(x,{key:1},[t("div",C,[(d(),s(x,null,U(y,l=>t("button",{key:l.id,onClick:q=>u.value=l.id,class:T(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",u.value===l.id?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"])},g(l.label),11,I)),64))]),u.value==="general"?(d(),s("div",D,[t("div",null,[e[13]||(e[13]=t("label",{class:"text-sm font-medium"},"Default Model",-1)),a(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.value.defaultModel=l),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.defaultModel]])]),t("div",null,[e[14]||(e[14]=t("label",{class:"text-sm font-medium"},"Port",-1)),a(t("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.port=l),type:"number",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.port,void 0,{number:!0}]]),e[15]||(e[15]=t("p",{class:"text-xs text-muted-foreground mt-1"},"Requires restart to take effect",-1))]),t("div",null,[e[17]||(e[17]=t("label",{class:"text-sm font-medium"},"Background Notify Mode",-1)),a(t("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.backgroundNotifyMode=l),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[16]||(e[16]=[t("option",{value:"all"},"All",-1),t("option",{value:"meaningful"},"Meaningful",-1),t("option",{value:"off"},"Off",-1)])],512),[[M,o.value.backgroundNotifyMode]])]),t("div",K,[a(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>o.value.backgroundNotifyTelegram=l),type:"checkbox",id:"notifyTelegram",class:"rounded"},null,512),[[p,o.value.backgroundNotifyTelegram]]),e[18]||(e[18]=t("label",{for:"notifyTelegram",class:"text-sm font-medium"},"Send notifications via Telegram",-1))])])):b("",!0),u.value==="telegram"?(d(),s("div",L,[t("div",null,[e[19]||(e[19]=t("label",{class:"text-sm font-medium"},"Bot Token",-1)),a(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>o.value.telegramBotToken=l),type:"password",placeholder:"Enter new token to update",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.telegramBotToken]])]),t("div",null,[e[20]||(e[20]=t("label",{class:"text-sm font-medium"},"Authorized User ID",-1)),a(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>o.value.authorizedUserId=l),type:"number",placeholder:"123456789",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.authorizedUserId,void 0,{number:!0}]])]),t("div",j,[a(t("input",{"onUpdate:modelValue":e[6]||(e[6]=l=>o.value.telegramEnabled=l),type:"checkbox",id:"telegramEnabled",class:"rounded"},null,512),[[p,o.value.telegramEnabled]]),e[21]||(e[21]=t("label",{for:"telegramEnabled",class:"text-sm font-medium"},"Enable Telegram Bot",-1))])])):b("",!0),u.value==="auth"?(d(),s("div",F,[t("div",null,[e[22]||(e[22]=t("label",{class:"text-sm font-medium"},"Supabase URL",-1)),a(t("input",{"onUpdate:modelValue":e[7]||(e[7]=l=>o.value.supabaseUrl=l),placeholder:"https://your-project.supabase.co",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.supabaseUrl]])]),t("div",null,[e[23]||(e[23]=t("label",{class:"text-sm font-medium"},"Supabase Anon Key",-1)),a(t("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>o.value.supabaseAnonKey=l),type:"password",placeholder:"Enter new key to update",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.supabaseAnonKey]])]),t("div",null,[e[24]||(e[24]=t("label",{class:"text-sm font-medium"},"Authorized Email",-1)),a(t("input",{"onUpdate:modelValue":e[9]||(e[9]=l=>o.value.authorizedEmail=l),type:"email",placeholder:"you@example.com",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.authorizedEmail]])])])):b("",!0),u.value==="advanced"?(d(),s("div",G,[t("div",O,[a(t("input",{"onUpdate:modelValue":e[10]||(e[10]=l=>o.value.selfEditEnabled=l),type:"checkbox",id:"selfEdit",class:"rounded"},null,512),[[p,o.value.selfEditEnabled]]),e[25]||(e[25]=t("div",null,[t("label",{for:"selfEdit",class:"text-sm font-medium"},"Self-Edit Mode"),t("p",{class:"text-xs text-muted-foreground"},"Allow IO to modify its own source code")],-1))]),t("div",P,[a(t("input",{"onUpdate:modelValue":e[11]||(e[11]=l=>o.value.watchdogEnabled=l),type:"checkbox",id:"watchdog",class:"rounded"},null,512),[[p,o.value.watchdogEnabled]]),e[26]||(e[26]=t("div",null,[t("label",{for:"watchdog",class:"text-sm font-medium"},"Watchdog"),t("p",{class:"text-xs text-muted-foreground"},"Monitor event loop and zombie instances")],-1))])])):b("",!0)],64))]))}});export{H as default};
1
+ import{i as w,o as E,m as d,e as s,a as t,t as g,F as x,p as U,G as a,A as n,z as M,y as p,d as b,r,k as T}from"./index-CMctONs4.js";import{b as V,d as S}from"./api-GN_ZR-Nh.js";const z={class:"p-6"},A={class:"flex items-center justify-between mb-6"},B=["disabled"],N={key:0,class:"text-muted-foreground"},C={class:"flex gap-1 border-b border-border mb-6"},I=["onClick"],D={key:0,class:"space-y-4 max-w-lg"},K={class:"flex items-center gap-3"},G={key:1,class:"space-y-4 max-w-lg"},L={class:"flex items-center gap-3"},j={key:2,class:"space-y-4 max-w-lg"},F={key:3,class:"space-y-4 max-w-lg"},O={class:"flex items-center gap-3"},P={class:"flex items-center gap-3"},H=w({__name:"SettingsView",setup(R){const f=r(!0),i=r(!1),m=r(!1),u=r("general"),y=[{id:"general",label:"General"},{id:"telegram",label:"Telegram"},{id:"auth",label:"Auth"},{id:"advanced",label:"Advanced"}],o=r({defaultModel:"",port:3170,telegramEnabled:!1,telegramBotToken:"",authorizedUserId:null,supabaseUrl:"",supabaseAnonKey:"",authorizedEmail:"",backgroundNotifyMode:"meaningful",backgroundNotifyTelegram:!0,selfEditEnabled:!1,watchdogEnabled:!0});async function k(){f.value=!0;try{const v=await V("/settings");o.value=v}finally{f.value=!1}}async function c(){i.value=!0,m.value=!1;try{await S("/settings",o.value),m.value=!0,setTimeout(()=>m.value=!1,2e3)}finally{i.value=!1}}return E(k),(v,e)=>(d(),s("div",z,[t("div",A,[e[12]||(e[12]=t("h1",{class:"text-2xl font-bold"},"Settings",-1)),t("button",{onClick:c,disabled:i.value,class:"px-4 py-2 rounded-md bg-primary text-primary-foreground text-sm hover:bg-primary/90 disabled:opacity-50"},g(i.value?"Saving...":m.value?"Saved ✓":"Save"),9,B)]),f.value?(d(),s("div",N,"Loading...")):(d(),s(x,{key:1},[t("div",C,[(d(),s(x,null,U(y,l=>t("button",{key:l.id,onClick:q=>u.value=l.id,class:T(["px-4 py-2 text-sm font-medium border-b-2 transition-colors",u.value===l.id?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"])},g(l.label),11,I)),64))]),u.value==="general"?(d(),s("div",D,[t("div",null,[e[13]||(e[13]=t("label",{class:"text-sm font-medium"},"Default Model",-1)),a(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.value.defaultModel=l),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.defaultModel]])]),t("div",null,[e[14]||(e[14]=t("label",{class:"text-sm font-medium"},"Port",-1)),a(t("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.port=l),type:"number",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.port,void 0,{number:!0}]]),e[15]||(e[15]=t("p",{class:"text-xs text-muted-foreground mt-1"},"Requires restart to take effect",-1))]),t("div",null,[e[17]||(e[17]=t("label",{class:"text-sm font-medium"},"Background Notify Mode",-1)),a(t("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.backgroundNotifyMode=l),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[16]||(e[16]=[t("option",{value:"all"},"All",-1),t("option",{value:"meaningful"},"Meaningful",-1),t("option",{value:"off"},"Off",-1)])],512),[[M,o.value.backgroundNotifyMode]])]),t("div",K,[a(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>o.value.backgroundNotifyTelegram=l),type:"checkbox",id:"notifyTelegram",class:"rounded"},null,512),[[p,o.value.backgroundNotifyTelegram]]),e[18]||(e[18]=t("label",{for:"notifyTelegram",class:"text-sm font-medium"},"Send notifications via Telegram",-1))])])):b("",!0),u.value==="telegram"?(d(),s("div",G,[t("div",null,[e[19]||(e[19]=t("label",{class:"text-sm font-medium"},"Bot Token",-1)),a(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>o.value.telegramBotToken=l),type:"password",placeholder:"Enter new token to update",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.telegramBotToken]])]),t("div",null,[e[20]||(e[20]=t("label",{class:"text-sm font-medium"},"Authorized User ID",-1)),a(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>o.value.authorizedUserId=l),type:"number",placeholder:"123456789",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.authorizedUserId,void 0,{number:!0}]])]),t("div",L,[a(t("input",{"onUpdate:modelValue":e[6]||(e[6]=l=>o.value.telegramEnabled=l),type:"checkbox",id:"telegramEnabled",class:"rounded"},null,512),[[p,o.value.telegramEnabled]]),e[21]||(e[21]=t("label",{for:"telegramEnabled",class:"text-sm font-medium"},"Enable Telegram Bot",-1))])])):b("",!0),u.value==="auth"?(d(),s("div",j,[t("div",null,[e[22]||(e[22]=t("label",{class:"text-sm font-medium"},"Supabase URL",-1)),a(t("input",{"onUpdate:modelValue":e[7]||(e[7]=l=>o.value.supabaseUrl=l),placeholder:"https://your-project.supabase.co",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.supabaseUrl]])]),t("div",null,[e[23]||(e[23]=t("label",{class:"text-sm font-medium"},"Supabase Anon Key",-1)),a(t("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>o.value.supabaseAnonKey=l),type:"password",placeholder:"Enter new key to update",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.supabaseAnonKey]])]),t("div",null,[e[24]||(e[24]=t("label",{class:"text-sm font-medium"},"Authorized Email",-1)),a(t("input",{"onUpdate:modelValue":e[9]||(e[9]=l=>o.value.authorizedEmail=l),type:"email",placeholder:"you@example.com",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.authorizedEmail]])])])):b("",!0),u.value==="advanced"?(d(),s("div",F,[t("div",O,[a(t("input",{"onUpdate:modelValue":e[10]||(e[10]=l=>o.value.selfEditEnabled=l),type:"checkbox",id:"selfEdit",class:"rounded"},null,512),[[p,o.value.selfEditEnabled]]),e[25]||(e[25]=t("div",null,[t("label",{for:"selfEdit",class:"text-sm font-medium"},"Self-Edit Mode"),t("p",{class:"text-xs text-muted-foreground"},"Allow IO to modify its own source code")],-1))]),t("div",P,[a(t("input",{"onUpdate:modelValue":e[11]||(e[11]=l=>o.value.watchdogEnabled=l),type:"checkbox",id:"watchdog",class:"rounded"},null,512),[[p,o.value.watchdogEnabled]]),e[26]||(e[26]=t("div",null,[t("label",{for:"watchdog",class:"text-sm font-medium"},"Watchdog"),t("p",{class:"text-xs text-muted-foreground"},"Monitor event loop and zombie instances")],-1))])])):b("",!0)],64))]))}});export{H as default};
@@ -0,0 +1 @@
1
+ import{i as k,o as h,m as l,e as o,a as t,h as g,u as f,g as _,G as w,A as S,H as C,t as n,d as x,P as V,F,p as N,r}from"./index-CMctONs4.js";import{b as P,c as A,a as T}from"./api-GN_ZR-Nh.js";import{P as B}from"./plus-CObRuHy3.js";import{T as D}from"./trash-2-yEg_2EGm.js";const G={class:"p-6"},L={class:"flex items-center justify-between mb-6"},R={key:0,class:"mb-6 p-4 border border-border rounded-lg"},U={class:"flex gap-2"},$=["disabled"],j={key:0,class:"text-sm text-destructive mt-2"},z={key:1,class:"text-muted-foreground"},I={key:2,class:"text-center py-12 text-muted-foreground"},K={key:3,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},M={class:"flex items-start justify-between"},E={class:"font-semibold"},H=["onClick"],q={class:"text-sm text-muted-foreground mt-1"},J={class:"text-xs text-muted-foreground mt-2 font-mono"},ee=k({__name:"SkillsView",setup(O){const c=r([]),p=r(!0),d=r(!1),a=r(""),u=r(!1),i=r("");async function v(){p.value=!0;try{c.value=await P("/skills")}finally{p.value=!1}}async function y(){if(a.value.trim()){u.value=!0,i.value="";try{await A("/skills",{url:a.value.trim()}),a.value="",d.value=!1,await v()}catch(m){i.value=m.message||"Failed to install skill"}finally{u.value=!1}}}async function b(m){try{await T(`/skills/${m}`),await v()}catch(e){i.value=e.message||"Failed to remove skill"}}return h(v),(m,e)=>(l(),o("div",G,[t("div",L,[e[3]||(e[3]=t("h1",{class:"text-2xl font-bold"},"Skills",-1)),t("button",{onClick:e[0]||(e[0]=s=>d.value=!d.value),class:"inline-flex items-center gap-2 px-3 py-2 rounded-md bg-primary text-primary-foreground text-sm hover:bg-primary/90"},[g(f(B),{class:"w-4 h-4"}),e[2]||(e[2]=_(" Add Skill ",-1))])]),d.value?(l(),o("div",R,[e[4]||(e[4]=t("label",{class:"block text-sm font-medium mb-2"},"Git Repository URL",-1)),t("div",U,[w(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>a.value=s),type:"text",placeholder:"https://github.com/user/skill-repo.git",class:"flex-1 px-3 py-2 rounded-md border border-input bg-background text-sm",onKeyup:C(y,["enter"])},null,544),[[S,a.value]]),t("button",{onClick:y,disabled:u.value||!a.value.trim(),class:"px-4 py-2 rounded-md bg-primary text-primary-foreground text-sm hover:bg-primary/90 disabled:opacity-50"},n(u.value?"Installing...":"Install"),9,$)]),i.value?(l(),o("p",j,n(i.value),1)):x("",!0)])):x("",!0),p.value?(l(),o("div",z,"Loading...")):c.value.length===0?(l(),o("div",I,[g(f(V),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[5]||(e[5]=t("p",null,"No skills installed.",-1)),e[6]||(e[6]=t("p",{class:"text-sm mt-1"},'Click "Add Skill" to install from a git repository.',-1))])):(l(),o("div",K,[(l(!0),o(F,null,N(c.value,s=>(l(),o("div",{key:s.slug,class:"border border-border rounded-lg p-4 group"},[t("div",M,[t("h3",E,n(s.name),1),t("button",{onClick:Q=>b(s.slug),class:"opacity-0 group-hover:opacity-100 p-1 rounded hover:bg-destructive/10 text-destructive transition-opacity",title:"Remove skill"},[g(f(D),{class:"w-4 h-4"})],8,H)]),t("p",q,n(s.description),1),t("div",J,n(s.slug),1)]))),128))]))]))}});export{ee as default};
@@ -1,4 +1,4 @@
1
- import{f as m,i as w,o as C,m as o,e as l,h as d,D as q,F as c,a as e,t as a,p as b,d as r,v as A,r as i,q as L,k as g,u as p,g as x}from"./index-x4G-bL2N.js";import{b as M}from"./api-Bb5_Gvnf.js";/**
1
+ import{f as m,i as w,o as C,m as o,e as l,h as d,E as q,F as c,a as e,t as a,p as b,d as r,w as A,r as i,q as L,k as g,u as p,g as x}from"./index-CMctONs4.js";import{b as M}from"./api-GN_ZR-Nh.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -18,4 +18,4 @@ import{f as m,i as w,o as C,m as o,e as l,h as d,D as q,F as c,a as e,t as a,p a
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const F=m("UserIcon",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),N={class:"p-6"},z={key:0,class:"text-muted-foreground"},B={class:"mb-6"},R={class:"text-2xl font-bold"},D={class:"text-muted-foreground"},H={class:"mb-8"},T={class:"border border-border rounded-lg overflow-hidden"},U={class:"w-full text-sm"},j={class:"px-4 py-2 font-medium"},E={class:"px-4 py-2 text-muted-foreground"},G={class:"px-4 py-2"},Q={class:"px-4 py-2 flex gap-1"},$={key:0,class:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded"},J={key:1,class:"text-xs bg-blue-500/10 text-blue-500 px-1.5 py-0.5 rounded"},K={key:2,class:"text-xs bg-purple-500/10 text-purple-500 px-1.5 py-0.5 rounded"},O={key:0,class:"mb-8"},P={class:"grid grid-cols-1 md:grid-cols-3 gap-3"},W={class:"font-mono text-xs text-muted-foreground"},X={class:"text-sm font-medium mt-1"},Y={class:"text-xs text-muted-foreground mt-1"},Z={key:0,class:"text-sm text-muted-foreground"},ee={key:1,class:"space-y-2"},te={class:"flex items-center justify-between"},se={class:"text-sm"},ne=w({__name:"SquadDetailView",setup(oe){const v=A(),u=i(null),f=i([]),y=i([]),_=i([]),h=i(!0);return C(async()=>{try{const n=await M(`/squads/${v.params.id}`);u.value=n.squad,f.value=n.agents,y.value=n.tasks,_.value=n.instances}finally{h.value=!1}}),(n,s)=>{const k=L("router-link");return o(),l("div",N,[d(k,{to:"/squads",class:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-4"},{default:q(()=>[d(p(V),{class:"w-4 h-4"}),s[0]||(s[0]=x(" Back to Squads ",-1))]),_:1}),h.value?(o(),l("div",z,"Loading...")):u.value?(o(),l(c,{key:1},[e("div",B,[e("h1",R,a(u.value.name),1),e("p",D,a(u.value.universe),1)]),e("section",H,[s[5]||(s[5]=e("h2",{class:"text-lg font-semibold mb-3"},"Agent Roster",-1)),e("div",T,[e("table",U,[s[4]||(s[4]=e("thead",{class:"bg-muted"},[e("tr",null,[e("th",{class:"text-left px-4 py-2 font-medium"},"Character"),e("th",{class:"text-left px-4 py-2 font-medium"},"Role"),e("th",{class:"text-left px-4 py-2 font-medium"},"Status"),e("th",{class:"text-left px-4 py-2 font-medium"},"Flags")])],-1)),e("tbody",null,[(o(!0),l(c,null,b(f.value,t=>(o(),l("tr",{key:t.id,class:"border-t border-border"},[e("td",j,a(t.character_name),1),e("td",E,a(t.role_title),1),e("td",G,[e("span",{class:g(["inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full",{"bg-green-500/10 text-green-500":t.status==="idle","bg-yellow-500/10 text-yellow-500":t.status==="working","bg-blue-500/10 text-blue-500":t.status==="reviewing"}])},a(t.status),3)]),e("td",Q,[t.is_lead?(o(),l("span",$,[d(p(F),{class:"w-3 h-3 inline"}),s[1]||(s[1]=x(" Lead ",-1))])):r("",!0),t.is_qa?(o(),l("span",J,[d(p(S),{class:"w-3 h-3 inline"}),s[2]||(s[2]=x(" QA ",-1))])):r("",!0),t.is_test?(o(),l("span",K,[d(p(I),{class:"w-3 h-3 inline"}),s[3]||(s[3]=x(" Test ",-1))])):r("",!0)])]))),128))])])])]),_.value.length>0?(o(),l("section",O,[s[6]||(s[6]=e("h2",{class:"text-lg font-semibold mb-3"},"Active Instances",-1)),e("div",P,[(o(!0),l(c,null,b(_.value,t=>(o(),l("div",{key:t.id,class:"border border-border rounded-lg p-3"},[e("div",W,a(t.id.slice(0,8)),1),e("div",X,a(t.branch),1),e("div",Y,"Last activity: "+a(t.last_activity),1)]))),128))])])):r("",!0),e("section",null,[s[7]||(s[7]=e("h2",{class:"text-lg font-semibold mb-3"},"Recent Tasks",-1)),y.value.length===0?(o(),l("div",Z,"No tasks yet.")):(o(),l("div",ee,[(o(!0),l(c,null,b(y.value,t=>(o(),l("div",{key:t.id,class:"border border-border rounded-lg p-3"},[e("div",te,[e("span",se,a(t.description),1),e("span",{class:g(["text-xs px-2 py-0.5 rounded-full",{"bg-yellow-500/10 text-yellow-500":t.status==="pending","bg-blue-500/10 text-blue-500":t.status==="in_progress","bg-green-500/10 text-green-500":t.status==="done","bg-red-500/10 text-red-500":t.status==="failed"}])},a(t.status),3)])]))),128))]))])],64)):r("",!0)])}}});export{ne as default};
21
+ */const F=m("UserIcon",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),N={class:"p-6"},z={key:0,class:"text-muted-foreground"},B={class:"mb-6"},R={class:"text-2xl font-bold"},H={class:"text-muted-foreground"},T={class:"mb-8"},D={class:"border border-border rounded-lg overflow-hidden"},E={class:"w-full text-sm"},U={class:"px-4 py-2 font-medium"},j={class:"px-4 py-2 text-muted-foreground"},G={class:"px-4 py-2"},Q={class:"px-4 py-2 flex gap-1"},$={key:0,class:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded"},J={key:1,class:"text-xs bg-blue-500/10 text-blue-500 px-1.5 py-0.5 rounded"},K={key:2,class:"text-xs bg-purple-500/10 text-purple-500 px-1.5 py-0.5 rounded"},O={key:0,class:"mb-8"},P={class:"grid grid-cols-1 md:grid-cols-3 gap-3"},W={class:"font-mono text-xs text-muted-foreground"},X={class:"text-sm font-medium mt-1"},Y={class:"text-xs text-muted-foreground mt-1"},Z={key:0,class:"text-sm text-muted-foreground"},ee={key:1,class:"space-y-2"},te={class:"flex items-center justify-between"},se={class:"text-sm"},ne=w({__name:"SquadDetailView",setup(oe){const v=A(),u=i(null),f=i([]),y=i([]),_=i([]),h=i(!0);return C(async()=>{try{const n=await M(`/squads/${v.params.id}`);u.value=n.squad,f.value=n.agents,y.value=n.tasks,_.value=n.instances}finally{h.value=!1}}),(n,s)=>{const k=L("router-link");return o(),l("div",N,[d(k,{to:"/squads",class:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-4"},{default:q(()=>[d(p(V),{class:"w-4 h-4"}),s[0]||(s[0]=x(" Back to Squads ",-1))]),_:1}),h.value?(o(),l("div",z,"Loading...")):u.value?(o(),l(c,{key:1},[e("div",B,[e("h1",R,a(u.value.name),1),e("p",H,a(u.value.universe),1)]),e("section",T,[s[5]||(s[5]=e("h2",{class:"text-lg font-semibold mb-3"},"Agent Roster",-1)),e("div",D,[e("table",E,[s[4]||(s[4]=e("thead",{class:"bg-muted"},[e("tr",null,[e("th",{class:"text-left px-4 py-2 font-medium"},"Character"),e("th",{class:"text-left px-4 py-2 font-medium"},"Role"),e("th",{class:"text-left px-4 py-2 font-medium"},"Status"),e("th",{class:"text-left px-4 py-2 font-medium"},"Flags")])],-1)),e("tbody",null,[(o(!0),l(c,null,b(f.value,t=>(o(),l("tr",{key:t.id,class:"border-t border-border"},[e("td",U,a(t.character_name),1),e("td",j,a(t.role_title),1),e("td",G,[e("span",{class:g(["inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full",{"bg-green-500/10 text-green-500":t.status==="idle","bg-yellow-500/10 text-yellow-500":t.status==="working","bg-blue-500/10 text-blue-500":t.status==="reviewing"}])},a(t.status),3)]),e("td",Q,[t.is_lead?(o(),l("span",$,[d(p(F),{class:"w-3 h-3 inline"}),s[1]||(s[1]=x(" Lead ",-1))])):r("",!0),t.is_qa?(o(),l("span",J,[d(p(S),{class:"w-3 h-3 inline"}),s[2]||(s[2]=x(" QA ",-1))])):r("",!0),t.is_test?(o(),l("span",K,[d(p(I),{class:"w-3 h-3 inline"}),s[3]||(s[3]=x(" Test ",-1))])):r("",!0)])]))),128))])])])]),_.value.length>0?(o(),l("section",O,[s[6]||(s[6]=e("h2",{class:"text-lg font-semibold mb-3"},"Active Instances",-1)),e("div",P,[(o(!0),l(c,null,b(_.value,t=>(o(),l("div",{key:t.id,class:"border border-border rounded-lg p-3"},[e("div",W,a(t.id.slice(0,8)),1),e("div",X,a(t.branch),1),e("div",Y,"Last activity: "+a(t.last_activity),1)]))),128))])])):r("",!0),e("section",null,[s[7]||(s[7]=e("h2",{class:"text-lg font-semibold mb-3"},"Recent Tasks",-1)),y.value.length===0?(o(),l("div",Z,"No tasks yet.")):(o(),l("div",ee,[(o(!0),l(c,null,b(y.value,t=>(o(),l("div",{key:t.id,class:"border border-border rounded-lg p-3"},[e("div",te,[e("span",se,a(t.description),1),e("span",{class:g(["text-xs px-2 py-0.5 rounded-full",{"bg-yellow-500/10 text-yellow-500":t.status==="pending","bg-blue-500/10 text-blue-500":t.status==="in_progress","bg-green-500/10 text-green-500":t.status==="done","bg-red-500/10 text-red-500":t.status==="failed"}])},a(t.status),3)])]))),128))]))])],64)):r("",!0)])}}});export{ne as default};
@@ -1,6 +1,6 @@
1
- import{b as _}from"./api-Bb5_Gvnf.js";import{f,i as x,o as y,m as o,e as r,a as e,h as u,u as m,U as h,F as v,p as k,r as c,b,D as q,q as w,t as n,g as B,d as N}from"./index-x4G-bL2N.js";/**
1
+ import{b as _}from"./api-GN_ZR-Nh.js";import{f,i as x,o as y,m as o,e as r,a as e,h as u,u as m,U as h,F as v,p as k,r as c,b,E as q,q as w,t as n,g as B,d as N}from"./index-CMctONs4.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const V=f("GitBranchIcon",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),C={class:"p-6"},S={key:0,class:"text-muted-foreground"},F={key:1,class:"text-center py-12 text-muted-foreground"},G={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},I={class:"flex items-start justify-between"},L={class:"font-semibold"},j={class:"text-sm text-muted-foreground mt-0.5"},A={class:"text-xs bg-secondary text-secondary-foreground px-2 py-0.5 rounded-full"},D={class:"mt-3 flex items-center gap-4 text-xs text-muted-foreground"},M={key:0,class:"flex items-center gap-1"},T=x({__name:"SquadsView",setup(U){const d=c([]),l=c([]),i=c(!0);y(async()=>{try{const a=await _("/squads");d.value=a.squads,l.value=a.agents}finally{i.value=!1}});function p(a){return l.value.filter(t=>t.squad_id===a)}return(a,t)=>{const g=w("router-link");return o(),r("div",C,[t[2]||(t[2]=e("h1",{class:"text-2xl font-bold mb-6"},"Squads",-1)),i.value?(o(),r("div",S,"Loading...")):d.value.length===0?(o(),r("div",F,[u(m(h),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),t[0]||(t[0]=e("p",null,"No squads yet.",-1)),t[1]||(t[1]=e("p",{class:"text-sm mt-1"},"Ask IO to create a squad for your project.",-1))])):(o(),r("div",G,[(o(!0),r(v,null,k(d.value,s=>(o(),b(g,{key:s.id,to:`/squads/${s.id}`,class:"block rounded-lg border border-border bg-card p-4 hover:border-primary/50 transition-colors"},{default:q(()=>[e("div",I,[e("div",null,[e("h3",L,n(s.name),1),e("p",j,n(s.universe),1)]),e("span",A,n(p(s.id).length)+" agents ",1)]),e("div",D,[s.repo_url?(o(),r("span",M,[u(m(V),{class:"w-3 h-3"}),B(" "+n(s.repo_url),1)])):N("",!0)])]),_:2},1032,["to"]))),128))]))])}}});export{T as default};
6
+ */const V=f("GitBranchIcon",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),C={class:"p-6"},S={key:0,class:"text-muted-foreground"},F={key:1,class:"text-center py-12 text-muted-foreground"},G={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},I={class:"flex items-start justify-between"},L={class:"font-semibold"},j={class:"text-sm text-muted-foreground mt-0.5"},A={class:"text-xs bg-secondary text-secondary-foreground px-2 py-0.5 rounded-full"},E={class:"mt-3 flex items-center gap-4 text-xs text-muted-foreground"},M={key:0,class:"flex items-center gap-1"},T=x({__name:"SquadsView",setup(U){const d=c([]),l=c([]),i=c(!0);y(async()=>{try{const a=await _("/squads");d.value=a.squads,l.value=a.agents}finally{i.value=!1}});function p(a){return l.value.filter(t=>t.squad_id===a)}return(a,t)=>{const g=w("router-link");return o(),r("div",C,[t[2]||(t[2]=e("h1",{class:"text-2xl font-bold mb-6"},"Squads",-1)),i.value?(o(),r("div",S,"Loading...")):d.value.length===0?(o(),r("div",F,[u(m(h),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),t[0]||(t[0]=e("p",null,"No squads yet.",-1)),t[1]||(t[1]=e("p",{class:"text-sm mt-1"},"Ask IO to create a squad for your project.",-1))])):(o(),r("div",G,[(o(!0),r(v,null,k(d.value,s=>(o(),b(g,{key:s.id,to:`/squads/${s.id}`,class:"block rounded-lg border border-border bg-card p-4 hover:border-primary/50 transition-colors"},{default:q(()=>[e("div",I,[e("div",null,[e("h3",L,n(s.name),1),e("p",j,n(s.universe),1)]),e("span",A,n(p(s.id).length)+" agents ",1)]),e("div",E,[s.repo_url?(o(),r("span",M,[u(m(V),{class:"w-3 h-3"}),B(" "+n(s.repo_url),1)])):N("",!0)])]),_:2},1032,["to"]))),128))]))])}}});export{T as default};
@@ -1,4 +1,4 @@
1
- import{f as b,i as N,A as H,m as l,e as p,F as w,p as j,c as z,l as B,k as E,b as P,u as f,h as m,a as s,t as T,r as v,o as Q,E as M,z as V,g as U,G as W,d as A,B as G}from"./index-x4G-bL2N.js";import{b as I,d as L,a as K}from"./api-Bb5_Gvnf.js";import{_ as R}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-LK_1LFOW.js";import{P as X}from"./plus-Drw0JiiN.js";import{T as Z}from"./trash-2-BMzWlawI.js";/**
1
+ import{f as b,i as H,D as T,m as l,e as p,F as w,p as j,c as I,l as B,k as E,b as P,u as f,h as m,a as s,t as L,r as v,o as Q,G as M,A as V,g as U,H as W,d as A,B as G}from"./index-CMctONs4.js";import{b as z,d as D,a as K}from"./api-GN_ZR-Nh.js";import{_ as R}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-Bo47khKQ.js";import{P as X}from"./plus-CObRuHy3.js";import{T as Z}from"./trash-2-yEg_2EGm.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -38,4 +38,4 @@ import{f as b,i as N,A as H,m as l,e as p,F as w,p as j,c as z,l as B,k as E,b a
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const oe=b("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),le={class:"select-none"},ne=["onClick"],re={class:"truncate"},ie=N({__name:"WikiTree",props:{pages:{},selectedPage:{},searchQuery:{}},emits:["select"],setup($,{emit:h}){const a=$,g=h,i=v(new Set);function y(n){const r=[];for(const c of n){const u=c.split("/");let o=r;for(let e=0;e<u.length;e++){const d=u[e],D=u.slice(0,e+1).join("/"),S=e<u.length-1;let F=o.find(q=>q.name===d&&q.isFolder===S);F||(F={name:d,path:D,children:[],isFolder:S},o.push(F)),o=F.children}}const t=c=>{c.sort((u,o)=>u.isFolder!==o.isFolder?u.isFolder?-1:1:u.name.localeCompare(o.name)),c.forEach(u=>t(u.children))};return t(r),r}const _=z(()=>{let n=a.pages;if(a.searchQuery){const r=a.searchQuery.toLowerCase();n=a.pages.filter(t=>t.toLowerCase().includes(r))}return y(n)});H(()=>a.selectedPage,n=>{if(!n)return;const r=n.split("/");for(let t=1;t<r.length;t++)i.value.add(r.slice(0,t).join("/"))},{immediate:!0});function C(n){i.value.has(n)?i.value.delete(n):i.value.add(n)}function x(n,r){const t=[];for(const c of n)t.push({node:c,depth:r}),c.isFolder&&i.value.has(c.path)&&t.push(...x(c.children,r+1));return t}const k=z(()=>x(_.value,0));return(n,r)=>(l(),p("div",le,[(l(!0),p(w,null,j(k.value,({node:t,depth:c})=>(l(),p("button",{key:t.path,onClick:u=>t.isFolder?C(t.path):g("select",t.path),class:E(["w-full text-left flex items-center gap-1 py-1 text-xs rounded hover:bg-accent transition-colors",{"bg-accent font-medium":!t.isFolder&&$.selectedPage===t.path}]),style:B({paddingLeft:c*12+8+"px"})},[t.isFolder?(l(),p(w,{key:0},[i.value.has(t.path)?(l(),P(f(O),{key:0,class:"w-3 h-3 shrink-0 text-muted-foreground"})):(l(),P(f(J),{key:1,class:"w-3 h-3 shrink-0 text-muted-foreground"})),m(f(ee),{class:"w-3.5 h-3.5 shrink-0 text-muted-foreground"})],64)):(l(),p(w,{key:1},[r[0]||(r[0]=s("span",{class:"w-3 shrink-0"},null,-1)),m(f(Y),{class:"w-3.5 h-3.5 shrink-0 text-muted-foreground"})],64)),s("span",re,T(t.name),1)],14,ne))),128))]))}}),ue={class:"flex h-full"},ce={class:"w-64 border-r border-border flex flex-col shrink-0"},de={class:"p-3 border-b border-border space-y-2"},pe={class:"relative"},fe={key:0,class:"space-y-1.5"},ve={class:"flex gap-1"},he=["disabled"],me={class:"flex-1 overflow-y-auto p-2"},ge={key:0,class:"text-xs text-muted-foreground p-2"},ye={class:"flex-1 flex flex-col"},xe={key:0,class:"flex items-center justify-center h-full text-muted-foreground"},ke={class:"text-center"},be={class:"flex items-center justify-between px-4 py-2 border-b border-border"},we={class:"text-sm font-medium font-mono"},_e={class:"flex gap-1"},Ce={class:"flex-1 overflow-y-auto p-4"},Se=N({__name:"WikiView",setup($){const h=v([]),a=v(null),g=v(""),i=v(!1),y=v(""),_=v(""),C=v(!0),x=v(!1),k=v("");Q(async()=>{try{h.value=await I("/wiki/pages")}finally{C.value=!1}});async function n(o){a.value=o,i.value=!1;const e=await I(`/wiki/page/${o}`);g.value=e.content}function r(){y.value=g.value,i.value=!0}async function t(){a.value&&(await L(`/wiki/page/${a.value}`,{content:y.value}),g.value=y.value,i.value=!1)}async function c(){a.value&&confirm(`Delete "${a.value}"?`)&&(await K(`/wiki/page/${a.value}`),h.value=h.value.filter(o=>o!==a.value),a.value=null,g.value="")}async function u(){const o=k.value.trim();if(!o)return;const e=o.endsWith(".md")?o:`${o}.md`;await L(`/wiki/page/${e}`,{content:""}),h.value.includes(e)||(h.value.push(e),h.value.sort()),x.value=!1,k.value="",a.value=e,g.value="",y.value="",i.value=!0}return(o,e)=>(l(),p("div",ue,[s("div",ce,[s("div",de,[s("div",pe,[m(f(ae),{class:"absolute left-2.5 top-2.5 w-3.5 h-3.5 text-muted-foreground"}),M(s("input",{"onUpdate:modelValue":e[0]||(e[0]=d=>_.value=d),placeholder:"Search pages...",class:"w-full rounded-md border border-input bg-background pl-8 pr-3 py-2 text-xs focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[V,_.value]])]),s("button",{onClick:e[1]||(e[1]=d=>x.value=!x.value),class:"w-full flex items-center justify-center gap-1.5 px-2 py-1.5 text-xs rounded-md bg-primary text-primary-foreground hover:bg-primary/90"},[m(f(X),{class:"w-3.5 h-3.5"}),e[7]||(e[7]=U(" New Page ",-1))]),x.value?(l(),p("div",fe,[M(s("input",{"onUpdate:modelValue":e[2]||(e[2]=d=>k.value=d),placeholder:"path/to/page.md",class:"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-ring",onKeyup:W(u,["enter"])},null,544),[[V,k.value]]),s("div",ve,[s("button",{onClick:u,disabled:!k.value.trim(),class:"flex-1 px-2 py-1 text-xs rounded bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50"}," Create ",8,he),s("button",{onClick:e[3]||(e[3]=d=>{x.value=!1,k.value=""}),class:"px-2 py-1 text-xs rounded border border-border hover:bg-accent"}," Cancel ")])])):A("",!0)]),s("div",me,[C.value?(l(),p("div",ge,"Loading...")):(l(),P(ie,{key:1,pages:h.value,"selected-page":a.value,"search-query":_.value,onSelect:e[4]||(e[4]=d=>n(d))},null,8,["pages","selected-page","search-query"]))])]),s("div",ye,[a.value?(l(),p(w,{key:1},[s("div",be,[s("span",we,T(a.value),1),s("div",_e,[i.value?(l(),p(w,{key:1},[s("button",{onClick:t,class:"p-1.5 rounded hover:bg-accent text-green-500",title:"Save"},[m(f(se),{class:"w-4 h-4"})]),s("button",{onClick:e[5]||(e[5]=d=>i.value=!1),class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Cancel"},[m(f(oe),{class:"w-4 h-4"})])],64)):(l(),p(w,{key:0},[s("button",{onClick:r,class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Edit"},[m(f(te),{class:"w-4 h-4"})]),s("button",{onClick:c,class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",title:"Delete"},[m(f(Z),{class:"w-4 h-4"})])],64))])]),s("div",Ce,[i.value?M((l(),p("textarea",{key:0,"onUpdate:modelValue":e[6]||(e[6]=d=>y.value=d),class:"w-full h-full min-h-[400px] font-mono text-sm bg-background border border-input rounded-md p-3 focus:outline-none focus:ring-1 focus:ring-ring resize-none"},null,512)),[[V,y.value]]):(l(),P(R,{key:1,content:g.value},null,8,["content"]))])],64)):(l(),p("div",xe,[s("div",ke,[m(f(G),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[8]||(e[8]=s("p",null,"Select a page to view",-1))])]))])]))}});export{Se as default};
41
+ */const oe=b("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),le={class:"select-none"},ne=["onClick"],re={class:"truncate"},ie=H({__name:"WikiTree",props:{pages:{},selectedPage:{},searchQuery:{}},emits:["select"],setup($,{emit:h}){const a=$,g=h,i=v(new Set);function y(n){const r=[];for(const c of n){const u=c.split("/");let o=r;for(let e=0;e<u.length;e++){const d=u[e],N=u.slice(0,e+1).join("/"),S=e<u.length-1;let F=o.find(q=>q.name===d&&q.isFolder===S);F||(F={name:d,path:N,children:[],isFolder:S},o.push(F)),o=F.children}}const t=c=>{c.sort((u,o)=>u.isFolder!==o.isFolder?u.isFolder?-1:1:u.name.localeCompare(o.name)),c.forEach(u=>t(u.children))};return t(r),r}const _=I(()=>{let n=a.pages;if(a.searchQuery){const r=a.searchQuery.toLowerCase();n=a.pages.filter(t=>t.toLowerCase().includes(r))}return y(n)});T(()=>a.selectedPage,n=>{if(!n)return;const r=n.split("/");for(let t=1;t<r.length;t++)i.value.add(r.slice(0,t).join("/"))},{immediate:!0});function C(n){i.value.has(n)?i.value.delete(n):i.value.add(n)}function x(n,r){const t=[];for(const c of n)t.push({node:c,depth:r}),c.isFolder&&i.value.has(c.path)&&t.push(...x(c.children,r+1));return t}const k=I(()=>x(_.value,0));return(n,r)=>(l(),p("div",le,[(l(!0),p(w,null,j(k.value,({node:t,depth:c})=>(l(),p("button",{key:t.path,onClick:u=>t.isFolder?C(t.path):g("select",t.path),class:E(["w-full text-left flex items-center gap-1 py-1 text-xs rounded hover:bg-accent transition-colors",{"bg-accent font-medium":!t.isFolder&&$.selectedPage===t.path}]),style:B({paddingLeft:c*12+8+"px"})},[t.isFolder?(l(),p(w,{key:0},[i.value.has(t.path)?(l(),P(f(O),{key:0,class:"w-3 h-3 shrink-0 text-muted-foreground"})):(l(),P(f(J),{key:1,class:"w-3 h-3 shrink-0 text-muted-foreground"})),m(f(ee),{class:"w-3.5 h-3.5 shrink-0 text-muted-foreground"})],64)):(l(),p(w,{key:1},[r[0]||(r[0]=s("span",{class:"w-3 shrink-0"},null,-1)),m(f(Y),{class:"w-3.5 h-3.5 shrink-0 text-muted-foreground"})],64)),s("span",re,L(t.name),1)],14,ne))),128))]))}}),ue={class:"flex h-full"},ce={class:"w-64 border-r border-border flex flex-col shrink-0"},de={class:"p-3 border-b border-border space-y-2"},pe={class:"relative"},fe={key:0,class:"space-y-1.5"},ve={class:"flex gap-1"},he=["disabled"],me={class:"flex-1 overflow-y-auto p-2"},ge={key:0,class:"text-xs text-muted-foreground p-2"},ye={class:"flex-1 flex flex-col"},xe={key:0,class:"flex items-center justify-center h-full text-muted-foreground"},ke={class:"text-center"},be={class:"flex items-center justify-between px-4 py-2 border-b border-border"},we={class:"text-sm font-medium font-mono"},_e={class:"flex gap-1"},Ce={class:"flex-1 overflow-y-auto p-4"},Se=H({__name:"WikiView",setup($){const h=v([]),a=v(null),g=v(""),i=v(!1),y=v(""),_=v(""),C=v(!0),x=v(!1),k=v("");Q(async()=>{try{h.value=await z("/wiki/pages")}finally{C.value=!1}});async function n(o){a.value=o,i.value=!1;const e=await z(`/wiki/page/${o}`);g.value=e.content}function r(){y.value=g.value,i.value=!0}async function t(){a.value&&(await D(`/wiki/page/${a.value}`,{content:y.value}),g.value=y.value,i.value=!1)}async function c(){a.value&&confirm(`Delete "${a.value}"?`)&&(await K(`/wiki/page/${a.value}`),h.value=h.value.filter(o=>o!==a.value),a.value=null,g.value="")}async function u(){const o=k.value.trim();if(!o)return;const e=o.endsWith(".md")?o:`${o}.md`;await D(`/wiki/page/${e}`,{content:""}),h.value.includes(e)||(h.value.push(e),h.value.sort()),x.value=!1,k.value="",a.value=e,g.value="",y.value="",i.value=!0}return(o,e)=>(l(),p("div",ue,[s("div",ce,[s("div",de,[s("div",pe,[m(f(ae),{class:"absolute left-2.5 top-2.5 w-3.5 h-3.5 text-muted-foreground"}),M(s("input",{"onUpdate:modelValue":e[0]||(e[0]=d=>_.value=d),placeholder:"Search pages...",class:"w-full rounded-md border border-input bg-background pl-8 pr-3 py-2 text-xs focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[V,_.value]])]),s("button",{onClick:e[1]||(e[1]=d=>x.value=!x.value),class:"w-full flex items-center justify-center gap-1.5 px-2 py-1.5 text-xs rounded-md bg-primary text-primary-foreground hover:bg-primary/90"},[m(f(X),{class:"w-3.5 h-3.5"}),e[7]||(e[7]=U(" New Page ",-1))]),x.value?(l(),p("div",fe,[M(s("input",{"onUpdate:modelValue":e[2]||(e[2]=d=>k.value=d),placeholder:"path/to/page.md",class:"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-ring",onKeyup:W(u,["enter"])},null,544),[[V,k.value]]),s("div",ve,[s("button",{onClick:u,disabled:!k.value.trim(),class:"flex-1 px-2 py-1 text-xs rounded bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50"}," Create ",8,he),s("button",{onClick:e[3]||(e[3]=d=>{x.value=!1,k.value=""}),class:"px-2 py-1 text-xs rounded border border-border hover:bg-accent"}," Cancel ")])])):A("",!0)]),s("div",me,[C.value?(l(),p("div",ge,"Loading...")):(l(),P(ie,{key:1,pages:h.value,"selected-page":a.value,"search-query":_.value,onSelect:e[4]||(e[4]=d=>n(d))},null,8,["pages","selected-page","search-query"]))])]),s("div",ye,[a.value?(l(),p(w,{key:1},[s("div",be,[s("span",we,L(a.value),1),s("div",_e,[i.value?(l(),p(w,{key:1},[s("button",{onClick:t,class:"p-1.5 rounded hover:bg-accent text-green-500",title:"Save"},[m(f(se),{class:"w-4 h-4"})]),s("button",{onClick:e[5]||(e[5]=d=>i.value=!1),class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Cancel"},[m(f(oe),{class:"w-4 h-4"})])],64)):(l(),p(w,{key:0},[s("button",{onClick:r,class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Edit"},[m(f(te),{class:"w-4 h-4"})]),s("button",{onClick:c,class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",title:"Delete"},[m(f(Z),{class:"w-4 h-4"})])],64))])]),s("div",Ce,[i.value?M((l(),p("textarea",{key:0,"onUpdate:modelValue":e[6]||(e[6]=d=>y.value=d),class:"w-full h-full min-h-[400px] font-mono text-sm bg-background border border-input rounded-md p-3 focus:outline-none focus:ring-1 focus:ring-ring resize-none"},null,512)),[[V,y.value]]):(l(),P(R,{key:1,content:g.value},null,8,["content"]))])],64)):(l(),p("div",xe,[s("div",ke,[m(f(G),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[8]||(e[8]=s("p",null,"Select a page to view",-1))])]))])]))}});export{Se as default};
@@ -0,0 +1 @@
1
+ import{v as c,s as i}from"./index-CMctONs4.js";const s="/api";async function o(){const t=c(),e={"Content-Type":"application/json"};return t.token&&(e.Authorization=`Bearer ${t.token}`),e}async function n(t,e){if(t.status===401){const r=c();try{if(await r.refreshToken(),r.token){const a=await e();if(a.status===401)throw r.logout(),i.push("/login"),new Error("Session expired");return a}}catch{}throw r.logout(),i.push("/login"),new Error("Session expired")}return t}async function u(t){const e=await n(await fetch(`${s}${t}`,{headers:await o()}),async()=>fetch(`${s}${t}`,{headers:await o()}));if(!e.ok)throw new Error(`API error: ${e.status}`);return e.json()}async function w(t,e){const r={method:"POST",headers:await o(),body:e?JSON.stringify(e):void 0},a=await n(await fetch(`${s}${t}`,r),async()=>fetch(`${s}${t}`,{...r,headers:await o()}));if(!a.ok)throw new Error(`API error: ${a.status}`);return a.json()}async function f(t,e){const r={method:"PUT",headers:await o(),body:e?JSON.stringify(e):void 0},a=await n(await fetch(`${s}${t}`,r),async()=>fetch(`${s}${t}`,{...r,headers:await o()}));if(!a.ok)throw new Error(`API error: ${a.status}`);return a.json()}async function $(t){const e={method:"DELETE",headers:await o()},r=await n(await fetch(`${s}${t}`,e),async()=>fetch(`${s}${t}`,{...e,headers:await o()}));if(!r.ok)throw new Error(`API error: ${r.status}`);return r.json()}export{$ as a,u as b,w as c,f as d};