clankie 0.2.9 → 0.2.11
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/cli.js +92 -26
- package/package.json +1 -1
- package/web-ui-dist/_shell.html +2 -2
- package/web-ui-dist/assets/{extensions-I1gtx6lT.js → extensions-Ce8R4mF3.js} +1 -1
- package/web-ui-dist/assets/{field-DndVA7U4.js → field-omFPry7c.js} +1 -1
- package/web-ui-dist/assets/{index-QDWEB_Lf.js → index-CdxpJyJ4.js} +1 -1
- package/web-ui-dist/assets/{loader-circle-CO83p2nq.js → loader-circle-DJwIWnWV.js} +1 -1
- package/web-ui-dist/assets/{main-DUT2mAkp.js → main-UkFzTTck.js} +9 -9
- package/web-ui-dist/assets/{sessions._sessionId-D6j5CxBe.js → sessions._sessionId-DA8C51jO.js} +2 -2
- package/web-ui-dist/assets/{settings-EP4s8NoB.js → settings-Db2CTnq7.js} +1 -1
- package/web-ui-dist/assets/styles-DAZ1IN1z.css +1 -0
- package/web-ui-dist/assets/styles-CdE1WgCk.css +0 -1
package/dist/cli.js
CHANGED
|
@@ -297320,6 +297320,51 @@ async function createSession(options2 = {}) {
|
|
|
297320
297320
|
});
|
|
297321
297321
|
}
|
|
297322
297322
|
|
|
297323
|
+
// src/auth/providers.ts
|
|
297324
|
+
var CURATED_API_KEY_PROVIDERS = [
|
|
297325
|
+
{ id: "anthropic", name: "Anthropic" },
|
|
297326
|
+
{ id: "openai", name: "OpenAI" },
|
|
297327
|
+
{ id: "google", name: "Google (Gemini)" },
|
|
297328
|
+
{ id: "xai", name: "xAI (Grok)" },
|
|
297329
|
+
{ id: "groq", name: "Groq" },
|
|
297330
|
+
{ id: "openrouter", name: "OpenRouter" },
|
|
297331
|
+
{ id: "mistral", name: "Mistral" }
|
|
297332
|
+
];
|
|
297333
|
+
function formatProviderName(providerId) {
|
|
297334
|
+
const lower2 = providerId.toLowerCase();
|
|
297335
|
+
if (lower2 === "xai")
|
|
297336
|
+
return "xAI (Grok)";
|
|
297337
|
+
if (lower2 === "openai")
|
|
297338
|
+
return "OpenAI";
|
|
297339
|
+
if (lower2 === "anthropic")
|
|
297340
|
+
return "Anthropic";
|
|
297341
|
+
if (lower2 === "openrouter")
|
|
297342
|
+
return "OpenRouter";
|
|
297343
|
+
if (lower2 === "mistral")
|
|
297344
|
+
return "Mistral";
|
|
297345
|
+
if (lower2 === "groq")
|
|
297346
|
+
return "Groq";
|
|
297347
|
+
if (lower2 === "google")
|
|
297348
|
+
return "Google (Gemini)";
|
|
297349
|
+
return providerId.split(/[-_\s]+/).filter(Boolean).map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join(" ");
|
|
297350
|
+
}
|
|
297351
|
+
function buildApiKeyProviders(oauthIds, dynamicProviderIds) {
|
|
297352
|
+
const byId = new Map;
|
|
297353
|
+
for (const provider of CURATED_API_KEY_PROVIDERS) {
|
|
297354
|
+
if (!oauthIds.has(provider.id)) {
|
|
297355
|
+
byId.set(provider.id, provider.name);
|
|
297356
|
+
}
|
|
297357
|
+
}
|
|
297358
|
+
for (const providerId of dynamicProviderIds) {
|
|
297359
|
+
if (!providerId || oauthIds.has(providerId))
|
|
297360
|
+
continue;
|
|
297361
|
+
if (!byId.has(providerId)) {
|
|
297362
|
+
byId.set(providerId, formatProviderName(providerId));
|
|
297363
|
+
}
|
|
297364
|
+
}
|
|
297365
|
+
return Array.from(byId.entries()).map(([id, name]) => ({ id, name })).sort((a, b) => a.name.localeCompare(b.name));
|
|
297366
|
+
}
|
|
297367
|
+
|
|
297323
297368
|
// src/daemon.ts
|
|
297324
297369
|
import { existsSync as existsSync28, readFileSync as readFileSync24, unlinkSync as unlinkSync3, watch as watch3, writeFileSync as writeFileSync12 } from "node:fs";
|
|
297325
297370
|
import { join as join31 } from "node:path";
|
|
@@ -300562,15 +300607,7 @@ class WebChannel {
|
|
|
300562
300607
|
case "get_auth_providers": {
|
|
300563
300608
|
const oauthProviders = authStorage.getOAuthProviders();
|
|
300564
300609
|
const oauthIds = new Set(oauthProviders.map((p) => p.id));
|
|
300565
|
-
const apiKeyProviders =
|
|
300566
|
-
{ id: "anthropic", name: "Anthropic" },
|
|
300567
|
-
{ id: "openai", name: "OpenAI" },
|
|
300568
|
-
{ id: "google", name: "Google (Gemini)" },
|
|
300569
|
-
{ id: "xai", name: "xAI (Grok)" },
|
|
300570
|
-
{ id: "groq", name: "Groq" },
|
|
300571
|
-
{ id: "openrouter", name: "OpenRouter" },
|
|
300572
|
-
{ id: "mistral", name: "Mistral" }
|
|
300573
|
-
].filter((p) => !oauthIds.has(p.id));
|
|
300610
|
+
const apiKeyProviders = await this.getApiKeyProviders(oauthIds);
|
|
300574
300611
|
const providers = [
|
|
300575
300612
|
...oauthProviders.map((p) => ({
|
|
300576
300613
|
id: p.id,
|
|
@@ -300749,6 +300786,21 @@ class WebChannel {
|
|
|
300749
300786
|
});
|
|
300750
300787
|
}
|
|
300751
300788
|
}
|
|
300789
|
+
async getApiKeyProviders(oauthIds) {
|
|
300790
|
+
const dynamicProviderIds = new Set;
|
|
300791
|
+
try {
|
|
300792
|
+
const config = loadConfig();
|
|
300793
|
+
const discoverySession = await getOrCreateSession("web_auth_providers", config);
|
|
300794
|
+
const allModels = discoverySession.modelRegistry.getAll();
|
|
300795
|
+
for (const model of allModels) {
|
|
300796
|
+
if (model.provider)
|
|
300797
|
+
dynamicProviderIds.add(model.provider);
|
|
300798
|
+
}
|
|
300799
|
+
} catch (err) {
|
|
300800
|
+
console.warn(`[web] Failed to discover dynamic API key providers: ${err instanceof Error ? err.message : String(err)}`);
|
|
300801
|
+
}
|
|
300802
|
+
return buildApiKeyProviders(oauthIds, dynamicProviderIds);
|
|
300803
|
+
}
|
|
300752
300804
|
sendAuthEvent(ws2, _loginFlowId, event) {
|
|
300753
300805
|
const message = {
|
|
300754
300806
|
sessionId: "_auth",
|
|
@@ -301088,6 +301140,17 @@ Or edit ~/.clankie/clankie.json directly.
|
|
|
301088
301140
|
activeChannels = channels;
|
|
301089
301141
|
console.log("[daemon] Ready. Waiting for messages...");
|
|
301090
301142
|
}
|
|
301143
|
+
async function restartChannels() {
|
|
301144
|
+
console.log("[daemon] Config changed — restarting channels...");
|
|
301145
|
+
for (const ch of activeChannels) {
|
|
301146
|
+
await ch.stop().catch((err) => {
|
|
301147
|
+
console.error(`[daemon] Error stopping channel ${ch.name}:`, err);
|
|
301148
|
+
});
|
|
301149
|
+
}
|
|
301150
|
+
activeChannels = [];
|
|
301151
|
+
await initializeChannels();
|
|
301152
|
+
console.log("[daemon] Channels restarted.");
|
|
301153
|
+
}
|
|
301091
301154
|
async function startDaemon() {
|
|
301092
301155
|
writePidFile();
|
|
301093
301156
|
console.log(`[daemon] Starting clankie daemon (pid ${process.pid})...`);
|
|
@@ -301099,8 +301162,8 @@ async function startDaemon() {
|
|
|
301099
301162
|
if (debounceTimer)
|
|
301100
301163
|
clearTimeout(debounceTimer);
|
|
301101
301164
|
debounceTimer = setTimeout(() => {
|
|
301102
|
-
|
|
301103
|
-
console.error("[daemon]
|
|
301165
|
+
restartChannels().catch((err) => {
|
|
301166
|
+
console.error("[daemon] Channel restart failed:", err instanceof Error ? err.message : String(err));
|
|
301104
301167
|
});
|
|
301105
301168
|
}, 1000);
|
|
301106
301169
|
});
|
|
@@ -301165,12 +301228,9 @@ var SERVICE_NAME = "clankie";
|
|
|
301165
301228
|
var LAUNCHD_LABEL = "ai.clankie.daemon";
|
|
301166
301229
|
function resolveProgramArguments() {
|
|
301167
301230
|
const runtime = process.execPath || process.argv[0];
|
|
301168
|
-
const
|
|
301169
|
-
const
|
|
301170
|
-
|
|
301171
|
-
return [runtime, entry, "start", "--foreground"];
|
|
301172
|
-
}
|
|
301173
|
-
return [runtime, "start", "--foreground"];
|
|
301231
|
+
const thisFile = import.meta.filename;
|
|
301232
|
+
const cliEntry = thisFile.endsWith("service.ts") ? join32(dirname16(thisFile), "cli.ts") : join32(dirname16(thisFile), "cli.js");
|
|
301233
|
+
return [runtime, cliEntry, "start", "--foreground"];
|
|
301174
301234
|
}
|
|
301175
301235
|
function systemdUnitPath() {
|
|
301176
301236
|
return join32(homedir15(), ".config", "systemd", "user", `${SERVICE_NAME}.service`);
|
|
@@ -301559,20 +301619,26 @@ async function cmdChat(args) {
|
|
|
301559
301619
|
});
|
|
301560
301620
|
await mode.run();
|
|
301561
301621
|
}
|
|
301622
|
+
async function getApiKeyProvidersForLogin(oauthIds) {
|
|
301623
|
+
const dynamicProviderIds = new Set;
|
|
301624
|
+
try {
|
|
301625
|
+
const { session } = await createSession({ ephemeral: true });
|
|
301626
|
+
const allModels = session.modelRegistry.getAll();
|
|
301627
|
+
for (const model of allModels) {
|
|
301628
|
+
if (model.provider)
|
|
301629
|
+
dynamicProviderIds.add(model.provider);
|
|
301630
|
+
}
|
|
301631
|
+
} catch (err) {
|
|
301632
|
+
console.warn(`Warning: failed to discover dynamic providers: ${err instanceof Error ? err.message : String(err)}`);
|
|
301633
|
+
}
|
|
301634
|
+
return buildApiKeyProviders(oauthIds, dynamicProviderIds);
|
|
301635
|
+
}
|
|
301562
301636
|
async function cmdLogin(_args) {
|
|
301563
301637
|
const rl = readline3.createInterface({ input: process.stdin, output: process.stdout });
|
|
301564
301638
|
const authStorage = AuthStorage.create(getAuthPath2());
|
|
301565
301639
|
const oauthProviders = authStorage.getOAuthProviders();
|
|
301566
301640
|
const oauthIds = new Set(oauthProviders.map((p) => p.id));
|
|
301567
|
-
const apiKeyProviders =
|
|
301568
|
-
{ id: "anthropic", name: "Anthropic" },
|
|
301569
|
-
{ id: "openai", name: "OpenAI" },
|
|
301570
|
-
{ id: "google", name: "Google (Gemini)" },
|
|
301571
|
-
{ id: "xai", name: "xAI (Grok)" },
|
|
301572
|
-
{ id: "groq", name: "Groq" },
|
|
301573
|
-
{ id: "openrouter", name: "OpenRouter" },
|
|
301574
|
-
{ id: "mistral", name: "Mistral" }
|
|
301575
|
-
].filter((p) => !oauthIds.has(p.id));
|
|
301641
|
+
const apiKeyProviders = await getApiKeyProvidersForLogin(oauthIds);
|
|
301576
301642
|
const entries = [];
|
|
301577
301643
|
for (const p of oauthProviders) {
|
|
301578
301644
|
entries.push({ id: p.id, name: p.name, type: "oauth", hasAuth: authStorage.hasAuth(p.id) });
|
package/package.json
CHANGED
package/web-ui-dist/_shell.html
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>clankie — Personal AI Assistant</title><link rel="modulepreload" href="/assets/main-DUT2mAkp.js"/><link rel="modulepreload" href="/assets/index-QDWEB_Lf.js"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="stylesheet" href="/assets/styles-CdE1WgCk.css"/></head><body><div data-slot="sidebar-wrapper" style="--sidebar-width:16rem;--sidebar-width-icon:3rem" class="group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full"><div class="group peer text-sidebar-foreground hidden md:block" data-state="expanded" data-collapsible="" data-variant="inset" data-side="left" data-slot="sidebar"><div data-slot="sidebar-gap" class="transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"></div><div data-slot="sidebar-container" data-side="left" class="fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"><div data-sidebar="sidebar" data-slot="sidebar-inner" class="bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col"><div data-slot="sidebar-header" data-sidebar="header" class="gap-2 p-2 flex flex-col"><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-12 text-sm group-data-[collapsible=icon]:p-0! active" href="/" data-status="active" aria-current="page"><div class="flex items-center gap-2"><div class="flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 border border-primary/20"><span class="text-sm font-mono font-bold text-primary">c/</span></div><span class="text-base font-mono font-semibold tracking-tight">clankie</span></div></a></li></ul></div><div data-slot="sidebar-content" data-sidebar="content" class="no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden"><div data-slot="sidebar-group" data-sidebar="group" class="p-2 relative flex w-full min-w-0 flex-col"><div data-slot="sidebar-group-content" data-sidebar="group-content" class="text-sm w-full"><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><button type="button" id="base-ui-_R_6qb6_" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class="ring-sidebar-ring data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 h-8 text-sm bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground duration-200 ease-linear"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-plus" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M8 12h8"></path><path d="M12 8v8"></path></svg><span>Create Chat</span></button></li></ul></div></div><div data-slot="sidebar-group" data-sidebar="group" class="p-2 relative flex w-full min-w-0 flex-col group-data-[collapsible=icon]:hidden"><div data-slot="sidebar-group-label" data-sidebar="group-label" class="text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0">Recent Sessions</div><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-8 text-sm" disabled=""><span class="text-sidebar-foreground/70">No sessions yet</span></button></li></ul></div><div data-slot="sidebar-group" data-sidebar="group" class="p-2 relative flex w-full min-w-0 flex-col mt-auto"><div data-slot="sidebar-group-content" data-sidebar="group-content" class="text-sm w-full"><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" href="/settings" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-8 text-sm"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings" aria-hidden="true"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"></path><circle cx="12" cy="12" r="3"></circle></svg><span>Settings</span></a></li><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" href="/extensions" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-8 text-sm"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-puzzle" aria-hidden="true"><path d="M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"></path></svg><span>Extensions</span></a></li><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><div class="px-2 py-1.5"><span data-slot="badge" data-variant="secondary" class="h-5 gap-1 rounded-4xl border px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge [a]:hover:bg-secondary/80 bg-red-500/10 text-red-500 border-red-500/20 w-full justify-start"><div class="size-2 rounded-full mr-2 bg-red-500 "></div>Disconnected</span></div></li></ul></div></div></div></div></div></div><main data-slot="sidebar-inset" class="bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col"><div class="flex flex-1 flex-col overflow-hidden"><header class="flex h-14 shrink-0 items-center gap-2 border-b px-4"><button type="button" tabindex="0" data-slot="sidebar-trigger" data-sidebar="trigger" class="focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-panel-left" aria-hidden="true"><rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M9 3v18"></path></svg><span class="sr-only">Toggle Sidebar</span></button></header><!--$--><!--$--><!--/$--><script></script><!--/$--></div></main></div><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};
|
|
2
|
-
;$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/main-
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>clankie — Personal AI Assistant</title><link rel="modulepreload" href="/assets/main-UkFzTTck.js"/><link rel="modulepreload" href="/assets/index-CdxpJyJ4.js"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="stylesheet" href="/assets/styles-DAZ1IN1z.css"/></head><body><div data-slot="sidebar-wrapper" style="--sidebar-width:16rem;--sidebar-width-icon:3rem" class="group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full"><div class="group peer text-sidebar-foreground hidden md:block" data-state="expanded" data-collapsible="" data-variant="inset" data-side="left" data-slot="sidebar"><div data-slot="sidebar-gap" class="transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"></div><div data-slot="sidebar-container" data-side="left" class="fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"><div data-sidebar="sidebar" data-slot="sidebar-inner" class="bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col"><div data-slot="sidebar-header" data-sidebar="header" class="gap-2 p-2 flex flex-col"><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-12 text-sm group-data-[collapsible=icon]:p-0! active" href="/" data-status="active" aria-current="page"><div class="flex items-center gap-2"><div class="flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 border border-primary/20"><span class="text-sm font-mono font-bold text-primary">c/</span></div><span class="text-base font-mono font-semibold tracking-tight">clankie</span></div></a></li></ul></div><div data-slot="sidebar-content" data-sidebar="content" class="no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden"><div data-slot="sidebar-group" data-sidebar="group" class="p-2 relative flex w-full min-w-0 flex-col"><div data-slot="sidebar-group-content" data-sidebar="group-content" class="text-sm w-full"><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><button type="button" id="base-ui-_R_6qb6_" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class="ring-sidebar-ring data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 h-8 text-sm bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground duration-200 ease-linear"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-plus" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M8 12h8"></path><path d="M12 8v8"></path></svg><span>Create Chat</span></button></li></ul></div></div><div data-slot="sidebar-group" data-sidebar="group" class="p-2 relative flex w-full min-w-0 flex-col group-data-[collapsible=icon]:hidden"><div data-slot="sidebar-group-label" data-sidebar="group-label" class="text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0">Recent Sessions</div><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><button type="button" data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-8 text-sm" disabled=""><span class="text-sidebar-foreground/70">No sessions yet</span></button></li></ul></div><div data-slot="sidebar-group" data-sidebar="group" class="p-2 relative flex w-full min-w-0 flex-col mt-auto"><div data-slot="sidebar-group-content" data-sidebar="group-content" class="text-sm w-full"><ul data-slot="sidebar-menu" data-sidebar="menu" class="gap-0 flex w-full min-w-0 flex-col"><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" href="/settings" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-8 text-sm"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings" aria-hidden="true"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"></path><circle cx="12" cy="12" r="3"></circle></svg><span>Settings</span></a></li><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="default" href="/extensions" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-8 text-sm"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-puzzle" aria-hidden="true"><path d="M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"></path></svg><span>Extensions</span></a></li><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><div class="px-2 py-1.5"><span data-slot="badge" data-variant="secondary" class="h-5 gap-1 rounded-4xl border px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge [a]:hover:bg-secondary/80 bg-red-500/10 text-red-500 border-red-500/20 w-full justify-start"><div class="size-2 rounded-full mr-2 bg-red-500 "></div>Disconnected</span></div></li></ul></div></div></div></div></div></div><main data-slot="sidebar-inset" class="bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col"><div class="flex flex-1 flex-col overflow-hidden"><header class="flex h-14 shrink-0 items-center gap-2 border-b px-4"><button type="button" tabindex="0" data-slot="sidebar-trigger" data-sidebar="trigger" class="focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-panel-left" aria-hidden="true"><rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M9 3v18"></path></svg><span class="sr-only">Toggle Sidebar</span></button></header><!--$--><!--$--><!--/$--><script></script><!--/$--></div></main></div><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};
|
|
2
|
+
;$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/main-UkFzTTck.js"],assets:$R[5]=[$R[6]={tag:"script",attrs:$R[7]={type:"module",async:!0},children:"import(\"/assets/main-UkFzTTck.js\")"}]}}},matches:$R[8]=[$R[9]={i:"__root__",u:1772486127078,s:"success",ssr:!0}],lastMatchId:"__root__"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="">import("/assets/main-UkFzTTck.js")</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,S as T,m as u,q,A as z,r as x,p as L,j as e,H as E,L as B,B as p,C as j,s as g,t as f,P as R,v as N,w as v,F as d,I as H}from"./main-DUT2mAkp.js";import{F as V,a as $,C as G}from"./field-DndVA7U4.js";import{L as J}from"./loader-circle-CO83p2nq.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=b("circle-alert",K);const O=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],F=b("package",O);const Q=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],U=b("sparkles",Q),W={extensions:[],extensionErrors:[],skills:[],skillDiagnostics:[],isLoading:!1,installStatus:{isInstalling:!1,output:"",exitCode:null}},r=new T(W);function P(i){r.setState(t=>({...t,isLoading:i}))}function X(i,t){r.setState(c=>({...c,extensions:i,extensionErrors:t,isLoading:!1}))}function Y(i,t){r.setState(c=>({...c,skills:i,skillDiagnostics:t,isLoading:!1}))}function k(i){r.setState(t=>({...t,installStatus:{...t.installStatus,...i}}))}function Z(){r.setState(i=>({...i,installStatus:{isInstalling:!1,output:"",exitCode:null,error:void 0}}))}function te(){const{status:i}=u(q,s=>({status:s.status})),{activeSessionId:t}=u(z,s=>({activeSessionId:s.activeSessionId})),{extensions:c,extensionErrors:w,skills:S,skillDiagnostics:C,isLoading:A,installStatus:n}=u(r,s=>s),[o,M]=x.useState(""),[I,_]=x.useState(!1),m=i==="connected",h=x.useCallback(async()=>{const s=L.getClient();if(!(!s||!t)){P(!0);try{await s.reload(t);const[a,l]=await Promise.all([s.getExtensions(t),s.getSkills(t)]);X(a.extensions,a.errors),Y(l.skills,l.diagnostics)}catch(a){console.error("Failed to load extensions and skills:",a),P(!1)}}},[t]);x.useEffect(()=>{m&&t&&h()},[m,t,h]);const D=async()=>{const s=L.getClient();if(!(!s||!t||!o.trim())){k({isInstalling:!0,output:"",exitCode:null,error:void 0});try{const a=await s.installPackage(t,o.trim(),I);k({isInstalling:!1,output:a.output,exitCode:a.exitCode}),a.exitCode===0&&await h()}catch(a){k({isInstalling:!1,error:a instanceof Error?a.message:String(a)})}}};return m?A?e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("div",{className:"inline-flex gap-1 mb-2",children:[e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading extensions and skills..."})]})}):e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-4xl py-8 px-4 space-y-6",children:[e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"h-5 w-5"}),"Extensions"]}),e.jsx(N,{children:"Loaded extensions with their registered tools and commands"})]}),e.jsxs(v,{children:[w.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-destructive/50 bg-destructive/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-destructive mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-destructive",children:"Extension Load Errors"}),e.jsx("div",{className:"mt-2 space-y-2",children:w.map((s,a)=>e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-mono text-muted-foreground",children:s.path}),e.jsx("p",{className:"text-destructive",children:s.error})]},a))})]})]})}),c.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No extensions loaded."}):e.jsx("div",{className:"space-y-3",children:c.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium font-mono break-all",children:s.path}),s.resolvedPath!==s.path&&e.jsxs("p",{className:"text-xs text-muted-foreground font-mono mt-1 break-all",children:["→ ",s.resolvedPath]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.tools.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Tools:"}),s.tools.map(l=>e.jsx(d,{variant:"secondary",className:"text-xs",children:l},l))]}),s.commands.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Commands:"}),s.commands.map(l=>e.jsxs(d,{variant:"default",className:"text-xs",children:["/",l]},l))]}),s.flags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Flags:"}),s.flags.map(l=>e.jsxs(d,{variant:"outline",className:"text-xs",children:["--",l]},l))]}),s.shortcuts.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Shortcuts:"}),s.shortcuts.map(l=>e.jsx(d,{variant:"outline",className:"text-xs font-mono",children:l},l))]})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(U,{className:"h-5 w-5"}),"Skills"]}),e.jsx(N,{children:"Available skills for the agent"})]}),e.jsxs(v,{children:[C.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-yellow-500/50 bg-yellow-500/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-yellow-600 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-yellow-600",children:"Skill Diagnostics"}),e.jsx("div",{className:"mt-2 space-y-1",children:C.map((s,a)=>e.jsxs("p",{className:"text-xs text-yellow-700",children:[s.path&&e.jsxs("span",{className:"font-mono",children:[s.path,": "]}),s.message]},a))})]})]})}),S.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No skills loaded."}):e.jsx("div",{className:"space-y-3",children:S.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-start justify-between gap-2",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:s.name}),s.disableModelInvocation&&e.jsx(d,{variant:"outline",className:"text-xs",children:"Manual only"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description})]})}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[e.jsx("span",{className:"font-medium",children:"Source:"})," ",s.source]}),e.jsx("span",{children:"•"}),e.jsx("span",{className:"font-mono break-all",children:s.filePath})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-5 w-5"}),"Install Package"]}),e.jsx(N,{children:"Install a Pi package from npm, git, or a local path"})]}),e.jsxs(v,{className:"space-y-4",children:[e.jsxs(V,{children:[e.jsx($,{htmlFor:"package-source",children:"Package Source"}),e.jsx(H,{id:"package-source",type:"text",placeholder:"npm:@foo/bar@1.0.0, git:github.com/user/repo, or /path/to/package",value:o,onChange:s=>M(s.target.value),disabled:n.isInstalling}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Examples: ",e.jsx("code",{className:"text-xs",children:"npm:package-name"}),","," ",e.jsx("code",{className:"text-xs",children:"git:github.com/user/repo"}),","," ",e.jsx("code",{className:"text-xs",children:"/absolute/path"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"install-local",checked:I,onChange:s=>_(s.target.checked),disabled:n.isInstalling,className:"h-4 w-4"}),e.jsx("label",{htmlFor:"install-local",className:"text-sm cursor-pointer",children:"Install to project settings (.pi/settings.json) instead of global"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{onClick:D,disabled:n.isInstalling||!o.trim(),className:"flex-1",children:n.isInstalling?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"mr-2 h-4 w-4 animate-spin"}),"Installing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"mr-2 h-4 w-4"}),"Install"]})}),(n.output||n.error)&&e.jsx(p,{variant:"outline",onClick:Z,children:"Clear"})]}),n.error&&e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive",children:[e.jsx("p",{className:"font-medium",children:"Error"}),e.jsx("p",{className:"text-xs mt-1",children:n.error})]}),n.output&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center gap-2",children:n.exitCode===0?e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"h-4 w-4 text-green-600"}),e.jsx("p",{className:"text-sm font-medium text-green-600",children:"Installation Successful"})]}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4 text-destructive"}),e.jsxs("p",{className:"text-sm font-medium text-destructive",children:["Installation Failed (exit code: ",n.exitCode,")"]})]})}),e.jsx("div",{className:"rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap break-all max-h-60 overflow-y-auto",children:n.output})]})]})]})]})}):e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-4 max-w-md p-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-destructive/10 border border-destructive/20 mb-2",children:e.jsx(E,{className:"h-8 w-8 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Not Connected"}),e.jsx("p",{className:"text-muted-foreground",children:"Configure your connection to get started"})]}),e.jsx(B,{to:"/settings",children:e.jsxs(p,{className:"transition-transform hover:scale-105 active:scale-95",children:[e.jsx(E,{className:"mr-2 h-4 w-4"}),"Go to Settings"]})})]})})}export{te as component};
|
|
1
|
+
import{c as b,S as T,m as u,q,A as z,r as x,p as L,j as e,H as E,L as B,B as p,C as j,s as g,t as f,P as R,v as N,w as v,F as d,I as H}from"./main-UkFzTTck.js";import{F as V,a as $,C as G}from"./field-omFPry7c.js";import{L as J}from"./loader-circle-DJwIWnWV.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=b("circle-alert",K);const O=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],F=b("package",O);const Q=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],U=b("sparkles",Q),W={extensions:[],extensionErrors:[],skills:[],skillDiagnostics:[],isLoading:!1,installStatus:{isInstalling:!1,output:"",exitCode:null}},r=new T(W);function P(i){r.setState(t=>({...t,isLoading:i}))}function X(i,t){r.setState(c=>({...c,extensions:i,extensionErrors:t,isLoading:!1}))}function Y(i,t){r.setState(c=>({...c,skills:i,skillDiagnostics:t,isLoading:!1}))}function k(i){r.setState(t=>({...t,installStatus:{...t.installStatus,...i}}))}function Z(){r.setState(i=>({...i,installStatus:{isInstalling:!1,output:"",exitCode:null,error:void 0}}))}function te(){const{status:i}=u(q,s=>({status:s.status})),{activeSessionId:t}=u(z,s=>({activeSessionId:s.activeSessionId})),{extensions:c,extensionErrors:w,skills:S,skillDiagnostics:C,isLoading:A,installStatus:n}=u(r,s=>s),[o,M]=x.useState(""),[I,_]=x.useState(!1),m=i==="connected",h=x.useCallback(async()=>{const s=L.getClient();if(!(!s||!t)){P(!0);try{await s.reload(t);const[a,l]=await Promise.all([s.getExtensions(t),s.getSkills(t)]);X(a.extensions,a.errors),Y(l.skills,l.diagnostics)}catch(a){console.error("Failed to load extensions and skills:",a),P(!1)}}},[t]);x.useEffect(()=>{m&&t&&h()},[m,t,h]);const D=async()=>{const s=L.getClient();if(!(!s||!t||!o.trim())){k({isInstalling:!0,output:"",exitCode:null,error:void 0});try{const a=await s.installPackage(t,o.trim(),I);k({isInstalling:!1,output:a.output,exitCode:a.exitCode}),a.exitCode===0&&await h()}catch(a){k({isInstalling:!1,error:a instanceof Error?a.message:String(a)})}}};return m?A?e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("div",{className:"inline-flex gap-1 mb-2",children:[e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading extensions and skills..."})]})}):e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-4xl py-8 px-4 space-y-6",children:[e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"h-5 w-5"}),"Extensions"]}),e.jsx(N,{children:"Loaded extensions with their registered tools and commands"})]}),e.jsxs(v,{children:[w.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-destructive/50 bg-destructive/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-destructive mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-destructive",children:"Extension Load Errors"}),e.jsx("div",{className:"mt-2 space-y-2",children:w.map((s,a)=>e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-mono text-muted-foreground",children:s.path}),e.jsx("p",{className:"text-destructive",children:s.error})]},a))})]})]})}),c.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No extensions loaded."}):e.jsx("div",{className:"space-y-3",children:c.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium font-mono break-all",children:s.path}),s.resolvedPath!==s.path&&e.jsxs("p",{className:"text-xs text-muted-foreground font-mono mt-1 break-all",children:["→ ",s.resolvedPath]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.tools.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Tools:"}),s.tools.map(l=>e.jsx(d,{variant:"secondary",className:"text-xs",children:l},l))]}),s.commands.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Commands:"}),s.commands.map(l=>e.jsxs(d,{variant:"default",className:"text-xs",children:["/",l]},l))]}),s.flags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Flags:"}),s.flags.map(l=>e.jsxs(d,{variant:"outline",className:"text-xs",children:["--",l]},l))]}),s.shortcuts.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Shortcuts:"}),s.shortcuts.map(l=>e.jsx(d,{variant:"outline",className:"text-xs font-mono",children:l},l))]})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(U,{className:"h-5 w-5"}),"Skills"]}),e.jsx(N,{children:"Available skills for the agent"})]}),e.jsxs(v,{children:[C.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-yellow-500/50 bg-yellow-500/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-yellow-600 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-yellow-600",children:"Skill Diagnostics"}),e.jsx("div",{className:"mt-2 space-y-1",children:C.map((s,a)=>e.jsxs("p",{className:"text-xs text-yellow-700",children:[s.path&&e.jsxs("span",{className:"font-mono",children:[s.path,": "]}),s.message]},a))})]})]})}),S.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No skills loaded."}):e.jsx("div",{className:"space-y-3",children:S.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-start justify-between gap-2",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:s.name}),s.disableModelInvocation&&e.jsx(d,{variant:"outline",className:"text-xs",children:"Manual only"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description})]})}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[e.jsx("span",{className:"font-medium",children:"Source:"})," ",s.source]}),e.jsx("span",{children:"•"}),e.jsx("span",{className:"font-mono break-all",children:s.filePath})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-5 w-5"}),"Install Package"]}),e.jsx(N,{children:"Install a Pi package from npm, git, or a local path"})]}),e.jsxs(v,{className:"space-y-4",children:[e.jsxs(V,{children:[e.jsx($,{htmlFor:"package-source",children:"Package Source"}),e.jsx(H,{id:"package-source",type:"text",placeholder:"npm:@foo/bar@1.0.0, git:github.com/user/repo, or /path/to/package",value:o,onChange:s=>M(s.target.value),disabled:n.isInstalling}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Examples: ",e.jsx("code",{className:"text-xs",children:"npm:package-name"}),","," ",e.jsx("code",{className:"text-xs",children:"git:github.com/user/repo"}),","," ",e.jsx("code",{className:"text-xs",children:"/absolute/path"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"install-local",checked:I,onChange:s=>_(s.target.checked),disabled:n.isInstalling,className:"h-4 w-4"}),e.jsx("label",{htmlFor:"install-local",className:"text-sm cursor-pointer",children:"Install to project settings (.pi/settings.json) instead of global"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{onClick:D,disabled:n.isInstalling||!o.trim(),className:"flex-1",children:n.isInstalling?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"mr-2 h-4 w-4 animate-spin"}),"Installing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"mr-2 h-4 w-4"}),"Install"]})}),(n.output||n.error)&&e.jsx(p,{variant:"outline",onClick:Z,children:"Clear"})]}),n.error&&e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive",children:[e.jsx("p",{className:"font-medium",children:"Error"}),e.jsx("p",{className:"text-xs mt-1",children:n.error})]}),n.output&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center gap-2",children:n.exitCode===0?e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"h-4 w-4 text-green-600"}),e.jsx("p",{className:"text-sm font-medium text-green-600",children:"Installation Successful"})]}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4 text-destructive"}),e.jsxs("p",{className:"text-sm font-medium text-destructive",children:["Installation Failed (exit code: ",n.exitCode,")"]})]})}),e.jsx("div",{className:"rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap break-all max-h-60 overflow-y-auto",children:n.output})]})]})]})]})}):e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-4 max-w-md p-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-destructive/10 border border-destructive/20 mb-2",children:e.jsx(E,{className:"h-8 w-8 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Not Connected"}),e.jsx("p",{className:"text-muted-foreground",children:"Configure your connection to get started"})]}),e.jsx(B,{to:"/settings",children:e.jsxs(p,{className:"transition-transform hover:scale-105 active:scale-95",children:[e.jsx(E,{className:"mr-2 h-4 w-4"}),"Go to Settings"]})})]})})}export{te as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,j as t,f as l,J as r}from"./main-
|
|
1
|
+
import{c as o,j as t,f as l,J as r}from"./main-UkFzTTck.js";const i=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],f=o("circle-check-big",i);function s({className:a,...e}){return t.jsx("label",{"data-slot":"label",className:l("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",a),...e})}const c=r("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function u({className:a,orientation:e="vertical",...d}){return t.jsx("div",{role:"group","data-slot":"field","data-orientation":e,className:l(c({orientation:e}),a),...d})}function p({className:a,...e}){return t.jsx(s,{"data-slot":"field-label",className:l("has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",a),...e})}export{f as C,u as F,p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as o,m as a,q as l,A as d,r as m,j as s,H as c,L as x,B as u}from"./main-
|
|
1
|
+
import{K as o,m as a,q as l,A as d,r as m,j as s,H as c,L as x,B as u}from"./main-UkFzTTck.js";function h(){const i=o(),{status:r}=a(l,n=>({status:n.status})),{activeSessionId:e}=a(d,n=>({activeSessionId:n.activeSessionId})),t=r==="connected";return m.useEffect(()=>{t&&e&&(console.log(`[index] Redirecting to active session: ${e}`),i({to:"/sessions/$sessionId",params:{sessionId:e}}))},[e,t,i]),t?s.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:s.jsxs("div",{className:"text-center space-y-3",children:[s.jsxs("div",{className:"inline-flex gap-1 mb-2",children:[s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading sessions..."})]})}):s.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:s.jsxs("div",{className:"text-center space-y-4 max-w-md p-8",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-destructive/10 border border-destructive/20 mb-2",children:s.jsx(c,{className:"h-8 w-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-2xl font-semibold",children:"Not Connected"}),s.jsx("p",{className:"text-muted-foreground",children:"Configure your connection to get started"})]}),s.jsx(x,{to:"/settings",children:s.jsxs(u,{className:"transition-transform hover:scale-105 active:scale-95",children:[s.jsx(c,{className:"mr-2 h-4 w-4"}),"Go to Settings"]})})]})})}export{h as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./main-
|
|
1
|
+
import{c}from"./main-UkFzTTck.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
|