clankie 0.6.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/cli.js +163 -6
  2. package/package.json +2 -1
  3. package/skills/clankie-admin/SKILL.md +64 -0
  4. package/web-ui-dist/_shell.html +2 -2
  5. package/web-ui-dist/assets/{auth-CszIWbjg.js → auth-B9O56j8p.js} +1 -1
  6. package/web-ui-dist/assets/{badge-n982dtcJ.js → badge-CFXQDPlY.js} +1 -1
  7. package/web-ui-dist/assets/check-D-vykl4i.js +1 -0
  8. package/web-ui-dist/assets/{circle-x-8a_H31zB.js → circle-x-DXPT4pz6.js} +1 -1
  9. package/web-ui-dist/assets/{connection-CJ5rxoTn.js → connection-yciJazNP.js} +1 -1
  10. package/web-ui-dist/assets/extensions-COhAmsTM.js +1 -0
  11. package/web-ui-dist/assets/extensions-OUCiAY5C.js +1 -0
  12. package/web-ui-dist/assets/{field-B65zDnKR.js → field-BbqZG4RJ.js} +1 -1
  13. package/web-ui-dist/assets/{index-BPe4bC0P.js → index-DDPzWyca.js} +1 -1
  14. package/web-ui-dist/assets/{index-DagqCCaE.js → index-r9_5oSFI.js} +1 -1
  15. package/web-ui-dist/assets/{json-render-renderer-LfYi54yN.js → json-render-renderer-BcrsT8Ur.js} +1 -1
  16. package/web-ui-dist/assets/{main-DLbCrY1P.js → main-D1-MPeAM.js} +3 -3
  17. package/web-ui-dist/assets/{scoped-models-Dn75_0eE.js → scoped-models-C9IkaHnT.js} +1 -1
  18. package/web-ui-dist/assets/{sessions._sessionId-BMqy9VwK.js → sessions._sessionId-D9fk3HTP.js} +1 -1
  19. package/web-ui-dist/assets/{skills-DZkToxg_.js → skills-DYeJYRTs.js} +1 -1
  20. package/web-ui-dist/assets/styles-C4OT29Wk.css +1 -0
  21. package/web-ui-dist/assets/{theme-g799ir3H.js → theme-D4lx1WJW.js} +1 -1
  22. package/web-ui-dist/assets/check-CFMzbw3W.js +0 -1
  23. package/web-ui-dist/assets/extensions-C5MIyE-l.js +0 -1
  24. package/web-ui-dist/assets/extensions-CnpFPAZe.js +0 -1
  25. package/web-ui-dist/assets/styles-BsoKVYca.css +0 -1
package/dist/cli.js CHANGED
@@ -302538,14 +302538,14 @@ function parseSchedule(params) {
302538
302538
  }
302539
302539
  function createCronExtension() {
302540
302540
  return function cronExtension(pi) {
302541
- pi.on("before_agent_start", async () => {
302541
+ pi.on("before_agent_start", async (event) => {
302542
302542
  const now = /* @__PURE__ */ new Date();
302543
302543
  const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
302544
302544
  const local = now.toLocaleString("sv-SE", {
302545
302545
  timeZone: timezone,
302546
302546
  hour12: false
302547
302547
  }).replace(" ", "T");
302548
- return { systemPrompt: `\n\nYou can manage scheduled tasks with the cron tool.\nCurrent UTC time: ${now.toISOString()}\nCurrent timezone: ${timezone} (local: ${local})` };
302548
+ return { systemPrompt: `${event.systemPrompt}\n\nYou can manage scheduled tasks with the cron tool.\nCurrent UTC time: ${now.toISOString()}\nCurrent timezone: ${timezone} (local: ${local})` };
302549
302549
  });
302550
302550
  pi.registerTool({
302551
302551
  name: "cron",
@@ -303414,6 +303414,10 @@ function createWorkspaceJailExtension(workspaceDir, allowedPaths = []) {
303414
303414
  * This is defense-in-depth, not a complete sandbox.
303415
303415
  */
303416
303416
  function scanBashCommand(command) {
303417
+ if (/(^|\s)(pi\s+(install|remove|update))(\s|$)/.test(command)) return {
303418
+ allowed: false,
303419
+ reason: "Blocked: use the manage_packages tool (or Settings → Extensions install UI) instead of running `pi install/remove/update` in bash."
303420
+ };
303417
303421
  const absolutePathPattern = /(?:^|\s)([~/][\w\-./]+)/g;
303418
303422
  let match;
303419
303423
  while ((match = absolutePathPattern.exec(command)) !== null) {
@@ -303468,8 +303472,9 @@ function createWorkspaceJailExtension(workspaceDir, allowedPaths = []) {
303468
303472
  }
303469
303473
  }
303470
303474
  });
303471
- pi.on("before_agent_start", async () => {
303472
- return { systemPrompt: `\n\nIMPORTANT: You are restricted to working within the directory: ${workspaceDir}${normalizedAllowedPaths.length ? `\nAlso allowed: ${normalizedAllowedPaths.join(", ")}` : ""}
303475
+ pi.on("before_agent_start", async (event) => {
303476
+ const allowedPathsNote = normalizedAllowedPaths.length ? `\nAlso allowed: ${normalizedAllowedPaths.join(", ")}` : "";
303477
+ return { systemPrompt: `${event.systemPrompt}\n\nIMPORTANT: You are restricted to working within the directory: ${workspaceDir}${allowedPathsNote}
303473
303478
  Do not access files, run commands, or reference paths outside the allowed directories.` };
303474
303479
  });
303475
303480
  };
@@ -303943,6 +303948,147 @@ function createHeartbeatExtension() {
303943
303948
  };
303944
303949
  }
303945
303950
  //#endregion
303951
+ //#region src/extensions/package-manager.ts
303952
+ const PackageManagerParamsSchema = Type$1.Object({
303953
+ action: StringEnum([
303954
+ "install",
303955
+ "remove",
303956
+ "update",
303957
+ "list"
303958
+ ]),
303959
+ source: Type$1.Optional(Type$1.String({ description: "Package source, e.g. npm:@scope/pkg, git:github.com/user/repo, or local path" })),
303960
+ scope: Type$1.Optional(StringEnum(["user", "project"]))
303961
+ });
303962
+ function stringifyPackageSource(source) {
303963
+ if (typeof source === "string") return source;
303964
+ return source.source;
303965
+ }
303966
+ function createPackageManagerExtension(reloadAllSessions) {
303967
+ return function packageManagerExtension(pi) {
303968
+ let pendingReload = false;
303969
+ pi.on("agent_end", () => {
303970
+ if (!pendingReload) return;
303971
+ pendingReload = false;
303972
+ setTimeout(() => {
303973
+ reloadAllSessions().catch((err) => {
303974
+ console.error("[package-manager] Failed to reload sessions:", err);
303975
+ });
303976
+ }, 0);
303977
+ });
303978
+ pi.registerTool({
303979
+ name: "manage_packages",
303980
+ label: "Manage Packages",
303981
+ description: "Install, remove, update, or list clankie packages in the correct clankie directories. Defaults to user scope.",
303982
+ parameters: PackageManagerParamsSchema,
303983
+ async execute(_toolCallId, rawParams) {
303984
+ const params = rawParams;
303985
+ const config = loadConfig();
303986
+ const cwd = getWorkspace(config);
303987
+ const agentDir = getAgentDir(config);
303988
+ const settingsManager = SettingsManager.create(cwd, agentDir);
303989
+ const packageManager = new DefaultPackageManager({
303990
+ cwd,
303991
+ agentDir,
303992
+ settingsManager
303993
+ });
303994
+ const output = [];
303995
+ packageManager.setProgressCallback((event) => {
303996
+ if (!event.message) return;
303997
+ output.push(event.message);
303998
+ });
303999
+ const scope = params.scope ?? "user";
304000
+ const local = scope === "project";
304001
+ const detailsBase = {
304002
+ action: params.action,
304003
+ scope,
304004
+ source: params.source?.trim() ?? null,
304005
+ output
304006
+ };
304007
+ try {
304008
+ switch (params.action) {
304009
+ case "list": {
304010
+ const globalPackages = (settingsManager.getGlobalSettings().packages ?? []).map(stringifyPackageSource);
304011
+ const projectPackages = (settingsManager.getProjectSettings().packages ?? []).map(stringifyPackageSource);
304012
+ return {
304013
+ content: [{
304014
+ type: "text",
304015
+ text: [
304016
+ "Configured package sources:",
304017
+ `- User (${globalPackages.length}): ${globalPackages.length > 0 ? globalPackages.join(", ") : "(none)"}`,
304018
+ `- Project (${projectPackages.length}): ${projectPackages.length > 0 ? projectPackages.join(", ") : "(none)"}`
304019
+ ].join("\n")
304020
+ }],
304021
+ details: {
304022
+ ...detailsBase,
304023
+ globalPackages,
304024
+ projectPackages
304025
+ }
304026
+ };
304027
+ }
304028
+ case "install": {
304029
+ if (!params.source?.trim()) throw new Error("install requires source");
304030
+ const source = params.source.trim();
304031
+ await packageManager.install(source, { local });
304032
+ packageManager.addSourceToSettings(source, { local });
304033
+ pendingReload = true;
304034
+ return {
304035
+ content: [{
304036
+ type: "text",
304037
+ text: output.join("\n") || `Installed ${source} in ${scope} scope and scheduled runtime reload.`
304038
+ }],
304039
+ details: {
304040
+ ...detailsBase,
304041
+ source
304042
+ }
304043
+ };
304044
+ }
304045
+ case "remove": {
304046
+ if (!params.source?.trim()) throw new Error("remove requires source");
304047
+ const source = params.source.trim();
304048
+ await packageManager.remove(source, { local });
304049
+ packageManager.removeSourceFromSettings(source, { local });
304050
+ pendingReload = true;
304051
+ return {
304052
+ content: [{
304053
+ type: "text",
304054
+ text: output.join("\n") || `Removed ${source} from ${scope} scope and scheduled runtime reload.`
304055
+ }],
304056
+ details: {
304057
+ ...detailsBase,
304058
+ source
304059
+ }
304060
+ };
304061
+ }
304062
+ case "update": {
304063
+ const source = params.source?.trim();
304064
+ await packageManager.update(source && source.length > 0 ? source : void 0);
304065
+ pendingReload = true;
304066
+ return {
304067
+ content: [{
304068
+ type: "text",
304069
+ text: output.join("\n") || `Updated ${source && source.length > 0 ? source : "all configured packages"} and scheduled runtime reload.`
304070
+ }],
304071
+ details: {
304072
+ ...detailsBase,
304073
+ source: source ?? null
304074
+ }
304075
+ };
304076
+ }
304077
+ }
304078
+ } catch (err) {
304079
+ return {
304080
+ content: [{
304081
+ type: "text",
304082
+ text: `Package manager error: ${err instanceof Error ? err.message : String(err)}`
304083
+ }],
304084
+ details: detailsBase
304085
+ };
304086
+ }
304087
+ }
304088
+ });
304089
+ };
304090
+ }
304091
+ //#endregion
303946
304092
  //#region src/extensions/reload-runtime.ts
303947
304093
  /**
303948
304094
  * Create the reload runtime extension factory.
@@ -303951,6 +304097,7 @@ function createHeartbeatExtension() {
303951
304097
  */
303952
304098
  function createReloadRuntimeExtension(reloadAllSessions) {
303953
304099
  return function reloadRuntime(pi) {
304100
+ let pendingReload = false;
303954
304101
  pi.registerCommand("reload-runtime", {
303955
304102
  description: "Reload extensions, skills, prompts, and themes for all sessions",
303956
304103
  handler: async (_args, ctx) => {
@@ -303958,17 +304105,26 @@ function createReloadRuntimeExtension(reloadAllSessions) {
303958
304105
  await reloadAllSessions();
303959
304106
  }
303960
304107
  });
304108
+ pi.on("agent_end", () => {
304109
+ if (!pendingReload) return;
304110
+ pendingReload = false;
304111
+ setTimeout(() => {
304112
+ reloadAllSessions().catch((err) => {
304113
+ console.error("[reload-runtime] Failed to reload sessions:", err);
304114
+ });
304115
+ }, 0);
304116
+ });
303961
304117
  pi.registerTool({
303962
304118
  name: "reload_runtime",
303963
304119
  label: "Reload Runtime",
303964
304120
  description: "Reload extensions, skills, prompts, and themes for all sessions. Call this after installing or creating new skills/extensions.",
303965
304121
  parameters: Type$1.Object({}),
303966
304122
  async execute() {
303967
- pi.sendUserMessage("/reload-runtime", { deliverAs: "followUp" });
304123
+ pendingReload = true;
303968
304124
  return {
303969
304125
  content: [{
303970
304126
  type: "text",
303971
- text: "Queued /reload-runtime all sessions will reload to pick up any newly installed resources."
304127
+ text: "Runtime reload scheduled. All sessions will reload to pick up newly installed resources after this response completes."
303972
304128
  }],
303973
304129
  details: {}
303974
304130
  };
@@ -304317,6 +304473,7 @@ function buildExtensionFactories(config, cwd) {
304317
304473
  const extensionFactories = [];
304318
304474
  extensionFactories.push(createCronExtension());
304319
304475
  extensionFactories.push(createHeartbeatExtension());
304476
+ extensionFactories.push(createPackageManagerExtension(reloadAllSessions));
304320
304477
  extensionFactories.push(createReloadRuntimeExtension(reloadAllSessions));
304321
304478
  if (config.agent?.restrictToWorkspace ?? true) {
304322
304479
  const configuredAllowedPaths = config.agent?.allowedPaths ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clankie",
3
- "version": "0.6.0",
3
+ "version": "0.9.0",
4
4
  "description": "A minimal personal AI assistant built on pi's SDK",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,6 +9,7 @@
9
9
  "files": [
10
10
  "dist/",
11
11
  "web-ui-dist/",
12
+ "skills/",
12
13
  "package.json",
13
14
  "README.md"
14
15
  ],
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: clankie-admin
3
+ description: Manage clankie configuration, install/update Pi packages, and create local skills/extensions in the correct clankie directories. Use when asked to install or maintain clankie skills/extensions.
4
+ ---
5
+
6
+ # Clankie Admin
7
+
8
+ Use this skill when the user asks to install, update, remove, or create skills/extensions for clankie.
9
+
10
+ ## Directory layout (source of truth)
11
+
12
+ Clankie uses `~/.clankie/` as its global agent directory:
13
+
14
+ - `~/.clankie/settings.json` → Pi global settings for clankie
15
+ - `~/.clankie/clankie.json` → Clankie app config
16
+ - `~/.clankie/extensions/` → user-scope local extensions
17
+ - `~/.clankie/skills/` → user-scope local skills
18
+ - `~/.clankie/prompts/` → user-scope prompt templates
19
+ - `~/.clankie/themes/` → user-scope themes
20
+ - `~/.clankie/git/` → git-based package installs
21
+ - `~/.clankie/workspace/` → working directory (not the global package location)
22
+
23
+ ## Installation rules
24
+
25
+ 1. Prefer **user scope** installs for clankie-managed packages.
26
+ 2. Avoid project-local installs into `~/.clankie/workspace/.pi/` unless the user explicitly asks for project scope.
27
+ 3. Prefer clankie's controlled package flows:
28
+ - LLM: `manage_packages` tool
29
+ - UI: Settings → Extensions install panel
30
+ 4. Do **not** use raw `pi install/remove/update` commands in bash unless explicitly requested for debugging.
31
+ 5. After install/update/remove, reload the session so newly loaded resources become available.
32
+
33
+ ## Creating a skill
34
+
35
+ Create skills under:
36
+
37
+ - `~/.clankie/skills/<skill-name>/SKILL.md`
38
+
39
+ Requirements:
40
+
41
+ - Directory name must match frontmatter `name`
42
+ - Include frontmatter with `name` and `description`
43
+ - Keep description specific about when to use the skill
44
+
45
+ ## Creating an extension
46
+
47
+ Create extensions under:
48
+
49
+ - `~/.clankie/extensions/<extension-name>/`
50
+
51
+ Keep extension code and any package metadata there. If the extension ships skills, place them under a `skills/` folder in the extension package and expose them through the package manifest.
52
+
53
+ ## After creating or modifying resources
54
+
55
+ After creating, installing, updating, or removing any skill, extension, prompt template, or theme, **you MUST call the `reload_runtime` tool** to ensure all active sessions pick up the changes. Without this step, the newly installed resources will not be available until the daemon is restarted.
56
+
57
+ ```
58
+ reload_runtime: {}
59
+ ```
60
+
61
+ ## Safety checks
62
+
63
+ Before changing files, confirm target paths are under `~/.clankie/` for global clankie resources.
64
+ If an install path would resolve to `~/.clankie/workspace/.pi/`, explicitly confirm with the user before proceeding.
@@ -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-DLbCrY1P.js"/><link rel="modulepreload" href="/assets/index-BPe4bC0P.js"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="stylesheet" href="/assets/styles-BsoKVYca.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"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground text-sm group-data-[collapsible=icon]:p-0! h-10 active" href="/" data-status="active" aria-current="page"><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></a></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_spb6_" 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 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_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 [&amp;&gt;svg]:size-4 flex shrink-0 items-center outline-hidden [&amp;&gt;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 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_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"><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 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_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_7pb6_"><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"><div class="absolute left-4 top-3.5 z-50 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 [&amp;_svg:not([class*=&#x27;size-&#x27;])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none shrink-0 [&amp;_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></div><!--$--><!--$--><!--/$--><script></script><!--/$--></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-DLbCrY1P.js"],assets:$R[5]=[$R[6]={tag:"script",attrs:$R[7]={type:"module",async:!0},children:"import(\"/assets/main-DLbCrY1P.js\")"}]}}},matches:$R[8]=[$R[9]={i:"__root__",u:1772720316132,s:"success",ssr:!0}],lastMatchId:"__root__"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="">import("/assets/main-DLbCrY1P.js")</script></body></html>
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-D1-MPeAM.js"/><link rel="modulepreload" href="/assets/index-DDPzWyca.js"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><link rel="stylesheet" href="/assets/styles-C4OT29Wk.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"><a data-slot="sidebar-menu-button" data-sidebar="menu-button" data-size="lg" class="ring-sidebar-ring active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground text-sm group-data-[collapsible=icon]:p-0! h-10 active" href="/" data-status="active" aria-current="page"><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></a></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_spb6_" 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 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_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 [&amp;&gt;svg]:size-4 flex shrink-0 items-center outline-hidden [&amp;&gt;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 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_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"><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 [&amp;&gt;span:last-child]:truncate [&amp;_svg]:size-4 [&amp;_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_7pb6_"><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"><div class="absolute left-4 top-3.5 z-50 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 [&amp;_svg:not([class*=&#x27;size-&#x27;])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none shrink-0 [&amp;_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></div><!--$--><!--$--><!--/$--><script></script><!--/$--></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-D1-MPeAM.js"],assets:$R[5]=[$R[6]={tag:"script",attrs:$R[7]={type:"module",async:!0},children:"import(\"/assets/main-D1-MPeAM.js\")"}]}}},matches:$R[8]=[$R[9]={i:"__root__",u:1772739330754,s:"success",ssr:!0}],lastMatchId:"__root__"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="">import("/assets/main-D1-MPeAM.js")</script></body></html>
@@ -1 +1 @@
1
- import{i as b,z as R,A as K,D as O,E,r as u,j as e,H as T,J as B,w as p,M as V,N as U,B as x,O as $,Q as q,R as H,a as A,U as S,V as Y,m as j,o as y,I,c as W,W as X,X as w,s as J,Y as Q,C as D,g as P,h as F,n as Z,e as L,K as G,Z as ee,_ as te}from"./main-DLbCrY1P.js";import{F as k,a as z}from"./field-B65zDnKR.js";import{C as M}from"./circle-x-8a_H31zB.js";import{B as se}from"./badge-n982dtcJ.js";const ae=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ne=b("circle-check-big",ae);const re=[["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"}]],ie=b("external-link",re);const oe=[["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"}]],_=b("shield",oe);function le(t){const{children:a,open:s,defaultOpen:l=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:m,handle:f,triggerId:g,defaultTriggerId:h=null}=t,v=R(),N=!!v,c=K(()=>f?.store??new O({open:l,openProp:s,activeTriggerId:h,triggerIdProp:g,modal:!0,disablePointerDismissal:!0,nested:N,role:"alertdialog"})).current;c.useControlledProp("openProp",s),c.useControlledProp("triggerIdProp",g),c.useSyncedValue("nested",N),c.useContextCallback("onOpenChange",r),c.useContextCallback("onOpenChangeComplete",i);const C=c.useState("payload");E({store:c,actionsRef:m,parentContext:v?.store.context});const n=u.useMemo(()=>({store:c}),[c]);return e.jsx(T.Provider,{value:n,children:typeof a=="function"?a({payload:C}):a})}function ce({...t}){return e.jsx(le,{"data-slot":"alert-dialog",...t})}function de({...t}){return e.jsx(q,{"data-slot":"alert-dialog-portal",...t})}function ue({className:t,...a}){return e.jsx(H,{"data-slot":"alert-dialog-overlay",className:p("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),...a})}function me({className:t,size:a="default",...s}){return e.jsxs(de,{children:[e.jsx(ue,{}),e.jsx(B,{"data-slot":"alert-dialog-content","data-size":a,className:p("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),...s})]})}function xe({className:t,...a}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:p("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),...a})}function ge({className:t,...a}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:p("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),...a})}function he({className:t,...a}){return e.jsx(V,{"data-slot":"alert-dialog-title",className:p("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),...a})}function pe({className:t,...a}){return e.jsx(U,{"data-slot":"alert-dialog-description",className:p("text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",t),...a})}function fe({className:t,...a}){return e.jsx(x,{"data-slot":"alert-dialog-action",className:p(t),...a})}function je({className:t,variant:a="outline",size:s="default",...l}){return e.jsx($,{"data-slot":"alert-dialog-cancel",className:p(t),render:e.jsx(x,{variant:a,size:s}),...l})}function ye({open:t,onOpenChange:a}){const{loginFlow:s}=A(S,i=>({loginFlow:i.loginFlow}));if(u.useEffect(()=>{!t&&s&&Y()},[t,s]),u.useEffect(()=>{if(t&&s?.status==="complete"&&s.success===!0){const i=setTimeout(()=>{a(!1)},1500);return()=>clearTimeout(i)}},[t,s,a]),!s)return null;const l=()=>{s.loginFlowId&&s.status!=="complete"&&s.status!=="error"&&j.getClient()?.authLoginCancel(s.loginFlowId),a(!1)},r=()=>{a(!1)};return e.jsx(ce,{open:t,onOpenChange:a,children:e.jsxs(me,{children:[e.jsxs(xe,{children:[e.jsx(he,{children:s.status==="complete"&&s.success?"Login Successful":s.status==="error"?"Login Failed":`Sign in to ${s.providerId}`}),e.jsx(pe,{children:e.jsx(ve,{flow:s})})]}),e.jsx(ge,{children:s.status==="complete"||s.status==="error"?e.jsx(fe,{onClick:r,children:"Close"}):e.jsx(je,{onClick:l,children:"Cancel"})})]})})}function ve({flow:t}){const a=j.getClient(),s=u.useRef(null),l=i=>{t.loginFlowId&&a&&a.authLoginInput(t.loginFlowId,i)},r=i=>{t.loginFlowId&&a&&a.authLoginInput(t.loginFlowId,i)};return u.useEffect(()=>{t.status==="waiting_url"&&t.url&&s.current!==t.url&&(s.current=t.url,window.open(t.url,"_blank"))},[t.status,t.url]),t.status==="idle"?e.jsxs("div",{className:"flex items-center gap-3 py-4",children:[e.jsx(y,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:"Starting login..."})]}):t.status==="waiting_url"&&t.url?e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(y,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:"Complete the authentication in your browser..."})]}),t.instructions&&e.jsx("p",{className:"text-xs text-muted-foreground rounded-md bg-muted p-2",children:t.instructions}),e.jsxs(x,{onClick:()=>window.open(t.url,"_blank"),className:"w-full",variant:"outline",size:"sm",children:[e.jsx(ie,{className:"mr-2 h-4 w-4"}),"Open in Browser"]}),t.showManualInput&&e.jsx(Ne,{onSubmit:l}),t.progressMessage&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(y,{className:"h-3 w-3 animate-spin"}),e.jsx("span",{children:t.progressMessage})]})]}):t.status==="waiting_input"&&t.promptMessage?e.jsx("div",{className:"py-4",children:e.jsx(Ce,{message:t.promptMessage,placeholder:t.promptPlaceholder,onSubmit:r})}):t.status==="in_progress"?e.jsxs("div",{className:"flex items-center gap-3 py-4",children:[e.jsx(y,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:t.progressMessage||"Completing authentication..."})]}):t.status==="complete"&&t.success?e.jsxs("div",{className:"flex items-center gap-3 py-4 text-green-600",children:[e.jsx(ne,{className:"h-5 w-5"}),e.jsxs("span",{className:"text-sm",children:["Successfully authenticated with ",t.providerId]})]}):t.status==="error"||t.status==="complete"&&!t.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(M,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-medium",children:"Authentication failed"})]}),t.error&&e.jsx("p",{className:"text-xs text-muted-foreground rounded-md bg-muted p-2",children:t.error})]}):null}function Ne({onSubmit:t}){const a=s=>{s.preventDefault();const r=new FormData(s.currentTarget).get("code");r?.trim()&&t(r.trim())};return e.jsx("form",{onSubmit:a,className:"space-y-2",children:e.jsxs(k,{children:[e.jsx(z,{htmlFor:"manual-code",children:"Or paste the authorization code/URL here:"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{id:"manual-code",name:"code",type:"text",placeholder:"Paste code or redirect URL",className:"flex-1"}),e.jsx(x,{type:"submit",size:"sm",children:"Submit"})]})]})})}function Ce({message:t,placeholder:a,onSubmit:s}){const l=r=>{r.preventDefault();const m=new FormData(r.currentTarget).get("prompt-value");m?.trim()&&s(m.trim())};return e.jsxs("form",{onSubmit:l,className:"space-y-3",children:[e.jsx("p",{className:"text-sm",children:t}),e.jsx(k,{children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{id:"prompt-value",name:"prompt-value",type:"text",placeholder:a||"Enter value",className:"flex-1",autoFocus:!0}),e.jsx(x,{type:"submit",size:"sm",children:"Submit"})]})})]})}function Pe(){const{status:t}=A(W,s=>({status:s.status}));return t==="connected"?e.jsx(be,{}):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(_,{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 be(){const{providers:t,isLoadingProviders:a,loginFlow:s}=A(S,n=>({providers:n.providers,isLoadingProviders:n.isLoadingProviders,loginFlow:n.loginFlow})),[l,r]=u.useState(!1),[i,m]=u.useState(null),[f,g]=u.useState(""),h=u.useCallback(async()=>{const n=j.getClient();if(n){X(!0);try{const{providers:o}=await n.getAuthProviders();w(o)}catch(o){console.error("Failed to load auth providers:",o),w([])}}},[]);u.useEffect(()=>{h()},[h]),u.useEffect(()=>{if(s?.status==="complete"&&s.success===!0){h();const{activeSessionId:n}=J.state;if(n){const o=j.getClient();o&&o.getAvailableModels(n).then(({models:d})=>{Q(d),console.log("[settings/auth] Refreshed available models after OAuth login")}).catch(d=>{console.error("[settings/auth] Failed to refresh available models:",d)})}}},[s?.status,s?.success,h]);const v=async n=>{const o=j.getClient();if(o)try{const{loginFlowId:d}=await o.authLogin(n);te(d,n),r(!0)}catch(d){console.error("Failed to start login:",d)}},N=n=>{m(n),g("")},c=async n=>{const o=j.getClient();if(!(!o||!f.trim()))try{await o.authSetApiKey(n,f.trim()),m(null),g(""),await h()}catch(d){console.error("Failed to save API key:",d)}},C=async n=>{const o=j.getClient();if(o)try{await o.authLogout(n),await h()}catch(d){console.error("Failed to logout:",d)}};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(D,{className:"card-depth",children:[e.jsxs(P,{children:[e.jsx(F,{children:"AI Provider Authentication"}),e.jsx(Z,{children:"Configure authentication for AI providers (OpenAI, Anthropic, etc.)"})]}),e.jsx(L,{children:a?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(y,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t.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:t.map(n=>e.jsx(Ae,{provider:n,isEditing:i===n.id,apiKeyValue:f,onApiKeyChange:g,onLogin:()=>n.type==="oauth"?v(n.id):N(n.id),onSaveApiKey:()=>c(n.id),onCancelApiKey:()=>m(null),onLogout:()=>C(n.id)},n.id))})})]}),e.jsxs(D,{className:"mt-4 card-depth",children:[e.jsx(P,{children:e.jsx(F,{children:"About Provider Authentication"})}),e.jsxs(L,{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(ye,{open:l,onOpenChange:r})]})}function Ae({provider:t,isEditing:a,apiKeyValue:s,onApiKeyChange:l,onLogin:r,onSaveApiKey:i,onCancelApiKey:m,onLogout:f}){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:t.name}),e.jsx(se,{variant:t.type==="oauth"?"default":"secondary",className:"text-xs",children:t.type==="oauth"?e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"h-3 w-3 mr-1"}),"OAuth"]}):e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"h-3 w-3 mr-1"}),"API Key"]})}),t.hasAuth?e.jsx(ee,{className:"h-4 w-4 text-green-600"}):e.jsx(M,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.hasAuth?"Authenticated":"Not configured"}),a&&t.type==="apikey"&&e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs(k,{children:[e.jsx(z,{htmlFor:`api-key-${t.id}`,children:"API Key"}),e.jsx(I,{id:`api-key-${t.id}`,type:"password",placeholder:"Enter API key",value:s,onChange:g=>l(g.target.value),autoFocus:!0})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(x,{size:"sm",onClick:i,disabled:!s.trim(),children:"Save"}),e.jsx(x,{size:"sm",variant:"outline",onClick:m,children:"Cancel"})]})]})]}),!a&&e.jsx("div",{className:"flex gap-2",children:t.hasAuth?e.jsx(x,{size:"sm",variant:"outline",onClick:f,children:"Logout"}):e.jsx(x,{size:"sm",onClick:r,children:"Login"})})]})})}export{Pe as component};
1
+ import{i as b,z as R,A as K,D as O,E,r as u,j as e,H as T,J as B,w as p,M as V,N as U,B as x,O as $,Q as q,R as H,a as A,U as S,V as Y,m as j,o as y,I,c as W,W as X,X as w,s as J,Y as Q,C as D,g as P,h as F,n as Z,e as L,K as G,Z as ee,_ as te}from"./main-D1-MPeAM.js";import{F as k,a as z}from"./field-BbqZG4RJ.js";import{C as M}from"./circle-x-DXPT4pz6.js";import{B as se}from"./badge-CFXQDPlY.js";const ae=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ne=b("circle-check-big",ae);const re=[["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"}]],ie=b("external-link",re);const oe=[["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"}]],_=b("shield",oe);function le(t){const{children:a,open:s,defaultOpen:l=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:m,handle:f,triggerId:g,defaultTriggerId:h=null}=t,v=R(),N=!!v,c=K(()=>f?.store??new O({open:l,openProp:s,activeTriggerId:h,triggerIdProp:g,modal:!0,disablePointerDismissal:!0,nested:N,role:"alertdialog"})).current;c.useControlledProp("openProp",s),c.useControlledProp("triggerIdProp",g),c.useSyncedValue("nested",N),c.useContextCallback("onOpenChange",r),c.useContextCallback("onOpenChangeComplete",i);const C=c.useState("payload");E({store:c,actionsRef:m,parentContext:v?.store.context});const n=u.useMemo(()=>({store:c}),[c]);return e.jsx(T.Provider,{value:n,children:typeof a=="function"?a({payload:C}):a})}function ce({...t}){return e.jsx(le,{"data-slot":"alert-dialog",...t})}function de({...t}){return e.jsx(q,{"data-slot":"alert-dialog-portal",...t})}function ue({className:t,...a}){return e.jsx(H,{"data-slot":"alert-dialog-overlay",className:p("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),...a})}function me({className:t,size:a="default",...s}){return e.jsxs(de,{children:[e.jsx(ue,{}),e.jsx(B,{"data-slot":"alert-dialog-content","data-size":a,className:p("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),...s})]})}function xe({className:t,...a}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:p("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),...a})}function ge({className:t,...a}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:p("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),...a})}function he({className:t,...a}){return e.jsx(V,{"data-slot":"alert-dialog-title",className:p("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),...a})}function pe({className:t,...a}){return e.jsx(U,{"data-slot":"alert-dialog-description",className:p("text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",t),...a})}function fe({className:t,...a}){return e.jsx(x,{"data-slot":"alert-dialog-action",className:p(t),...a})}function je({className:t,variant:a="outline",size:s="default",...l}){return e.jsx($,{"data-slot":"alert-dialog-cancel",className:p(t),render:e.jsx(x,{variant:a,size:s}),...l})}function ye({open:t,onOpenChange:a}){const{loginFlow:s}=A(S,i=>({loginFlow:i.loginFlow}));if(u.useEffect(()=>{!t&&s&&Y()},[t,s]),u.useEffect(()=>{if(t&&s?.status==="complete"&&s.success===!0){const i=setTimeout(()=>{a(!1)},1500);return()=>clearTimeout(i)}},[t,s,a]),!s)return null;const l=()=>{s.loginFlowId&&s.status!=="complete"&&s.status!=="error"&&j.getClient()?.authLoginCancel(s.loginFlowId),a(!1)},r=()=>{a(!1)};return e.jsx(ce,{open:t,onOpenChange:a,children:e.jsxs(me,{children:[e.jsxs(xe,{children:[e.jsx(he,{children:s.status==="complete"&&s.success?"Login Successful":s.status==="error"?"Login Failed":`Sign in to ${s.providerId}`}),e.jsx(pe,{children:e.jsx(ve,{flow:s})})]}),e.jsx(ge,{children:s.status==="complete"||s.status==="error"?e.jsx(fe,{onClick:r,children:"Close"}):e.jsx(je,{onClick:l,children:"Cancel"})})]})})}function ve({flow:t}){const a=j.getClient(),s=u.useRef(null),l=i=>{t.loginFlowId&&a&&a.authLoginInput(t.loginFlowId,i)},r=i=>{t.loginFlowId&&a&&a.authLoginInput(t.loginFlowId,i)};return u.useEffect(()=>{t.status==="waiting_url"&&t.url&&s.current!==t.url&&(s.current=t.url,window.open(t.url,"_blank"))},[t.status,t.url]),t.status==="idle"?e.jsxs("div",{className:"flex items-center gap-3 py-4",children:[e.jsx(y,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:"Starting login..."})]}):t.status==="waiting_url"&&t.url?e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(y,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:"Complete the authentication in your browser..."})]}),t.instructions&&e.jsx("p",{className:"text-xs text-muted-foreground rounded-md bg-muted p-2",children:t.instructions}),e.jsxs(x,{onClick:()=>window.open(t.url,"_blank"),className:"w-full",variant:"outline",size:"sm",children:[e.jsx(ie,{className:"mr-2 h-4 w-4"}),"Open in Browser"]}),t.showManualInput&&e.jsx(Ne,{onSubmit:l}),t.progressMessage&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(y,{className:"h-3 w-3 animate-spin"}),e.jsx("span",{children:t.progressMessage})]})]}):t.status==="waiting_input"&&t.promptMessage?e.jsx("div",{className:"py-4",children:e.jsx(Ce,{message:t.promptMessage,placeholder:t.promptPlaceholder,onSubmit:r})}):t.status==="in_progress"?e.jsxs("div",{className:"flex items-center gap-3 py-4",children:[e.jsx(y,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm",children:t.progressMessage||"Completing authentication..."})]}):t.status==="complete"&&t.success?e.jsxs("div",{className:"flex items-center gap-3 py-4 text-green-600",children:[e.jsx(ne,{className:"h-5 w-5"}),e.jsxs("span",{className:"text-sm",children:["Successfully authenticated with ",t.providerId]})]}):t.status==="error"||t.status==="complete"&&!t.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(M,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-medium",children:"Authentication failed"})]}),t.error&&e.jsx("p",{className:"text-xs text-muted-foreground rounded-md bg-muted p-2",children:t.error})]}):null}function Ne({onSubmit:t}){const a=s=>{s.preventDefault();const r=new FormData(s.currentTarget).get("code");r?.trim()&&t(r.trim())};return e.jsx("form",{onSubmit:a,className:"space-y-2",children:e.jsxs(k,{children:[e.jsx(z,{htmlFor:"manual-code",children:"Or paste the authorization code/URL here:"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{id:"manual-code",name:"code",type:"text",placeholder:"Paste code or redirect URL",className:"flex-1"}),e.jsx(x,{type:"submit",size:"sm",children:"Submit"})]})]})})}function Ce({message:t,placeholder:a,onSubmit:s}){const l=r=>{r.preventDefault();const m=new FormData(r.currentTarget).get("prompt-value");m?.trim()&&s(m.trim())};return e.jsxs("form",{onSubmit:l,className:"space-y-3",children:[e.jsx("p",{className:"text-sm",children:t}),e.jsx(k,{children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{id:"prompt-value",name:"prompt-value",type:"text",placeholder:a||"Enter value",className:"flex-1",autoFocus:!0}),e.jsx(x,{type:"submit",size:"sm",children:"Submit"})]})})]})}function Pe(){const{status:t}=A(W,s=>({status:s.status}));return t==="connected"?e.jsx(be,{}):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(_,{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 be(){const{providers:t,isLoadingProviders:a,loginFlow:s}=A(S,n=>({providers:n.providers,isLoadingProviders:n.isLoadingProviders,loginFlow:n.loginFlow})),[l,r]=u.useState(!1),[i,m]=u.useState(null),[f,g]=u.useState(""),h=u.useCallback(async()=>{const n=j.getClient();if(n){X(!0);try{const{providers:o}=await n.getAuthProviders();w(o)}catch(o){console.error("Failed to load auth providers:",o),w([])}}},[]);u.useEffect(()=>{h()},[h]),u.useEffect(()=>{if(s?.status==="complete"&&s.success===!0){h();const{activeSessionId:n}=J.state;if(n){const o=j.getClient();o&&o.getAvailableModels(n).then(({models:d})=>{Q(d),console.log("[settings/auth] Refreshed available models after OAuth login")}).catch(d=>{console.error("[settings/auth] Failed to refresh available models:",d)})}}},[s?.status,s?.success,h]);const v=async n=>{const o=j.getClient();if(o)try{const{loginFlowId:d}=await o.authLogin(n);te(d,n),r(!0)}catch(d){console.error("Failed to start login:",d)}},N=n=>{m(n),g("")},c=async n=>{const o=j.getClient();if(!(!o||!f.trim()))try{await o.authSetApiKey(n,f.trim()),m(null),g(""),await h()}catch(d){console.error("Failed to save API key:",d)}},C=async n=>{const o=j.getClient();if(o)try{await o.authLogout(n),await h()}catch(d){console.error("Failed to logout:",d)}};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(D,{className:"card-depth",children:[e.jsxs(P,{children:[e.jsx(F,{children:"AI Provider Authentication"}),e.jsx(Z,{children:"Configure authentication for AI providers (OpenAI, Anthropic, etc.)"})]}),e.jsx(L,{children:a?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(y,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t.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:t.map(n=>e.jsx(Ae,{provider:n,isEditing:i===n.id,apiKeyValue:f,onApiKeyChange:g,onLogin:()=>n.type==="oauth"?v(n.id):N(n.id),onSaveApiKey:()=>c(n.id),onCancelApiKey:()=>m(null),onLogout:()=>C(n.id)},n.id))})})]}),e.jsxs(D,{className:"mt-4 card-depth",children:[e.jsx(P,{children:e.jsx(F,{children:"About Provider Authentication"})}),e.jsxs(L,{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(ye,{open:l,onOpenChange:r})]})}function Ae({provider:t,isEditing:a,apiKeyValue:s,onApiKeyChange:l,onLogin:r,onSaveApiKey:i,onCancelApiKey:m,onLogout:f}){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:t.name}),e.jsx(se,{variant:t.type==="oauth"?"default":"secondary",className:"text-xs",children:t.type==="oauth"?e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"h-3 w-3 mr-1"}),"OAuth"]}):e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"h-3 w-3 mr-1"}),"API Key"]})}),t.hasAuth?e.jsx(ee,{className:"h-4 w-4 text-green-600"}):e.jsx(M,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.hasAuth?"Authenticated":"Not configured"}),a&&t.type==="apikey"&&e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs(k,{children:[e.jsx(z,{htmlFor:`api-key-${t.id}`,children:"API Key"}),e.jsx(I,{id:`api-key-${t.id}`,type:"password",placeholder:"Enter API key",value:s,onChange:g=>l(g.target.value),autoFocus:!0})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(x,{size:"sm",onClick:i,disabled:!s.trim(),children:"Save"}),e.jsx(x,{size:"sm",variant:"outline",onClick:m,children:"Cancel"})]})]})]}),!a&&e.jsx("div",{className:"flex gap-2",children:t.hasAuth?e.jsx(x,{size:"sm",variant:"outline",onClick:f,children:"Logout"}):e.jsx(x,{size:"sm",onClick:r,children:"Login"})})]})})}export{Pe as component};
@@ -1 +1 @@
1
- import{$ as i,a0 as n,w as d,a1 as s}from"./main-DLbCrY1P.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,...a}){return i({defaultTagName:"span",props:n({className:d(o({variant:e}),r)},a),render:t,state:{slot:"badge",variant:e}})}export{g as B};
1
+ import{$ as i,a0 as n,w as d,a1 as s}from"./main-D1-MPeAM.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,...a}){return i({defaultTagName:"span",props:n({className:d(o({variant:e}),r)},a),render:t,state:{slot:"badge",variant:e}})}export{g as B};
@@ -0,0 +1 @@
1
+ import{i as c}from"./main-D1-MPeAM.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{i as c}from"./main-DLbCrY1P.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"}]],i=c("circle-x",e);export{i as C};
1
+ import{i as c}from"./main-D1-MPeAM.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"}]],i=c("circle-x",e);export{i as C};
@@ -1 +1 @@
1
- import{a as S,c as w,r,j as e,C as d,g as h,h as x,n as y,e as u,I as m,B as c,L as T,S as F,y as j,m as p}from"./main-DLbCrY1P.js";import{F as g,a as k}from"./field-B65zDnKR.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(g,{children:[e.jsx(k,{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(g,{children:[e.jsx(k,{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};
1
+ import{a as S,c as w,r,j as e,C as d,g as h,h as x,n as y,e as u,I as m,B as c,L as T,S as F,y as j,m as p}from"./main-D1-MPeAM.js";import{F as g,a as k}from"./field-BbqZG4RJ.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(g,{children:[e.jsx(k,{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(g,{children:[e.jsx(k,{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
+ import{i,x as a}from"./main-D1-MPeAM.js";const l=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],u=i("circle-alert",l);const o=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],d=i("lightbulb",o),c={extensions:[],extensionErrors:[],skills:[],skillDiagnostics:[],isLoading:!1,installStatus:{isInstalling:!1,output:"",exitCode:null}},e=new a(c);function x(t){e.setState(s=>({...s,isLoading:t}))}function S(t,s){e.setState(n=>({...n,extensions:t,extensionErrors:s,isLoading:!1}))}function g(t,s){e.setState(n=>({...n,skills:t,skillDiagnostics:s,isLoading:!1}))}function f(t){e.setState(s=>({...s,installStatus:{...s.installStatus,...t}}))}function y(){e.setState(t=>({...t,installStatus:{isInstalling:!1,output:"",exitCode:null,error:void 0}}))}export{u as C,d as L,g as a,S as b,f as c,e,y as r,x as s};
@@ -0,0 +1 @@
1
+ import{i as j,j as e,w as q,a as P,c as Z,s as Q,r as d,m as L,b as $,C as A,g as Y,h as ee,n as se,B as f,o as B,e as z,I as F,d as H}from"./main-D1-MPeAM.js";import{B as I}from"./badge-CFXQDPlY.js";import{R as te,C as ae,a as ne,S as le,b as oe,W as re,J as ie}from"./json-render-renderer-BcrsT8Ur.js";import{e as ce,s as R,b as de,c as y,r as O,C as me,L as xe}from"./extensions-COhAmsTM.js";const ue=[["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"}]],pe=j("command",ue);const he=[["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"}]],ge=j("flag",he);const fe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],U=j("folder",fe);const je=[["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"}]],Ne=j("keyboard",je);const be=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],_=j("package",be);function ve({...s}){return e.jsx(te,{"data-slot":"collapsible",...s})}function ye({className:s,...a}){return e.jsx(ae,{"data-slot":"collapsible-trigger",className:q("",s),...a})}function ke({className:s,...a}){return e.jsx(ne,{"data-slot":"collapsible-content",className:q("overflow-hidden",s),...a})}const Ce=/^<inline:([^>]+)>$/,we=/(^|[\\/])node_modules([\\/]|$)/,Ie=/(^|[\\/])extensions([\\/]|$)/,Se=/[\\/]+/,Ee=/\.[a-z0-9]+$/i,Pe=new Set(["index","main","mod"]);function W(s){return s.split(Se).filter(Boolean)}function D(s){return s.replace(Ee,"")}function _e(s){return s.split(" ").filter(Boolean).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function G(s){return _e(s.replace(/^@/,"").replace(/[-_.]+/g," ").trim())}function Te(s){const a=s.match(Ce);if(a)return G(a[1])}function Me(s){const a=W(s),n=a.lastIndexOf("node_modules");if(n<0)return;const r=a[n+1],i=a[n+2];if(r)return r.startsWith("@")&&i?`${r}/${i}`:r}function Le(s){const a=W(s);if(a.length===0)return;const n=D(a[a.length-1]);if(n.length!==0)return Pe.has(n.toLowerCase())&&a.length>1?D(a[a.length-2]):n}function V(s){return we.test(s)||Ie.test(s)}function $e(s,a){const n=Te(s);if(n)return n;for(const r of[a,s]){if(!r)continue;const i=Me(r);if(i)return i}for(const r of[a,s]){if(!r)continue;const i=Le(r);if(i)return G(i)}return"Extension"}function Ae(s){return s.path.startsWith("<inline:")?"builtIn":V(s.path)||V(s.resolvedPath)?"packages":"local"}const Be=["builtIn","packages","local"],ze={builtIn:{label:"Built-in",description:"Inline and core extensions bundled with clankie",icon:H},packages:{label:"Packages",description:"Extensions loaded from packages and extension folders",icon:_},local:{label:"Local",description:"Extensions loaded from your workspace files",icon:U}};function k(s,a){return`${s} ${a}${s===1?"":"s"}`}function qe(){const{status:s}=P(Z,t=>({status:t.status})),{activeSessionId:a}=P(Q,t=>({activeSessionId:t.activeSessionId})),{extensions:n,extensionErrors:r,isLoading:i,installStatus:o}=P(ce,t=>t),[m,T]=d.useState(""),[p,N]=d.useState(""),[h,M]=d.useState("user"),S=s==="connected",x=d.useCallback(async()=>{const t=L.getClient();if(!(!t||!a)){R(!0);try{await t.reload(a);const{extensions:l,errors:c}=await t.getExtensions(a);de(l,c)}catch(l){console.error("Failed to load extensions:",l),R(!1)}}},[a]),X=d.useCallback(async()=>{const t=L.getClient();if(!t||!a)return;const l=p.trim();if(!l){y({isInstalling:!1,error:"Package source is required"});return}O(),y({isInstalling:!0,output:`Installing ${l} (${h} scope)...`,exitCode:null,error:void 0});try{const c=await t.installPackage(a,l,h==="project");y({isInstalling:!1,output:c.output,exitCode:c.exitCode,error:void 0}),N(""),await x()}catch(c){y({isInstalling:!1,error:c instanceof Error?c.message:"Failed to install package",exitCode:1})}},[a,h,x,p]);d.useEffect(()=>{S&&a&&x()},[S,a,x]);const E=d.useMemo(()=>n.map(t=>{const l=$e(t.path,t.resolvedPath);return{ext:t,displayName:l,category:Ae(t),searchBlob:[l,t.path,t.resolvedPath,t.tools.join(" "),t.commands.join(" "),t.flags.join(" "),t.shortcuts.join(" ")].join(" ").toLowerCase()}}),[n]),b=m.trim().toLowerCase(),u=d.useMemo(()=>b.length===0?E:E.filter(t=>t.searchBlob.includes(b)),[E,b]),J=d.useMemo(()=>u.reduce((t,l)=>(t[l.category].push(l),t),{builtIn:[],packages:[],local:[]}),[u]),v=d.useMemo(()=>u.reduce((t,l)=>({extensions:t.extensions+1,tools:t.tools+l.ext.tools.length,commands:t.commands+l.ext.commands.length,flags:t.flags+l.ext.flags.length}),{extensions:0,tools:0,commands:0,flags:0}),[u]);return S?i?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 extensions..."})]})}):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(A,{className:"card-depth",children:[e.jsxs(Y,{className:"flex flex-row items-center justify-between gap-2",children:[e.jsxs("div",{children:[e.jsxs(ee,{className:"flex items-center gap-2",children:[e.jsx($,{className:"h-5 w-5"}),"Extensions"]}),e.jsx(se,{children:"Loaded extensions with tools, commands, flags, and optional configuration"})]}),e.jsxs(f,{variant:"outline",size:"sm",onClick:x,children:[e.jsx(B,{className:"h-4 w-4 mr-2"}),"Refresh"]})]}),e.jsxs(z,{className:"space-y-4",children:[r.length>0&&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(me,{className:"h-4 w-4 text-destructive mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-destructive",children:"Extension Load Errors"}),e.jsx("div",{className:"mt-2 space-y-2",children:r.map(t=>e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-mono text-muted-foreground",children:t.path}),e.jsx("p",{className:"text-destructive",children:t.error})]},`${t.path}-${t.error}`))})]})]})}),n.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(_,{className:"h-12 w-12 text-muted-foreground/50 mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"No extensions loaded."}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Install packages below or ask the AI to use manage_packages."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(le,{className:"h-4 w-4 text-muted-foreground absolute left-3 top-1/2 -translate-y-1/2"}),e.jsx(F,{value:m,onChange:t=>T(t.target.value),placeholder:"Search extensions, tools, or commands",className:"pl-9"})]}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-4",children:[e.jsx(C,{label:"Extensions",value:v.extensions}),e.jsx(C,{label:"Tools",value:v.tools}),e.jsx(C,{label:"Commands",value:v.commands}),e.jsx(C,{label:"Flags",value:v.flags})]}),b.length>0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Showing ",u.length," of ",n.length," ","extensions"]})]}),u.length===0?e.jsxs("div",{className:"rounded-lg border border-dashed p-6 text-center",children:[e.jsx("p",{className:"text-sm font-medium",children:"No matching extensions"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Try searching by extension name, path, tool, or command."})]}):e.jsx("div",{className:"space-y-6",children:Be.map(t=>{const l=J[t];if(l.length===0)return null;const c=ze[t],K=c.icon;return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(K,{className:"h-4 w-4 text-primary"}),e.jsx("p",{className:"text-sm font-medium",children:c.label}),e.jsx(I,{variant:"outline",className:"text-[10px]",children:l.length})]}),e.jsx("p",{className:"text-xs text-muted-foreground hidden sm:block",children:c.description})]}),e.jsx("div",{className:"space-y-2",children:l.map(g=>e.jsx(Fe,{ext:g.ext,displayName:g.displayName,category:g.category,activeSessionId:a,onConfigSaved:x},`${g.ext.path}-${g.ext.resolvedPath}`))})]},t)})})]})]})]}),e.jsx(A,{className:"card-depth border-primary/20 bg-primary/5",children:e.jsxs(z,{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(xe,{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 Package"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Use this controlled installer to ensure packages are installed in clankie paths."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(F,{value:p,onChange:t=>N(t.target.value),placeholder:"npm:@foo/pi-tools or git:github.com/user/repo",disabled:o.isInstalling}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(f,{type:"button",size:"sm",variant:h==="user"?"default":"outline",onClick:()=>M("user"),disabled:o.isInstalling,children:"User scope (~/.clankie)"}),e.jsx(f,{type:"button",size:"sm",variant:h==="project"?"default":"outline",onClick:()=>M("project"),disabled:o.isInstalling,children:"Project scope (.pi)"}),e.jsx(f,{type:"button",size:"sm",onClick:X,disabled:o.isInstalling,children:o.isInstalling?e.jsxs(e.Fragment,{children:[e.jsx(B,{className:"h-4 w-4 mr-2 animate-spin"}),"Installing..."]}):"Install"})]})]})]})]}),(o.output||o.error)&&e.jsxs("div",{className:"rounded-md border bg-background/70 p-3 space-y-2",children:[o.error&&e.jsx("p",{className:"text-xs text-destructive",children:o.error}),o.output&&e.jsx("pre",{className:"text-xs whitespace-pre-wrap font-mono text-muted-foreground",children:o.output}),o.exitCode!==null&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Exit code: ",o.exitCode]}),e.jsx(f,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:O,disabled:o.isInstalling,children:"Clear output"})]})]})})]})}):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($,{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 loaded extensions"})]})]})})}function C({label:s,value:a}){return e.jsxs("div",{className:"rounded-md border bg-muted/20 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:s}),e.jsx("p",{className:"text-sm font-semibold",children:a})]})}function Fe({ext:s,displayName:a,category:n,activeSessionId:r,onConfigSaved:i}){const[o,m]=d.useState(!!s.uiSpec),p={builtIn:H,packages:_,local:U}[n],N=[k(s.tools.length,"tool"),k(s.commands.length,"command"),k(s.flags.length,"flag"),k(s.shortcuts.length,"shortcut")];return e.jsxs(ve,{open:o,onOpenChange:m,className:"rounded-lg border bg-card/40",children:[e.jsx(ye,{className:"group w-full rounded-lg px-4 py-3 text-left transition-colors hover:bg-muted/20",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 rounded-md border bg-primary/10 p-2",children:e.jsx(p,{className:"h-4 w-4 text-primary"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-semibold",children:a}),s.uiSpec&&e.jsx(I,{variant:"default",className:"text-[10px]",children:"Config UI"})]}),e.jsx("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",children:s.path}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:N.join(" · ")})]}),e.jsx(oe,{className:`mt-1 h-4 w-4 text-muted-foreground transition-transform ${o?"rotate-180":""}`})]})}),e.jsx(ke,{className:"border-t px-4 pb-4 pt-3",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border 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:s.path}),s.resolvedPath!==s.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:s.resolvedPath})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(w,{icon:re,label:"Tools",values:s.tools,variant:"secondary"}),e.jsx(w,{icon:pe,label:"Commands",values:s.commands,valuePrefix:"/",variant:"default"}),e.jsx(w,{icon:ge,label:"Flags",values:s.flags,valuePrefix:"--",variant:"outline"}),e.jsx(w,{icon:Ne,label:"Shortcuts",values:s.shortcuts,variant:"outline",mono:!0})]}),s.uiSpec&&r&&e.jsxs("div",{className:"rounded-md border bg-muted/30 p-3",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Extension Configuration"}),e.jsx(ie,{spec:s.uiSpec,sessionId:r,extensionPath:s.path,initialState:s.uiState,onConfigSaved:i})]})]})})]})}function w({icon:s,label:a,values:n,valuePrefix:r,variant:i,mono:o}){return n.length===0?null:e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(s,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"font-medium",children:a}),e.jsx(I,{variant:"outline",className:"h-4 px-1.5 text-[10px]",children:n.length})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(m=>e.jsxs(I,{variant:i,className:o?"font-mono text-[11px]":"",children:[r,m]},m))})]})}export{qe as component};
@@ -1 +1 @@
1
- import{j as t,w as l,a1 as o}from"./main-DLbCrY1P.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
+ import{j as t,w as l,a1 as o}from"./main-D1-MPeAM.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{u as o,a,c as l,s as d,r as m,j as s,S as c,L as x,B as u}from"./main-DLbCrY1P.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
+ import{u as o,a,c as l,s as d,r as m,j as s,S as c,L as x,B as u}from"./main-D1-MPeAM.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,b as l,d,L as h,C as n,e as t,f as m,g as x,h as p}from"./main-DLbCrY1P.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:"}),' Ask the AI in chat to install packages for you. For example: "install @pi/heartbeat"']}),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};
1
+ import{j as e,P as r,G as o,K as a,F as c,b as l,d,L as h,C as n,e as t,f as m,g as x,h as p}from"./main-D1-MPeAM.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};