clankie 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +126 -2
- package/package.json +2 -1
- package/web-ui-dist/_shell.html +2 -2
- package/web-ui-dist/assets/_extensionId-jxWP2S13.js +1 -0
- package/web-ui-dist/assets/alert-dialog-BIIBYt2z.js +1 -0
- package/web-ui-dist/assets/arrow-left-CanF8kNl.js +1 -0
- package/web-ui-dist/assets/auth-FGn4O1eR.js +1 -0
- package/web-ui-dist/assets/{badge-B27MkVic.js → badge-c82-MNWk.js} +1 -1
- package/web-ui-dist/assets/check-BnrsKItJ.js +1 -0
- package/web-ui-dist/assets/{circle-x-Bek90N0j.js → circle-x-LHmDBdxQ.js} +1 -1
- package/web-ui-dist/assets/{connection-Bh7ctiLV.js → connection-CZpAjJDr.js} +1 -1
- package/web-ui-dist/assets/extensions-DtqBFgK5.js +1 -0
- package/web-ui-dist/assets/external-link-BCZG6eNB.js +1 -0
- package/web-ui-dist/assets/{field-Dy_c96vc.js → field-BbXq2X_c.js} +1 -1
- package/web-ui-dist/assets/{index-DTLVg2XM.js → index-BzsQtzuI.js} +1 -1
- package/web-ui-dist/assets/{index-DuhjveLi.js → index-DBVkPGaR.js} +1 -1
- package/web-ui-dist/assets/install-CwAS9woQ.js +1 -0
- package/web-ui-dist/assets/json-render-renderer-zeUDNNBW.js +107 -0
- package/web-ui-dist/assets/main-hpNDXGG3.js +35 -0
- package/web-ui-dist/assets/notifications-DJIu8YOc.js +1 -0
- package/web-ui-dist/assets/{scoped-models-D-DbdhBI.js → scoped-models-BFItu8Uw.js} +1 -1
- package/web-ui-dist/assets/search-Btit_lTh.js +1 -0
- package/web-ui-dist/assets/sessions._sessionId-BA13yM3i.js +25 -0
- package/web-ui-dist/assets/skills-ahbD1CnW.js +1 -0
- package/web-ui-dist/assets/styles-B-UYjSrN.css +1 -0
- package/web-ui-dist/assets/{theme-DfHdxP7k.js → theme-ComfoJ1q.js} +1 -1
- package/web-ui-dist/assets/auth-DxmWVlOj.js +0 -1
- package/web-ui-dist/assets/check-D2XSq1UZ.js +0 -1
- package/web-ui-dist/assets/extensions-S_3zi2ye.js +0 -1
- package/web-ui-dist/assets/extensions-dzmh5XjT.js +0 -1
- package/web-ui-dist/assets/json-render-renderer-BEA6E5Sp.js +0 -94
- package/web-ui-dist/assets/main-CKIteeQH.js +0 -35
- package/web-ui-dist/assets/notifications-CJ14tHG8.js +0 -1
- package/web-ui-dist/assets/sessions._sessionId-DpLOfRZu.js +0 -38
- package/web-ui-dist/assets/skills-suEsMWsc.js +0 -1
- package/web-ui-dist/assets/styles-CuRG0ztT.css +0 -1
package/dist/cli.js
CHANGED
|
@@ -279141,6 +279141,126 @@ var WebChannel = class {
|
|
|
279141
279141
|
}
|
|
279142
279142
|
};
|
|
279143
279143
|
}
|
|
279144
|
+
case "get_extension_details": {
|
|
279145
|
+
const extension = this.getExtensionDescriptor(session, command.extensionPath);
|
|
279146
|
+
if (!extension) return {
|
|
279147
|
+
id,
|
|
279148
|
+
type: "response",
|
|
279149
|
+
command: "get_extension_details",
|
|
279150
|
+
success: false,
|
|
279151
|
+
error: `Unknown extension: ${command.extensionPath}`
|
|
279152
|
+
};
|
|
279153
|
+
const cwd = this.getSessionCwd(session);
|
|
279154
|
+
const uiSpec = resolveExtensionUiSpec(extension);
|
|
279155
|
+
const config = getExtensionUiConfig(cwd, extension);
|
|
279156
|
+
const availableModels = await session.modelRegistry.getAvailable();
|
|
279157
|
+
const availableModelIds = ["(default session model)", ...Array.from(new Set(availableModels.map((model) => `${model.provider}/${model.id}`))).sort()];
|
|
279158
|
+
let readme;
|
|
279159
|
+
const extensionDir = extension.resolvedPath.startsWith("<inline:") ? void 0 : existsSync(extension.resolvedPath) && statSync(extension.resolvedPath).isDirectory() ? extension.resolvedPath : dirname(extension.resolvedPath);
|
|
279160
|
+
if (extensionDir) {
|
|
279161
|
+
const packageRoot = findPackageRoot(extensionDir);
|
|
279162
|
+
const readmeCandidates = [
|
|
279163
|
+
join(extensionDir, "README.md"),
|
|
279164
|
+
join(extensionDir, "readme.md"),
|
|
279165
|
+
...packageRoot ? [join(packageRoot, "README.md"), join(packageRoot, "readme.md")] : []
|
|
279166
|
+
];
|
|
279167
|
+
for (const candidate of readmeCandidates) if (existsSync(candidate)) try {
|
|
279168
|
+
readme = readFileSync(candidate, "utf8");
|
|
279169
|
+
break;
|
|
279170
|
+
} catch {}
|
|
279171
|
+
}
|
|
279172
|
+
const extensionSkills = session.resourceLoader.getSkills().skills.filter((skill) => {
|
|
279173
|
+
if (!extensionDir) return false;
|
|
279174
|
+
return skill.baseDir.startsWith(extensionDir) || skill.filePath.startsWith(extensionDir);
|
|
279175
|
+
}).map((skill) => ({
|
|
279176
|
+
name: skill.name,
|
|
279177
|
+
description: skill.description,
|
|
279178
|
+
filePath: skill.filePath
|
|
279179
|
+
}));
|
|
279180
|
+
const tools = Array.from(extension.tools.entries()).map(([name, tool]) => {
|
|
279181
|
+
const toolDef = tool;
|
|
279182
|
+
return {
|
|
279183
|
+
name,
|
|
279184
|
+
description: toolDef.description,
|
|
279185
|
+
inputSchema: toolDef.inputSchema
|
|
279186
|
+
};
|
|
279187
|
+
});
|
|
279188
|
+
const commands = Array.from(extension.commands.entries()).map(([name, cmd]) => {
|
|
279189
|
+
return {
|
|
279190
|
+
name,
|
|
279191
|
+
description: cmd.description
|
|
279192
|
+
};
|
|
279193
|
+
});
|
|
279194
|
+
const uiState = uiSpec ? {
|
|
279195
|
+
config: {
|
|
279196
|
+
...config,
|
|
279197
|
+
model: typeof config.model === "string" && config.model.trim().length > 0 ? config.model : "(default session model)"
|
|
279198
|
+
},
|
|
279199
|
+
availableModels: availableModelIds,
|
|
279200
|
+
extensionPath: extension.path
|
|
279201
|
+
} : void 0;
|
|
279202
|
+
return {
|
|
279203
|
+
id,
|
|
279204
|
+
type: "response",
|
|
279205
|
+
command: "get_extension_details",
|
|
279206
|
+
success: true,
|
|
279207
|
+
data: {
|
|
279208
|
+
path: extension.path,
|
|
279209
|
+
resolvedPath: extension.resolvedPath,
|
|
279210
|
+
readme,
|
|
279211
|
+
skills: extensionSkills,
|
|
279212
|
+
tools,
|
|
279213
|
+
commands,
|
|
279214
|
+
flags: Array.from(extension.flags.keys()),
|
|
279215
|
+
shortcuts: Array.from(extension.shortcuts.keys()),
|
|
279216
|
+
uiSpec,
|
|
279217
|
+
uiState
|
|
279218
|
+
}
|
|
279219
|
+
};
|
|
279220
|
+
}
|
|
279221
|
+
case "uninstall_extension": {
|
|
279222
|
+
const extension = this.getExtensionDescriptor(session, command.extensionPath);
|
|
279223
|
+
if (!extension) return {
|
|
279224
|
+
id,
|
|
279225
|
+
type: "response",
|
|
279226
|
+
command: "uninstall_extension",
|
|
279227
|
+
success: false,
|
|
279228
|
+
error: `Unknown extension: ${command.extensionPath}`
|
|
279229
|
+
};
|
|
279230
|
+
const config = loadConfig();
|
|
279231
|
+
const cwd = getWorkspace(config);
|
|
279232
|
+
const agentDir = getAgentDir(config);
|
|
279233
|
+
const packageManager = new DefaultPackageManager({
|
|
279234
|
+
cwd,
|
|
279235
|
+
agentDir,
|
|
279236
|
+
settingsManager: SettingsManager.create(cwd, agentDir)
|
|
279237
|
+
});
|
|
279238
|
+
try {
|
|
279239
|
+
if (!packageManager.removeSourceFromSettings(extension.path)) return {
|
|
279240
|
+
id,
|
|
279241
|
+
type: "response",
|
|
279242
|
+
command: "uninstall_extension",
|
|
279243
|
+
success: false,
|
|
279244
|
+
error: `Extension not found in settings: ${extension.path}`
|
|
279245
|
+
};
|
|
279246
|
+
await reloadAllSessions();
|
|
279247
|
+
return {
|
|
279248
|
+
id,
|
|
279249
|
+
type: "response",
|
|
279250
|
+
command: "uninstall_extension",
|
|
279251
|
+
success: true,
|
|
279252
|
+
data: { message: `Uninstalled ${extension.path}` }
|
|
279253
|
+
};
|
|
279254
|
+
} catch (err) {
|
|
279255
|
+
return {
|
|
279256
|
+
id,
|
|
279257
|
+
type: "response",
|
|
279258
|
+
command: "uninstall_extension",
|
|
279259
|
+
success: false,
|
|
279260
|
+
error: err instanceof Error ? err.message : "Unknown error during uninstall"
|
|
279261
|
+
};
|
|
279262
|
+
}
|
|
279263
|
+
}
|
|
279144
279264
|
case "get_extension_config": {
|
|
279145
279265
|
const extension = this.getExtensionDescriptor(session, command.extensionPath);
|
|
279146
279266
|
if (!extension) return {
|
|
@@ -279247,14 +279367,18 @@ var WebChannel = class {
|
|
|
279247
279367
|
try {
|
|
279248
279368
|
await packageManager.install(source, { local: local === true });
|
|
279249
279369
|
if (!packageManager.addSourceToSettings(source, { local: local === true })) output.push(`Package source already configured: ${source}`);
|
|
279250
|
-
|
|
279370
|
+
setTimeout(() => {
|
|
279371
|
+
reloadAllSessions().catch((reloadErr) => {
|
|
279372
|
+
console.error("[web] Failed to reload sessions after install:", reloadErr);
|
|
279373
|
+
});
|
|
279374
|
+
}, 0);
|
|
279251
279375
|
return {
|
|
279252
279376
|
id,
|
|
279253
279377
|
type: "response",
|
|
279254
279378
|
command: "install_package",
|
|
279255
279379
|
success: true,
|
|
279256
279380
|
data: {
|
|
279257
|
-
output: output.join("\n") || `Installed ${source}
|
|
279381
|
+
output: output.join("\n") || `Installed ${source}. Runtime reload scheduled.`,
|
|
279258
279382
|
exitCode: 0
|
|
279259
279383
|
}
|
|
279260
279384
|
};
|
package/package.json
CHANGED
package/web-ui-dist/_shell.html
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><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-CKIteeQH.js"/><link rel="modulepreload" href="/assets/index-DTLVg2XM.js"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="stylesheet" href="/assets/styles-CuRG0ztT.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)] border-r border-border/20"><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="p-2 flex flex-col gap-3 px-4 py-4"><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="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 text-sm group-data-[collapsible=icon]:p-0! h-10"><div class="flex items-center gap-3"><div class="flex items-center justify-center w-8 h-8 rounded-xl bg-primary/15 border border-primary/20"><span class="text-sm font-mono font-bold text-primary">c/</span></div><span class="text-lg font-mono font-semibold tracking-tight text-sidebar-foreground">clankie</span></div></button></li></ul><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_1phb6_" 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 p-2 text-left 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-10 text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground transition-all rounded-xl"><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 h-4 w-4 mr-1" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M8 12h8"></path><path d="M12 8v8"></path></svg><span>New Chat</span></button></li></ul></div><div data-slot="sidebar-content" data-sidebar="content" class="no-scrollbar flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden gap-2 px-2 py-2"><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 py-2"><div data-slot="sidebar-group-label" data-sidebar="group-label" class="ring-sidebar-ring h-8 rounded-md 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 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/40 px-3 py-2">Recent</div><ul data-slot="sidebar-menu" data-sidebar="menu" class="flex w-full min-w-0 flex-col gap-1 px-1"><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 text-sm h-12 opacity-40" disabled=""><span class="text-sm text-sidebar-foreground/40">No sessions yet</span></button></li></ul></div></div><div data-slot="sidebar-footer" data-sidebar="footer" class="gap-2 p-2 flex flex-col px-2 py-2"><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="/notifications" 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 p-2 text-left 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 h-10 text-sm rounded-xl transition-colors text-sidebar-foreground/70 hover:text-sidebar-foreground"><div class="relative flex items-center justify-center w-4"><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-bell h-4 w-4" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg></div><span>Notifications</span></a></li><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><button type="button" data-slot="dropdown-menu-trigger" 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 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 h-10 text-sm text-sidebar-foreground/70 hover:text-sidebar-foreground rounded-xl" tabindex="0" aria-haspopup="menu" id="base-ui-_R_1rhb6_"><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 h-4 w-4" 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></button></li></ul></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 flex w-full flex-1 flex-col relative min-h-0"><header class="topbar-glass sticky top-0 z-40 flex h-14 shrink-0 items-center border-b px-4 md:hidden"><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><div class="min-h-0 flex-1"><!--$--><!--$--><!--/$--><script></script><!--/$--></div></main></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><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"><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-hpNDXGG3.js"/><link rel="modulepreload" href="/assets/index-BzsQtzuI.js"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="stylesheet" href="/assets/styles-B-UYjSrN.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)] border-r border-border/20"><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="p-2 flex flex-col gap-3 px-4 py-4"><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="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 text-sm group-data-[collapsible=icon]:p-0! h-10"><div class="flex items-center gap-3"><div class="flex items-center justify-center w-8 h-8 rounded-xl bg-primary/15 border border-primary/20"><span class="text-sm font-mono font-bold text-primary">c/</span></div><span class="text-lg font-mono font-semibold tracking-tight text-sidebar-foreground">clankie</span></div></button></li></ul><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_1phb6_" 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 p-2 text-left 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-10 text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground transition-all rounded-xl"><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 h-4 w-4 mr-1" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M8 12h8"></path><path d="M12 8v8"></path></svg><span>New Chat</span></button></li></ul></div><div data-slot="sidebar-content" data-sidebar="content" class="no-scrollbar flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden gap-2 px-2 py-2"><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 py-2"><div data-slot="sidebar-group-label" data-sidebar="group-label" class="ring-sidebar-ring h-8 rounded-md 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 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/40 px-3 py-2">Recent</div><ul data-slot="sidebar-menu" data-sidebar="menu" class="flex w-full min-w-0 flex-col gap-1 px-1"><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 text-sm h-12 opacity-40" disabled=""><span class="text-sm text-sidebar-foreground/40">No sessions yet</span></button></li></ul></div></div><div data-slot="sidebar-footer" data-sidebar="footer" class="gap-2 p-2 flex flex-col px-2 py-2"><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="/notifications" 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 p-2 text-left 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 h-10 text-sm rounded-xl transition-colors text-sidebar-foreground/70 hover:text-sidebar-foreground"><div class="relative flex items-center justify-center w-4"><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-bell h-4 w-4" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg></div><span>Notifications</span></a></li><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><button type="button" data-slot="dropdown-menu-trigger" 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 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 h-10 text-sm text-sidebar-foreground/70 hover:text-sidebar-foreground rounded-xl" tabindex="0" aria-haspopup="menu" id="base-ui-_R_1rhb6_"><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 h-4 w-4" 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></button></li><li data-slot="sidebar-menu-item" data-sidebar="menu-item" class="group/menu-item relative"><button type="button" data-slot="dropdown-menu-trigger" 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 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 h-10 text-sm text-sidebar-foreground/70 hover:text-sidebar-foreground rounded-xl" tabindex="0" aria-haspopup="menu" id="base-ui-_R_1vhb6_"><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 h-4 w-4" 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></button></li></ul></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 flex w-full flex-1 flex-col relative min-h-0"><header class="topbar-glass sticky top-0 z-40 flex h-14 shrink-0 items-center border-b px-4 md:hidden"><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><div class="min-h-0 flex-1"><!--$--><!--$--><!--/$--><script></script><!--/$--></div></main></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><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-hpNDXGG3.js"],assets:$R[5]=[$R[6]={tag:"script",attrs:$R[7]={type:"module",async:!0},children:"import(\"/assets/main-hpNDXGG3.js\")"}]}}},matches:$R[8]=[$R[9]={i:"__root__",u:1772974120291,s:"success",ssr:!0}],lastMatchId:"__root__"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="">import("/assets/main-hpNDXGG3.js")</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as J,j as e,i as W,r as n,as as ke,at as we,au as _e,av as U,aw as te,ax as ae,ay as Me,az as Ee,aA as ze,aB as Le,aC as fe,aD as Ke,aE as He,aF as xe,aG as me,aH as Oe,aI as Be,aJ as Ve,aK as Fe,aL as Ye,aM as Ue,aN as ge,aO as We,aP as Ge,aQ as pe,aR as $e,aS as qe,aT as Je,aU as ne,aV as Xe,aW as Ze,aX as Z,aY as ie,aZ as Qe,a_ as et,a$ as tt,b0 as be,b1 as re,b2 as at,b3 as st,b4 as nt,b5 as it,b6 as rt,b7 as ot,b8 as lt,b9 as de,ba as ct,bb as dt,a3 as ut,bc as ht,p as ft,u as oe,q as xt,s as mt,H as gt,bd as pt,be as bt,d as le,J as ve,ao as vt,t as jt,C as je,B as ce,O as Nt,T as yt,aq as Ct,S as It,h as F,k as Y,x as $,y as q,v as kt,N as Ne}from"./main-hpNDXGG3.js";import{A as wt,h as Mt,a as Et,b as Rt,c as Tt,d as St,e as At,g as Pt,f as Dt}from"./alert-dialog-BIIBYt2z.js";import{B}from"./badge-c82-MNWk.js";import{y as _t,z as zt,A as Lt,W as ye,M as Kt,b as Ht,J as Ot}from"./json-render-renderer-zeUDNNBW.js";import{A as Ce}from"./arrow-left-CanF8kNl.js";const Bt=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Vt=J("book-open",Bt);const Ft=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Yt=J("code-xml",Ft);const Ut=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Wt=J("command",Ut);const Gt=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],$t=J("flag",Gt);const qt=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],Jt=J("keyboard",qt);function Xt({...a}){return e.jsx(_t,{"data-slot":"collapsible",...a})}function Zt({className:a,...o}){return e.jsx(zt,{"data-slot":"collapsible-trigger",className:W("",a),...o})}function Qt({className:a,...o}){return e.jsx(Lt,{"data-slot":"collapsible-content",className:W("overflow-hidden",a),...o})}const Re=n.createContext(void 0);function ue(){const a=n.useContext(Re);if(a===void 0)throw new Error(ke(64));return a}let ea=(function(a){return a.activationDirection="data-activation-direction",a.orientation="data-orientation",a})({});const he={tabActivationDirection:a=>({[ea.activationDirection]:a})},ta=n.forwardRef(function(o,f){const{className:h,defaultValue:c=0,onValueChange:t,orientation:u="horizontal",render:M,value:v,...w}=o,j=we(),E=Object.hasOwn(o,"defaultValue"),N=n.useRef([]),[T,r]=n.useState(()=>new Map),[b,y]=_e({controlled:v,default:c,name:"Tabs",state:"value"}),I=v!==void 0,[x,m]=n.useState(()=>new Map),[s,d]=n.useState("none"),p=U((l,k)=>{t?.(l,k),!k.isCanceled&&(y(l),d(k.activationDirection))}),C=U((l,k)=>{r(g=>{if(g.get(l)===k)return g;const P=new Map(g);return P.set(l,k),P})}),S=U((l,k)=>{r(g=>{if(!g.has(l)||g.get(l)!==k)return g;const P=new Map(g);return P.delete(l),P})}),i=n.useCallback(l=>T.get(l),[T]),R=n.useCallback(l=>{for(const k of x.values())if(l===k?.value)return k?.id},[x]),_=n.useCallback(l=>{if(l===void 0)return null;for(const[k,g]of x.entries())if(g!=null&&l===(g.value??g.index))return k;return null},[x]),D=n.useMemo(()=>({direction:j,getTabElementBySelectedValue:_,getTabIdByPanelValue:R,getTabPanelIdByValue:i,onValueChange:p,orientation:u,registerMountedTabPanel:C,setTabMap:m,unregisterMountedTabPanel:S,tabActivationDirection:s,value:b}),[j,_,R,i,p,u,C,m,S,s,b]),A=n.useMemo(()=>{for(const l of x.values())if(l!=null&&l.value===b)return l},[x,b]),L=n.useMemo(()=>{for(const l of x.values())if(l!=null&&!l.disabled)return l.value},[x]);te(()=>{if(I||x.size===0)return;const l=A?.disabled,k=A==null&&b!==null;if(E&&l&&b===c||!l&&!k)return;const P=L??null;b!==P&&(y(P),d("none"))},[c,L,E,I,A,d,y,x,b]);const K=ae("div",o,{state:{orientation:u,tabActivationDirection:s},ref:f,props:w,stateAttributesMapping:he});return e.jsx(Re.Provider,{value:D,children:e.jsx(Me,{elementsRef:N,children:K})})}),Te="data-composite-item-active",Se=n.createContext(void 0);function aa(){const a=n.useContext(Se);if(a===void 0)throw new Error(ke(65));return a}const sa=n.forwardRef(function(o,f){const{className:h,disabled:c=!1,render:t,value:u,id:M,nativeButton:v=!0,...w}=o,{value:j,getTabPanelIdByValue:E,orientation:N}=ue(),{activateOnFocus:T,highlightedTabIndex:r,onTabActivation:b,setHighlightedTabIndex:y,tabsListElement:I}=aa(),x=Ee(M),m=n.useMemo(()=>({disabled:c,id:x,value:u}),[c,x,u]),{compositeProps:s,compositeRef:d,index:p}=ze({metadata:m}),C=u===j,S=n.useRef(!1);te(()=>{if(S.current){S.current=!1;return}if(!(C&&p>-1&&r!==p))return;const g=I;if(g!=null){const P=Le(fe(g));if(P&&Ke(g,P))return}c||y(p)},[C,p,r,y,c,I]);const{getButtonProps:i,buttonRef:R}=He({disabled:c,native:v,focusableWhenDisabled:!0}),_=E(u),D=n.useRef(!1),A=n.useRef(!1);function L(g){C||c||b(u,xe(me,g.nativeEvent,void 0,{activationDirection:"none"}))}function z(g){C||(p>-1&&!c&&y(p),!c&&T&&(!D.current||D.current&&A.current)&&b(u,xe(me,g.nativeEvent,void 0,{activationDirection:"none"})))}function K(g){if(C||c)return;D.current=!0;function P(){D.current=!1,A.current=!1}(!g.button||g.button===0)&&(A.current=!0,fe(g.currentTarget).addEventListener("pointerup",P,{once:!0}))}return ae("button",o,{state:{disabled:c,active:C,orientation:N},ref:[f,R,d],props:[s,{role:"tab","aria-controls":_,"aria-selected":C,id:x,onClick:L,onFocus:z,onPointerDown:K,[Te]:C?"":void 0,onKeyDownCapture(){S.current=!0}},w,i]})});let na=(function(a){return a.index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a})({});const ia={...he,...Ye},ra=n.forwardRef(function(o,f){const{className:h,value:c,render:t,keepMounted:u=!1,...M}=o,{value:v,getTabIdByPanelValue:w,orientation:j,tabActivationDirection:E,registerMountedTabPanel:N,unregisterMountedTabPanel:T}=ue(),r=Ee(),b=n.useMemo(()=>({id:r,value:c}),[r,c]),{ref:y,index:I}=Oe({metadata:b}),x=c===v,{mounted:m,transitionStatus:s,setMounted:d}=Be(x),p=!m,C=w(c),S={hidden:p,orientation:j,tabActivationDirection:E,transitionStatus:s},i=n.useRef(null),R=ae("div",o,{state:S,ref:[f,y,i],props:[{"aria-labelledby":C,hidden:p,id:r,role:"tabpanel",tabIndex:x?0:-1,inert:Ve(!x),[na.index]:I},M],stateAttributesMapping:ia});return Fe({open:x,ref:i,onComplete(){x||d(!1)}}),te(()=>{if(!(p&&!u)&&r!=null)return N(c,r),()=>{T(c,r)}},[p,u,c,r,N,T]),u||m?R:null});function oa(a){return a==null||a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true"}const la=[];function ca(a){const{itemSizes:o,cols:f=1,loopFocus:h=!0,dense:c=!1,orientation:t="both",direction:u,highlightedIndex:M,onHighlightedIndexChange:v,rootRef:w,enableHomeAndEndKeys:j=!1,stopEventPropagation:E=!1,disabledIndices:N,modifierKeys:T=la}=a,[r,b]=n.useState(0),y=f>1,I=n.useRef(null),x=Ue(I,w),m=n.useRef([]),s=n.useRef(!1),d=M??r,p=U((i,R=!1)=>{if((v??b)(i),R){const _=m.current[i];ge(I.current,_,u,t)}}),C=U(i=>{if(i.size===0||s.current)return;s.current=!0;const R=Array.from(i.keys()),_=R.find(A=>A?.hasAttribute(Te))??null,D=_?R.indexOf(_):-1;D!==-1&&p(D),ge(I.current,_,u,t)}),S=n.useMemo(()=>({"aria-orientation":t==="both"?void 0:t,ref:x,onFocus(i){!I.current||!pe(i.target)||i.target.setSelectionRange(0,i.target.value.length??0)},onKeyDown(i){const R=j?We:Ge;if(!R.has(i.key)||da(i,T)||!I.current)return;const D=u==="rtl",A=D?be:ie,L={horizontal:A,vertical:Z,both:A}[t],z=D?ie:be,K={horizontal:z,vertical:re,both:z}[t];if(pe(i.target)&&!oa(i.target)){const V=i.target.selectionStart,H=i.target.selectionEnd,se=i.target.value??"";if(V==null||i.shiftKey||V!==H||i.key!==K&&V<se.length||i.key!==L&&V>0)return}let l=d;const k=$e(m,N),g=qe(m,N);if(y){const V=o||Array.from({length:m.current.length},()=>({width:1,height:1})),H=Je(V,f,c),se=H.findIndex(O=>O!=null&&!ne(m,O,N)),Pe=H.reduce((O,G,De)=>G!=null&&!ne(m,G,N)?De:O,-1);l=H[Xe({current:H.map(O=>O?m.current[O]:null)},{event:i,orientation:t,loopFocus:h,cols:f,disabledIndices:Qe([...N||m.current.map((O,G)=>ne(m,G)?G:void 0),void 0],H),minIndex:se,maxIndex:Pe,prevIndex:Ze(d>g?k:d,V,H,f,i.key===Z?"bl":i.key===ie?"tr":"tl"),rtl:D})]}const P={horizontal:[A],vertical:[Z],both:[A,Z]}[t],X={horizontal:[z],vertical:[re],both:[z,re]}[t],Ae=y?R:{horizontal:j?rt:ot,vertical:j?nt:it,both:R}[t];j&&(i.key===et?l=k:i.key===tt&&(l=g)),l===d&&(P.includes(i.key)||X.includes(i.key))&&(h&&l===g&&P.includes(i.key)?l=k:h&&l===k&&X.includes(i.key)?l=g:l=at(m,{startingIndex:l,decrement:X.includes(i.key),disabledIndices:N})),l!==d&&!st(m,l)&&(E&&i.stopPropagation(),Ae.has(i.key)&&i.preventDefault(),p(l,!0),queueMicrotask(()=>{m.current[l]?.focus()}))}}),[f,c,u,N,m,j,d,y,o,h,x,T,p,t,E]);return n.useMemo(()=>({props:S,highlightedIndex:d,onHighlightedIndexChange:p,elementsRef:m,disabledIndices:N,onMapChange:C,relayKeyboardEvent:S.onKeyDown}),[S,d,p,m,N,C])}function da(a,o){for(const f of lt.values())if(!o.includes(f)&&a.getModifierState(f))return!0;return!1}function ua(a){const{render:o,className:f,refs:h=de,props:c=de,state:t=ct,stateAttributesMapping:u,highlightedIndex:M,onHighlightedIndexChange:v,orientation:w,dense:j,itemSizes:E,loopFocus:N,cols:T,enableHomeAndEndKeys:r,onMapChange:b,stopEventPropagation:y=!0,rootRef:I,disabledIndices:x,modifierKeys:m,highlightItemOnHover:s=!1,tag:d="div",...p}=a,C=we(),{props:S,highlightedIndex:i,onHighlightedIndexChange:R,elementsRef:_,onMapChange:D,relayKeyboardEvent:A}=ca({itemSizes:E,cols:T,loopFocus:N,dense:j,orientation:w,highlightedIndex:M,onHighlightedIndexChange:v,rootRef:I,stopEventPropagation:y,enableHomeAndEndKeys:r,direction:C,disabledIndices:x,modifierKeys:m}),L=ae(d,a,{state:t,ref:h,props:[S,...c,p],stateAttributesMapping:u}),z=n.useMemo(()=>({highlightedIndex:i,onHighlightedIndexChange:R,highlightItemOnHover:s,relayKeyboardEvent:A}),[i,R,s,A]);return e.jsx(dt.Provider,{value:z,children:e.jsx(Me,{elementsRef:_,onMapChange:K=>{b?.(K),D(K)},children:L})})}const ha=n.forwardRef(function(o,f){const{activateOnFocus:h=!1,className:c,loopFocus:t=!0,render:u,...M}=o,{getTabElementBySelectedValue:v,onValueChange:w,orientation:j,value:E,setTabMap:N,tabActivationDirection:T}=ue(),[r,b]=n.useState(0),[y,I]=n.useState(null),x=fa(E,j,y,v),m=U((C,S)=>{if(C!==E){const i=x(C);S.activationDirection=i,w(C,S)}}),s={orientation:j,tabActivationDirection:T},d={"aria-orientation":j==="vertical"?"vertical":void 0,role:"tablist"},p=n.useMemo(()=>({activateOnFocus:h,highlightedTabIndex:r,onTabActivation:m,setHighlightedTabIndex:b,tabsListElement:y,value:E}),[h,r,m,b,y,E]);return e.jsx(Se.Provider,{value:p,children:e.jsx(ua,{render:u,className:c,state:s,refs:[f,I],props:[d,M],stateAttributesMapping:he,highlightedIndex:r,enableHomeAndEndKeys:!0,loopFocus:t,orientation:j,onHighlightedIndexChange:b,onMapChange:N,disabledIndices:de})})});function Ie(a,o){const{left:f,top:h}=a.getBoundingClientRect(),{left:c,top:t}=o.getBoundingClientRect(),u=f-c,M=h-t;return{left:u,top:M}}function fa(a,o,f,h){const[c,t]=n.useState(null);return te(()=>{if(a==null||f==null){t(null);return}const u=h(a);if(u==null){t(null);return}const{left:M,top:v}=Ie(u,f);t(o==="horizontal"?M:v)},[o,h,f,a]),n.useCallback(u=>{if(u===a)return"none";if(u==null)return t(null),"none";if(u!=null&&f!=null){const M=h(u);if(M!=null){const{left:v,top:w}=Ie(M,f);if(c==null)return t(o==="horizontal"?v:w),"none";if(o==="horizontal"){if(v<c)return t(v),"left";if(v>c)return t(v),"right"}else{if(w<c)return t(w),"up";if(w>c)return t(w),"down"}}}return"none"},[h,o,c,f,a])}function xa({className:a,orientation:o="horizontal",...f}){return e.jsx(ta,{"data-slot":"tabs","data-orientation":o,className:W("gap-2 group/tabs flex data-horizontal:flex-col",a),...f})}const ma=ut("rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function ga({className:a,variant:o="default",...f}){return e.jsx(ha,{"data-slot":"tabs-list","data-variant":o,className:W(ma({variant:o}),a),...f})}function Q({className:a,...o}){return e.jsx(sa,{"data-slot":"tabs-trigger",className:W("gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",a),...o})}function ee({className:a,...o}){return e.jsx(ra,{"data-slot":"tabs-content",className:W("text-sm flex-1 outline-none",a),...o})}function ya(){const{extensionId:a}=ht.useParams(),o=ft(),{status:f}=oe(xt,s=>({status:s.status})),{activeSessionId:h}=oe(mt,s=>({activeSessionId:s.activeSessionId})),{extensions:c}=oe(gt,s=>({extensions:s.extensions})),[t,u]=n.useState(null),[M,v]=n.useState(!0),[w,j]=n.useState(null),[E,N]=n.useState(!1),T=f==="connected",r=n.useMemo(()=>{const s=decodeURIComponent(a);return c.find(d=>d.path===s||d.resolvedPath===s||encodeURIComponent(d.path)===a)},[c,a]),b=n.useMemo(()=>r?pt(r.path,r.resolvedPath):"Extension",[r]),y=n.useMemo(()=>r?bt(r):"packages",[r]),I=n.useCallback(async()=>{const s=le.getClient();if(!(!s||!h||!r)){v(!0),j(null);try{const d=await s.getExtensionDetails(h,r.path);u(d)}catch(d){j(d instanceof Error?d.message:"Failed to load extension details")}finally{v(!1)}}},[h,r]),x=n.useCallback(async()=>{const s=le.getClient();if(!(!s||!h)){ve(!0);try{const{extensions:d,errors:p}=await s.getExtensions(h);vt(d,p)}catch(d){console.error("Failed to load extensions:",d)}finally{ve(!1)}}},[h]),m=n.useCallback(async()=>{const s=le.getClient();if(!(!s||!h||!r)){N(!0);try{await s.uninstallExtension(h,r.path),await x(),o({to:"/extensions/install"})}catch(d){j(d instanceof Error?d.message:"Failed to uninstall extension")}finally{N(!1)}}},[h,r,x,o]);return n.useEffect(()=>{T&&h&&r&&I()},[T,h,r,I]),T?r?M?e.jsx("div",{className:"h-full flex 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 extension details..."})]})}):e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-5xl py-8 px-4 space-y-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{variant:"ghost",size:"icon-sm",onClick:()=>o({to:"/extensions/install"}),children:e.jsx(Ce,{className:"h-4 w-4"})}),e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:b}),e.jsx(B,{variant:"outline",className:"capitalize",children:y})]}),e.jsx("p",{className:"text-sm text-muted-foreground font-mono truncate max-w-xl",children:r.path})]}),y==="packages"&&e.jsxs(wt,{children:[e.jsx(Mt,{render:e.jsx(ce,{variant:"destructive",size:"sm",disabled:E,children:E?e.jsx(Nt,{className:"h-4 w-4 animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(yt,{className:"h-4 w-4 mr-2"}),"Uninstall"]})})}),e.jsxs(Et,{children:[e.jsxs(Rt,{children:[e.jsx(Tt,{children:"Uninstall Extension"}),e.jsxs(St,{children:['Are you sure you want to uninstall "',b,'"? This will remove it from your clankie configuration.']})]}),e.jsxs(At,{children:[e.jsx(Pt,{children:"Cancel"}),e.jsx(Dt,{onClick:m,children:"Uninstall"})]})]})]})]}),w&&e.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(je,{className:"h-4 w-4 text-destructive mt-0.5"}),e.jsx("p",{className:"text-sm text-destructive",children:w})]})}),e.jsxs(xa,{defaultValue:t?.readme?"readme":"overview",className:"space-y-4",children:[e.jsxs(ga,{children:[t?.readme&&e.jsxs(Q,{value:"readme",className:"flex items-center gap-2",children:[e.jsx(Vt,{className:"h-4 w-4"}),"README"]}),e.jsxs(Q,{value:"overview",className:"flex items-center gap-2",children:[e.jsx(Ct,{className:"h-4 w-4"}),"Overview"]}),t?.tools&&t.tools.length>0&&e.jsxs(Q,{value:"tools",className:"flex items-center gap-2",children:[e.jsx(ye,{className:"h-4 w-4"}),"Tools (",t.tools.length,")"]}),t?.uiSpec&&e.jsxs(Q,{value:"config",className:"flex items-center gap-2",children:[e.jsx(It,{className:"h-4 w-4"}),"Configuration"]})]}),t?.readme&&e.jsx(ee,{value:"readme",children:e.jsx(F,{className:"card-depth",children:e.jsx(Y,{className:"pt-6 prose prose-sm dark:prose-invert max-w-none",children:e.jsx(Kt,{children:t.readme})})})}),e.jsxs(ee,{value:"overview",className:"space-y-4",children:[e.jsxs(F,{className:"card-depth",children:[e.jsx($,{children:e.jsx(q,{className:"text-base",children:"Path Information"})}),e.jsx(Y,{className:"space-y-3",children:e.jsxs("div",{className:"rounded-md bg-muted/20 p-3 text-xs",children:[e.jsx("p",{className:"uppercase tracking-wide text-muted-foreground",children:"Path"}),e.jsx("p",{className:"mt-1 font-mono break-all",children:r.path}),r.resolvedPath!==r.path&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-2 uppercase tracking-wide text-muted-foreground",children:"Resolved"}),e.jsx("p",{className:"mt-1 font-mono break-all",children:r.resolvedPath})]})]})})]}),t?.skills&&t.skills.length>0&&e.jsxs(F,{className:"card-depth",children:[e.jsx($,{children:e.jsxs(q,{className:"text-base flex items-center gap-2",children:[e.jsx(kt,{className:"h-4 w-4"}),"Skills",e.jsx(B,{variant:"outline",className:"ml-auto",children:t.skills.length})]})}),e.jsx(Y,{className:"space-y-2",children:t.skills.map(s=>e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsx("p",{className:"font-medium text-sm",children:s.name}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description}),e.jsx("p",{className:"text-xs text-muted-foreground font-mono mt-2 truncate",children:s.filePath})]},s.name))})]}),t?.commands&&t.commands.length>0&&e.jsxs(F,{className:"card-depth",children:[e.jsx($,{children:e.jsxs(q,{className:"text-base flex items-center gap-2",children:[e.jsx(Wt,{className:"h-4 w-4"}),"Commands",e.jsx(B,{variant:"outline",className:"ml-auto",children:t.commands.length})]})}),e.jsx(Y,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:t.commands.map(s=>e.jsxs("div",{className:"group relative",children:[e.jsxs(B,{variant:"default",children:["/",s.name]}),s.description&&e.jsx("div",{className:"absolute bottom-full left-0 mb-1 hidden group-hover:block z-10 w-48 p-2 text-xs bg-popover border rounded-md shadow-md",children:s.description})]},s.name))})})]}),(t?.flags&&t.flags.length>0||t?.shortcuts&&t.shortcuts.length>0)&&e.jsx(F,{className:"card-depth",children:e.jsxs(Y,{className:"pt-6 space-y-4",children:[t?.flags&&t.flags.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[e.jsx($t,{className:"h-4 w-4"}),"Flags",e.jsx(B,{variant:"outline",className:"text-[10px]",children:t.flags.length})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.flags.map(s=>e.jsxs(B,{variant:"outline",children:["--",s]},s))})]}),t?.shortcuts&&t.shortcuts.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[e.jsx(Jt,{className:"h-4 w-4"}),"Shortcuts",e.jsx(B,{variant:"outline",className:"text-[10px]",children:t.shortcuts.length})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.shortcuts.map(s=>e.jsx(B,{variant:"outline",className:"font-mono",children:s},s))})]})]})})]}),t?.tools&&t.tools.length>0&&e.jsx(ee,{value:"tools",className:"space-y-4",children:t.tools.map(s=>e.jsx(Xt,{children:e.jsxs(F,{className:"card-depth",children:[e.jsx(Zt,{className:"w-full text-left",children:e.jsxs($,{className:"py-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(q,{className:"text-base flex items-center gap-2",children:[e.jsx(ye,{className:"h-4 w-4"}),s.name]}),e.jsx(Ht,{className:"h-4 w-4 text-muted-foreground transition-transform data-[state=open]:rotate-180"})]}),s.description&&e.jsx(Ne,{className:"text-left",children:s.description})]})}),s.inputSchema&&e.jsx(Qt,{children:e.jsx(Y,{className:"pt-0",children:e.jsxs("div",{className:"rounded-md bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-muted-foreground mb-2",children:[e.jsx(Yt,{className:"h-3 w-3"}),"Input Schema"]}),e.jsx("pre",{className:"text-xs overflow-auto",children:JSON.stringify(s.inputSchema,null,2)})]})})})]})},s.name))}),t?.uiSpec&&h&&e.jsx(ee,{value:"config",children:e.jsxs(F,{className:"card-depth",children:[e.jsxs($,{children:[e.jsx(q,{className:"text-base",children:"Extension Configuration"}),e.jsx(Ne,{children:"Configure this extension's settings"})]}),e.jsx(Y,{children:e.jsx(Ot,{spec:t.uiSpec,sessionId:h,extensionPath:r.path,initialState:t.uiState,onConfigSaved:I})})]})})]})]})}):e.jsx("div",{className:"h-full flex 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-muted border mb-2",children:e.jsx(je,{className:"h-8 w-8 text-muted-foreground"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Extension Not Found"}),e.jsx("p",{className:"text-muted-foreground",children:"The extension you're looking for doesn't exist or isn't installed."}),e.jsxs(ce,{variant:"outline",onClick:()=>o({to:"/extensions/install"}),children:[e.jsx(Ce,{className:"h-4 w-4 mr-2"}),"Back to Extensions"]})]})]})}):e.jsx("div",{className:"h-full flex 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(jt,{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:"Connect to clankie to view extension details"})]})]})})}export{ya as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as x,bf as C,as as v,az as B,bg as k,aE as E,bh as N,bi as O,ax as S,bj as _,bk as M,bl as F,bm as G,bn as V,j as o,bo as q,bp as H,i as s,bq as K,br as L,B as h,bs as U,bt as W,bu as J}from"./main-hpNDXGG3.js";const Q=x.forwardRef(function(e,r){const{render:l,className:b,disabled:i=!1,nativeButton:p=!0,id:f,payload:d,handle:m,...g}=e,u=C(!0),a=m?.store??u?.store;if(!a)throw new Error(v(79));const n=B(f),c=a.useState("floatingRootContext"),j=a.useState("isOpenedByTrigger",n),D=x.useRef(null),{registerTrigger:R,isMountedByThisTrigger:T}=k(n,D,a,{payload:d}),{getButtonProps:P,buttonRef:I}=E({disabled:i,native:p}),z=N(c,{enabled:c!=null}),A=O([z]),w={disabled:i,open:j},y=a.useState("triggerProps",T);return S("button",e,{state:w,ref:[I,r,R,D],props:[A.getReferenceProps(),y,{[_]:"",id:n},g,P],stateAttributesMapping:M})});function X(t){const{children:e,open:r,defaultOpen:l=!1,onOpenChange:b,onOpenChangeComplete:i,actionsRef:p,handle:f,triggerId:d,defaultTriggerId:m=null}=t,g=C(),u=!!g,a=F(()=>f?.store??new G({open:l,openProp:r,activeTriggerId:m,triggerIdProp:d,modal:!0,disablePointerDismissal:!0,nested:u,role:"alertdialog"})).current;a.useControlledProp("openProp",r),a.useControlledProp("triggerIdProp",d),a.useSyncedValue("nested",u),a.useContextCallback("onOpenChange",b),a.useContextCallback("onOpenChangeComplete",i);const n=a.useState("payload");V({store:a,actionsRef:p,parentContext:g?.store.context});const c=x.useMemo(()=>({store:a}),[a]);return o.jsx(q.Provider,{value:c,children:typeof e=="function"?e({payload:n}):e})}function tt({...t}){return o.jsx(X,{"data-slot":"alert-dialog",...t})}function et({...t}){return o.jsx(Q,{"data-slot":"alert-dialog-trigger",...t})}function Y({...t}){return o.jsx(W,{"data-slot":"alert-dialog-portal",...t})}function Z({className:t,...e}){return o.jsx(J,{"data-slot":"alert-dialog-overlay",className:s("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",t),...e})}function at({className:t,size:e="default",...r}){return o.jsxs(Y,{children:[o.jsx(Z,{}),o.jsx(H,{"data-slot":"alert-dialog-content","data-size":e,className:s("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",t),...r})]})}function ot({className:t,...e}){return o.jsx("div",{"data-slot":"alert-dialog-header",className:s("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),...e})}function rt({className:t,...e}){return o.jsx("div",{"data-slot":"alert-dialog-footer",className:s("bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),...e})}function st({className:t,...e}){return o.jsx(K,{"data-slot":"alert-dialog-title",className:s("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),...e})}function nt({className:t,...e}){return o.jsx(L,{"data-slot":"alert-dialog-description",className:s("text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",t),...e})}function lt({className:t,...e}){return o.jsx(h,{"data-slot":"alert-dialog-action",className:s(t),...e})}function it({className:t,variant:e="outline",size:r="default",...l}){return o.jsx(U,{"data-slot":"alert-dialog-cancel",className:s(t),render:o.jsx(h,{variant:e,size:r}),...l})}export{tt as A,at as a,ot as b,st as c,nt as d,rt as e,lt as f,it as g,et as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o}from"./main-hpNDXGG3.js";const e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],r=o("arrow-left",e);export{r as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as I,u as f,Y as L,r as d,Z as E,j as e,d as m,O as j,B as h,V as y,q as _,_ as z,$ as v,s as O,a0 as B,h as A,x as C,y as b,N as R,k as F,K as T,a1 as $,a2 as U}from"./main-hpNDXGG3.js";import{A as V,a as Y,b as q,c as H,d as X,e as Z,f as G,g as J}from"./alert-dialog-BIIBYt2z.js";import{F as N,a as k}from"./field-BbXq2X_c.js";import{E as Q}from"./external-link-BCZG6eNB.js";import{C as w}from"./circle-x-LHmDBdxQ.js";import{B as W}from"./badge-c82-MNWk.js";const ee=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],se=I("circle-check-big",ee);const te=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],S=I("shield",te);function ae({open:s,onOpenChange:i}){const{loginFlow:t}=f(L,c=>({loginFlow:c.loginFlow}));if(d.useEffect(()=>{!s&&t&&E()},[s,t]),d.useEffect(()=>{if(s&&t?.status==="complete"&&t.success===!0){const c=setTimeout(()=>{i(!1)},1500);return()=>clearTimeout(c)}},[s,t,i]),!t)return null;const o=()=>{t.loginFlowId&&t.status!=="complete"&&t.status!=="error"&&m.getClient()?.authLoginCancel(t.loginFlowId),i(!1)},r=()=>{i(!1)};return e.jsx(V,{open:s,onOpenChange:i,children:e.jsxs(Y,{children:[e.jsxs(q,{children:[e.jsx(H,{children:t.status==="complete"&&t.success?"Login Successful":t.status==="error"?"Login Failed":`Sign in to ${t.providerId}`}),e.jsx(X,{children:e.jsx(ie,{flow:t})})]}),e.jsx(Z,{children:t.status==="complete"||t.status==="error"?e.jsx(G,{onClick:r,children:"Close"}):e.jsx(J,{onClick:o,children:"Cancel"})})]})})}function ie({flow:s}){const i=m.getClient(),t=d.useRef(null),o=c=>{s.loginFlowId&&i&&i.authLoginInput(s.loginFlowId,c)},r=c=>{s.loginFlowId&&i&&i.authLoginInput(s.loginFlowId,c)};return d.useEffect(()=>{s.status==="waiting_url"&&s.url&&t.current!==s.url&&(t.current=s.url,window.open(s.url,"_blank"))},[s.status,s.url]),s.status==="idle"?e.jsxs("div",{className:"flex items-center gap-3 py-4",children:[e.jsx(j,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:"Starting login..."})]}):s.status==="waiting_url"&&s.url?e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(j,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:"Complete the authentication in your browser..."})]}),s.instructions&&e.jsx("p",{className:"text-xs text-muted-foreground rounded-md bg-muted p-2",children:s.instructions}),e.jsxs(h,{onClick:()=>window.open(s.url,"_blank"),className:"w-full",variant:"outline",size:"sm",children:[e.jsx(Q,{className:"mr-2 h-4 w-4"}),"Open in Browser"]}),s.showManualInput&&e.jsx(ne,{onSubmit:o}),s.progressMessage&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(j,{className:"h-3 w-3 animate-spin"}),e.jsx("span",{children:s.progressMessage})]})]}):s.status==="waiting_input"&&s.promptMessage?e.jsx("div",{className:"py-4",children:e.jsx(re,{message:s.promptMessage,placeholder:s.promptPlaceholder,onSubmit:r})}):s.status==="in_progress"?e.jsxs("div",{className:"flex items-center gap-3 py-4",children:[e.jsx(j,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:s.progressMessage||"Completing authentication..."})]}):s.status==="complete"&&s.success?e.jsxs("div",{className:"flex items-center gap-3 py-4 text-green-600",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsxs("span",{className:"text-sm",children:["Successfully authenticated with ",s.providerId]})]}):s.status==="error"||s.status==="complete"&&!s.success?e.jsxs("div",{className:"space-y-2 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3 text-destructive",children:[e.jsx(w,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-medium",children:"Authentication failed"})]}),s.error&&e.jsx("p",{className:"text-xs text-muted-foreground rounded-md bg-muted p-2",children:s.error})]}):null}function ne({onSubmit:s}){const i=t=>{t.preventDefault();const r=new FormData(t.currentTarget).get("code");r?.trim()&&s(r.trim())};return e.jsx("form",{onSubmit:i,className:"space-y-2",children:e.jsxs(N,{children:[e.jsx(k,{htmlFor:"manual-code",children:"Or paste the authorization code/URL here:"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{id:"manual-code",name:"code",type:"text",placeholder:"Paste code or redirect URL",className:"flex-1"}),e.jsx(h,{type:"submit",size:"sm",children:"Submit"})]})]})})}function re({message:s,placeholder:i,onSubmit:t}){const o=r=>{r.preventDefault();const u=new FormData(r.currentTarget).get("prompt-value");u?.trim()&&t(u.trim())};return e.jsxs("form",{onSubmit:o,className:"space-y-3",children:[e.jsx("p",{className:"text-sm",children:s}),e.jsx(N,{children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(y,{id:"prompt-value",name:"prompt-value",type:"text",placeholder:i||"Enter value",className:"flex-1",autoFocus:!0}),e.jsx(h,{type:"submit",size:"sm",children:"Submit"})]})})]})}function pe(){const{status:s}=f(_,t=>({status:t.status}));return s==="connected"?e.jsx(ce,{}):e.jsx("div",{className:"h-full flex 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(S,{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:"Connect to clankie to manage AI provider authentication"})]})]})})}function ce(){const{providers:s,isLoadingProviders:i,loginFlow:t}=f(L,a=>({providers:a.providers,isLoadingProviders:a.isLoadingProviders,loginFlow:a.loginFlow})),[o,r]=d.useState(!1),[c,u]=d.useState(null),[p,g]=d.useState(""),x=d.useCallback(async()=>{const a=m.getClient();if(a){z(!0);try{const{providers:n}=await a.getAuthProviders();v(n)}catch(n){console.error("Failed to load auth providers:",n),v([])}}},[]);d.useEffect(()=>{x()},[x]),d.useEffect(()=>{if(t?.status==="complete"&&t.success===!0){x();const{activeSessionId:a}=O.state;if(a){const n=m.getClient();n&&n.getAvailableModels(a).then(({models:l})=>{B(l),console.log("[settings/auth] Refreshed available models after OAuth login")}).catch(l=>{console.error("[settings/auth] Failed to refresh available models:",l)})}}},[t?.status,t?.success,x]);const P=async a=>{const n=m.getClient();if(n)try{const{loginFlowId:l}=await n.authLogin(a);U(l,a),r(!0)}catch(l){console.error("Failed to start login:",l)}},D=a=>{u(a),g("")},K=async a=>{const n=m.getClient();if(!(!n||!p.trim()))try{await n.authSetApiKey(a,p.trim()),u(null),g(""),await x()}catch(l){console.error("Failed to save API key:",l)}},M=async a=>{const n=m.getClient();if(n)try{await n.authLogout(a),await x()}catch(l){console.error("Failed to logout:",l)}};return e.jsxs("div",{className:"h-full overflow-y-auto chat-background",children:[e.jsxs("div",{className:"container max-w-2xl py-8 px-4",children:[e.jsxs(A,{className:"card-depth",children:[e.jsxs(C,{children:[e.jsx(b,{children:"AI Provider Authentication"}),e.jsx(R,{children:"Configure authentication for AI providers (OpenAI, Anthropic, etc.)"})]}),e.jsx(F,{children:i?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(j,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No providers available. Make sure clankie is configured with at least one AI provider."}):e.jsx("div",{className:"space-y-3",children:s.map(a=>e.jsx(le,{provider:a,isEditing:c===a.id,apiKeyValue:p,onApiKeyChange:g,onLogin:()=>a.type==="oauth"?P(a.id):D(a.id),onSaveApiKey:()=>K(a.id),onCancelApiKey:()=>u(null),onLogout:()=>M(a.id)},a.id))})})]}),e.jsxs(A,{className:"mt-4 card-depth",children:[e.jsx(C,{children:e.jsx(b,{children:"About Provider Authentication"})}),e.jsxs(F,{className:"space-y-3 text-sm text-muted-foreground",children:[e.jsx("p",{children:"AI providers require authentication to access their APIs. You can authenticate using:"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"OAuth"})," - Browser-based authentication flow for supported providers"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"API Key"})," - Direct API key entry for providers that support it"]})]}),e.jsx("p",{className:"text-xs",children:"Your credentials are stored securely by clankie and are never shared with the web UI."})]})]})]}),e.jsx(ae,{open:o,onOpenChange:r})]})}function le({provider:s,isEditing:i,apiKeyValue:t,onApiKeyChange:o,onLogin:r,onSaveApiKey:c,onCancelApiKey:u,onLogout:p}){return e.jsx("div",{className:"rounded-lg border p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h4",{className:"font-medium",children:s.name}),e.jsx(W,{variant:s.type==="oauth"?"default":"secondary",className:"text-xs",children:s.type==="oauth"?e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"h-3 w-3 mr-1"}),"OAuth"]}):e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"h-3 w-3 mr-1"}),"API Key"]})}),s.hasAuth?e.jsx($,{className:"h-4 w-4 text-green-600"}):e.jsx(w,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.hasAuth?"Authenticated":"Not configured"}),i&&s.type==="apikey"&&e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs(N,{children:[e.jsx(k,{htmlFor:`api-key-${s.id}`,children:"API Key"}),e.jsx(y,{id:`api-key-${s.id}`,type:"password",placeholder:"Enter API key",value:t,onChange:g=>o(g.target.value),autoFocus:!0})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{size:"sm",onClick:c,disabled:!t.trim(),children:"Save"}),e.jsx(h,{size:"sm",variant:"outline",onClick:u,children:"Cancel"})]})]})]}),!i&&e.jsx("div",{className:"flex gap-2",children:s.hasAuth?e.jsx(h,{size:"sm",variant:"outline",onClick:p,children:"Logout"}):e.jsx(h,{size:"sm",onClick:r,children:"Login"})})]})})}export{pe as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bL as a,bM as n,i as d,a3 as s}from"./main-hpNDXGG3.js";const o=s("h-5 gap-1 rounded-4xl border border-transparent 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 justify-center w-fit 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",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function g({className:r,variant:e="default",render:t,...i}){return a({defaultTagName:"span",props:n({className:d(o({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{g as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c}from"./main-hpNDXGG3.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./main-
|
|
1
|
+
import{c}from"./main-hpNDXGG3.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],o=c("circle-x",e);export{o as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as S,q as w,r,j as e,h as d,x as h,y as x,
|
|
1
|
+
import{u as S,q as w,r,j as e,h as d,x as h,y as x,N as y,k as u,V as m,B as c,L as T,S as F,W as j,d as p}from"./main-hpNDXGG3.js";import{F as k,a as g}from"./field-BbXq2X_c.js";function A(){const{settings:o,status:l}=S(w,t=>({settings:t.settings,status:t.status})),[a,b]=r.useState(o.url),[n,v]=r.useState(o.authToken),s=l==="connected",i=l==="connecting",C=()=>{j({url:a,authToken:n})},N=()=>{j({url:a,authToken:n}),p.connect()},f=()=>{p.disconnect()};return e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-2xl py-8 px-4",children:[e.jsxs(d,{className:"card-depth",children:[e.jsxs(h,{children:[e.jsx(x,{children:"Connection Settings"}),e.jsx(y,{children:"Configure the WebSocket connection to your clankie instance"})]}),e.jsxs(u,{className:"space-y-4",children:[e.jsxs(k,{children:[e.jsx(g,{htmlFor:"ws-url",children:"WebSocket URL"}),e.jsx(m,{id:"ws-url",type:"text",placeholder:"ws://localhost:3100",value:a,onChange:t=>b(t.target.value),disabled:s})]}),e.jsxs(k,{children:[e.jsx(g,{htmlFor:"auth-token",children:"Auth Token"}),e.jsx(m,{id:"auth-token",type:"password",placeholder:"Enter your authentication token",value:n,onChange:t=>v(t.target.value),disabled:s}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Set with:"," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5",children:'clankie config set channels.web.authToken "your-token"'})]})]}),e.jsx("div",{className:"flex gap-2 pt-2",children:s?e.jsx(c,{variant:"destructive",onClick:f,children:"Disconnect"}):e.jsxs(e.Fragment,{children:[e.jsx(c,{onClick:N,disabled:i||!n,children:i?"Connecting...":"Connect"}),e.jsx(c,{variant:"outline",onClick:C,disabled:i,children:"Save"})]})}),!n&&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:"Auth token required"}),e.jsx("p",{className:"text-xs mt-1",children:"Configure the token in clankie and enter it above to connect."})]})]})]}),e.jsxs(d,{className:"mt-4 card-depth",children:[e.jsx(h,{children:e.jsx(x,{children:"Setup Instructions"})}),e.jsxs(u,{className:"space-y-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"1. Enable the web channel in clankie"}),e.jsxs("code",{className:"block mt-1 rounded bg-muted p-2 text-xs",children:['clankie config set channels.web.authToken "your-secret-token"',e.jsx("br",{}),"clankie config set channels.web.port 3100"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"2. Start the clankie daemon"}),e.jsx("code",{className:"block mt-1 rounded bg-muted p-2 text-xs",children:"clankie start"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"3. Enter the token above and connect"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"The web-ui will connect to ws://localhost:3100 by default"})]})]})]}),!s&&e.jsx("div",{className:"mt-4 text-center",children:e.jsx(T,{to:"/settings",children:e.jsxs(c,{variant:"outline",children:[e.jsx(F,{className:"mr-2 h-4 w-4"}),"Back to Settings"]})})})]})})}export{A as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=()=>null;export{n as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a}from"./main-hpNDXGG3.js";const e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],n=a("external-link",e);export{n as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,i as l,
|
|
1
|
+
import{j as t,i as l,a3 as o}from"./main-hpNDXGG3.js";function r({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 i=o("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 n({className:a,orientation:e="vertical",...d}){return t.jsx("div",{role:"group","data-slot":"field","data-orientation":e,className:l(i({orientation:e}),a),...d})}function f({className:a,...e}){return t.jsx(r,{"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{n as F,f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as o,u as a,q as l,s as d,r as m,j as s,S as c,L as x,B as u}from"./main-
|
|
1
|
+
import{p as o,u as a,q as l,s as d,r as m,j as s,S as c,L as x,B as u}from"./main-hpNDXGG3.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{j as e,P as r,G as o,K as a,F as c,t as l,v as d,L as h,h as n,k as t,w as m,x,y as p}from"./main-
|
|
1
|
+
import{j as e,P as r,G as o,K as a,F as c,t as l,v as d,L as h,h as n,k as t,w as m,x,y as p}from"./main-hpNDXGG3.js";const u=[{id:"theme",title:"Appearance",description:"Choose your theme and color mode preference",icon:r,href:"/settings/theme"},{id:"connection",title:"Connection",description:"Configure WebSocket connection to your clankie instance",icon:o,href:"/settings/connection"},{id:"auth",title:"Auth Providers",description:"Manage AI provider authentication (OpenAI, Anthropic, etc.)",icon:a,href:"/settings/auth"},{id:"scoped-models",title:"Scoped Models",description:"Choose which models are available in the model selector",icon:c,href:"/settings/scoped-models"},{id:"extensions",title:"Extensions",description:"View loaded extensions and their tools and commands",icon:l,href:"/settings/extensions"},{id:"skills",title:"Skills",description:"Browse available skills for the agent",icon:d,href:"/settings/skills"}];function j(){return e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-2xl py-8 px-4",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your clankie configuration"})]}),e.jsx("div",{className:"space-y-3",children:u.map(s=>{const i=s.icon;return e.jsx(h,{to:s.href,children:e.jsx(n,{className:"card-depth hover:border-primary/50 transition-colors cursor-pointer group",children:e.jsx(t,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10 group-hover:bg-primary/20 transition-colors",children:e.jsx(i,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-medium",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description})]}),e.jsx(m,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors"})]})})})},s.id)})}),e.jsxs(n,{className:"mt-6 card-depth",children:[e.jsx(x,{children:e.jsx(p,{children:"Quick Tips"})}),e.jsxs(t,{className:"space-y-3 text-sm text-muted-foreground",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Installing packages:"})," Use Settings → Extensions install panel (recommended), or ask the AI to use",e.jsx("code",{className:"mx-1",children:"manage_packages"}),"."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Connection:"})," Make sure clankie is running and the web channel is enabled."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Authentication:"})," Configure at least one AI provider to start using the agent."]})]})]})]})})}export{j as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as h,q as M,s as O,H as T,r,d as C,J as I,ao as z,ap as m,j as e,t as S,h as E,k as P,aq as H,V as L,B as g,O as F,ar as q,x as U,y as $,N as J}from"./main-hpNDXGG3.js";import{B as j}from"./badge-c82-MNWk.js";import{S as _}from"./search-Btit_lTh.js";import{C as A}from"./check-BnrsKItJ.js";import{E as G}from"./external-link-BCZG6eNB.js";const K=[{name:"Memory",packageName:"npm:@clankie/memory",description:"Persistent memory with TursoDB native vector search for clankie. Store and retrieve context across sessions.",author:"clankie",category:"productivity",tags:["memory","vector-search","persistence"]},{name:"Web Search",packageName:"npm:@clankie/web-search",description:"Headless web search and page extraction using CloakBrowser + Playwright. Search the web and extract content.",author:"clankie",category:"integration",tags:["search","web","browser"]},{name:"Sandbox",packageName:"npm:@clankie/sandbox",description:"Gondolin micro-VM sandbox — runs agent tools inside an isolated VM with network policies, secret injection, and filesystem isolation.",author:"clankie",category:"utility",tags:["sandbox","security","isolation"]},{name:"JSON UI Render",packageName:"npm:@clankie/json-ui-render",description:"Render structured chat UI via details.renderHint and details.uiSpec. Create rich interactive components.",author:"clankie",category:"development",tags:["ui","render","components"]}],W={productivity:"bg-blue-500/10 text-blue-500 border-blue-500/20",development:"bg-purple-500/10 text-purple-500 border-purple-500/20",integration:"bg-green-500/10 text-green-500 border-green-500/20",utility:"bg-orange-500/10 text-orange-500 border-orange-500/20"};function se(){const{status:B}=h(M,s=>({status:s.status})),{activeSessionId:i}=h(O,s=>({activeSessionId:s.activeSessionId})),{extensions:N}=h(T,s=>({extensions:s.extensions})),[c,D]=r.useState(""),[o,f]=r.useState(""),[x,y]=r.useState(null),[t,d]=r.useState(null),R=B==="connected",V=r.useCallback(s=>N.some(a=>a.path.includes(s.replace("npm:","").replace("@","").replace("/","-"))||a.path===s),[N]),b=r.useCallback(async()=>{const s=C.getClient();if(!(!s||!i)){I(!0);try{await s.reload(i);const{extensions:a,errors:l}=await s.getExtensions(i);z(a,l)}catch(a){console.error("Failed to load extensions:",a),m.warning("Installed, but failed to refresh extension list"),I(!1)}}},[i]),p=r.useCallback(async s=>{const a=C.getClient();if(!a||!i)return;y(s),d({output:`Installing ${s}...`});const l=m.loading(`Installing ${s}...`);try{const n=await a.installPackage(i,s,!1);d({output:n.output,exitCode:n.exitCode}),m.success(`Installed ${s}`,{id:l,description:"Refreshing extensions…"}),b().catch(u=>{console.error("Failed to refresh extensions after install:",u)})}catch(n){const u=n instanceof Error?n.message:"Failed to install package",w=u.includes("Request timeout")?"Install request timed out. The package may still be installing in the background.":u;d({error:w,exitCode:1}),m.error(`Failed to install ${s}`,{id:l,description:w})}finally{y(null)}},[i,b]),k=r.useCallback(async()=>{const s=o.trim();if(!s){d({error:"Package source is required"}),m.error("Package source is required");return}await p(s),f("")},[p,o]),v=K.filter(s=>c===""||s.name.toLowerCase().includes(c.toLowerCase())||s.description.toLowerCase().includes(c.toLowerCase())||s.tags?.some(a=>a.toLowerCase().includes(c.toLowerCase())));return R?e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-5xl py-8 px-4 space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:"Install Extensions"}),e.jsx("p",{className:"text-muted-foreground",children:"Discover and install extensions to enhance your clankie experience"})]}),e.jsx(E,{className:"card-depth border-primary/20 bg-primary/5",children:e.jsxs(P,{className:"pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:e.jsx(H,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"flex-1 space-y-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium mb-1",children:"Install from Package"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Install any npm package or git repository"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Installs can take a while; the UI waits up to 5 minutes before timing out."})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(L,{value:o,onChange:s=>f(s.target.value),placeholder:"npm:@foo/pi-tools or git:github.com/user/repo",disabled:x!==null,className:"flex-1",onKeyDown:s=>s.key==="Enter"&&k()}),e.jsx(g,{onClick:k,disabled:x!==null||!o.trim(),children:x===o?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"h-4 w-4 mr-2 animate-spin"}),"Installing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(q,{className:"h-4 w-4 mr-2"}),"Install"]})})]})]})]}),t&&e.jsxs("div",{className:"rounded-md border bg-background/70 p-3 space-y-2",children:[t.error&&e.jsx("p",{className:"text-xs text-destructive",children:t.error}),t.output&&e.jsx("pre",{className:"text-xs whitespace-pre-wrap font-mono text-muted-foreground",children:t.output}),t.exitCode!==null&&t.exitCode!==void 0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Exit code: ",t.exitCode]}),e.jsx(g,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>d(null),children:"Clear output"})]})]})}),e.jsxs(E,{className:"card-depth",children:[e.jsxs(U,{children:[e.jsxs($,{className:"flex items-center gap-2",children:[e.jsx(S,{className:"h-5 w-5"}),"Curated Extensions"]}),e.jsx(J,{children:"Popular and recommended extensions for clankie"})]}),e.jsxs(P,{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(_,{className:"h-4 w-4 text-muted-foreground absolute left-3 top-1/2 -translate-y-1/2"}),e.jsx(L,{value:c,onChange:s=>D(s.target.value),placeholder:"Search extensions...",className:"pl-9"})]}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:v.map(s=>{const a=V(s.packageName),l=x===s.packageName;return e.jsxs("div",{className:"rounded-lg border bg-card/40 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-semibold truncate",children:s.name}),e.jsx(j,{variant:"outline",className:W[s.category],children:s.category})]}),s.author&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["by ",s.author]})]}),a?e.jsxs(j,{variant:"default",className:"shrink-0",children:[e.jsx(A,{className:"h-3 w-3 mr-1"}),"Installed"]}):e.jsx(g,{size:"sm",variant:"outline",onClick:()=>p(s.packageName),disabled:l,className:"shrink-0",children:l?e.jsx(F,{className:"h-4 w-4 animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(q,{className:"h-4 w-4 mr-1"}),"Install"]})})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:s.description}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("div",{className:"flex flex-wrap gap-1",children:s.tags?.map(n=>e.jsx(j,{variant:"secondary",className:"text-[10px]",children:n},n))}),s.url&&e.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-primary flex items-center gap-1",children:[e.jsx(G,{className:"h-3 w-3"}),"View"]})]})]},s.packageName)})}),v.length===0&&e.jsx("div",{className:"text-center py-8",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"No extensions match your search."})})]})]})]})}):e.jsx("div",{className:"h-full flex 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(S,{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:"Connect to clankie to install extensions"})]})]})})}export{se as component};
|