heyio 1.11.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/copilot/trigger-schedule.js +8 -6
  2. package/package.json +1 -1
  3. package/web-dist/assets/{AuditLogView-DJZUjDkn.js → AuditLogView-C92eQY3G.js} +1 -1
  4. package/web-dist/assets/ChatView-Dxk6eQl1.js +1 -0
  5. package/web-dist/assets/{FeedView-C4VD86L2.js → FeedView-CUuImaZo.js} +1 -1
  6. package/web-dist/assets/{HistoryView-BZa5YfV5.js → HistoryView-DXsZEMVH.js} +1 -1
  7. package/web-dist/assets/{LoginView-BJ3ew1vc.js → LoginView-CNnHmWRL.js} +1 -1
  8. package/web-dist/assets/{McpView-iZIbhRII.js → McpView-zHTJmc0Y.js} +1 -1
  9. package/web-dist/assets/{SchedulesView-CnWqh5AS.js → SchedulesView-DAGAkVsM.js} +1 -1
  10. package/web-dist/assets/{SettingsView-CMzjZyXZ.js → SettingsView-ClF03x9D.js} +1 -1
  11. package/web-dist/assets/{SkillsView-rQ1QT4EH.js → SkillsView-DoSq-jyC.js} +1 -1
  12. package/web-dist/assets/{SquadDetailView-BNnMQUiF.js → SquadDetailView-BOAi0Hgv.js} +1 -1
  13. package/web-dist/assets/{SquadHealthView-DUiz7eFf.js → SquadHealthView-CicAIjwi.js} +1 -1
  14. package/web-dist/assets/{SquadsView-nTPIFfqN.js → SquadsView-C6ikS5RW.js} +1 -1
  15. package/web-dist/assets/{ToggleSwitch.vue_vue_type_script_setup_true_lang-BTwxLQKn.js → ToggleSwitch.vue_vue_type_script_setup_true_lang-qVvadgnS.js} +1 -1
  16. package/web-dist/assets/{UsageView-Bwr9ZrfV.js → UsageView-Ar_4xZn1.js} +1 -1
  17. package/web-dist/assets/{WikiView-BSZKWJSH.js → WikiView-CYSbQVLd.js} +1 -1
  18. package/web-dist/assets/{api-fyXT822e.js → api-dXl4z_H9.js} +1 -1
  19. package/web-dist/assets/{arrow-left-BXi9pnzg.js → arrow-left-CiMmp6_a.js} +1 -1
  20. package/web-dist/assets/{git-branch-oAydmFRE.js → git-branch-CJwD1kDF.js} +1 -1
  21. package/web-dist/assets/{index-CGiFJDec.js → index-CVHn07Yu.js} +12 -12
  22. package/web-dist/assets/index-HnxAWR4u.css +1 -0
  23. package/web-dist/assets/{pencil-DKeaS1-M.js → pencil-Bfw57NpW.js} +1 -1
  24. package/web-dist/assets/{plus-D-W0AQd6.js → plus-CZyw8CN2.js} +1 -1
  25. package/web-dist/assets/{save-Do-iKszd.js → save-CQd10OTY.js} +1 -1
  26. package/web-dist/assets/{search-C7hAGhZ-.js → search-DOBptCtE.js} +1 -1
  27. package/web-dist/assets/{trash-2-dJti39sV.js → trash-2-BtBTSEpB.js} +1 -1
  28. package/web-dist/assets/{triangle-alert-C_bHcseh.js → triangle-alert-CaKwD4uJ.js} +1 -1
  29. package/web-dist/assets/{x-CH8ln3pi.js → x-nFOviyPn.js} +1 -1
  30. package/web-dist/index.html +2 -2
  31. package/web-dist/assets/ChatView-Cxbasu5Q.js +0 -1
  32. package/web-dist/assets/index-vcgp2T40.css +0 -1
@@ -1,6 +1,7 @@
1
1
  import { getSchedule, updateScheduleLastRun } from "../store/schedules.js";
2
2
  import { sendToOrchestrator } from "./orchestrator.js";
3
3
  import { buildSquadScopedPrompt } from "./io-scheduler.js";
4
+ import { delegateTask } from "./agents.js";
4
5
  /**
5
6
  * Trigger a schedule immediately, bypassing cron timing.
6
7
  * Returns the schedule if triggered successfully, or undefined if not found.
@@ -11,12 +12,13 @@ export function triggerSchedule(id) {
11
12
  return undefined;
12
13
  updateScheduleLastRun(schedule.id);
13
14
  if (schedule.type === "squad") {
14
- const agenda = schedule.agenda || "triage";
15
- const prompt = `[Squad Schedule] Run "${agenda}" stand-up for squad ${schedule.squad_id}. Agenda: ${agenda}`;
16
- sendToOrchestrator(prompt, "scheduler", (_text, done) => {
17
- if (done) {
18
- console.log(`[trigger] Squad stand-up completed for ${schedule.squad_id}`);
19
- }
15
+ if (!schedule.squad_id)
16
+ return schedule;
17
+ const task = schedule.prompt || `Run "triage" stand-up. Agenda: triage`;
18
+ // Delegate directly to squad lead — same path as the cron scheduler
19
+ delegateTask(schedule.squad_id, task).catch((err) => {
20
+ const errMsg = err instanceof Error ? err.message : "Unknown error";
21
+ console.error(`[trigger] Delegation failed for squad ${schedule.squad_id}: ${errMsg}`);
20
22
  });
21
23
  }
22
24
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyio",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
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{r as W,u as X,E as Z,J as a,q as d,n as o,t as A,T as N,b as V,s as S,R as l,a4 as f,$ as T,d as h,L as w,a0 as L,p as b,K as n,m as _,z as ee}from"./index-CGiFJDec.js";import{b as F}from"./api-fyXT822e.js";/**
1
+ import{r as W,u as X,E as Z,J as a,q as d,n as o,t as A,T as N,b as V,s as S,R as l,a4 as f,$ as T,d as h,L as w,a0 as L,p as b,K as n,m as _,z as ee}from"./index-CVHn07Yu.js";import{b as F}from"./api-dXl4z_H9.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{u as R,W as U,a2 as T,E as X,J as a,q as r,n as o,T as s,t as A,p,d as C,L as S,R as d,w as x,M as W,f as Y,P as J,a4 as Q,a0 as G,o as m,S as Z,j as ee,z as k,K as v,m as I,v as te,a1 as se,_ as ae,x as D,Q as ne,I as j,F as H,l as oe,y as M}from"./index-CVHn07Yu.js";import{X as re}from"./x-nFOviyPn.js";const le={class:"flex flex-col h-full"},ie={key:0,class:"flex items-center justify-center h-full"},ce={class:"text-center text-muted-foreground"},ue={key:0,class:"mb-2 space-y-2"},de=["src","alt"],fe={class:"flex items-center gap-2 text-xs"},pe={class:"truncate"},me={class:"opacity-70"},ve={key:2,class:"text-muted-foreground"},he={key:3,class:"inline-block w-2 h-4 bg-current animate-pulse ml-1"},ge={key:0,class:"mb-2 space-y-2"},xe={class:"flex flex-wrap gap-2"},ye={class:"max-w-[170px] truncate"},_e={class:"opacity-70"},be=["onClick"],ke={class:"text-xs text-muted-foreground"},we={key:1,class:"text-xs text-destructive mb-2"},Te={class:"flex gap-2 items-end"},Ae=["disabled"],Ce=["disabled"],ze=R({__name:"ChatView",setup(Se){const c=U(),h=v(""),f=v(""),y=v(),_=v(),i=v([]),g=v(),b=v(!1),N=I(()=>i.value.reduce((e,n)=>e+n.size,0)),z=I(()=>!c.isStreaming&&(h.value.trim().length>0||i.value.length>0));async function B(e){if(!e||e.length===0)return;f.value="";const n=[];try{for(const u of Array.from(e))n.push(await te(u))}catch(u){f.value=(u==null?void 0:u.message)??"Unable to read one or more files.";return}const t=[...i.value,...n],l=se(t);if(!l.ok){f.value=l.error;return}i.value=t,_.value&&(_.value.value="")}function P(e){i.value.splice(e,1),f.value=""}function V(){var e;(e=_.value)==null||e.click()}function F(e){const n=e.target;B((n==null?void 0:n.files)??null)}async function E(){if(!z.value)return;const e=h.value.trim(),n=[...i.value],t=e||"Please review the attached file(s).";h.value="",i.value=[],f.value="",await c.sendMessage(t,n)}function w(){y.value&&(y.value.scrollTop=y.value.scrollHeight)}function $(){g.value&&(g.value.style.height="auto",g.value.style.height=`${Math.min(g.value.scrollHeight,120)}px`)}function K(e){e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),E())}function L(e){e.preventDefault(),b.value=!0}function q(e){e.preventDefault(),b.value=!1}async function O(e){var n;e.preventDefault(),b.value=!1,await B(((n=e.dataTransfer)==null?void 0:n.files)??null)}return T(()=>c.messages.map(e=>e.content),async()=>{await M(),w()},{deep:!0}),T(()=>c.messages.length,async()=>{await M(),w()}),T(()=>h.value,async()=>{await M(),$()}),X(()=>{$(),w()}),(e,n)=>(a(),r("div",le,[o("div",{ref_key:"messagesContainer",ref:y,class:"flex-1 overflow-y-auto p-4 space-y-4"},[s(c).messages.length===0?(a(),r("div",ie,[o("div",ce,[A(ae,{size:56,class:"mx-auto mb-4"}),n[1]||(n[1]=o("p",{class:"text-lg font-medium"},"Welcome to IO",-1)),n[2]||(n[2]=o("p",{class:"text-sm mt-1"},"Send a message to get started.",-1))])])):p("",!0),(a(!0),r(C,null,S(s(c).messages,t=>(a(),r("div",{key:t.id,class:k(["flex",t.role==="user"?"justify-end":"justify-start"])},[o("div",{class:k(["max-w-[75%] rounded-lg px-4 py-2 text-sm",t.role==="user"?"bg-primary text-primary-foreground":"bg-muted text-foreground"])},[t.attachments.length>0?(a(),r("div",ue,[(a(!0),r(C,null,S(t.attachments,(l,u)=>(a(),r("div",{key:`${t.id}-${u}`,class:"rounded border border-border/50 p-2 bg-background/70 text-foreground"},[s(D)(l)?(a(),r("img",{key:0,src:s(ne)(l),alt:l.name,class:"max-h-44 rounded mb-1 object-contain"},null,8,de)):p("",!0),o("div",fe,[s(D)(l)?(a(),m(s(j),{key:0,class:"w-3.5 h-3.5"})):(a(),m(s(H),{key:1,class:"w-3.5 h-3.5"})),o("span",pe,d(l.name),1),o("span",me,d(s(x)(l.size)),1)])]))),128))])):p("",!0),t.content?(a(),m(oe,{key:1,content:t.content,class:k(t.role==="user"?"prose-invert":"")},null,8,["content","class"])):t.streaming?p("",!0):(a(),r("span",ve,"...")),t.streaming?(a(),r("div",he)):p("",!0)],2)],2))),128))],512),o("div",{class:k(["border-t border-border p-4",b.value?"bg-accent/40":""]),onDragover:L,onDragleave:q,onDrop:O},[o("input",{ref_key:"fileInput",ref:_,type:"file",multiple:"",class:"hidden",onChange:F},null,544),i.value.length>0?(a(),r("div",ge,[o("div",xe,[(a(!0),r(C,null,S(i.value,(t,l)=>(a(),r("div",{key:`${t.name}-${l}`,class:"flex items-center gap-2 rounded border border-border px-2 py-1 text-xs bg-muted"},[s(D)(t)?(a(),m(s(j),{key:0,class:"w-3.5 h-3.5"})):(a(),m(s(H),{key:1,class:"w-3.5 h-3.5"})),o("span",ye,d(t.name),1),o("span",_e,d(s(x)(t.size)),1),o("button",{class:"hover:text-destructive",onClick:u=>P(l)},[A(s(re),{class:"w-3.5 h-3.5"})],8,be)]))),128))]),o("p",ke,d(s(x)(N.value))+" attached · Max per file "+d(s(x)(s(W)))+" · Max total "+d(s(x)(s(Y))),1)])):p("",!0),f.value?(a(),r("p",we,d(f.value),1)):p("",!0),o("div",Te,[o("button",{class:"rounded-md border border-input p-2 hover:bg-accent disabled:opacity-50",disabled:s(c).isStreaming,onClick:V,title:"Attach files"},[A(s(J),{class:"w-4 h-4"})],8,Ae),Q(o("textarea",{ref_key:"textareaRef",ref:g,"onUpdate:modelValue":n[0]||(n[0]=t=>h.value=t),onKeydown:K,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),[[G,h.value]]),o("button",{onClick:E,disabled:!z.value,class:"rounded-md bg-primary text-primary-foreground p-2 hover:bg-primary/90 disabled:opacity-50 transition-colors"},[s(c).isStreaming?(a(),m(s(ee),{key:1,class:"w-4 h-4"})):(a(),m(s(Z),{key:0,class:"w-4 h-4"}))],8,Ce)])],34)]))}});export{ze as default};
@@ -1,4 +1,4 @@
1
- import{r as M,u as D,E as N,J as o,q as n,n as a,d as h,L as b,t as c,T as i,e as V,K as d,m as z,z as f,R as p,D as B,a6 as k,p as q,l as T}from"./index-CGiFJDec.js";import{b as C,c as E,a as P}from"./api-fyXT822e.js";import{g as R}from"./squad-colors-B8B_Y-lz.js";import{T as j}from"./trash-2-dJti39sV.js";/**
1
+ import{r as M,u as D,E as N,J as o,q as n,n as a,d as h,L as b,t as c,T as i,e as V,K as d,m as z,z as f,R as p,D as B,a6 as k,p as q,l as T}from"./index-CVHn07Yu.js";import{b as C,c as E,a as P}from"./api-dXl4z_H9.js";import{g as R}from"./squad-colors-B8B_Y-lz.js";import{T as j}from"./trash-2-BtBTSEpB.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{u as q,a2 as F,E as z,J as r,q as n,n as t,t as d,T as c,H as M,a4 as T,a0 as L,g as E,p as x,d as $,L as A,z as p,R as g,K as l,m as P,o as R,l as G}from"./index-CGiFJDec.js";import{b as B,a as J}from"./api-fyXT822e.js";import{S as K}from"./search-C7hAGhZ-.js";import{A as Q}from"./arrow-left-BXi9pnzg.js";import{T as I}from"./trash-2-dJti39sV.js";const O={class:"flex h-full"},W={class:"p-3 border-b border-border space-y-2"},X={class:"flex items-center gap-2"},Y={class:"relative"},Z={class:"flex gap-2"},ee={class:"flex-1"},te={class:"flex-1"},se={class:"flex-1 overflow-y-auto"},oe={key:0,class:"p-4 text-xs text-muted-foreground"},re={key:1,class:"flex flex-col items-center justify-center h-full p-6 text-center text-muted-foreground"},ne=["onClick"],ae={class:"flex-1 min-w-0"},le={class:"text-xs text-foreground line-clamp-2"},ie={class:"flex items-center gap-2 mt-1"},ue={class:"text-xs text-muted-foreground"},de={class:"text-xs text-muted-foreground"},ce=["onClick"],fe={key:2,class:"p-3 text-center"},ve={key:0,class:"flex-1 flex flex-col"},me={class:"flex items-center gap-2 px-4 py-2 border-b border-border"},xe={class:"text-sm font-medium text-muted-foreground"},pe={class:"flex-1 overflow-y-auto p-4 space-y-4"},ge={key:0,class:"text-center text-xs text-muted-foreground py-8"},he={class:"text-xs mt-1 opacity-60"},ye={key:1,class:"hidden md:flex flex-1 items-center justify-center text-muted-foreground"},be={class:"text-center"},_e=50,De=q({__name:"HistoryView",setup(we){const a=l([]),h=l(0),y=l(!0),f=l(""),v=l(""),m=l(""),u=l(null),b=l([]),_=l(!1),w=l(0);async function k(o=!0){y.value=!0;try{o&&(w.value=0,a.value=[]);const e=new URLSearchParams;f.value&&e.set("q",f.value),v.value&&e.set("from",v.value),m.value&&e.set("to",m.value+"T23:59:59"),e.set("limit",String(_e)),e.set("offset",String(w.value));const i=await B(`/history?${e.toString()}`);a.value=o?i.items:[...a.value,...i.items],h.value=i.total,w.value+=i.items.length}finally{y.value=!1}}async function j(o){u.value=o,_.value=!0;try{b.value=await B(`/history/${o}`)}finally{_.value=!1}}function D(){u.value=null,b.value=[]}async function H(o,e){e.stopPropagation(),confirm("Delete this conversation?")&&(await J(`/history/${o}`),a.value=a.value.filter(i=>i.id!==o),h.value=Math.max(0,h.value-1),u.value===o&&D())}function C(o){return new Date(o).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function N(o,e=100){return o.length>e?o.slice(0,e)+"…":o}const U=P(()=>a.value.length<h.value);let S=null;return F([f,v,m],()=>{S&&clearTimeout(S),S=setTimeout(()=>k(!0),300)}),z(()=>k(!0)),(o,e)=>{var i;return r(),n("div",O,[t("div",{class:p(["flex flex-col border-r border-border",u.value?"hidden md:flex w-80 shrink-0":"flex-1"])},[t("div",W,[t("div",X,[d(c(M),{class:"w-4 h-4 text-muted-foreground"}),e[4]||(e[4]=t("span",{class:"text-sm font-medium"},"Conversation History",-1))]),t("div",Y,[d(c(K),{class:"absolute left-2.5 top-2.5 w-3.5 h-3.5 text-muted-foreground"}),T(t("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>f.value=s),placeholder:"Search conversations...",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),[[L,f.value]])]),t("div",Z,[t("div",ee,[e[5]||(e[5]=t("label",{class:"text-xs text-muted-foreground block mb-1"},"From",-1)),T(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>v.value=s),type:"date",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"},null,512),[[L,v.value]])]),t("div",te,[e[6]||(e[6]=t("label",{class:"text-xs text-muted-foreground block mb-1"},"To",-1)),T(t("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>m.value=s),type:"date",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"},null,512),[[L,m.value]])])])]),t("div",se,[y.value&&a.value.length===0?(r(),n("div",oe," Loading... ")):a.value.length===0?(r(),n("div",re,[d(c(E),{class:"w-10 h-10 mb-3 opacity-40"}),e[7]||(e[7]=t("p",{class:"text-sm"},"No conversations found.",-1)),e[8]||(e[8]=t("p",{class:"text-xs mt-1"},"Start chatting to build up your history.",-1))])):x("",!0),(r(!0),n($,null,A(a.value,s=>(r(),n("div",{key:s.id,class:p(["group flex items-start gap-2 px-3 py-3 border-b border-border cursor-pointer hover:bg-accent/50 transition-colors",u.value===s.id?"bg-accent":""]),onClick:V=>j(s.id)},[t("div",ae,[t("p",le,g(N(s.preview)),1),t("div",ie,[t("span",ue,g(C(s.updatedAt)),1),t("span",de,"· "+g(s.messageCount)+" msgs",1)])]),t("button",{class:"opacity-0 group-hover:opacity-100 p-1 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-all",title:"Delete",onClick:V=>H(s.id,V)},[d(c(I),{class:"w-3.5 h-3.5"})],8,ce)],10,ne))),128)),U.value?(r(),n("div",fe,[t("button",{class:"text-xs text-muted-foreground hover:text-foreground underline",onClick:e[3]||(e[3]=s=>k(!1))}," Load more ")])):x("",!0)])],2),u.value?(r(),n("div",ve,[t("div",me,[t("button",{class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Back",onClick:D},[d(c(Q),{class:"w-4 h-4"})]),t("span",xe,g(C(((i=a.value.find(s=>s.id===u.value))==null?void 0:i.startedAt)??"")),1)]),t("div",pe,[_.value?(r(),n("div",ge," Loading... ")):x("",!0),(r(!0),n($,null,A(b.value,s=>(r(),n("div",{key:s.id,class:p(["flex",s.role==="user"?"justify-end":"justify-start"])},[t("div",{class:p(["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?(r(),R(G,{key:0,content:s.content,class:p(s.role==="user"?"prose-invert":"")},null,8,["content","class"])):x("",!0),t("p",he,g(C(s.createdAt)),1)],2)],2))),128))])])):u.value?x("",!0):(r(),n("div",ye,[t("div",be,[d(c(M),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[9]||(e[9]=t("p",null,"Select a conversation to view",-1))])]))])}}});export{De as default};
1
+ import{u as q,a2 as F,E as z,J as r,q as n,n as t,t as d,T as c,H as M,a4 as T,a0 as L,g as E,p as x,d as $,L as A,z as p,R as g,K as l,m as P,o as R,l as G}from"./index-CVHn07Yu.js";import{b as B,a as J}from"./api-dXl4z_H9.js";import{S as K}from"./search-DOBptCtE.js";import{A as Q}from"./arrow-left-CiMmp6_a.js";import{T as I}from"./trash-2-BtBTSEpB.js";const O={class:"flex h-full"},W={class:"p-3 border-b border-border space-y-2"},X={class:"flex items-center gap-2"},Y={class:"relative"},Z={class:"flex gap-2"},ee={class:"flex-1"},te={class:"flex-1"},se={class:"flex-1 overflow-y-auto"},oe={key:0,class:"p-4 text-xs text-muted-foreground"},re={key:1,class:"flex flex-col items-center justify-center h-full p-6 text-center text-muted-foreground"},ne=["onClick"],ae={class:"flex-1 min-w-0"},le={class:"text-xs text-foreground line-clamp-2"},ie={class:"flex items-center gap-2 mt-1"},ue={class:"text-xs text-muted-foreground"},de={class:"text-xs text-muted-foreground"},ce=["onClick"],fe={key:2,class:"p-3 text-center"},ve={key:0,class:"flex-1 flex flex-col"},me={class:"flex items-center gap-2 px-4 py-2 border-b border-border"},xe={class:"text-sm font-medium text-muted-foreground"},pe={class:"flex-1 overflow-y-auto p-4 space-y-4"},ge={key:0,class:"text-center text-xs text-muted-foreground py-8"},he={class:"text-xs mt-1 opacity-60"},ye={key:1,class:"hidden md:flex flex-1 items-center justify-center text-muted-foreground"},be={class:"text-center"},_e=50,De=q({__name:"HistoryView",setup(we){const a=l([]),h=l(0),y=l(!0),f=l(""),v=l(""),m=l(""),u=l(null),b=l([]),_=l(!1),w=l(0);async function k(o=!0){y.value=!0;try{o&&(w.value=0,a.value=[]);const e=new URLSearchParams;f.value&&e.set("q",f.value),v.value&&e.set("from",v.value),m.value&&e.set("to",m.value+"T23:59:59"),e.set("limit",String(_e)),e.set("offset",String(w.value));const i=await B(`/history?${e.toString()}`);a.value=o?i.items:[...a.value,...i.items],h.value=i.total,w.value+=i.items.length}finally{y.value=!1}}async function j(o){u.value=o,_.value=!0;try{b.value=await B(`/history/${o}`)}finally{_.value=!1}}function D(){u.value=null,b.value=[]}async function H(o,e){e.stopPropagation(),confirm("Delete this conversation?")&&(await J(`/history/${o}`),a.value=a.value.filter(i=>i.id!==o),h.value=Math.max(0,h.value-1),u.value===o&&D())}function C(o){return new Date(o).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function N(o,e=100){return o.length>e?o.slice(0,e)+"…":o}const U=P(()=>a.value.length<h.value);let S=null;return F([f,v,m],()=>{S&&clearTimeout(S),S=setTimeout(()=>k(!0),300)}),z(()=>k(!0)),(o,e)=>{var i;return r(),n("div",O,[t("div",{class:p(["flex flex-col border-r border-border",u.value?"hidden md:flex w-80 shrink-0":"flex-1"])},[t("div",W,[t("div",X,[d(c(M),{class:"w-4 h-4 text-muted-foreground"}),e[4]||(e[4]=t("span",{class:"text-sm font-medium"},"Conversation History",-1))]),t("div",Y,[d(c(K),{class:"absolute left-2.5 top-2.5 w-3.5 h-3.5 text-muted-foreground"}),T(t("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>f.value=s),placeholder:"Search conversations...",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),[[L,f.value]])]),t("div",Z,[t("div",ee,[e[5]||(e[5]=t("label",{class:"text-xs text-muted-foreground block mb-1"},"From",-1)),T(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>v.value=s),type:"date",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"},null,512),[[L,v.value]])]),t("div",te,[e[6]||(e[6]=t("label",{class:"text-xs text-muted-foreground block mb-1"},"To",-1)),T(t("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>m.value=s),type:"date",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"},null,512),[[L,m.value]])])])]),t("div",se,[y.value&&a.value.length===0?(r(),n("div",oe," Loading... ")):a.value.length===0?(r(),n("div",re,[d(c(E),{class:"w-10 h-10 mb-3 opacity-40"}),e[7]||(e[7]=t("p",{class:"text-sm"},"No conversations found.",-1)),e[8]||(e[8]=t("p",{class:"text-xs mt-1"},"Start chatting to build up your history.",-1))])):x("",!0),(r(!0),n($,null,A(a.value,s=>(r(),n("div",{key:s.id,class:p(["group flex items-start gap-2 px-3 py-3 border-b border-border cursor-pointer hover:bg-accent/50 transition-colors",u.value===s.id?"bg-accent":""]),onClick:V=>j(s.id)},[t("div",ae,[t("p",le,g(N(s.preview)),1),t("div",ie,[t("span",ue,g(C(s.updatedAt)),1),t("span",de,"· "+g(s.messageCount)+" msgs",1)])]),t("button",{class:"opacity-0 group-hover:opacity-100 p-1 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-all",title:"Delete",onClick:V=>H(s.id,V)},[d(c(I),{class:"w-3.5 h-3.5"})],8,ce)],10,ne))),128)),U.value?(r(),n("div",fe,[t("button",{class:"text-xs text-muted-foreground hover:text-foreground underline",onClick:e[3]||(e[3]=s=>k(!1))}," Load more ")])):x("",!0)])],2),u.value?(r(),n("div",ve,[t("div",me,[t("button",{class:"p-1.5 rounded hover:bg-accent text-muted-foreground",title:"Back",onClick:D},[d(c(Q),{class:"w-4 h-4"})]),t("span",xe,g(C(((i=a.value.find(s=>s.id===u.value))==null?void 0:i.startedAt)??"")),1)]),t("div",pe,[_.value?(r(),n("div",ge," Loading... ")):x("",!0),(r(!0),n($,null,A(b.value,s=>(r(),n("div",{key:s.id,class:p(["flex",s.role==="user"?"justify-end":"justify-start"])},[t("div",{class:p(["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?(r(),R(G,{key:0,content:s.content,class:p(s.role==="user"?"prose-invert":"")},null,8,["content","class"])):x("",!0),t("p",he,g(C(s.createdAt)),1)],2)],2))),128))])])):u.value?x("",!0):(r(),n("div",ye,[t("div",be,[d(c(M),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[9]||(e[9]=t("p",null,"Select a conversation to view",-1))])]))])}}});export{De as default};
@@ -1 +1 @@
1
- import{u as b,V as v,J as u,q as i,n as t,t as y,a6 as w,a4 as m,a0 as p,R as c,p as V,T as f,K as d,_,Y as h}from"./index-CGiFJDec.js";const S={class:"min-h-screen flex items-center justify-center bg-background p-4"},k={class:"w-full max-w-sm space-y-8"},q={class:"text-center"},A={key:0,class:"text-sm text-destructive"},B=["disabled"],L=b({__name:"LoginView",setup(D){const o=v(),g=h(),r=d(""),n=d(""),s=d("");async function x(){s.value="";try{await o.login(r.value,n.value),g.push("/")}catch(l){s.value=l.message??"Login failed"}}return(l,e)=>(u(),i("div",S,[t("div",k,[t("div",q,[y(_,{size:56,class:"mx-auto mb-4"}),e[2]||(e[2]=t("h1",{class:"font-display text-4xl font-normal uppercase tracking-[0.18em] bg-gradient-brand bg-clip-text text-transparent"}," IO ",-1)),e[3]||(e[3]=t("p",{class:"text-sm text-muted-foreground mt-1"},"Sign in to your dashboard",-1))]),t("form",{onSubmit:w(x,["prevent"]),class:"space-y-4 bg-card border border-border rounded-lg p-6"},[t("div",null,[e[4]||(e[4]=t("label",{class:"text-sm font-medium text-muted-foreground",for:"email"},"Email",-1)),m(t("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=a=>r.value=a),type:"email",required:"",class:"mt-1 w-full rounded-md border border-border bg-input px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"you@example.com"},null,512),[[p,r.value]])]),t("div",null,[e[5]||(e[5]=t("label",{class:"text-sm font-medium text-muted-foreground",for:"password"},"Password",-1)),m(t("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=a=>n.value=a),type:"password",required:"",class:"mt-1 w-full rounded-md border border-border bg-input px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"••••••••"},null,512),[[p,n.value]])]),s.value?(u(),i("div",A,c(s.value),1)):V("",!0),t("button",{type:"submit",disabled:f(o).loading,class:"btn-gradient w-full py-2.5"},c(f(o).loading?"Signing in...":"Sign In"),9,B)],32),e[6]||(e[6]=t("p",{class:"text-center text-xs text-muted-foreground"}," Personal AI Assistant Daemon ",-1))])]))}});export{L as default};
1
+ import{u as b,V as v,J as u,q as i,n as t,t as y,a6 as w,a4 as m,a0 as p,R as c,p as V,T as f,K as d,_,Y as h}from"./index-CVHn07Yu.js";const S={class:"min-h-screen flex items-center justify-center bg-background p-4"},k={class:"w-full max-w-sm space-y-8"},q={class:"text-center"},A={key:0,class:"text-sm text-destructive"},B=["disabled"],L=b({__name:"LoginView",setup(D){const o=v(),g=h(),r=d(""),n=d(""),s=d("");async function x(){s.value="";try{await o.login(r.value,n.value),g.push("/")}catch(l){s.value=l.message??"Login failed"}}return(l,e)=>(u(),i("div",S,[t("div",k,[t("div",q,[y(_,{size:56,class:"mx-auto mb-4"}),e[2]||(e[2]=t("h1",{class:"font-display text-4xl font-normal uppercase tracking-[0.18em] bg-gradient-brand bg-clip-text text-transparent"}," IO ",-1)),e[3]||(e[3]=t("p",{class:"text-sm text-muted-foreground mt-1"},"Sign in to your dashboard",-1))]),t("form",{onSubmit:w(x,["prevent"]),class:"space-y-4 bg-card border border-border rounded-lg p-6"},[t("div",null,[e[4]||(e[4]=t("label",{class:"text-sm font-medium text-muted-foreground",for:"email"},"Email",-1)),m(t("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=a=>r.value=a),type:"email",required:"",class:"mt-1 w-full rounded-md border border-border bg-input px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"you@example.com"},null,512),[[p,r.value]])]),t("div",null,[e[5]||(e[5]=t("label",{class:"text-sm font-medium text-muted-foreground",for:"password"},"Password",-1)),m(t("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=a=>n.value=a),type:"password",required:"",class:"mt-1 w-full rounded-md border border-border bg-input px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"••••••••"},null,512),[[p,n.value]])]),s.value?(u(),i("div",A,c(s.value),1)):V("",!0),t("button",{type:"submit",disabled:f(o).loading,class:"btn-gradient w-full py-2.5"},c(f(o).loading?"Signing in...":"Sign In"),9,B)],32),e[6]||(e[6]=t("p",{class:"text-center text-xs text-muted-foreground"}," Personal AI Assistant Daemon ",-1))])]))}});export{L as default};
@@ -1 +1 @@
1
- import{u as E,E as S,J as l,q as a,n as s,t as c,T as b,s as C,a4 as i,a0 as m,$ as M,p as x,i as P,d as $,L as j,K as f,R as p}from"./index-CGiFJDec.js";import{b as U,c as I,d as N,a as L}from"./api-fyXT822e.js";import{_ as O}from"./ToggleSwitch.vue_vue_type_script_setup_true_lang-BTwxLQKn.js";import{P as G}from"./plus-D-W0AQd6.js";import{T as K}from"./trash-2-dJti39sV.js";const F={class:"p-6"},Y={class:"flex items-center justify-between mb-6"},B={key:0,class:"border border-border rounded-lg p-4 mb-6 space-y-3 bg-card"},h={class:"grid grid-cols-2 gap-3"},D={key:0},J={key:1},R={key:1,class:"text-muted-foreground"},q={key:2,class:"text-center py-12 text-muted-foreground"},W={key:3,class:"space-y-2"},z={class:"space-y-1"},H={class:"flex items-center gap-2"},Q={class:"font-medium text-sm"},X={class:"text-xs text-muted-foreground bg-secondary px-1.5 py-0.5 rounded"},Z={key:0,class:"text-xs text-muted-foreground"},ee={key:1,class:"text-xs text-muted-foreground"},te={key:2,class:"text-xs text-muted-foreground"},se={class:"flex items-center gap-3"},oe=["onClick"],ie=E({__name:"McpView",setup(ne){const u=f([]),g=f(!0),v=f(!1),o=f({name:"",type:"stdio",command:"",url:"",argsText:"",envText:""});S(async()=>{try{u.value=await U("/mcp")}finally{g.value=!1}});function k(n){return n.split(/\r?\n|,/).map(e=>e.trim()).filter(Boolean)}function w(n){const e={};try{const t=JSON.parse(n);if(t&&typeof t=="object"&&!Array.isArray(t)){for(const[d,r]of Object.entries(t))e[d]=String(r);return e}}catch{}for(const t of n.split(/\r?\n/)){const d=t.trim();if(!d||d.startsWith("#"))continue;const r=d.indexOf("=");if(r===-1)continue;const y=d.slice(0,r).trim(),A=d.slice(r+1).trim();y&&(e[y]=A)}return e}async function _(n){await N(`/mcp/${n.id}`,{enabled:!n.enabled}),n.enabled=!n.enabled}async function T(n){await L(`/mcp/${n}`),u.value=u.value.filter(e=>e.id!==n)}async function V(){const n={name:o.value.name,type:o.value.type,args:k(o.value.argsText),env:w(o.value.envText)};o.value.type==="stdio"?n.command=o.value.command:n.url=o.value.url;const e=await I("/mcp",n);u.value.push(e),v.value=!1,o.value={name:"",type:"stdio",command:"",url:"",argsText:"",envText:""}}return(n,e)=>(l(),a("div",F,[s("div",Y,[e[8]||(e[8]=s("div",null,[s("p",{class:"text-sm font-medium text-primary"},"MCP configuration"),s("h1",{class:"text-2xl font-bold"},"MCP Servers")],-1)),s("button",{onClick:e[0]||(e[0]=t=>v.value=!v.value),class:"btn-gradient inline-flex items-center gap-1"},[c(b(G),{class:"w-4 h-4"}),e[7]||(e[7]=C(" Add Server ",-1))])]),v.value?(l(),a("div",B,[s("div",h,[s("div",null,[e[9]||(e[9]=s("label",{class:"text-sm font-medium"},"Name",-1)),i(s("input",{"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.name=t),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[m,o.value.name]])]),s("div",null,[e[11]||(e[11]=s("label",{class:"text-sm font-medium"},"Type",-1)),i(s("select",{"onUpdate:modelValue":e[2]||(e[2]=t=>o.value.type=t),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[10]||(e[10]=[s("option",{value:"stdio"},"stdio",-1),s("option",{value:"http"},"http",-1)])],512),[[M,o.value.type]])])]),o.value.type==="stdio"?(l(),a("div",D,[e[12]||(e[12]=s("label",{class:"text-sm font-medium"},"Command",-1)),i(s("input",{"onUpdate:modelValue":e[3]||(e[3]=t=>o.value.command=t),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),[[m,o.value.command]])])):(l(),a("div",J,[e[13]||(e[13]=s("label",{class:"text-sm font-medium"},"URL",-1)),i(s("input",{"onUpdate:modelValue":e[4]||(e[4]=t=>o.value.url=t),placeholder:"https://...",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[m,o.value.url]])])),s("div",null,[e[14]||(e[14]=s("label",{class:"text-sm font-medium"},"Command args",-1)),i(s("textarea",{"onUpdate:modelValue":e[5]||(e[5]=t=>o.value.argsText=t),rows:"3",placeholder:"--stdio\n--figma-api-key=${FIGMA_API_KEY}",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[m,o.value.argsText]]),e[15]||(e[15]=s("p",{class:"mt-1 text-xs text-muted-foreground"},"Enter one arg per line or comma-separated.",-1))]),s("div",null,[e[16]||(e[16]=s("label",{class:"text-sm font-medium"},"Environment variables",-1)),i(s("textarea",{"onUpdate:modelValue":e[6]||(e[6]=t=>o.value.envText=t),rows:"4",placeholder:"FIGMA_API_KEY=${FIGMA_API_KEY}\nLOG_LEVEL=debug",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm font-mono"},null,512),[[m,o.value.envText]]),e[17]||(e[17]=s("p",{class:"mt-1 text-xs text-muted-foreground"},"Use KEY=value lines, or paste JSON. Values like ${FIGMA_API_KEY} are preserved.",-1))]),s("div",{class:"flex justify-end"},[s("button",{onClick:V,class:"btn-gradient"},"Save")])])):x("",!0),g.value?(l(),a("div",R,"Loading...")):u.value.length===0?(l(),a("div",q,[c(b(P),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[18]||(e[18]=s("p",null,"No MCP servers configured.",-1))])):(l(),a("div",W,[(l(!0),a($,null,j(u.value,t=>{var d;return l(),a("div",{key:t.id,class:"flex items-center justify-between border border-border rounded-lg px-4 py-3 bg-card"},[s("div",z,[s("div",H,[s("span",Q,p(t.name),1),s("span",X,p(t.type),1)]),t.command||t.url?(l(),a("div",Z,p(t.command||t.url),1)):x("",!0),(d=t.args)!=null&&d.length?(l(),a("div",ee,"Args: "+p(t.args.join(", ")),1)):x("",!0),t.env&&Object.keys(t.env).length>0?(l(),a("div",te,"Env: "+p(Object.keys(t.env).join(", ")),1)):x("",!0)]),s("div",se,[c(O,{"model-value":t.enabled,"aria-label":`Toggle ${t.name}`,"onUpdate:modelValue":r=>_(t)},null,8,["model-value","aria-label","onUpdate:modelValue"]),s("button",{onClick:r=>T(t.id),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive"},[c(b(K),{class:"w-4 h-4"})],8,oe)])])}),128))]))]))}});export{ie as default};
1
+ import{u as E,E as S,J as l,q as a,n as s,t as c,T as b,s as C,a4 as i,a0 as m,$ as M,p as x,i as P,d as $,L as j,K as f,R as p}from"./index-CVHn07Yu.js";import{b as U,c as I,d as N,a as L}from"./api-dXl4z_H9.js";import{_ as O}from"./ToggleSwitch.vue_vue_type_script_setup_true_lang-qVvadgnS.js";import{P as G}from"./plus-CZyw8CN2.js";import{T as K}from"./trash-2-BtBTSEpB.js";const F={class:"p-6"},Y={class:"flex items-center justify-between mb-6"},B={key:0,class:"border border-border rounded-lg p-4 mb-6 space-y-3 bg-card"},h={class:"grid grid-cols-2 gap-3"},D={key:0},J={key:1},R={key:1,class:"text-muted-foreground"},q={key:2,class:"text-center py-12 text-muted-foreground"},W={key:3,class:"space-y-2"},z={class:"space-y-1"},H={class:"flex items-center gap-2"},Q={class:"font-medium text-sm"},X={class:"text-xs text-muted-foreground bg-secondary px-1.5 py-0.5 rounded"},Z={key:0,class:"text-xs text-muted-foreground"},ee={key:1,class:"text-xs text-muted-foreground"},te={key:2,class:"text-xs text-muted-foreground"},se={class:"flex items-center gap-3"},oe=["onClick"],ie=E({__name:"McpView",setup(ne){const u=f([]),g=f(!0),v=f(!1),o=f({name:"",type:"stdio",command:"",url:"",argsText:"",envText:""});S(async()=>{try{u.value=await U("/mcp")}finally{g.value=!1}});function k(n){return n.split(/\r?\n|,/).map(e=>e.trim()).filter(Boolean)}function w(n){const e={};try{const t=JSON.parse(n);if(t&&typeof t=="object"&&!Array.isArray(t)){for(const[d,r]of Object.entries(t))e[d]=String(r);return e}}catch{}for(const t of n.split(/\r?\n/)){const d=t.trim();if(!d||d.startsWith("#"))continue;const r=d.indexOf("=");if(r===-1)continue;const y=d.slice(0,r).trim(),A=d.slice(r+1).trim();y&&(e[y]=A)}return e}async function _(n){await N(`/mcp/${n.id}`,{enabled:!n.enabled}),n.enabled=!n.enabled}async function T(n){await L(`/mcp/${n}`),u.value=u.value.filter(e=>e.id!==n)}async function V(){const n={name:o.value.name,type:o.value.type,args:k(o.value.argsText),env:w(o.value.envText)};o.value.type==="stdio"?n.command=o.value.command:n.url=o.value.url;const e=await I("/mcp",n);u.value.push(e),v.value=!1,o.value={name:"",type:"stdio",command:"",url:"",argsText:"",envText:""}}return(n,e)=>(l(),a("div",F,[s("div",Y,[e[8]||(e[8]=s("div",null,[s("p",{class:"text-sm font-medium text-primary"},"MCP configuration"),s("h1",{class:"text-2xl font-bold"},"MCP Servers")],-1)),s("button",{onClick:e[0]||(e[0]=t=>v.value=!v.value),class:"btn-gradient inline-flex items-center gap-1"},[c(b(G),{class:"w-4 h-4"}),e[7]||(e[7]=C(" Add Server ",-1))])]),v.value?(l(),a("div",B,[s("div",h,[s("div",null,[e[9]||(e[9]=s("label",{class:"text-sm font-medium"},"Name",-1)),i(s("input",{"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.name=t),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[m,o.value.name]])]),s("div",null,[e[11]||(e[11]=s("label",{class:"text-sm font-medium"},"Type",-1)),i(s("select",{"onUpdate:modelValue":e[2]||(e[2]=t=>o.value.type=t),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[10]||(e[10]=[s("option",{value:"stdio"},"stdio",-1),s("option",{value:"http"},"http",-1)])],512),[[M,o.value.type]])])]),o.value.type==="stdio"?(l(),a("div",D,[e[12]||(e[12]=s("label",{class:"text-sm font-medium"},"Command",-1)),i(s("input",{"onUpdate:modelValue":e[3]||(e[3]=t=>o.value.command=t),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),[[m,o.value.command]])])):(l(),a("div",J,[e[13]||(e[13]=s("label",{class:"text-sm font-medium"},"URL",-1)),i(s("input",{"onUpdate:modelValue":e[4]||(e[4]=t=>o.value.url=t),placeholder:"https://...",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[m,o.value.url]])])),s("div",null,[e[14]||(e[14]=s("label",{class:"text-sm font-medium"},"Command args",-1)),i(s("textarea",{"onUpdate:modelValue":e[5]||(e[5]=t=>o.value.argsText=t),rows:"3",placeholder:"--stdio\n--figma-api-key=${FIGMA_API_KEY}",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[m,o.value.argsText]]),e[15]||(e[15]=s("p",{class:"mt-1 text-xs text-muted-foreground"},"Enter one arg per line or comma-separated.",-1))]),s("div",null,[e[16]||(e[16]=s("label",{class:"text-sm font-medium"},"Environment variables",-1)),i(s("textarea",{"onUpdate:modelValue":e[6]||(e[6]=t=>o.value.envText=t),rows:"4",placeholder:"FIGMA_API_KEY=${FIGMA_API_KEY}\nLOG_LEVEL=debug",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm font-mono"},null,512),[[m,o.value.envText]]),e[17]||(e[17]=s("p",{class:"mt-1 text-xs text-muted-foreground"},"Use KEY=value lines, or paste JSON. Values like ${FIGMA_API_KEY} are preserved.",-1))]),s("div",{class:"flex justify-end"},[s("button",{onClick:V,class:"btn-gradient"},"Save")])])):x("",!0),g.value?(l(),a("div",R,"Loading...")):u.value.length===0?(l(),a("div",q,[c(b(P),{class:"w-12 h-12 mx-auto mb-3 opacity-50"}),e[18]||(e[18]=s("p",null,"No MCP servers configured.",-1))])):(l(),a("div",W,[(l(!0),a($,null,j(u.value,t=>{var d;return l(),a("div",{key:t.id,class:"flex items-center justify-between border border-border rounded-lg px-4 py-3 bg-card"},[s("div",z,[s("div",H,[s("span",Q,p(t.name),1),s("span",X,p(t.type),1)]),t.command||t.url?(l(),a("div",Z,p(t.command||t.url),1)):x("",!0),(d=t.args)!=null&&d.length?(l(),a("div",ee,"Args: "+p(t.args.join(", ")),1)):x("",!0),t.env&&Object.keys(t.env).length>0?(l(),a("div",te,"Env: "+p(Object.keys(t.env).join(", ")),1)):x("",!0)]),s("div",se,[c(O,{"model-value":t.enabled,"aria-label":`Toggle ${t.name}`,"onUpdate:modelValue":r=>_(t)},null,8,["model-value","aria-label","onUpdate:modelValue"]),s("button",{onClick:r=>T(t.id),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive"},[c(b(K),{class:"w-4 h-4"})],8,oe)])])}),128))]))]))}});export{ie as default};
@@ -1,4 +1,4 @@
1
- import{r as O,u as A,E as R,J as d,q as r,n as o,t as c,T as v,s as C,d as _,L as k,a4 as b,$,a0 as w,p as S,c as F,R as i,K as n,m as G,z as J,D as K}from"./index-CGiFJDec.js";import{b as P,c as T,d as V,a as H}from"./api-fyXT822e.js";import{g as Q}from"./squad-colors-B8B_Y-lz.js";import{_ as W}from"./ToggleSwitch.vue_vue_type_script_setup_true_lang-BTwxLQKn.js";import{P as X}from"./plus-D-W0AQd6.js";import{P as Y}from"./pencil-DKeaS1-M.js";import{T as Z}from"./trash-2-dJti39sV.js";/**
1
+ import{r as O,u as A,E as R,J as d,q as r,n as o,t as c,T as v,s as C,d as _,L as k,a4 as b,$,a0 as w,p as S,c as F,R as i,K as n,m as G,z as J,D as K}from"./index-CVHn07Yu.js";import{b as P,c as T,d as V,a as H}from"./api-dXl4z_H9.js";import{g as Q}from"./squad-colors-B8B_Y-lz.js";import{_ as W}from"./ToggleSwitch.vue_vue_type_script_setup_true_lang-qVvadgnS.js";import{P as X}from"./plus-CZyw8CN2.js";import{P as Y}from"./pencil-Bfw57NpW.js";import{T as Z}from"./trash-2-BtBTSEpB.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{u as w,E,J as d,q as s,n as t,R as g,d as x,L as U,a4 as o,a0 as n,$ as M,Z as p,p as b,K as r,z as T}from"./index-CGiFJDec.js";import{b as V,d as S}from"./api-fyXT822e.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"],K={key:0,class:"space-y-4 max-w-lg"},D={class:"flex items-center gap-3"},L={key:1,class:"space-y-4 max-w-lg"},R={class:"flex items-center gap-3"},j={key:2,class:"space-y-4 max-w-lg"},q={key:3,class:"space-y-4 max-w-lg"},G={class:"flex items-center gap-3"},O={class:"flex items-center gap-3"},W=w({__name:"SettingsView",setup(P){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"}],a=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");a.value=v}finally{f.value=!1}}async function c(){i.value=!0,m.value=!1;try{await S("/settings",a.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:$=>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",K,[t("div",null,[e[13]||(e[13]=t("label",{class:"text-sm font-medium"},"Default Model",-1)),o(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>a.value.defaultModel=l),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,a.value.defaultModel]])]),t("div",null,[e[14]||(e[14]=t("label",{class:"text-sm font-medium"},"Port",-1)),o(t("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>a.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,a.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)),o(t("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>a.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,a.value.backgroundNotifyMode]])]),t("div",D,[o(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>a.value.backgroundNotifyTelegram=l),type:"checkbox",id:"notifyTelegram",class:"rounded"},null,512),[[p,a.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)),o(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>a.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,a.value.telegramBotToken]])]),t("div",null,[e[20]||(e[20]=t("label",{class:"text-sm font-medium"},"Authorized User ID",-1)),o(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>a.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,a.value.authorizedUserId,void 0,{number:!0}]])]),t("div",R,[o(t("input",{"onUpdate:modelValue":e[6]||(e[6]=l=>a.value.telegramEnabled=l),type:"checkbox",id:"telegramEnabled",class:"rounded"},null,512),[[p,a.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)),o(t("input",{"onUpdate:modelValue":e[7]||(e[7]=l=>a.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,a.value.supabaseUrl]])]),t("div",null,[e[23]||(e[23]=t("label",{class:"text-sm font-medium"},"Supabase Anon Key",-1)),o(t("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>a.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,a.value.supabaseAnonKey]])]),t("div",null,[e[24]||(e[24]=t("label",{class:"text-sm font-medium"},"Authorized Email",-1)),o(t("input",{"onUpdate:modelValue":e[9]||(e[9]=l=>a.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,a.value.authorizedEmail]])])])):b("",!0),u.value==="advanced"?(d(),s("div",q,[t("div",G,[o(t("input",{"onUpdate:modelValue":e[10]||(e[10]=l=>a.value.selfEditEnabled=l),type:"checkbox",id:"selfEdit",class:"rounded"},null,512),[[p,a.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",O,[o(t("input",{"onUpdate:modelValue":e[11]||(e[11]=l=>a.value.watchdogEnabled=l),type:"checkbox",id:"watchdog",class:"rounded"},null,512),[[p,a.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{W as default};
1
+ import{u as w,E,J as d,q as s,n as t,R as g,d as x,L as U,a4 as o,a0 as n,$ as M,Z as p,p as b,K as r,z as T}from"./index-CVHn07Yu.js";import{b as V,d as S}from"./api-dXl4z_H9.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"],K={key:0,class:"space-y-4 max-w-lg"},D={class:"flex items-center gap-3"},L={key:1,class:"space-y-4 max-w-lg"},R={class:"flex items-center gap-3"},j={key:2,class:"space-y-4 max-w-lg"},q={key:3,class:"space-y-4 max-w-lg"},G={class:"flex items-center gap-3"},O={class:"flex items-center gap-3"},W=w({__name:"SettingsView",setup(P){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"}],a=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");a.value=v}finally{f.value=!1}}async function c(){i.value=!0,m.value=!1;try{await S("/settings",a.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:$=>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",K,[t("div",null,[e[13]||(e[13]=t("label",{class:"text-sm font-medium"},"Default Model",-1)),o(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>a.value.defaultModel=l),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,a.value.defaultModel]])]),t("div",null,[e[14]||(e[14]=t("label",{class:"text-sm font-medium"},"Port",-1)),o(t("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>a.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,a.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)),o(t("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>a.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,a.value.backgroundNotifyMode]])]),t("div",D,[o(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>a.value.backgroundNotifyTelegram=l),type:"checkbox",id:"notifyTelegram",class:"rounded"},null,512),[[p,a.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)),o(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>a.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,a.value.telegramBotToken]])]),t("div",null,[e[20]||(e[20]=t("label",{class:"text-sm font-medium"},"Authorized User ID",-1)),o(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>a.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,a.value.authorizedUserId,void 0,{number:!0}]])]),t("div",R,[o(t("input",{"onUpdate:modelValue":e[6]||(e[6]=l=>a.value.telegramEnabled=l),type:"checkbox",id:"telegramEnabled",class:"rounded"},null,512),[[p,a.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)),o(t("input",{"onUpdate:modelValue":e[7]||(e[7]=l=>a.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,a.value.supabaseUrl]])]),t("div",null,[e[23]||(e[23]=t("label",{class:"text-sm font-medium"},"Supabase Anon Key",-1)),o(t("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>a.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,a.value.supabaseAnonKey]])]),t("div",null,[e[24]||(e[24]=t("label",{class:"text-sm font-medium"},"Authorized Email",-1)),o(t("input",{"onUpdate:modelValue":e[9]||(e[9]=l=>a.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,a.value.authorizedEmail]])])])):b("",!0),u.value==="advanced"?(d(),s("div",q,[t("div",G,[o(t("input",{"onUpdate:modelValue":e[10]||(e[10]=l=>a.value.selfEditEnabled=l),type:"checkbox",id:"selfEdit",class:"rounded"},null,512),[[p,a.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",O,[o(t("input",{"onUpdate:modelValue":e[11]||(e[11]=l=>a.value.watchdogEnabled=l),type:"checkbox",id:"watchdog",class:"rounded"},null,512),[[p,a.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{W as default};
@@ -1,4 +1,4 @@
1
- import{r as me,u as fe,E as xe,J as o,q as a,n as t,z as j,t as u,T as d,s as q,d as p,a4 as C,a0 as M,a5 as ee,R as r,p as S,h as te,L as se,$ as ge,o as oe,l as le,K as n,m as ye,a6 as ae}from"./index-CGiFJDec.js";import{b as z,c as J,d as be,a as ke}from"./api-fyXT822e.js";import{P as ne}from"./plus-D-W0AQd6.js";import{S as he}from"./search-C7hAGhZ-.js";import{P as _e}from"./pencil-DKeaS1-M.js";import{S as we}from"./save-Do-iKszd.js";import{X as Ce}from"./x-CH8ln3pi.js";import{T as Se}from"./trash-2-dJti39sV.js";/**
1
+ import{r as me,u as fe,E as xe,J as o,q as a,n as t,z as j,t as u,T as d,s as q,d as p,a4 as C,a0 as M,a5 as ee,R as r,p as S,h as te,L as se,$ as ge,o as oe,l as le,K as n,m as ye,a6 as ae}from"./index-CVHn07Yu.js";import{b as z,c as J,d as be,a as ke}from"./api-dXl4z_H9.js";import{P as ne}from"./plus-CZyw8CN2.js";import{S as he}from"./search-DOBptCtE.js";import{P as _e}from"./pencil-Bfw57NpW.js";import{S as we}from"./save-CQd10OTY.js";import{X as Ce}from"./x-nFOviyPn.js";import{T as Se}from"./trash-2-BtBTSEpB.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{r as A,u as J,a2 as F,E as z,y as E,G,J as s,q as o,n as t,t as p,T as c,A as B,z as _,R as i,j as O,s as h,p as v,o as I,d as C,L as D,l as R,K as m,m as H,a3 as U,D as X,X as Z,N as K,U as Q}from"./index-CGiFJDec.js";import{b as P,e as W,c as V,a as Y}from"./api-fyXT822e.js";import{g as ee}from"./squad-colors-B8B_Y-lz.js";import{X as te}from"./x-CH8ln3pi.js";import{G as se}from"./git-branch-oAydmFRE.js";import{T as oe}from"./trash-2-dJti39sV.js";import{A as re}from"./arrow-left-BXi9pnzg.js";/**
1
+ import{r as A,u as J,a2 as F,E as z,y as E,G,J as s,q as o,n as t,t as p,T as c,A as B,z as _,R as i,j as O,s as h,p as v,o as I,d as C,L as D,l as R,K as m,m as H,a3 as U,D as X,X as Z,N as K,U as Q}from"./index-CVHn07Yu.js";import{b as P,e as W,c as V,a as Y}from"./api-dXl4z_H9.js";import{g as ee}from"./squad-colors-B8B_Y-lz.js";import{X as te}from"./x-nFOviyPn.js";import{G as se}from"./git-branch-CJwD1kDF.js";import{T as oe}from"./trash-2-BtBTSEpB.js";import{A as re}from"./arrow-left-CiMmp6_a.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 L}from"./api-fyXT822e.js";import{r as I,u as T,E as B,J as o,q as n,n as t,t as u,T as l,A as M,s as g,k as _,d as f,L as y,K as v,m as N,z as k,a3 as P,R as a,o as x,p,c as b,N as V}from"./index-CGiFJDec.js";import{T as w}from"./triangle-alert-C_bHcseh.js";import{G as $}from"./git-branch-oAydmFRE.js";/**
1
+ import{b as L}from"./api-dXl4z_H9.js";import{r as I,u as T,E as B,J as o,q as n,n as t,t as u,T as l,A as M,s as g,k as _,d as f,L as y,K as v,m as N,z as k,a3 as P,R as a,o as x,p,c as b,N as V}from"./index-CVHn07Yu.js";import{T as w}from"./triangle-alert-CaKwD4uJ.js";import{G as $}from"./git-branch-CJwD1kDF.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 y}from"./api-fyXT822e.js";import{g as v}from"./squad-colors-B8B_Y-lz.js";import{r as h,u as k,E as b,J as o,q as r,n as t,t as i,T as l,k as w,d as L,L as C,K as d,o as S,a3 as N,D as f,N as q,R as n,s as _,p as B}from"./index-CGiFJDec.js";import{G as V}from"./git-branch-oAydmFRE.js";/**
1
+ import{b as y}from"./api-dXl4z_H9.js";import{g as v}from"./squad-colors-B8B_Y-lz.js";import{r as h,u as k,E as b,J as o,q as r,n as t,t as i,T as l,k as w,d as L,L as C,K as d,o as S,a3 as N,D as f,N as q,R as n,s as _,p as B}from"./index-CVHn07Yu.js";import{G as V}from"./git-branch-CJwD1kDF.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{u as t,J as s,q as r,z as l,n as d}from"./index-CGiFJDec.js";const u=["aria-label","aria-checked","disabled"],m=t({__name:"ToggleSwitch",props:{modelValue:{type:Boolean},ariaLabel:{default:"Toggle"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){const a=e,i=o;function n(){a.disabled||i("update:modelValue",!a.modelValue)}return(c,b)=>(s(),r("button",{type:"button",role:"switch","aria-label":e.ariaLabel,"aria-checked":e.modelValue,disabled:e.disabled,class:l(["inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border p-0.5 transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e.modelValue?"bg-gradient-brand shadow-[0_0_0_1px_rgba(228,58,156,0.35)]":"bg-muted"]),onClick:n},[d("span",{class:l(["pointer-events-none h-4 w-4 rounded-full bg-white shadow-sm ring-1 ring-black/10 transition-transform duration-200",e.modelValue?"translate-x-5":"translate-x-0"])},null,2)],10,u))}});export{m as _};
1
+ import{u as t,J as s,q as r,z as l,n as d}from"./index-CVHn07Yu.js";const u=["aria-label","aria-checked","disabled"],m=t({__name:"ToggleSwitch",props:{modelValue:{type:Boolean},ariaLabel:{default:"Toggle"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){const a=e,i=o;function n(){a.disabled||i("update:modelValue",!a.modelValue)}return(c,b)=>(s(),r("button",{type:"button",role:"switch","aria-label":e.ariaLabel,"aria-checked":e.modelValue,disabled:e.disabled,class:l(["inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border p-0.5 transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e.modelValue?"bg-gradient-brand shadow-[0_0_0_1px_rgba(228,58,156,0.35)]":"bg-muted"]),onClick:n},[d("span",{class:l(["pointer-events-none h-4 w-4 rounded-full bg-white shadow-sm ring-1 ring-black/10 transition-transform duration-200",e.modelValue?"translate-x-5":"translate-x-0"])},null,2)],10,u))}});export{m as _};
@@ -1,4 +1,4 @@
1
- import{r as L,u as j,E as Q,J as d,q as r,n as t,t as _,T as k,C as W,d as i,L as m,s as w,R as o,k as X,p as u,a4 as F,a0 as O,K as a,z as Y,D as Z,m as tt}from"./index-CGiFJDec.js";import{b as T,d as q}from"./api-fyXT822e.js";import{T as et}from"./triangle-alert-C_bHcseh.js";/**
1
+ import{r as L,u as j,E as Q,J as d,q as r,n as t,t as _,T as k,C as W,d as i,L as m,s as w,R as o,k as X,p as u,a4 as F,a0 as O,K as a,z as Y,D as Z,m as tt}from"./index-CVHn07Yu.js";import{b as T,d as q}from"./api-dXl4z_H9.js";import{T as et}from"./triangle-alert-CaKwD4uJ.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{r as j,u as se,a2 as oe,J as o,q as a,d as b,L as K,m as A,n as t,o as I,T as d,a as ce,t as v,F as ve,R as N,D as pe,z,a6 as fe,p as B,K as c,E as me,B as H,s as S,a4 as V,a0 as L,a5 as R,l as Z}from"./index-CGiFJDec.js";import{b as T,d as E,a as G}from"./api-fyXT822e.js";import{S as xe}from"./search-C7hAGhZ-.js";import{P as J}from"./plus-D-W0AQd6.js";import{P as O}from"./pencil-DKeaS1-M.js";import{T as X}from"./trash-2-dJti39sV.js";import{S as Y}from"./save-Do-iKszd.js";import{X as ee}from"./x-CH8ln3pi.js";/**
1
+ import{r as j,u as se,a2 as oe,J as o,q as a,d as b,L as K,m as A,n as t,o as I,T as d,a as ce,t as v,F as ve,R as N,D as pe,z,a6 as fe,p as B,K as c,E as me,B as H,s as S,a4 as V,a0 as L,a5 as R,l as Z}from"./index-CVHn07Yu.js";import{b as T,d as E,a as G}from"./api-dXl4z_H9.js";import{S as xe}from"./search-DOBptCtE.js";import{P as J}from"./plus-CZyw8CN2.js";import{P as O}from"./pencil-Bfw57NpW.js";import{T as X}from"./trash-2-BtBTSEpB.js";import{S as Y}from"./save-CQd10OTY.js";import{X as ee}from"./x-nFOviyPn.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 i,O as c}from"./index-CGiFJDec.js";const o="/api";function u(t){try{return JSON.parse(atob(t.split(".")[1])).exp*1e3<=Date.now()+6e4}catch{return!0}}async function n(){const t=i(),e={"Content-Type":"application/json"};return t.token&&u(t.token)&&await t.refreshToken(),t.token&&(e.Authorization=`Bearer ${t.token}`),e}async function s(t,e){if(t.status===401){const r=i();try{if(await r.refreshToken(),r.token){const a=await e();if(a.status===401)throw r.logout(),c.push("/login"),new Error("Session expired");return a}}catch{}throw r.logout(),c.push("/login"),new Error("Session expired")}return t}async function w(t){const e=await s(await fetch(`${o}${t}`,{headers:await n()}),async()=>fetch(`${o}${t}`,{headers:await n()}));if(!e.ok)throw new Error(`API error: ${e.status}`);return e.json()}async function f(t,e){const r={method:"POST",headers:await n(),body:e?JSON.stringify(e):void 0},a=await s(await fetch(`${o}${t}`,r),async()=>fetch(`${o}${t}`,{...r,headers:await n()}));if(!a.ok)throw new Error(`API error: ${a.status}`);return a.json()}async function $(t,e){const r={method:"PUT",headers:await n(),body:e?JSON.stringify(e):void 0},a=await s(await fetch(`${o}${t}`,r),async()=>fetch(`${o}${t}`,{...r,headers:await n()}));if(!a.ok)throw new Error(`API error: ${a.status}`);return a.json()}async function d(t){const e={method:"DELETE",headers:await n()},r=await s(await fetch(`${o}${t}`,e),async()=>fetch(`${o}${t}`,{...e,headers:await n()}));if(!r.ok)throw new Error(`API error: ${r.status}`);return r.json()}function p(){const t=i(),e=`${o}/stream?token=${t.token??""}`;return new EventSource(e)}export{d as a,w as b,f as c,$ as d,p as e};
1
+ import{V as i,O as c}from"./index-CVHn07Yu.js";const o="/api";function u(t){try{return JSON.parse(atob(t.split(".")[1])).exp*1e3<=Date.now()+6e4}catch{return!0}}async function n(){const t=i(),e={"Content-Type":"application/json"};return t.token&&u(t.token)&&await t.refreshToken(),t.token&&(e.Authorization=`Bearer ${t.token}`),e}async function s(t,e){if(t.status===401){const r=i();try{if(await r.refreshToken(),r.token){const a=await e();if(a.status===401)throw r.logout(),c.push("/login"),new Error("Session expired");return a}}catch{}throw r.logout(),c.push("/login"),new Error("Session expired")}return t}async function w(t){const e=await s(await fetch(`${o}${t}`,{headers:await n()}),async()=>fetch(`${o}${t}`,{headers:await n()}));if(!e.ok)throw new Error(`API error: ${e.status}`);return e.json()}async function f(t,e){const r={method:"POST",headers:await n(),body:e?JSON.stringify(e):void 0},a=await s(await fetch(`${o}${t}`,r),async()=>fetch(`${o}${t}`,{...r,headers:await n()}));if(!a.ok)throw new Error(`API error: ${a.status}`);return a.json()}async function $(t,e){const r={method:"PUT",headers:await n(),body:e?JSON.stringify(e):void 0},a=await s(await fetch(`${o}${t}`,r),async()=>fetch(`${o}${t}`,{...r,headers:await n()}));if(!a.ok)throw new Error(`API error: ${a.status}`);return a.json()}async function d(t){const e={method:"DELETE",headers:await n()},r=await s(await fetch(`${o}${t}`,e),async()=>fetch(`${o}${t}`,{...e,headers:await n()}));if(!r.ok)throw new Error(`API error: ${r.status}`);return r.json()}function p(){const t=i(),e=`${o}/stream?token=${t.token??""}`;return new EventSource(e)}export{d as a,w as b,f as c,$ as d,p as e};
@@ -1,4 +1,4 @@
1
- import{r}from"./index-CGiFJDec.js";/**
1
+ import{r}from"./index-CVHn07Yu.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{r as c}from"./index-CGiFJDec.js";/**
1
+ import{r as c}from"./index-CVHn07Yu.js";/**
2
2
  * @license lucide-vue-next v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.