heyio 1.5.0 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/attachments.js +36 -0
- package/dist/copilot/agents.js +5 -2
- package/dist/copilot/orchestrator.js +5 -2
- package/dist/copilot/squad-tools.js +14 -8
- package/dist/copilot/tools.js +12 -3
- package/dist/paths.js +1 -0
- package/package.json +1 -1
- package/web-dist/assets/{AuditLogView-Ds7LwE01.js → AuditLogView-C6FNd8dq.js} +1 -1
- package/web-dist/assets/{ChatView-90GHN5-3.js → ChatView-BZ4Le-WE.js} +1 -1
- package/web-dist/assets/{FeedView-RlM4m0Dp.js → FeedView-BdRlXQvc.js} +1 -1
- package/web-dist/assets/{HistoryView-Vrb5nk4l.js → HistoryView-CmvnaBkj.js} +1 -1
- package/web-dist/assets/{LoginView-BVt0eVoK.js → LoginView-Rf99Bykf.js} +1 -1
- package/web-dist/assets/{McpView-DMg1Ieji.js → McpView-B16zbxmQ.js} +1 -1
- package/web-dist/assets/{SchedulesView-CvasMUhn.js → SchedulesView-DrzbMX0s.js} +1 -1
- package/web-dist/assets/{SettingsView-DqNi_5IM.js → SettingsView-WMeQYIds.js} +1 -1
- package/web-dist/assets/{SkillsView-CufZGrhf.js → SkillsView-Dn5gk4nb.js} +1 -1
- package/web-dist/assets/{SquadDetailView-DmseEdEl.js → SquadDetailView-YZSMZhMl.js} +1 -1
- package/web-dist/assets/{SquadHealthView-D4kmk8OD.js → SquadHealthView-CYhxwPFD.js} +1 -1
- package/web-dist/assets/{SquadsView-CVB2pCwd.js → SquadsView-wke_WrBH.js} +1 -1
- package/web-dist/assets/{UsageView-xEe1ZUp4.js → UsageView-B4PPFtZE.js} +1 -1
- package/web-dist/assets/{WikiView-ADnv-80y.js → WikiView-B5QKxKWR.js} +1 -1
- package/web-dist/assets/{api-2XP2yG1A.js → api-C26hZoW-.js} +1 -1
- package/web-dist/assets/{arrow-left-BsbWSKAE.js → arrow-left-C9JLmvAS.js} +1 -1
- package/web-dist/assets/{file-text-Dn2yDZCL.js → file-text-Okjs6RpT.js} +1 -1
- package/web-dist/assets/{git-branch-wkQUgAGS.js → git-branch-D6UaMAIC.js} +1 -1
- package/web-dist/assets/{index-DI8QgDXv.js → index-DXDatko_.js} +3 -3
- package/web-dist/assets/{plus-BOXwfDpA.js → plus-Cf35gEaB.js} +1 -1
- package/web-dist/assets/{save-CTfFmP-U.js → save-DazCQL04.js} +1 -1
- package/web-dist/assets/{search-BnsxENnH.js → search-HfqKWu4x.js} +1 -1
- package/web-dist/assets/{trash-2-C86P23n5.js → trash-2-BZNhYu4s.js} +1 -1
- package/web-dist/assets/{triangle-alert-MLnkHsRL.js → triangle-alert-CbAKPBKT.js} +1 -1
- package/web-dist/assets/{x-Cw7ZjfeL.js → x-2aE_QDyH.js} +1 -1
- package/web-dist/index.html +1 -1
package/dist/chat/attachments.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { PATHS } from "../paths.js";
|
|
1
5
|
export const MAX_ATTACHMENT_BYTES = 10 * 1024 * 1024;
|
|
2
6
|
export const MAX_TOTAL_ATTACHMENT_BYTES = 25 * 1024 * 1024;
|
|
3
7
|
const BASE64_RE = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
@@ -73,4 +77,36 @@ export function buildAttachmentSummary(attachments) {
|
|
|
73
77
|
const lines = attachments.map((attachment) => `- ${attachment.name} (${attachment.mimeType}, ${Math.round(attachment.size / 1024)}KB)`);
|
|
74
78
|
return `\n\n[Attachments]\n${lines.join("\n")}`;
|
|
75
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Save attachments to disk at ~/.io/attachments/{batchId}/{filename}
|
|
82
|
+
* Returns the saved paths so they can be referenced by the orchestrator and squads.
|
|
83
|
+
*/
|
|
84
|
+
export function saveAttachmentsToDisk(attachments) {
|
|
85
|
+
if (attachments.length === 0)
|
|
86
|
+
return [];
|
|
87
|
+
const batchId = randomUUID();
|
|
88
|
+
const batchDir = join(PATHS.attachments, batchId);
|
|
89
|
+
if (!existsSync(PATHS.attachments))
|
|
90
|
+
mkdirSync(PATHS.attachments, { recursive: true });
|
|
91
|
+
mkdirSync(batchDir, { recursive: true });
|
|
92
|
+
return attachments.map((attachment) => {
|
|
93
|
+
const filePath = join(batchDir, attachment.name);
|
|
94
|
+
writeFileSync(filePath, Buffer.from(attachment.content, "base64"));
|
|
95
|
+
return {
|
|
96
|
+
name: attachment.name,
|
|
97
|
+
mimeType: attachment.mimeType,
|
|
98
|
+
size: attachment.size,
|
|
99
|
+
path: filePath,
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Build a summary that includes file paths on disk for tool access.
|
|
105
|
+
*/
|
|
106
|
+
export function buildAttachmentPathSummary(saved) {
|
|
107
|
+
if (saved.length === 0)
|
|
108
|
+
return "";
|
|
109
|
+
const lines = saved.map((s) => `- ${s.name} (${s.mimeType}, ${Math.round(s.size / 1024)}KB) → ${s.path}`);
|
|
110
|
+
return `\n\n[Attached files saved to disk]\n${lines.join("\n")}`;
|
|
111
|
+
}
|
|
76
112
|
//# sourceMappingURL=attachments.js.map
|
package/dist/copilot/agents.js
CHANGED
|
@@ -12,7 +12,7 @@ import { PATHS } from "../paths.js";
|
|
|
12
12
|
import { createSquadTools } from "./squad-tools.js";
|
|
13
13
|
import { loadSkillDirectories } from "./skills.js";
|
|
14
14
|
import { getMcpServersForSession } from "../mcp/registry.js";
|
|
15
|
-
import {
|
|
15
|
+
import { buildAttachmentPathSummary, saveAttachmentsToDisk, toCopilotBlobAttachments } from "../chat/attachments.js";
|
|
16
16
|
import { existsSync, mkdirSync } from "node:fs";
|
|
17
17
|
import { join } from "node:path";
|
|
18
18
|
import { exec } from "node:child_process";
|
|
@@ -217,8 +217,11 @@ ${lead.persona ? `## Personality:\n${lead.persona}` : ""}
|
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
try {
|
|
220
|
+
// Save attachments to disk so squad agents can access them via shell_exec
|
|
221
|
+
const savedAttachments = saveAttachmentsToDisk(attachments);
|
|
222
|
+
const attachmentPathInfo = buildAttachmentPathSummary(savedAttachments);
|
|
220
223
|
const response = await session.sendAndWait({
|
|
221
|
-
prompt: `Task delegated to you:\n\n${task}${
|
|
224
|
+
prompt: `Task delegated to you:\n\n${task}${attachmentPathInfo}`,
|
|
222
225
|
attachments: toCopilotBlobAttachments(attachments),
|
|
223
226
|
}, 600_000);
|
|
224
227
|
result = response?.data?.content ?? "Task completed (no response content).";
|
|
@@ -7,7 +7,7 @@ import { loadSkillDirectories } from "./skills.js";
|
|
|
7
7
|
import { getMcpServersForSession } from "../mcp/registry.js";
|
|
8
8
|
import { resetClient } from "./client.js";
|
|
9
9
|
import { addAuditEntry } from "../store/audit-log.js";
|
|
10
|
-
import { buildAttachmentSummary, toCopilotBlobAttachments, } from "../chat/attachments.js";
|
|
10
|
+
import { buildAttachmentSummary, buildAttachmentPathSummary, saveAttachmentsToDisk, toCopilotBlobAttachments, } from "../chat/attachments.js";
|
|
11
11
|
let orchestratorSession;
|
|
12
12
|
let sessionCreatePromise;
|
|
13
13
|
let healthCheckInterval;
|
|
@@ -120,7 +120,10 @@ async function executeOnSession(msg) {
|
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
activeMessageAttachments = msg.attachments;
|
|
123
|
-
|
|
123
|
+
// Save attachments to disk so orchestrator/squads can access them via filesystem tools
|
|
124
|
+
const savedAttachments = saveAttachmentsToDisk(msg.attachments);
|
|
125
|
+
const pathSummary = buildAttachmentPathSummary(savedAttachments);
|
|
126
|
+
const taggedPrompt = `[via ${msg.source}] ${msg.prompt}${pathSummary || buildAttachmentSummary(msg.attachments)}`;
|
|
124
127
|
let accumulated = "";
|
|
125
128
|
const unsubscribe = orchestratorSession.on("assistant.message_delta", (event) => {
|
|
126
129
|
const delta = event.data?.deltaContent ?? "";
|
|
@@ -29,25 +29,29 @@ export function createSquadTools(squadSlug, squadId, repoUrl) {
|
|
|
29
29
|
return [
|
|
30
30
|
// --- Wiki Tools (scoped to squads/{slug}/) ---
|
|
31
31
|
defineTool("wiki_read", {
|
|
32
|
-
description: `Read a wiki page from the squad wiki (paths are relative to your squad's wiki folder)`,
|
|
32
|
+
description: `Read a wiki page from the squad wiki (paths are relative to your squad's wiki folder — do NOT include 'squads/${squadSlug}/' prefix)`,
|
|
33
33
|
parameters: z.object({
|
|
34
34
|
path: z.string().describe("Page path (e.g., 'decisions.md', 'notes/architecture.md')"),
|
|
35
35
|
}),
|
|
36
36
|
handler: async ({ path }) => {
|
|
37
37
|
const { readPage } = await import("../wiki/fs.js");
|
|
38
|
-
|
|
38
|
+
// Strip redundant prefix if agent accidentally includes it
|
|
39
|
+
const cleanPath = path.replace(new RegExp(`^(?:squads/${squadSlug}/)+`), "");
|
|
40
|
+
return await readPage(`${wikiPrefix}/${cleanPath}`);
|
|
39
41
|
},
|
|
40
42
|
}),
|
|
41
43
|
defineTool("wiki_write", {
|
|
42
|
-
description: "Write or update a wiki page in the squad wiki",
|
|
44
|
+
description: "Write or update a wiki page in the squad wiki (paths are relative — do NOT include the squad prefix)",
|
|
43
45
|
parameters: z.object({
|
|
44
46
|
path: z.string().describe("Page path (e.g., 'decisions.md')"),
|
|
45
47
|
content: z.string().describe("Markdown content to write"),
|
|
46
48
|
}),
|
|
47
49
|
handler: async ({ path, content }) => {
|
|
48
50
|
const { writePage } = await import("../wiki/fs.js");
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
// Strip redundant prefix if agent accidentally includes it
|
|
52
|
+
const cleanPath = path.replace(new RegExp(`^(?:squads/${squadSlug}/)+`), "");
|
|
53
|
+
await writePage(`${wikiPrefix}/${cleanPath}`, content);
|
|
54
|
+
return `Page saved: ${cleanPath}`;
|
|
51
55
|
},
|
|
52
56
|
}),
|
|
53
57
|
defineTool("wiki_list", {
|
|
@@ -75,8 +79,9 @@ export function createSquadTools(squadSlug, squadId, repoUrl) {
|
|
|
75
79
|
}),
|
|
76
80
|
handler: async ({ path }) => {
|
|
77
81
|
const { deletePage } = await import("../wiki/fs.js");
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
const cleanPath = path.replace(new RegExp(`^(?:squads/${squadSlug}/)+`), "");
|
|
83
|
+
await deletePage(`${wikiPrefix}/${cleanPath}`);
|
|
84
|
+
return `Page deleted: ${cleanPath}`;
|
|
80
85
|
},
|
|
81
86
|
}),
|
|
82
87
|
defineTool("wiki_backlinks", {
|
|
@@ -86,7 +91,8 @@ export function createSquadTools(squadSlug, squadId, repoUrl) {
|
|
|
86
91
|
}),
|
|
87
92
|
handler: async ({ path }) => {
|
|
88
93
|
const { getBacklinks } = await import("../wiki/backlinks.js");
|
|
89
|
-
const
|
|
94
|
+
const cleanPath = path.replace(new RegExp(`^(?:squads/${squadSlug}/)+`), "");
|
|
95
|
+
const allBacklinks = await getBacklinks(`${wikiPrefix}/${cleanPath}`);
|
|
90
96
|
// Filter to only show backlinks within squad wiki, strip prefix for display
|
|
91
97
|
return allBacklinks
|
|
92
98
|
.filter((bl) => bl.startsWith(`${wikiPrefix}/`))
|
package/dist/copilot/tools.js
CHANGED
|
@@ -171,8 +171,12 @@ export function createTools() {
|
|
|
171
171
|
size: attachment.size,
|
|
172
172
|
})),
|
|
173
173
|
}, { squad_id });
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
// Fire-and-forget: start delegation in background so the orchestrator can respond immediately
|
|
175
|
+
delegateTask(squad_id, task, instance_id, attachments).catch((err) => {
|
|
176
|
+
const errMsg = err instanceof Error ? err.message : "Unknown error";
|
|
177
|
+
addAuditEntry("task_delegation_error", `Background delegation failed: ${errMsg}`, { squad_id, error: errMsg }, { squad_id });
|
|
178
|
+
});
|
|
179
|
+
return `Task delegated to squad ${squad_id}. The squad is now working on it in the background. You will be notified via the inbox when work is complete.`;
|
|
176
180
|
},
|
|
177
181
|
}),
|
|
178
182
|
defineTool("squad_meeting", {
|
|
@@ -198,7 +202,12 @@ export function createTools() {
|
|
|
198
202
|
size: attachment.size,
|
|
199
203
|
})),
|
|
200
204
|
}, { squad_id });
|
|
201
|
-
|
|
205
|
+
// Fire-and-forget: start meeting in background so the orchestrator can respond immediately
|
|
206
|
+
squadMeeting(squad_id, task, execute_after, attachments).catch((err) => {
|
|
207
|
+
const errMsg = err instanceof Error ? err.message : "Unknown error";
|
|
208
|
+
addAuditEntry("squad_meeting_error", `Background meeting failed: ${errMsg}`, { squad_id, error: errMsg }, { squad_id });
|
|
209
|
+
});
|
|
210
|
+
return `Planning meeting started for squad ${squad_id}. The squad is discussing the task in the background.${execute_after ? " Work will begin automatically after planning." : " The plan will be posted to the feed for your review."}`;
|
|
202
211
|
},
|
|
203
212
|
}),
|
|
204
213
|
defineTool("squad_task_status", {
|
package/dist/paths.js
CHANGED
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as W,o as X,s as Z,u as a,k as d,h as o,n as P,D as A,a as V,m as S,z as l,T as f,N as T,F as h,w,O as F,j as b,v as n,g as _,q as ee}from"./index-
|
|
1
|
+
import{l as W,o as X,s as Z,u as a,k as d,h as o,n as P,D as A,a as V,m as S,z as l,T as f,N as T,F as h,w,O as F,j as b,v as n,g as _,q as ee}from"./index-DXDatko_.js";import{b as L}from"./api-C26hZoW-.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{l as U,o as R,G as W,Q as B,s as Y,u as a,k as l,h as o,D as t,j as y,F as T,w as A,z as v,n as $,T as G,O as Q,i as h,S as J,d as Z,q as k,v as x,g as I,f as ee,p as E}from"./index-
|
|
1
|
+
import{l as U,o as R,G as W,Q as B,s as Y,u as a,k as l,h as o,D as t,j as y,F as T,w as A,z as v,n as $,T as G,O as Q,i as h,S as J,d as Z,q as k,v as x,g as I,f as ee,p as E}from"./index-DXDatko_.js";import{F as z}from"./file-text-Okjs6RpT.js";import{X as te}from"./x-2aE_QDyH.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{l as M,o as D,s as N,u as o,k as n,h as a,F as y,w as b,n as c,D as i,I as V,v as d,g as z,q as f,z as v,r as B,W as k,j as q,f as j}from"./index-
|
|
1
|
+
import{l as M,o as D,s as N,u as o,k as n,h as a,F as y,w as b,n as c,D as i,I as V,v as d,g as z,q as f,z as v,r as B,W as k,j as q,f as j}from"./index-DXDatko_.js";import{b as C,c as P,a as T}from"./api-C26hZoW-.js";import{g as W}from"./squad-colors-B8B_Y-lz.js";import{T as A}from"./trash-2-BZNhYu4s.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{o as U,Q as q,s as z,u as r,k as n,h as t,n as d,D as c,H as V,T,O as D,M as P,j as x,F as $,w as j,q as p,z as g,v as l,g as Q,i as E,f as G}from"./index-
|
|
1
|
+
import{o as U,Q as q,s as z,u as r,k as n,h as t,n as d,D as c,H as V,T,O as D,M as P,j as x,F as $,w as j,q as p,z as g,v as l,g as Q,i as E,f as G}from"./index-DXDatko_.js";import{b as A,a as O}from"./api-C26hZoW-.js";import{S as R}from"./search-HfqKWu4x.js";import{A as I}from"./arrow-left-C9JLmvAS.js";import{T as J}from"./trash-2-BZNhYu4s.js";const K={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,Le=U({__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 A(`/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 B(o){u.value=o,_.value=!0;try{b.value=await A(`/history/${o}`)}finally{_.value=!1}}function L(){u.value=null,b.value=[]}async function F(o,e){e.stopPropagation(),confirm("Delete this conversation?")&&(await O(`/history/${o}`),a.value=a.value.filter(i=>i.id!==o),h.value=Math.max(0,h.value-1),u.value===o&&L())}function C(o){return new Date(o).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function H(o,e=100){return o.length>e?o.slice(0,e)+"…":o}const N=Q(()=>a.value.length<h.value);let S=null;return q([f,v,m],()=>{S&&clearTimeout(S),S=setTimeout(()=>k(!0),300)}),z(()=>k(!0)),(o,e)=>{var i;return r(),n("div",K,[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(V),{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(R),{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),[[D,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),[[D,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),[[D,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(P),{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,j(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:M=>B(s.id)},[t("div",ae,[t("p",le,g(H(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:M=>F(s.id,M)},[d(c(J),{class:"w-3.5 h-3.5"})],8,ce)],10,ne))),128)),N.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:L},[d(c(I),{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,j(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(),E(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(V),{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{Le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as b,E as v,u,k as i,h as t,n as y,W as w,T as m,O as p,z as f,j as h,D as g,v as d,_,K as S}from"./index-
|
|
1
|
+
import{o as b,E as v,u,k as i,h as t,n as y,W as w,T as m,O as p,z as f,j as h,D as g,v as d,_,K as S}from"./index-DXDatko_.js";const V={class:"min-h-screen flex items-center justify-center bg-background p-4"},k={class:"w-full max-w-sm space-y-8"},D={class:"text-center"},A={key:0,class:"text-sm text-destructive"},B=["disabled"],L=b({__name:"LoginView",setup(E){const o=v(),c=S(),r=d(""),n=d(""),s=d("");async function x(){s.value="";try{await o.login(r.value,n.value),c.push("/")}catch(l){s.value=l.message??"Login failed"}}return(l,e)=>(u(),i("div",V,[t("div",k,[t("div",D,[y(_,{size:56,class:"mx-auto mb-4"}),e[2]||(e[2]=t("h1",{class:"text-2xl font-bold 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,f(s.value),1)):h("",!0),t("button",{type:"submit",disabled:g(o).loading,class:"btn-gradient w-full py-2.5"},f(g(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{o as k,s as C,u as a,k as n,h as t,n as m,D as p,m as h,T as u,O as v,N as S,j as _,c as V,F as N,w as M,v as i,z as b,q as y}from"./index-
|
|
1
|
+
import{o as k,s as C,u as a,k as n,h as t,n as m,D as p,m as h,T as u,O as v,N as S,j as _,c as V,F as N,w as M,v as i,z as b,q as y}from"./index-DXDatko_.js";import{b as P,c as T,d as U,a as $}from"./api-C26hZoW-.js";import{P as D}from"./plus-Cf35gEaB.js";import{T as j}from"./trash-2-BZNhYu4s.js";const B={class:"p-6"},L={class:"flex items-center justify-between mb-6"},z={key:0,class:"border border-border rounded-lg p-4 mb-6 space-y-3"},A={class:"grid grid-cols-2 gap-3"},F={key:0},q={key:1},E={key:1,class:"text-muted-foreground"},G={key:2,class:"text-center py-12 text-muted-foreground"},O={key:3,class:"space-y-2"},R={class:"font-medium text-sm"},H={class:"ml-2 text-xs text-muted-foreground bg-secondary px-1.5 py-0.5 rounded"},I={class:"flex items-center gap-3"},J=["onClick"],K=["onClick"],ee=k({__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",B,[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(D),{class:"w-4 h-4"}),e[5]||(e[5]=h(" Add Server ",-1))])]),r.value?(a(),n("div",z,[t("div",A,[t("div",null,[e[7]||(e[7]=t("label",{class:"text-sm font-medium"},"Name",-1)),u(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>o.value.name=s),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[v,o.value.name]])]),t("div",null,[e[9]||(e[9]=t("label",{class:"text-sm font-medium"},"Type",-1)),u(t("select",{"onUpdate:modelValue":e[2]||(e[2]=s=>o.value.type=s),class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},[...e[8]||(e[8]=[t("option",{value:"stdio"},"stdio",-1),t("option",{value:"http"},"http",-1)])],512),[[S,o.value.type]])])]),o.value.type==="stdio"?(a(),n("div",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",q,[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",G,[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",O,[(a(!0),n(N,null,M(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",R,b(s.name),1),t("span",H,b(s.type),1)]),t("div",I,[t("button",{onClick:w=>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,J),t("button",{onClick:w=>x(s.id),class:"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive"},[m(p(j),{class:"w-4 h-4"})],8,K)])]))),128))]))]))}});export{ee as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as B,o as L,s as O,u as r,k as d,h as o,n as v,D as m,m as j,F as x,w as y,T as b,N as S,O as h,j as _,b as z,z as l,v as u,g as M,q as w,r as A}from"./index-
|
|
1
|
+
import{l as B,o as L,s as O,u as r,k as d,h as o,n as v,D as m,m as j,F as x,w as y,T as b,N as S,O as h,j as _,b as z,z as l,v as u,g as M,q as w,r as A}from"./index-DXDatko_.js";import{b as C,c as T,d as E,a as F}from"./api-C26hZoW-.js";import{g as G}from"./squad-colors-B8B_Y-lz.js";import{P as R}from"./plus-Cf35gEaB.js";import{T as H}from"./trash-2-BZNhYu4s.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{o as w,s as E,u as d,k as s,h as t,z as g,F as x,w as U,T as a,O as n,N as T,L as p,j as b,v as r,q as M}from"./index-
|
|
1
|
+
import{o as w,s as E,u as d,k as s,h as t,z as g,F as x,w as U,T as a,O as n,N as T,L as p,j as b,v as r,q as M}from"./index-DXDatko_.js";import{b as V,d as S}from"./api-C26hZoW-.js";const z={class:"p-6"},A={class:"flex items-center justify-between mb-6"},N=["disabled"],B={key:0,class:"text-muted-foreground"},C={class:"flex gap-1 border-b border-border mb-6"},I=["onClick"],D={key:0,class:"space-y-4 max-w-lg"},K={class:"flex items-center gap-3"},L={key:1,class:"space-y-4 max-w-lg"},j={class:"flex items-center gap-3"},O={key:2,class:"space-y-4 max-w-lg"},q={key:3,class:"space-y-4 max-w-lg"},F={class:"flex items-center gap-3"},G={class:"flex items-center gap-3"},H=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"}],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,N)]),f.value?(d(),s("div",B,"Loading...")):(d(),s(x,{key:1},[t("div",C,[(d(),s(x,null,U(y,l=>t("button",{key:l.id,onClick:R=>u.value=l.id,class:M(["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),[[T,o.value.backgroundNotifyMode]])]),t("div",K,[a(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>o.value.backgroundNotifyTelegram=l),type:"checkbox",id:"notifyTelegram",class:"rounded"},null,512),[[p,o.value.backgroundNotifyTelegram]]),e[18]||(e[18]=t("label",{for:"notifyTelegram",class:"text-sm font-medium"},"Send notifications via Telegram",-1))])])):b("",!0),u.value==="telegram"?(d(),s("div",L,[t("div",null,[e[19]||(e[19]=t("label",{class:"text-sm font-medium"},"Bot Token",-1)),a(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>o.value.telegramBotToken=l),type:"password",placeholder:"Enter new token to update",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.telegramBotToken]])]),t("div",null,[e[20]||(e[20]=t("label",{class:"text-sm font-medium"},"Authorized User ID",-1)),a(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>o.value.authorizedUserId=l),type:"number",placeholder:"123456789",class:"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"},null,512),[[n,o.value.authorizedUserId,void 0,{number:!0}]])]),t("div",j,[a(t("input",{"onUpdate:modelValue":e[6]||(e[6]=l=>o.value.telegramEnabled=l),type:"checkbox",id:"telegramEnabled",class:"rounded"},null,512),[[p,o.value.telegramEnabled]]),e[21]||(e[21]=t("label",{for:"telegramEnabled",class:"text-sm font-medium"},"Enable Telegram Bot",-1))])])):b("",!0),u.value==="auth"?(d(),s("div",O,[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",q,[t("div",F,[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",G,[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,4 +1,4 @@
|
|
|
1
|
-
import{l as fe,o as me,s as xe,u as o,k as a,h as t,q as E,n as u,D as d,m as q,F as p,T as C,O as M,V as ee,z as r,j as S,P as te,w as se,N as ge,i as oe,f as le,v as n,g as ye,W as ae}from"./index-
|
|
1
|
+
import{l as fe,o as me,s as xe,u as o,k as a,h as t,q as E,n as u,D as d,m as q,F as p,T as C,O as M,V as ee,z as r,j as S,P as te,w as se,N as ge,i as oe,f as le,v as n,g as ye,W as ae}from"./index-DXDatko_.js";import{b as z,c as O,d as be,a as ke}from"./api-C26hZoW-.js";import{P as ne}from"./plus-Cf35gEaB.js";import{S as he}from"./search-HfqKWu4x.js";import{P as _e,S as we}from"./save-DazCQL04.js";import{X as Ce}from"./x-2aE_QDyH.js";import{T as Se}from"./trash-2-BZNhYu4s.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{l as A,o as J,Q as V,s as z,p as R,t as H,u as s,k as o,h as t,n as p,D as c,A as B,q as _,z as i,d as F,m as h,j as v,i as I,F as C,w as D,f as E,v as m,g as G,R as U,r as Q,J as X,x as Z,U as W}from"./index-
|
|
1
|
+
import{l as A,o as J,Q as V,s as z,p as R,t as H,u as s,k as o,h as t,n as p,D as c,A as B,q as _,z as i,d as F,m as h,j as v,i as I,F as C,w as D,f as E,v as m,g as G,R as U,r as Q,J as X,x as Z,U as W}from"./index-DXDatko_.js";import{b as O,e as K,c as P,a as Y}from"./api-C26hZoW-.js";import{g as ee}from"./squad-colors-B8B_Y-lz.js";import{X as te}from"./x-2aE_QDyH.js";import{G as se}from"./git-branch-D6UaMAIC.js";import{T as oe}from"./trash-2-BZNhYu4s.js";import{A as re}from"./arrow-left-C9JLmvAS.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 B}from"./api-
|
|
1
|
+
import{b as B}from"./api-C26hZoW-.js";import{l as I,o as L,s as M,u as o,k as n,h as t,n as u,D as l,A as T,m as g,e as _,F as f,w as h,v,g as N,q as k,R as P,z as a,i as x,j as p,b,x as V}from"./index-DXDatko_.js";import{T as w}from"./triangle-alert-CbAKPBKT.js";import{G as $}from"./git-branch-D6UaMAIC.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-
|
|
1
|
+
import{b as y}from"./api-C26hZoW-.js";import{g as v}from"./squad-colors-B8B_Y-lz.js";import{l as h,o as k,s as b,u as o,k as r,h as t,n as c,D as l,e as w,F as L,w as C,v as d,i as S,R as B,r as f,x as N,z as n,m as _,j as V}from"./index-DXDatko_.js";import{G as j}from"./git-branch-D6UaMAIC.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{l as q,o as Q,s as R,u as d,k as r,h as t,n as _,D as k,C as W,F as i,w as m,m as w,z as o,e as X,j as u,T as O,O as B,v as a,q as Y,r as Z,g as tt}from"./index-
|
|
1
|
+
import{l as q,o as Q,s as R,u as d,k as r,h as t,n as _,D as k,C as W,F as i,w as m,m as w,z as o,e as X,j as u,T as O,O as B,v as a,q as Y,r as Z,g as tt}from"./index-DXDatko_.js";import{b as T,d as z}from"./api-C26hZoW-.js";import{T as et}from"./triangle-alert-CbAKPBKT.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{l as T,o as oe,Q as se,u as s,k as a,F as b,w as U,g as H,h as t,i as I,D as d,n as v,z as j,r as ce,q as z,W as ve,j as B,v as c,s as pe,B as K,m as S,T as L,O as N,V as O,f as R}from"./index-
|
|
1
|
+
import{l as T,o as oe,Q as se,u as s,k as a,F as b,w as U,g as H,h as t,i as I,D as d,n as v,z as j,r as ce,q as z,W as ve,j as B,v as c,s as pe,B as K,m as S,T as L,O as N,V as O,f as R}from"./index-DXDatko_.js";import{b as q,d as E,a as Z}from"./api-C26hZoW-.js";import{F as fe}from"./file-text-Okjs6RpT.js";import{S as me}from"./search-HfqKWu4x.js";import{P as G}from"./plus-Cf35gEaB.js";import{P as X,S as J}from"./save-DazCQL04.js";import{T as Y}from"./trash-2-BZNhYu4s.js";import{X as ee}from"./x-2aE_QDyH.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{E as i,y as c}from"./index-
|
|
1
|
+
import{E as i,y as c}from"./index-DXDatko_.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
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatView-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatView-BZ4Le-WE.js","assets/file-text-Okjs6RpT.js","assets/x-2aE_QDyH.js","assets/SquadsView-wke_WrBH.js","assets/api-C26hZoW-.js","assets/squad-colors-B8B_Y-lz.js","assets/git-branch-D6UaMAIC.js","assets/SquadHealthView-CYhxwPFD.js","assets/triangle-alert-CbAKPBKT.js","assets/SquadDetailView-YZSMZhMl.js","assets/trash-2-BZNhYu4s.js","assets/arrow-left-C9JLmvAS.js","assets/FeedView-BdRlXQvc.js","assets/SkillsView-Dn5gk4nb.js","assets/plus-Cf35gEaB.js","assets/search-HfqKWu4x.js","assets/save-DazCQL04.js","assets/McpView-B16zbxmQ.js","assets/SchedulesView-DrzbMX0s.js","assets/HistoryView-CmvnaBkj.js","assets/WikiView-B5QKxKWR.js","assets/UsageView-B4PPFtZE.js","assets/AuditLogView-C6FNd8dq.js","assets/SettingsView-WMeQYIds.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var rh=Object.defineProperty;var nh=(t,e,r)=>e in t?rh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var fe=(t,e,r)=>nh(t,typeof e!="symbol"?e+"":e,r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();const sh="modulepreload",ih=function(t){return"/"+t},zo={},Me=function(e,r,n){let s=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"));s=o(r.map(c=>{if(c=ih(c),c in zo)return;zo[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":sh,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(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 s.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
|
|
@@ -152,7 +152,7 @@ var rh=Object.defineProperty;var nh=(t,e,r)=>e in t?rh(t,e,{enumerable:!0,config
|
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const Sg=Te("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"}]]),Eg={key:0,class:"text-base font-bold tracking-tight bg-gradient-brand bg-clip-text text-transparent"},Tg=["title"],Ag={class:"flex-1 p-2 space-y-0.5 overflow-y-auto"},xg={key:0},Rg={class:"border-t border-border p-2 space-y-0.5"},Cg={key:0},Og=["href"],Xa="https://github.com/michaeljolley/io",Pg=ur({__name:"AppSidebar",setup(t){const e=Oo(),r=et(!1),n=[{name:"Chat",icon:Za,path:"/"},{name:"History",icon:hg,path:"/history"},{name:"Squads",icon:Sg,path:"/squads"},{name:"Health",icon:ig,path:"/squads/health"},{name:"Usage",icon:ag,path:"/usage"},{name:"Audit Log",icon:lg,path:"/audit-log"},{name:"Skills",icon:yg,path:"/skills"},{name:"MCP Servers",icon:bg,path:"/mcp"},{name:"Schedules",icon:cg,path:"/schedules"},{name:"Wiki",icon:og,path:"/wiki"}],s=[{name:"Chat",icon:Za,path:"/"},{name:"Feed",icon:_u,path:"/feed"},{name:"Settings",icon:_g,path:"/settings"}],i="1.5.0",o=Ue(()=>{let l="";const c=[...n,...s];for(const u of c){const h=u.path;(h==="/"?e.path==="/":e.path===h||e.path.startsWith(h+"/"))&&h.length>l.length&&(l=h)}return l});function a(){r.value=!r.value}return(l,c)=>{const u=So("router-link");return oe(),Ee("aside",{class:at(["border-r border-border bg-sidebar flex flex-col h-full shrink-0 transition-all duration-200",r.value?"w-16":"w-56"])},[ve("div",{class:at(["p-3 border-b border-border flex items-center",r.value?"justify-center":"justify-between"])},[ue(u,{to:"/",class:at(["flex items-center gap-2",r.value?"justify-center":""])},{default:Kr(()=>[ue(rg,{size:24}),r.value?Qe("",!0):(oe(),Ee("h1",Eg,"IO"))]),_:1},8,["class"]),r.value?Qe("",!0):(oe(),Ee("button",{key:0,onClick:a,class:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:r.value?"Expand sidebar":"Collapse sidebar"},[ue(_e(gg),{class:"w-4 h-4"})],8,Tg))],2),r.value?(oe(),Ee("button",{key:0,onClick:a,class:"mx-auto mt-2 p-1.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Expand sidebar"},[ue(_e(mg),{class:"w-4 h-4"})])):Qe("",!0),ve("nav",Ag,[(oe(),Ee(Ye,null,Ni(n,h=>ue(u,{key:h.path,to:h.path,class:at(["flex items-center gap-3 rounded-md text-sm transition-colors",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Kr(()=>[(oe(),Wt(ea(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?Qe("",!0):(oe(),Ee("span",xg,ps(h.name),1))]),_:2},1032,["to","class","title"])),64))]),ve("div",Rg,[(oe(),Ee(Ye,null,Ni(s,h=>ue(u,{key:h.path,to:h.path,class:at(["flex items-center gap-3 rounded-md text-sm transition-colors",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Kr(()=>[(oe(),Wt(ea(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?Qe("",!0):(oe(),Ee("span",Cg,ps(h.name),1))]),_:2},1032,["to","class","title"])),64)),ve("div",{class:at(["flex items-center pt-2 mt-2 border-t border-border",r.value?"justify-center":"justify-between px-3"])},[r.value?Qe("",!0):(oe(),Ee("a",{key:0,href:`${Xa}/releases/tag/v${_e(i)}`,target:"_blank",class:"text-[10px] text-muted-foreground hover:text-foreground transition-colors",title:"Release notes"}," v"+ps(_e(i)),9,Og)),ve("a",{href:Xa,target:"_blank",class:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"GitHub repository"},[ue(_e(ug),{class:"w-3.5 h-3.5"})])],2)])],2)}}});function ti(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Ig(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}const jg=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Po extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class $g extends Po{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class el extends Po{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class tl extends Po{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Gi;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Gi||(Gi={}));class Ng{constructor(e,{headers:r={},customFetch:n,region:s=Gi.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=jg(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Ig(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:h}=n;let d={},{region:f}=n;f||(f=this.region);const p=new URL(`${this.url}/${r}`);f&&f!=="any"&&(d["x-region"]=f,p.searchParams.set("forceFunctionRegion",f));let y;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",y=c):typeof c=="string"?(d["Content-Type"]="text/plain",y=c):typeof FormData<"u"&&c instanceof FormData?y=c:(d["Content-Type"]="application/json",y=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?y=JSON.stringify(c):y=c;let k=u;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),u?(k=o.signal,u.addEventListener("abort",()=>o.abort())):k=o.signal);const w=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),a),body:y,signal:k}).catch(D=>{throw new $g(D)}),b=w.headers.get("x-relay-error");if(b&&b==="true")throw new el(w);if(!w.ok)throw new tl(w);let _=((s=w.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return _==="application/json"?x=yield w.json():_==="application/octet-stream"||_==="application/pdf"?x=yield w.blob():_==="text/event-stream"?x=w:_==="multipart/form-data"?x=yield w.formData():x=yield w.text(),{data:x,error:null,response:w}}catch(a){return{data:null,error:a,response:a instanceof tl||a instanceof el?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const wu=3,rl=t=>Math.min(1e3*2**t,3e4),Lg=[520,503],ku=["GET","HEAD","OPTIONS"];var Dg=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function nl(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",s),r()},t);function s(){clearTimeout(n),r()}e==null||e.addEventListener("abort",s)})}function Ug(t,e,r,n){return!(!n||r>=wu||!ku.includes(t)||!Lg.includes(e))}var Bg=class{constructor(t){var e,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body,(h,d)=>typeof d=="bigint"?d.toString():d),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!ku.includes(r.method))throw h;if(r.retryEnabled&&o<wu){const d=rl(o);o++,await nl(d,r.signal);continue}throw h}if(Ug(r.method,u.status,o,r.retryEnabled)){var a,l;const h=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,d=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:rl(o);await u.text(),o++,await nl(d,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const h=o==null?void 0:o.cause;if(h){var d,f,p,y;const b=(d=h==null?void 0:h.message)!==null&&d!==void 0?d:"",_=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(p=o==null?void 0:o.name)!==null&&p!==void 0?p:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
|
|
155
|
+
*/const Sg=Te("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"}]]),Eg={key:0,class:"text-base font-bold tracking-tight bg-gradient-brand bg-clip-text text-transparent"},Tg=["title"],Ag={class:"flex-1 p-2 space-y-0.5 overflow-y-auto"},xg={key:0},Rg={class:"border-t border-border p-2 space-y-0.5"},Cg={key:0},Og=["href"],Xa="https://github.com/michaeljolley/io",Pg=ur({__name:"AppSidebar",setup(t){const e=Oo(),r=et(!1),n=[{name:"Chat",icon:Za,path:"/"},{name:"History",icon:hg,path:"/history"},{name:"Squads",icon:Sg,path:"/squads"},{name:"Health",icon:ig,path:"/squads/health"},{name:"Usage",icon:ag,path:"/usage"},{name:"Audit Log",icon:lg,path:"/audit-log"},{name:"Skills",icon:yg,path:"/skills"},{name:"MCP Servers",icon:bg,path:"/mcp"},{name:"Schedules",icon:cg,path:"/schedules"},{name:"Wiki",icon:og,path:"/wiki"}],s=[{name:"Chat",icon:Za,path:"/"},{name:"Feed",icon:_u,path:"/feed"},{name:"Settings",icon:_g,path:"/settings"}],i="1.5.3",o=Ue(()=>{let l="";const c=[...n,...s];for(const u of c){const h=u.path;(h==="/"?e.path==="/":e.path===h||e.path.startsWith(h+"/"))&&h.length>l.length&&(l=h)}return l});function a(){r.value=!r.value}return(l,c)=>{const u=So("router-link");return oe(),Ee("aside",{class:at(["border-r border-border bg-sidebar flex flex-col h-full shrink-0 transition-all duration-200",r.value?"w-16":"w-56"])},[ve("div",{class:at(["p-3 border-b border-border flex items-center",r.value?"justify-center":"justify-between"])},[ue(u,{to:"/",class:at(["flex items-center gap-2",r.value?"justify-center":""])},{default:Kr(()=>[ue(rg,{size:24}),r.value?Qe("",!0):(oe(),Ee("h1",Eg,"IO"))]),_:1},8,["class"]),r.value?Qe("",!0):(oe(),Ee("button",{key:0,onClick:a,class:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:r.value?"Expand sidebar":"Collapse sidebar"},[ue(_e(gg),{class:"w-4 h-4"})],8,Tg))],2),r.value?(oe(),Ee("button",{key:0,onClick:a,class:"mx-auto mt-2 p-1.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Expand sidebar"},[ue(_e(mg),{class:"w-4 h-4"})])):Qe("",!0),ve("nav",Ag,[(oe(),Ee(Ye,null,Ni(n,h=>ue(u,{key:h.path,to:h.path,class:at(["flex items-center gap-3 rounded-md text-sm transition-colors",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Kr(()=>[(oe(),Wt(ea(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?Qe("",!0):(oe(),Ee("span",xg,ps(h.name),1))]),_:2},1032,["to","class","title"])),64))]),ve("div",Rg,[(oe(),Ee(Ye,null,Ni(s,h=>ue(u,{key:h.path,to:h.path,class:at(["flex items-center gap-3 rounded-md text-sm transition-colors",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Kr(()=>[(oe(),Wt(ea(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?Qe("",!0):(oe(),Ee("span",Cg,ps(h.name),1))]),_:2},1032,["to","class","title"])),64)),ve("div",{class:at(["flex items-center pt-2 mt-2 border-t border-border",r.value?"justify-center":"justify-between px-3"])},[r.value?Qe("",!0):(oe(),Ee("a",{key:0,href:`${Xa}/releases/tag/v${_e(i)}`,target:"_blank",class:"text-[10px] text-muted-foreground hover:text-foreground transition-colors",title:"Release notes"}," v"+ps(_e(i)),9,Og)),ve("a",{href:Xa,target:"_blank",class:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"GitHub repository"},[ue(_e(ug),{class:"w-3.5 h-3.5"})])],2)])],2)}}});function ti(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Ig(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}const jg=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Po extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class $g extends Po{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class el extends Po{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class tl extends Po{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Gi;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Gi||(Gi={}));class Ng{constructor(e,{headers:r={},customFetch:n,region:s=Gi.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=jg(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Ig(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:h}=n;let d={},{region:f}=n;f||(f=this.region);const p=new URL(`${this.url}/${r}`);f&&f!=="any"&&(d["x-region"]=f,p.searchParams.set("forceFunctionRegion",f));let y;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",y=c):typeof c=="string"?(d["Content-Type"]="text/plain",y=c):typeof FormData<"u"&&c instanceof FormData?y=c:(d["Content-Type"]="application/json",y=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?y=JSON.stringify(c):y=c;let k=u;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),u?(k=o.signal,u.addEventListener("abort",()=>o.abort())):k=o.signal);const w=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),a),body:y,signal:k}).catch(D=>{throw new $g(D)}),b=w.headers.get("x-relay-error");if(b&&b==="true")throw new el(w);if(!w.ok)throw new tl(w);let _=((s=w.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return _==="application/json"?x=yield w.json():_==="application/octet-stream"||_==="application/pdf"?x=yield w.blob():_==="text/event-stream"?x=w:_==="multipart/form-data"?x=yield w.formData():x=yield w.text(),{data:x,error:null,response:w}}catch(a){return{data:null,error:a,response:a instanceof tl||a instanceof el?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const wu=3,rl=t=>Math.min(1e3*2**t,3e4),Lg=[520,503],ku=["GET","HEAD","OPTIONS"];var Dg=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function nl(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",s),r()},t);function s(){clearTimeout(n),r()}e==null||e.addEventListener("abort",s)})}function Ug(t,e,r,n){return!(!n||r>=wu||!ku.includes(t)||!Lg.includes(e))}var Bg=class{constructor(t){var e,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body,(h,d)=>typeof d=="bigint"?d.toString():d),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!ku.includes(r.method))throw h;if(r.retryEnabled&&o<wu){const d=rl(o);o++,await nl(d,r.signal);continue}throw h}if(Ug(r.method,u.status,o,r.retryEnabled)){var a,l;const h=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,d=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:rl(o);await u.text(),o++,await nl(d,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const h=o==null?void 0:o.cause;if(h){var d,f,p,y;const b=(d=h==null?void 0:h.message)!==null&&d!==void 0?d:"",_=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(p=o==null?void 0:o.name)!==null&&p!==void 0?p:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
|
|
156
156
|
|
|
157
157
|
Caused by: ${(y=h==null?void 0:h.name)!==null&&y!==void 0?y:"Error"}: ${b}`,_&&(l+=` (${_})`),h!=null&&h.stack&&(l+=`
|
|
158
158
|
${h.stack}`)}else{var k;l=(k=o==null?void 0:o.stack)!==null&&k!==void 0?k:""}const w=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${w} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(c+=`. Your request URL is ${w} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),i.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var c;const d=await t.text();d===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((c=e.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?n=d:n=JSON.parse(d))}const u=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),h=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&h&&h.length>1&&(s=parseInt(h[1])),e.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const u=await t.text();try{r=JSON.parse(u),Array.isArray(r)&&t.status===404&&(n=[],r=null,i=200,o="OK")}catch{t.status===404&&u===""?(i=204,o="No Content"):r={message:u}}if(r&&e.shouldThrowOnError)throw new Dg(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},Mg=class extends Bg{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const sl=new RegExp("[,()]");var Br=class extends Mg{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&sl.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&sl.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},Hg=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},s=r?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new Br({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),r||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new Br({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(c.length>0){const u=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",u.join(","))}}return new Br({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Br({method:n,url:s,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new Br({method:r,url:n,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Mn(t){"@babel/helpers - typeof";return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mn(t)}function qg(t,e){if(Mn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fg(t){var e=qg(t,"string");return Mn(e)=="symbol"?e:e+""}function Vg(t,e,r){return(e=Fg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function il(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function ns(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?il(Object(r),!0).forEach(function(n){Vg(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):il(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var zg=class Su{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const h=new AbortController,d=setTimeout(()=>h.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(d),l(c,u);const p=()=>{clearTimeout(d),h.abort()};return f.addEventListener("abort",p,{once:!0}),l(c,ns(ns({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(d),f.removeEventListener("abort",p)})}return l(c,ns(ns({},u),{},{signal:h.signal})).finally(()=>clearTimeout(d))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Hg(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Su(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),h=n&&Object.values(r).some(u);h?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,p])=>p!==void 0).map(([f,p])=>[f,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([f,p])=>{l.searchParams.append(f,p)})):(a="POST",c=r);const d=new Headers(this.headers);return h?d.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&d.set("Prefer",`count=${i}`),new Br({method:a,url:l,headers:d,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Wg{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
@@ -251,4 +251,4 @@ ${t}</tr>
|
|
|
251
251
|
`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
|
252
252
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${St(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){const n=this.parser.parseInline(r),s=Nl(t);if(s===null)return n;t=s;let i='<a href="'+t+'"';return e&&(i+=' title="'+St(e)+'"'),i+=">"+n+"</a>",i}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const s=Nl(t);if(s===null)return St(r);t=s;let i=`<img src="${t}" alt="${r}"`;return e&&(i+=` title="${St(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:St(t.text)}},Ho=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Vt=class co{constructor(e){fe(this,"options");fe(this,"renderer");fe(this,"textRenderer");this.options=e||xr,this.options.renderer=this.options.renderer||new Ls,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ho}static parse(e,r){return new co(r).parse(e)}static parseInline(e,r){return new co(r).parseInline(e)}parse(e,r=!0){var s,i;let n="";for(let o=0;o<e.length;o++){const a=e[o];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[a.type]){const c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){n+=u||"";continue}}const l=a;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;o+1<e.length&&e[o+1].type==="text";)c=e[++o],u+=`
|
|
253
253
|
`+this.renderer.text(c);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(e,r=this.renderer){var s,i;let n="";for(let o=0;o<e.length;o++){const a=e[o];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[a.type]){const c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=c||"";continue}}const l=a;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},Ci,vs=(Ci=class{constructor(t){fe(this,"options");fe(this,"block");this.options=t||xr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Ft.lex:Ft.lexInline}provideParser(){return this.block?Vt.parse:Vt.parseInline}},fe(Ci,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ci),kb=class{constructor(...t){fe(this,"defaults",jo());fe(this,"options",this.setOptions);fe(this,"parse",this.parseMarkdown(!0));fe(this,"parseInline",this.parseMarkdown(!1));fe(this,"Parser",Vt);fe(this,"Renderer",Ls);fe(this,"TextRenderer",Ho);fe(this,"Lexer",Ft);fe(this,"Tokenizer",Ns);fe(this,"Hooks",vs);this.use(...t)}walkTokens(t,e){var n,s;let r=[];for(const i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{const o=i;for(const a of o.header)r=r.concat(this.walkTokens(a.tokens,e));for(const a of o.rows)for(const l of a)r=r.concat(this.walkTokens(l.tokens,e));break}case"list":{const o=i;r=r.concat(this.walkTokens(o.items,e));break}default:{const o=i;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{const l=o[a].flat(1/0);r=r.concat(this.walkTokens(l,e))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,e)))}}return r}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const i=e.renderers[s.name];i?e.renderers[s.name]=function(...o){let a=s.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=e[s.level];i?i.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),r.renderer){const s=this.defaults.renderer||new Ls(this.defaults);for(const i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const o=i,a=r.renderer[o],l=s[o];s[o]=(...c)=>{let u=a.apply(s,c);return u===!1&&(u=l.apply(s,c)),u||""}}n.renderer=s}if(r.tokenizer){const s=this.defaults.tokenizer||new Ns(this.defaults);for(const i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const o=i,a=r.tokenizer[o],l=s[o];s[o]=(...c)=>{let u=a.apply(s,c);return u===!1&&(u=l.apply(s,c)),u}}n.tokenizer=s}if(r.hooks){const s=this.defaults.hooks||new vs;for(const i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const o=i,a=r.hooks[o],l=s[o];vs.passThroughHooks.has(i)?s[o]=c=>{if(this.defaults.async)return Promise.resolve(a.call(s,c)).then(h=>l.call(s,h));const u=a.call(s,c);return l.call(s,u)}:s[o]=(...c)=>{let u=a.apply(s,c);return u===!1&&(u=l.apply(s,c)),u}}n.hooks=s}if(r.walkTokens){const s=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),s&&(a=a.concat(s.call(this,o))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Ft.lex(t,e??this.defaults)}parser(t,e){return Vt.parse(t,e??this.defaults)}parseMarkdown(t){return(r,n)=>{const s={...n},i={...this.defaults,...s},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const a=i.hooks?i.hooks.provideLexer():t?Ft.lex:Ft.lexInline,l=i.hooks?i.hooks.provideParser():t?Vt.parse:Vt.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(c=>a(c,i)).then(c=>i.hooks?i.hooks.processAllTokens(c):c).then(c=>i.walkTokens?Promise.all(this.walkTokens(c,i.walkTokens)).then(()=>c):c).then(c=>l(c,i)).then(c=>i.hooks?i.hooks.postprocess(c):c).catch(o);try{i.hooks&&(r=i.hooks.preprocess(r));let c=a(r,i);i.hooks&&(c=i.hooks.processAllTokens(c)),i.walkTokens&&this.walkTokens(c,i.walkTokens);let u=l(c,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(c){return o(c)}}}onError(t,e){return r=>{if(r.message+=`
|
|
254
|
-
Please report this to https://github.com/markedjs/marked.`,t){const n="<p>An error occurred:</p><pre>"+St(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Ar=new kb;function ce(t,e){return Ar.parse(t,e)}ce.options=ce.setOptions=function(t){return Ar.setOptions(t),ce.defaults=Ar.defaults,Vu(ce.defaults),ce};ce.getDefaults=jo;ce.defaults=xr;ce.use=function(...t){return Ar.use(...t),ce.defaults=Ar.defaults,Vu(ce.defaults),ce};ce.walkTokens=function(t,e){return Ar.walkTokens(t,e)};ce.parseInline=Ar.parseInline;ce.Parser=Vt;ce.parser=Vt.parse;ce.Renderer=Ls;ce.TextRenderer=Ho;ce.Lexer=Ft;ce.lexer=Ft.lex;ce.Tokenizer=Ns;ce.Hooks=vs;ce.parse=ce;ce.options;ce.setOptions;ce.use;ce.walkTokens;ce.parseInline;Vt.parse;Ft.lex;const Sb=["innerHTML"],Eb=ur({__name:"MarkdownContent",props:{content:{}},setup(t){const e=t,r=Ue(()=>e.content?ce.parse(e.content,{async:!1}):"");return(n,s)=>(oe(),Ee("div",{class:"prose prose-sm dark:prose-invert max-w-none",innerHTML:r.value},null,8,Sb))}}),Tb={key:0,class:"fixed bottom-6 right-6 z-50 w-96 h-[500px] bg-card border border-border rounded-xl shadow-2xl flex flex-col overflow-hidden"},Ab={class:"flex items-center justify-between px-4 py-3 border-b border-border bg-header"},xb={key:0,class:"flex items-center justify-center h-full"},Rb={key:1,class:"text-muted-foreground"},Cb={key:2,class:"inline-block w-1.5 h-3 bg-current animate-pulse ml-1"},Ob={class:"border-t border-border p-3"},Pb={class:"flex gap-2 items-end"},Ib=["disabled"],jb=ur({__name:"ChatOverlay",setup(t){const e=Mv(),r=Oo(),n=et(!1),s=et(""),i=et(),o=()=>r.path==="/";function a(){o()||(n.value=!n.value)}async function l(){const h=s.value.trim();!h||e.isStreaming||(s.value="",await e.sendMessage(h))}function c(h){h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),l())}function u(){i.value&&(i.value.scrollTop=i.value.scrollHeight)}return Er(()=>e.messages.map(h=>h.content),async()=>{await Yr(),u()},{deep:!0}),Er(()=>e.messages.length,async()=>{await Yr(),u()}),(h,d)=>(oe(),Ee(Ye,null,[!n.value&&!o()?(oe(),Ee("button",{key:0,onClick:a,class:"fixed bottom-6 right-6 z-50 w-12 h-12 rounded-full btn-gradient flex items-center justify-center shadow-glow-lg hover:scale-105 transition-transform",title:"Chat with IO"},[ue(_e(fg),{class:"w-5 h-5 text-white"})])):Qe("",!0),ue(cf,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-4 scale-95","enter-to-class":"opacity-100 translate-y-0 scale-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0 scale-100","leave-to-class":"opacity-0 translate-y-4 scale-95"},{default:Kr(()=>[n.value?(oe(),Ee("div",Tb,[ve("div",Ab,[d[2]||(d[2]=ve("div",{class:"flex items-center gap-2"},[ve("div",{class:"w-2 h-2 rounded-full bg-emerald-400 animate-pulse"}),ve("span",{class:"text-sm font-medium"},"IO Assistant")],-1)),ve("button",{onClick:d[0]||(d[0]=f=>n.value=!1),class:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors"},[ue(_e(pg),{class:"w-4 h-4"})])]),ve("div",{ref_key:"messagesContainer",ref:i,class:"flex-1 overflow-y-auto p-3 space-y-3"},[_e(e).messages.length===0?(oe(),Ee("div",xb,[...d[3]||(d[3]=[ve("p",{class:"text-xs text-muted-foreground"},"Send a message to chat with IO",-1)])])):Qe("",!0),(oe(!0),Ee(Ye,null,Ni(_e(e).messages,f=>(oe(),Ee("div",{key:f.id,class:at(["flex",f.role==="user"?"justify-end":"justify-start"])},[ve("div",{class:at(["max-w-[80%] rounded-lg px-3 py-2 text-xs",f.role==="user"?"bg-primary text-primary-foreground":"bg-secondary text-foreground"])},[f.content?(oe(),Wt(Eb,{key:0,content:f.content,class:at(f.role==="user"?"prose-invert":"")},null,8,["content","class"])):(oe(),Ee("span",Rb,"...")),f.streaming?(oe(),Ee("div",Cb)):Qe("",!0)],2)],2))),128))],512),ve("div",Ob,[ve("div",Pb,[Qh(ve("textarea",{"onUpdate:modelValue":d[1]||(d[1]=f=>s.value=f),onKeydown:c,placeholder:"Message IO...",rows:"1",class:"flex-1 resize-none rounded-md border border-input bg-input px-3 py-2 text-xs focus:outline-none focus:ring-1 focus:ring-ring min-h-[36px] max-h-[80px]"},null,544),[[If,s.value]]),ve("button",{onClick:l,disabled:!s.value.trim()||_e(e).isStreaming,class:"rounded-md bg-primary text-primary-foreground p-2 hover:bg-primary/90 disabled:opacity-50 transition-colors"},[_e(e).isStreaming?(oe(),Wt(_e(wg),{key:1,class:"w-3.5 h-3.5"})):(oe(),Wt(_e(vg),{key:0,class:"w-3.5 h-3.5"}))],8,Ib)])])])):Qe("",!0)]),_:1})],64))}}),$b={class:"flex h-screen overflow-hidden"},Nb={class:"flex-1 flex flex-col overflow-hidden"},Lb={class:"flex-1 overflow-auto"},Db=ur({__name:"App",setup(t){const e=Qn(),r=Oo(),n=Ue(()=>e.isAuthenticated&&r.name!=="login");return(s,i)=>{const o=So("router-view");return oe(),Ee("div",$b,[n.value?(oe(),Wt(Pg,{key:0})):Qe("",!0),ve("div",Nb,[n.value?(oe(),Wt(Dv,{key:0})):Qe("",!0),ve("main",Lb,[ue(o)])]),n.value?(oe(),Wt(jb,{key:1})):Qe("",!0)])}}}),Ub=[{path:"/login",name:"login",component:()=>Me(()=>import("./LoginView-
|
|
254
|
+
Please report this to https://github.com/markedjs/marked.`,t){const n="<p>An error occurred:</p><pre>"+St(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Ar=new kb;function ce(t,e){return Ar.parse(t,e)}ce.options=ce.setOptions=function(t){return Ar.setOptions(t),ce.defaults=Ar.defaults,Vu(ce.defaults),ce};ce.getDefaults=jo;ce.defaults=xr;ce.use=function(...t){return Ar.use(...t),ce.defaults=Ar.defaults,Vu(ce.defaults),ce};ce.walkTokens=function(t,e){return Ar.walkTokens(t,e)};ce.parseInline=Ar.parseInline;ce.Parser=Vt;ce.parser=Vt.parse;ce.Renderer=Ls;ce.TextRenderer=Ho;ce.Lexer=Ft;ce.lexer=Ft.lex;ce.Tokenizer=Ns;ce.Hooks=vs;ce.parse=ce;ce.options;ce.setOptions;ce.use;ce.walkTokens;ce.parseInline;Vt.parse;Ft.lex;const Sb=["innerHTML"],Eb=ur({__name:"MarkdownContent",props:{content:{}},setup(t){const e=t,r=Ue(()=>e.content?ce.parse(e.content,{async:!1}):"");return(n,s)=>(oe(),Ee("div",{class:"prose prose-sm dark:prose-invert max-w-none",innerHTML:r.value},null,8,Sb))}}),Tb={key:0,class:"fixed bottom-6 right-6 z-50 w-96 h-[500px] bg-card border border-border rounded-xl shadow-2xl flex flex-col overflow-hidden"},Ab={class:"flex items-center justify-between px-4 py-3 border-b border-border bg-header"},xb={key:0,class:"flex items-center justify-center h-full"},Rb={key:1,class:"text-muted-foreground"},Cb={key:2,class:"inline-block w-1.5 h-3 bg-current animate-pulse ml-1"},Ob={class:"border-t border-border p-3"},Pb={class:"flex gap-2 items-end"},Ib=["disabled"],jb=ur({__name:"ChatOverlay",setup(t){const e=Mv(),r=Oo(),n=et(!1),s=et(""),i=et(),o=()=>r.path==="/";function a(){o()||(n.value=!n.value)}async function l(){const h=s.value.trim();!h||e.isStreaming||(s.value="",await e.sendMessage(h))}function c(h){h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),l())}function u(){i.value&&(i.value.scrollTop=i.value.scrollHeight)}return Er(()=>e.messages.map(h=>h.content),async()=>{await Yr(),u()},{deep:!0}),Er(()=>e.messages.length,async()=>{await Yr(),u()}),(h,d)=>(oe(),Ee(Ye,null,[!n.value&&!o()?(oe(),Ee("button",{key:0,onClick:a,class:"fixed bottom-6 right-6 z-50 w-12 h-12 rounded-full btn-gradient flex items-center justify-center shadow-glow-lg hover:scale-105 transition-transform",title:"Chat with IO"},[ue(_e(fg),{class:"w-5 h-5 text-white"})])):Qe("",!0),ue(cf,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-4 scale-95","enter-to-class":"opacity-100 translate-y-0 scale-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0 scale-100","leave-to-class":"opacity-0 translate-y-4 scale-95"},{default:Kr(()=>[n.value?(oe(),Ee("div",Tb,[ve("div",Ab,[d[2]||(d[2]=ve("div",{class:"flex items-center gap-2"},[ve("div",{class:"w-2 h-2 rounded-full bg-emerald-400 animate-pulse"}),ve("span",{class:"text-sm font-medium"},"IO Assistant")],-1)),ve("button",{onClick:d[0]||(d[0]=f=>n.value=!1),class:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors"},[ue(_e(pg),{class:"w-4 h-4"})])]),ve("div",{ref_key:"messagesContainer",ref:i,class:"flex-1 overflow-y-auto p-3 space-y-3"},[_e(e).messages.length===0?(oe(),Ee("div",xb,[...d[3]||(d[3]=[ve("p",{class:"text-xs text-muted-foreground"},"Send a message to chat with IO",-1)])])):Qe("",!0),(oe(!0),Ee(Ye,null,Ni(_e(e).messages,f=>(oe(),Ee("div",{key:f.id,class:at(["flex",f.role==="user"?"justify-end":"justify-start"])},[ve("div",{class:at(["max-w-[80%] rounded-lg px-3 py-2 text-xs",f.role==="user"?"bg-primary text-primary-foreground":"bg-secondary text-foreground"])},[f.content?(oe(),Wt(Eb,{key:0,content:f.content,class:at(f.role==="user"?"prose-invert":"")},null,8,["content","class"])):(oe(),Ee("span",Rb,"...")),f.streaming?(oe(),Ee("div",Cb)):Qe("",!0)],2)],2))),128))],512),ve("div",Ob,[ve("div",Pb,[Qh(ve("textarea",{"onUpdate:modelValue":d[1]||(d[1]=f=>s.value=f),onKeydown:c,placeholder:"Message IO...",rows:"1",class:"flex-1 resize-none rounded-md border border-input bg-input px-3 py-2 text-xs focus:outline-none focus:ring-1 focus:ring-ring min-h-[36px] max-h-[80px]"},null,544),[[If,s.value]]),ve("button",{onClick:l,disabled:!s.value.trim()||_e(e).isStreaming,class:"rounded-md bg-primary text-primary-foreground p-2 hover:bg-primary/90 disabled:opacity-50 transition-colors"},[_e(e).isStreaming?(oe(),Wt(_e(wg),{key:1,class:"w-3.5 h-3.5"})):(oe(),Wt(_e(vg),{key:0,class:"w-3.5 h-3.5"}))],8,Ib)])])])):Qe("",!0)]),_:1})],64))}}),$b={class:"flex h-screen overflow-hidden"},Nb={class:"flex-1 flex flex-col overflow-hidden"},Lb={class:"flex-1 overflow-auto"},Db=ur({__name:"App",setup(t){const e=Qn(),r=Oo(),n=Ue(()=>e.isAuthenticated&&r.name!=="login");return(s,i)=>{const o=So("router-view");return oe(),Ee("div",$b,[n.value?(oe(),Wt(Pg,{key:0})):Qe("",!0),ve("div",Nb,[n.value?(oe(),Wt(Dv,{key:0})):Qe("",!0),ve("main",Lb,[ue(o)])]),n.value?(oe(),Wt(jb,{key:1})):Qe("",!0)])}}}),Ub=[{path:"/login",name:"login",component:()=>Me(()=>import("./LoginView-Rf99Bykf.js"),[]),meta:{public:!0}},{path:"/",name:"chat",component:()=>Me(()=>import("./ChatView-BZ4Le-WE.js"),__vite__mapDeps([0,1,2]))},{path:"/squads",name:"squads",component:()=>Me(()=>import("./SquadsView-wke_WrBH.js"),__vite__mapDeps([3,4,5,6]))},{path:"/squads/health",name:"squad-health",component:()=>Me(()=>import("./SquadHealthView-CYhxwPFD.js"),__vite__mapDeps([7,4,8,6]))},{path:"/squads/:id",name:"squad-detail",component:()=>Me(()=>import("./SquadDetailView-YZSMZhMl.js"),__vite__mapDeps([9,4,5,2,6,10,11]))},{path:"/feed",name:"feed",component:()=>Me(()=>import("./FeedView-BdRlXQvc.js"),__vite__mapDeps([12,4,5,10]))},{path:"/skills",name:"skills",component:()=>Me(()=>import("./SkillsView-Dn5gk4nb.js"),__vite__mapDeps([13,4,14,15,16,2,10]))},{path:"/mcp",name:"mcp",component:()=>Me(()=>import("./McpView-B16zbxmQ.js"),__vite__mapDeps([17,4,14,10]))},{path:"/schedules",name:"schedules",component:()=>Me(()=>import("./SchedulesView-DrzbMX0s.js"),__vite__mapDeps([18,4,5,14,10]))},{path:"/history",name:"history",component:()=>Me(()=>import("./HistoryView-CmvnaBkj.js"),__vite__mapDeps([19,4,15,11,10]))},{path:"/wiki",name:"wiki",component:()=>Me(()=>import("./WikiView-B5QKxKWR.js"),__vite__mapDeps([20,4,1,15,14,16,10,2]))},{path:"/usage",name:"usage",component:()=>Me(()=>import("./UsageView-B4PPFtZE.js"),__vite__mapDeps([21,4,8]))},{path:"/audit-log",name:"audit-log",component:()=>Me(()=>import("./AuditLogView-C6FNd8dq.js"),__vite__mapDeps([22,4]))},{path:"/settings",name:"settings",component:()=>Me(()=>import("./SettingsView-WMeQYIds.js"),__vite__mapDeps([23,4]))}],th=Zp({history:Op(),routes:Ub});th.beforeEach(t=>{const e=Qn();if(!t.meta.public&&!e.isAuthenticated)return{name:"login"}});async function Bb(){await Iv();const t=Uf(Db);t.use(Hf()),t.use(th);const{useAuthStore:e}=await Me(async()=>{const{useAuthStore:n}=await Promise.resolve().then(()=>jv);return{useAuthStore:n}},void 0),r=e();r.initAuthListener(),r.token&&await r.refreshToken(),t.mount("#app")}Bb();export{ig as A,og as B,ag as C,_e as D,Qn as E,Ye as F,Mv as G,hg as H,_u as I,Oo as J,Xp as K,Hb as L,Za as M,qb as N,If as O,yg as P,Er as Q,Kr as R,vg as S,Qh as T,kg as U,Vb as V,Fb as W,rg as _,lg as a,cg as b,bg as c,wg as d,Sg as e,Eb as f,Ue as g,ve as h,Wt as i,Qe as j,Ee as k,Te as l,zd as m,ue as n,ur as o,Yr as p,at as q,fo as r,xc as s,Cc as t,oe as u,et as v,Ni as w,So as x,th as y,ps as z};
|
package/web-dist/index.html
CHANGED
|
@@ -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-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DXDatko_.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Cd9kiyp4.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground">
|