heyio 1.1.5 → 1.1.6

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.5",
3
+ "version": "1.1.6",
4
4
  "description": "IO — a personal AI assistant daemon built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "io": "dist/index.js"
@@ -0,0 +1,11 @@
1
+ import{f as _,j as b,r as m,i as k,D as h,o as w,m as o,e as c,a as n,u,d as x,F as S,p as M,G as C,A as D,b as g,k as y,n as v}from"./index-NtVa0DWK.js";import{c as I}from"./api-BJX69em8.js";import{_ as U}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-CY9sVI6F.js";/**
2
+ * @license lucide-vue-next v0.474.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const j=_("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
7
+ * @license lucide-vue-next v0.474.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const B=_("SquareIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),T=b("chat",()=>{const r=m([]),a=m(!1),i=m(null);function l(t){const e={id:crypto.randomUUID(),role:"user",content:t,timestamp:new Date};return r.value.push(e),e}async function f(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 I("/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 d(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:f,updateStreamingMessage:d,clearMessages:p}}),V={class:"flex flex-col h-full"},z={key:0,class:"flex items-center justify-center h-full"},E={key:1,class:"text-muted-foreground"},K={key:2,class:"inline-block w-2 h-4 bg-current animate-pulse ml-1"},q={class:"border-t border-border p-4"},F={class:"flex gap-2 items-end"},L=["disabled"],G=k({__name:"ChatView",setup(r){const a=T(),i=m(""),l=m();async function f(){const t=i.value.trim();!t||a.isStreaming||(i.value="",await a.sendMessage(t))}function d(){l.value&&(l.value.scrollTop=l.value.scrollHeight)}function p(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),f())}return h(()=>a.messages.map(t=>t.content),async()=>{await v(),d()},{deep:!0}),h(()=>a.messages.length,async()=>{await v(),d()}),w(()=>d()),(t,e)=>(o(),c("div",V,[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",z,[...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)])])):x("",!0),(o(!0),c(S,null,M(u(a).messages,s=>(o(),c("div",{key:s.id,class:y(["flex",s.role==="user"?"justify-end":"justify-start"])},[n("div",{class:y(["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(U,{key:0,content:s.content,class:y(s.role==="user"?"prose-invert":"")},null,8,["content","class"])):(o(),c("span",E,"...")),s.streaming?(o(),c("div",K)):x("",!0)],2)],2))),128))],512),n("div",q,[n("div",F,[C(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),[[D,i.value]]),n("button",{onClick:f,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(B),{key:1,class:"w-4 h-4"})):(o(),g(u(j),{key:0,class:"w-4 h-4"}))],8,L)])])]))}});export{G as default};
@@ -1,4 +1,4 @@
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";/**
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-NtVa0DWK.js";import{b as N,c as V,a as B}from"./api-BJX69em8.js";import{_ as D}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-CY9sVI6F.js";import{T as L}from"./trash-2-D3LQXmVt.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +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
+ 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-NtVa0DWK.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-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} *[^
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-NtVa0DWK.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,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
+ 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-NtVa0DWK.js";import{b as P,c as T,d as U,a as $}from"./api-BJX69em8.js";import{P as A}from"./plus-BxlTpuVX.js";import{T as B}from"./trash-2-D3LQXmVt.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,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
+ 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-NtVa0DWK.js";import{b as A,c as N,d as z,a as U}from"./api-BJX69em8.js";import{P as B}from"./plus-BxlTpuVX.js";import{T as D}from"./trash-2-D3LQXmVt.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,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};
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-NtVa0DWK.js";import{b as V,d as S}from"./api-BJX69em8.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};
@@ -1 +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
+ 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-NtVa0DWK.js";import{b as P,c as A,a as T}from"./api-BJX69em8.js";import{P as B}from"./plus-BxlTpuVX.js";import{T as D}from"./trash-2-D3LQXmVt.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,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";/**
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-NtVa0DWK.js";import{b as M}from"./api-BJX69em8.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
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";/**
1
+ import{b as _}from"./api-BJX69em8.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-NtVa0DWK.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
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";/**
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-NtVa0DWK.js";import{b as z,d as D,a as K}from"./api-BJX69em8.js";import{_ as R}from"./MarkdownContent.vue_vue_type_script_setup_true_lang-CY9sVI6F.js";import{P as X}from"./plus-BxlTpuVX.js";import{T as Z}from"./trash-2-D3LQXmVt.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +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};
1
+ import{v as c,s as i}from"./index-NtVa0DWK.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};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatView-B9WVD6tx.js","assets/api-GN_ZR-Nh.js","assets/MarkdownContent.vue_vue_type_script_setup_true_lang-Bo47khKQ.js","assets/SquadsView-DaFexZRB.js","assets/SquadDetailView-BM0HhBdq.js","assets/FeedView-CpzIivbf.js","assets/trash-2-yEg_2EGm.js","assets/SkillsView-DfS8e6eK.js","assets/plus-CObRuHy3.js","assets/McpView-Czjm3SHm.js","assets/SchedulesView-DD_f5CP5.js","assets/WikiView-BcQO6_oh.js","assets/SettingsView-BXYd-jo1.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatView-1wYs2kcb.js","assets/api-BJX69em8.js","assets/MarkdownContent.vue_vue_type_script_setup_true_lang-CY9sVI6F.js","assets/SquadsView-CAc6DHio.js","assets/SquadDetailView-GurJERAm.js","assets/FeedView-DR3F3vkn.js","assets/trash-2-D3LQXmVt.js","assets/SkillsView-C8bHP3LM.js","assets/plus-BxlTpuVX.js","assets/McpView-CDH-2HZC.js","assets/SchedulesView-Bjd5nZ3o.js","assets/WikiView-DqEkxYAc.js","assets/SettingsView-CoB0LolI.js"])))=>i.map(i=>d[i]);
2
2
  (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();const Rc="modulepreload",Oc=function(t){return"/"+t},Wi={},We=function(e,r,s){let n=Promise.resolve();if(r&&r.length>0){let o=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));n=o(r.map(c=>{if(c=Oc(c),c in Wi)return;Wi[c]=!0;const u=c.endsWith(".css"),h=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":Rc,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((f,m)=>{d.addEventListener("load",f),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return n.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})};/**
3
3
  * @vue/shared v3.5.34
4
4
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -135,4 +135,4 @@ ${E}`}class ge extends Error{constructor({message:e,code:r,cause:s,name:n}){var
135
135
  *
136
136
  * This source code is licensed under the ISC license.
137
137
  * See the LICENSE file in the root directory of this source tree.
138
- */const Pm=jt("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),xm={class:"w-64 border-r border-border bg-card flex flex-col h-full shrink-0"},Im={class:"flex-1 p-2 space-y-1 overflow-y-auto"},jm={class:"p-3 border-t border-border"},Nm={class:"flex items-center justify-between"},$m={class:"text-xs text-muted-foreground truncate"},Lm=dn({__name:"AppSidebar",setup(t){const e=rc(),r=yf(),s=kn(),n=[{name:"Chat",icon:Tm,path:"/"},{name:"Squads",icon:Pm,path:"/squads"},{name:"Feed",icon:km,path:"/feed"},{name:"Skills",icon:Rm,path:"/skills"},{name:"MCP Servers",icon:Om,path:"/mcp"},{name:"Schedules",icon:Em,path:"/schedules"},{name:"Wiki",icon:Sm,path:"/wiki"},{name:"Settings",icon:Cm,path:"/settings"}];async function i(){await s.logout(),r.push("/login")}return(o,a)=>{const l=dl("router-link");return Sr(),ei("aside",xm,[a[0]||(a[0]=ze("div",{class:"p-4 border-b border-border"},[ze("h1",{class:"text-xl font-bold tracking-tight"},"🤖 IO"),ze("p",{class:"text-xs text-muted-foreground mt-1"},"Personal AI Assistant")],-1)),ze("nav",Im,[(Sr(),ei(ut,null,Bu(n,c=>Ae(l,{key:c.path,to:c.path,class:an(["flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors",[Xe(e).path===c.path||c.path!=="/"&&Xe(e).path.startsWith(c.path)?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"]])},{default:nl(()=>[(Sr(),Di(Uu(c.icon),{class:"w-4 h-4"})),Nl(" "+Kn(c.name),1)]),_:2},1032,["to","class"])),64))]),ze("div",jm,[ze("div",Nm,[ze("span",$m,Kn(Xe(s).email),1),ze("button",{onClick:i,class:"p-1.5 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Sign out"},[Ae(Xe(Am),{class:"w-4 h-4"})])])])])}}}),Dm={class:"flex h-screen overflow-hidden"},Um={class:"flex-1 overflow-auto"},Bm=dn({__name:"App",setup(t){const e=kn(),r=rc(),s=$e(()=>e.isAuthenticated&&r.name!=="login");return(n,i)=>{const o=dl("router-view");return Sr(),ei("div",Dm,[s.value?(Sr(),Di(Lm,{key:0})):gh("",!0),ze("main",Um,[Ae(o)])])}}}),Mm=[{path:"/login",name:"login",component:()=>We(()=>import("./LoginView-CIP77sJH.js"),[]),meta:{public:!0}},{path:"/",name:"chat",component:()=>We(()=>import("./ChatView-B9WVD6tx.js"),__vite__mapDeps([0,1,2]))},{path:"/squads",name:"squads",component:()=>We(()=>import("./SquadsView-DaFexZRB.js"),__vite__mapDeps([3,1]))},{path:"/squads/:id",name:"squad-detail",component:()=>We(()=>import("./SquadDetailView-BM0HhBdq.js"),__vite__mapDeps([4,1]))},{path:"/feed",name:"feed",component:()=>We(()=>import("./FeedView-CpzIivbf.js"),__vite__mapDeps([5,1,2,6]))},{path:"/skills",name:"skills",component:()=>We(()=>import("./SkillsView-DfS8e6eK.js"),__vite__mapDeps([7,1,8,6]))},{path:"/mcp",name:"mcp",component:()=>We(()=>import("./McpView-Czjm3SHm.js"),__vite__mapDeps([9,1,8,6]))},{path:"/schedules",name:"schedules",component:()=>We(()=>import("./SchedulesView-DD_f5CP5.js"),__vite__mapDeps([10,1,8,6]))},{path:"/wiki",name:"wiki",component:()=>We(()=>import("./WikiView-BcQO6_oh.js"),__vite__mapDeps([11,1,2,8,6]))},{path:"/settings",name:"settings",component:()=>We(()=>import("./SettingsView-BXYd-jo1.js"),__vite__mapDeps([12,1]))}],Tc=mf({history:Gd(),routes:Mm});Tc.beforeEach(t=>{const e=kn();if(!t.meta.public&&!e.isAuthenticated)return{name:"login"}});async function Hm(){await vm();const t=ed(Bm);t.use(sd()),t.use(Tc);const{useAuthStore:e}=await We(async()=>{const{useAuthStore:s}=await Promise.resolve().then(()=>_m);return{useAuthStore:s}},void 0);e().initAuthListener(),t.mount("#app")}Hm();export{qm as A,Sm as B,Em as C,Wr as D,nl as E,ut as F,Fm as G,Gm as H,km as I,Wm as J,Rm as P,Om as S,Pm as U,ze as a,Di as b,$e as c,gh as d,ei as e,jt as f,Nl as g,Ae as h,dn as i,cd as j,an as k,ki as l,Sr as m,hn as n,Pu as o,Bu as p,dl as q,Kr as r,Tc as s,Kn as t,Xe as u,kn as v,rc as w,yf as x,Vm as y,Km as z};
138
+ */const Pm=jt("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),xm={class:"w-64 border-r border-border bg-card flex flex-col h-full shrink-0"},Im={class:"flex-1 p-2 space-y-1 overflow-y-auto"},jm={class:"p-3 border-t border-border"},Nm={class:"flex items-center justify-between"},$m={class:"text-xs text-muted-foreground truncate"},Lm=dn({__name:"AppSidebar",setup(t){const e=rc(),r=yf(),s=kn(),n=[{name:"Chat",icon:Tm,path:"/"},{name:"Squads",icon:Pm,path:"/squads"},{name:"Feed",icon:km,path:"/feed"},{name:"Skills",icon:Rm,path:"/skills"},{name:"MCP Servers",icon:Om,path:"/mcp"},{name:"Schedules",icon:Em,path:"/schedules"},{name:"Wiki",icon:Sm,path:"/wiki"},{name:"Settings",icon:Cm,path:"/settings"}];async function i(){await s.logout(),r.push("/login")}return(o,a)=>{const l=dl("router-link");return Sr(),ei("aside",xm,[a[0]||(a[0]=ze("div",{class:"p-4 border-b border-border"},[ze("h1",{class:"text-xl font-bold tracking-tight"},"🤖 IO"),ze("p",{class:"text-xs text-muted-foreground mt-1"},"Personal AI Assistant")],-1)),ze("nav",Im,[(Sr(),ei(ut,null,Bu(n,c=>Ae(l,{key:c.path,to:c.path,class:an(["flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors",[Xe(e).path===c.path||c.path!=="/"&&Xe(e).path.startsWith(c.path)?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"]])},{default:nl(()=>[(Sr(),Di(Uu(c.icon),{class:"w-4 h-4"})),Nl(" "+Kn(c.name),1)]),_:2},1032,["to","class"])),64))]),ze("div",jm,[ze("div",Nm,[ze("span",$m,Kn(Xe(s).email),1),ze("button",{onClick:i,class:"p-1.5 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Sign out"},[Ae(Xe(Am),{class:"w-4 h-4"})])])])])}}}),Dm={class:"flex h-screen overflow-hidden"},Um={class:"flex-1 overflow-auto"},Bm=dn({__name:"App",setup(t){const e=kn(),r=rc(),s=$e(()=>e.isAuthenticated&&r.name!=="login");return(n,i)=>{const o=dl("router-view");return Sr(),ei("div",Dm,[s.value?(Sr(),Di(Lm,{key:0})):gh("",!0),ze("main",Um,[Ae(o)])])}}}),Mm=[{path:"/login",name:"login",component:()=>We(()=>import("./LoginView-CCrOiks_.js"),[]),meta:{public:!0}},{path:"/",name:"chat",component:()=>We(()=>import("./ChatView-1wYs2kcb.js"),__vite__mapDeps([0,1,2]))},{path:"/squads",name:"squads",component:()=>We(()=>import("./SquadsView-CAc6DHio.js"),__vite__mapDeps([3,1]))},{path:"/squads/:id",name:"squad-detail",component:()=>We(()=>import("./SquadDetailView-GurJERAm.js"),__vite__mapDeps([4,1]))},{path:"/feed",name:"feed",component:()=>We(()=>import("./FeedView-DR3F3vkn.js"),__vite__mapDeps([5,1,2,6]))},{path:"/skills",name:"skills",component:()=>We(()=>import("./SkillsView-C8bHP3LM.js"),__vite__mapDeps([7,1,8,6]))},{path:"/mcp",name:"mcp",component:()=>We(()=>import("./McpView-CDH-2HZC.js"),__vite__mapDeps([9,1,8,6]))},{path:"/schedules",name:"schedules",component:()=>We(()=>import("./SchedulesView-Bjd5nZ3o.js"),__vite__mapDeps([10,1,8,6]))},{path:"/wiki",name:"wiki",component:()=>We(()=>import("./WikiView-DqEkxYAc.js"),__vite__mapDeps([11,1,2,8,6]))},{path:"/settings",name:"settings",component:()=>We(()=>import("./SettingsView-CoB0LolI.js"),__vite__mapDeps([12,1]))}],Tc=mf({history:Gd(),routes:Mm});Tc.beforeEach(t=>{const e=kn();if(!t.meta.public&&!e.isAuthenticated)return{name:"login"}});async function Hm(){await vm();const t=ed(Bm);t.use(sd()),t.use(Tc);const{useAuthStore:e}=await We(async()=>{const{useAuthStore:s}=await Promise.resolve().then(()=>_m);return{useAuthStore:s}},void 0);e().initAuthListener(),t.mount("#app")}Hm();export{qm as A,Sm as B,Em as C,Wr as D,nl as E,ut as F,Fm as G,Gm as H,km as I,Wm as J,Rm as P,Om as S,Pm as U,ze as a,Di as b,$e as c,gh as d,ei as e,jt as f,Nl as g,Ae as h,dn as i,cd as j,an as k,ki as l,Sr as m,hn as n,Pu as o,Bu as p,dl as q,Kr as r,Tc as s,Kn as t,Xe as u,kn as v,rc as w,yf as x,Vm as y,Km as z};
@@ -1,4 +1,4 @@
1
- import{f as e}from"./index-CMctONs4.js";/**
1
+ import{f as e}from"./index-NtVa0DWK.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{f as e}from"./index-CMctONs4.js";/**
1
+ import{f as e}from"./index-NtVa0DWK.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,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>IO — Dashboard</title>
7
7
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
- <script type="module" crossorigin src="/assets/index-CMctONs4.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-NtVa0DWK.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-Brk3rLgL.css">
10
10
  </head>
11
11
  <body class="bg-background text-foreground">
@@ -1,11 +0,0 @@
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
- * @license lucide-vue-next v0.474.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const U=v("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
7
- * @license lucide-vue-next v0.474.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
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}}),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};