import { a5 as spread_props, a6 as sanitize_props, a7 as slot, _ as derived, $ as store_get, a2 as attr_class, a3 as escape_html, a1 as attr, a4 as ensure_array_like, a9 as stringify, a8 as unsubscribe_stores, aa as bind_props } from './internal-B3VUlLoc.js';
import { g as goto, r as resolve } from './client-CHafgYl_.js';
import { I as Icon, c as activeProjectId, p as projects, g as agentProviders, h as agentMessages, j as ProviderIcon, k as agentRawEvents, l as agentSessions, m as agentAttachments, n as cancelAgent, o as ImportSessionsModal, u as updateAgentSession, q as createAgentSession, s as sendAgentMessage, r as uploadAgentAttachment, t as updateAgentSessionSettings, v as deleteAgentAttachment } from './Header-DF-atx4l.js';
import { f as formatDateTime, a as appSettings, b as formatTime } from './formatting-Cq2KfAoL.js';
import { R as Rotate_ccw, t as threadState, s as sessionPreview, a as sessionSubtitle, r as richMessage, m as messageAttachments, b as roleLabel, C as CUSTOM_MODEL_VALUE, i as isBusy, c as sessionExtensionsBySession, d as modelOptionsForProvider, e as effortDefaultForProvider, f as effectiveModelForProvider, g as effortOptionsForProvider } from './extensions-Crd97FJ_.js';
import { W as WorkspaceEmptyState } from './WorkspaceEmptyState-CpWtvgum.js';

//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/archive.svelte
function Archive($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "archive" },
		sanitize_props($$props),
		{
			/**
			* @component @name Archive
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iNSIgeD0iMiIgeT0iMyIgcng9IjEiIC8+CiAgPHBhdGggZD0iTTQgOHYxMWEyIDIgMCAwIDAgMiAyaDEyYTIgMiAwIDAgMCAyLTJWOCIgLz4KICA8cGF0aCBkPSJNMTAgMTJoNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/archive
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["rect", {
					"width": "20",
					"height": "5",
					"x": "2",
					"y": "3",
					"rx": "1"
				}],
				["path", { "d": "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }],
				["path", { "d": "M10 12h4" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/arrow-left.svelte
function Arrow_left($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "arrow-left" },
		sanitize_props($$props),
		{
			/**
			* @component @name ArrowLeft
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTIgMTktNy03IDctNyIgLz4KICA8cGF0aCBkPSJNMTkgMTJINSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/arrow-left
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/check.svelte
function Check($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "check" },
		sanitize_props($$props),
		{
			/**
			* @component @name Check
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgNiA5IDE3bC01LTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/check
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "M20 6 9 17l-5-5" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/chevron-down.svelte
function Chevron_down($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "chevron-down" },
		sanitize_props($$props),
		{
			/**
			* @component @name ChevronDown
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNiA5IDYgNiA2LTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chevron-down
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "m6 9 6 6 6-6" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/chevron-right.svelte
function Chevron_right($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "chevron-right" },
		sanitize_props($$props),
		{
			/**
			* @component @name ChevronRight
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtOSAxOCA2LTYtNi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/chevron-right
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "m9 18 6-6-6-6" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/clipboard.svelte
function Clipboard($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "clipboard" },
		sanitize_props($$props),
		{
			/**
			* @component @name Clipboard
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI0IiB4PSI4IiB5PSIyIiByeD0iMSIgcnk9IjEiIC8+CiAgPHBhdGggZD0iTTE2IDRoMmEyIDIgMCAwIDEgMiAydjE0YTIgMiAwIDAgMS0yIDJINmEyIDIgMCAwIDEtMi0yVjZhMiAyIDAgMCAxIDItMmgyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clipboard
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["rect", {
				"width": "8",
				"height": "4",
				"x": "8",
				"y": "2",
				"rx": "1",
				"ry": "1"
			}], ["path", { "d": "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/download.svelte
function Download($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "download" },
		sanitize_props($$props),
		{
			/**
			* @component @name Download
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTVWMyIgLz4KICA8cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNCIgLz4KICA8cGF0aCBkPSJtNyAxMCA1IDUgNS01IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/download
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "M12 15V3" }],
				["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }],
				["path", { "d": "m7 10 5 5 5-5" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/expand.svelte
function Expand($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "expand" },
		sanitize_props($$props),
		{
			/**
			* @component @name Expand
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgMTUgNiA2IiAvPgogIDxwYXRoIGQ9Im0xNSA5IDYtNiIgLz4KICA8cGF0aCBkPSJNMjEgMTZ2NWgtNSIgLz4KICA8cGF0aCBkPSJNMjEgOFYzaC01IiAvPgogIDxwYXRoIGQ9Ik0zIDE2djVoNSIgLz4KICA8cGF0aCBkPSJtMyAyMSA2LTYiIC8+CiAgPHBhdGggZD0iTTMgOFYzaDUiIC8+CiAgPHBhdGggZD0iTTkgOSAzIDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/expand
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "m15 15 6 6" }],
				["path", { "d": "m15 9 6-6" }],
				["path", { "d": "M21 16v5h-5" }],
				["path", { "d": "M21 8V3h-5" }],
				["path", { "d": "M3 16v5h5" }],
				["path", { "d": "m3 21 6-6" }],
				["path", { "d": "M3 8V3h5" }],
				["path", { "d": "M9 9 3 3" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/file-pen-line.svelte
function File_pen_line($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "file-pen-line" },
		sanitize_props($$props),
		{
			/**
			* @component @name FilePenLine
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQuMzY0IDEzLjYzNGEyIDIgMCAwIDAtLjUwNi44NTRsLS44MzcgMi44N2EuNS41IDAgMCAwIC42Mi42MmwyLjg3LS44MzdhMiAyIDAgMCAwIC44NTQtLjUwNmw0LjAxMy00LjAwOWExIDEgMCAwIDAtMy4wMDQtMy4wMDR6IiAvPgogIDxwYXRoIGQ9Ik0xNC40ODcgNy44NThBMSAxIDAgMCAxIDE0IDdWMiIgLz4KICA8cGF0aCBkPSJNMjAgMTkuNjQ1VjIwYTIgMiAwIDAgMS0yIDJINmEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg4YTIuNCAyLjQgMCAwIDEgMS43MDQuNzA2bDIuNTE2IDIuNTE2IiAvPgogIDxwYXRoIGQ9Ik04IDE4aDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/file-pen-line
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z" }],
				["path", { "d": "M14.487 7.858A1 1 0 0 1 14 7V2" }],
				["path", { "d": "M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516" }],
				["path", { "d": "M8 18h1" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/hammer.svelte
function Hammer($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "hammer" },
		sanitize_props($$props),
		{
			/**
			* @component @name Hammer
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgMTItOS4zNzMgOS4zNzNhMSAxIDAgMCAxLTMuMDAxLTNMMTIgOSIgLz4KICA8cGF0aCBkPSJtMTggMTUgNC00IiAvPgogIDxwYXRoIGQ9Im0yMS41IDExLjUtMS45MTQtMS45MTRBMiAyIDAgMCAxIDE5IDguMTcydi0uMzQ0YTIgMiAwIDAgMC0uNTg2LTEuNDE0bC0xLjY1Ny0xLjY1N0E2IDYgMCAwIDAgMTIuNTE2IDNIOWwxLjI0MyAxLjI0M0E2IDYgMCAwIDEgMTIgOC40ODVWMTBsMiAyaDEuMTcyYTIgMiAwIDAgMSAxLjQxNC41ODZMMTguNSAxNC41IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/hammer
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }],
				["path", { "d": "m18 15 4-4" }],
				["path", { "d": "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/image.svelte
function Image($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "image" },
		sanitize_props($$props),
		{
			/**
			* @component @name Image
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iOSIgcj0iMiIgLz4KICA8cGF0aCBkPSJtMjEgMTUtMy4wODYtMy4wODZhMiAyIDAgMCAwLTIuODI4IDBMNiAyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/image
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["rect", {
					"width": "18",
					"height": "18",
					"x": "3",
					"y": "3",
					"rx": "2",
					"ry": "2"
				}],
				["circle", {
					"cx": "9",
					"cy": "9",
					"r": "2"
				}],
				["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/list-checks.svelte
function List_checks($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "list-checks" },
		sanitize_props($$props),
		{
			/**
			* @component @name ListChecks
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgNWg4IiAvPgogIDxwYXRoIGQ9Ik0xMyAxMmg4IiAvPgogIDxwYXRoIGQ9Ik0xMyAxOWg4IiAvPgogIDxwYXRoIGQ9Im0zIDE3IDIgMiA0LTQiIC8+CiAgPHBhdGggZD0ibTMgNyAyIDIgNC00IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/list-checks
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "M13 5h8" }],
				["path", { "d": "M13 12h8" }],
				["path", { "d": "M13 19h8" }],
				["path", { "d": "m3 17 2 2 4-4" }],
				["path", { "d": "m3 7 2 2 4-4" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/message-square-text.svelte
function Message_square_text($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "message-square-text" },
		sanitize_props($$props),
		{
			/**
			* @component @name MessageSquareText
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTdhMiAyIDAgMCAxLTIgMkg2LjgyOGEyIDIgMCAwIDAtMS40MTQuNTg2bC0yLjIwMiAyLjIwMkEuNzEuNzEgMCAwIDEgMiAyMS4yODZWNWEyIDIgMCAwIDEgMi0yaDE2YTIgMiAwIDAgMSAyIDJ6IiAvPgogIDxwYXRoIGQ9Ik03IDExaDEwIiAvPgogIDxwYXRoIGQ9Ik03IDE1aDYiIC8+CiAgPHBhdGggZD0iTTcgN2g4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/message-square-text
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }],
				["path", { "d": "M7 11h10" }],
				["path", { "d": "M7 15h6" }],
				["path", { "d": "M7 7h8" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/network.svelte
function Network($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "network" },
		sanitize_props($$props),
		{
			/**
			* @component @name Network
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB4PSIxNiIgeT0iMTYiIHdpZHRoPSI2IiBoZWlnaHQ9IjYiIHJ4PSIxIiAvPgogIDxyZWN0IHg9IjIiIHk9IjE2IiB3aWR0aD0iNiIgaGVpZ2h0PSI2IiByeD0iMSIgLz4KICA8cmVjdCB4PSI5IiB5PSIyIiB3aWR0aD0iNiIgaGVpZ2h0PSI2IiByeD0iMSIgLz4KICA8cGF0aCBkPSJNNSAxNnYtM2ExIDEgMCAwIDEgMS0xaDEyYTEgMSAwIDAgMSAxIDF2MyIgLz4KICA8cGF0aCBkPSJNMTIgMTJWOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/network
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["rect", {
					"x": "16",
					"y": "16",
					"width": "6",
					"height": "6",
					"rx": "1"
				}],
				["rect", {
					"x": "2",
					"y": "16",
					"width": "6",
					"height": "6",
					"rx": "1"
				}],
				["rect", {
					"x": "9",
					"y": "2",
					"width": "6",
					"height": "6",
					"rx": "1"
				}],
				["path", { "d": "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3" }],
				["path", { "d": "M12 12V8" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/paperclip.svelte
function Paperclip($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "paperclip" },
		sanitize_props($$props),
		{
			/**
			* @component @name Paperclip
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgNi04LjQxNCA4LjU4NmEyIDIgMCAwIDAgMi44MjkgMi44MjlsOC40MTQtOC41ODZhNCA0IDAgMSAwLTUuNjU3LTUuNjU3bC04LjM3OSA4LjU1MWE2IDYgMCAxIDAgOC40ODUgOC40ODVsOC4zNzktOC41NTEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/paperclip
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/pencil.svelte
function Pencil($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "pencil" },
		sanitize_props($$props),
		{
			/**
			* @component @name Pencil
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuMTc0IDYuODEyYTEgMSAwIDAgMC0zLjk4Ni0zLjk4N0wzLjg0MiAxNi4xNzRhMiAyIDAgMCAwLS41LjgzbC0xLjMyMSA0LjM1MmEuNS41IDAgMCAwIC42MjMuNjIybDQuMzUzLTEuMzJhMiAyIDAgMCAwIC44My0uNDk3eiIgLz4KICA8cGF0aCBkPSJtMTUgNSA0IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pencil
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/plus.svelte
function Plus($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "plus" },
		sanitize_props($$props),
		{
			/**
			* @component @name Plus
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KICA8cGF0aCBkPSJNMTIgNXYxNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/plus
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/route.svelte
function Route($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "route" },
		sanitize_props($$props),
		{
			/**
			* @component @name Route
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI2IiBjeT0iMTkiIHI9IjMiIC8+CiAgPHBhdGggZD0iTTkgMTloOC41YTMuNSAzLjUgMCAwIDAgMC03aC0xMWEzLjUgMy41IDAgMCAxIDAtN0gxNSIgLz4KICA8Y2lyY2xlIGN4PSIxOCIgY3k9IjUiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/route
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["circle", {
					"cx": "6",
					"cy": "19",
					"r": "3"
				}],
				["path", { "d": "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15" }],
				["circle", {
					"cx": "18",
					"cy": "5",
					"r": "3"
				}]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/search.svelte
function Search($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "search" },
		sanitize_props($$props),
		{
			/**
			* @component @name Search
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMjEgMjEtNC4zNC00LjM0IiAvPgogIDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/search
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "m21 21-4.34-4.34" }], ["circle", {
				"cx": "11",
				"cy": "11",
				"r": "8"
			}]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/send-horizontal.svelte
function Send_horizontal($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "send-horizontal" },
		sanitize_props($$props),
		{
			/**
			* @component @name SendHorizontal
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy43MTQgMy4wNDhhLjQ5OC40OTggMCAwIDAtLjY4My42MjdsMi44NDMgNy42MjdhMiAyIDAgMCAxIDAgMS4zOTZsLTIuODQyIDcuNjI3YS40OTguNDk4IDAgMCAwIC42ODIuNjI3bDE4LTguNWEuNS41IDAgMCAwIDAtLjkwNHoiIC8+CiAgPHBhdGggZD0iTTYgMTJoMTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/send-horizontal
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" }], ["path", { "d": "M6 12h16" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/send.svelte
function Send($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "send" },
		sanitize_props($$props),
		{
			/**
			* @component @name Send
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQuNTM2IDIxLjY4NmEuNS41IDAgMCAwIC45MzctLjAyNGw2LjUtMTlhLjQ5Ni40OTYgMCAwIDAtLjYzNS0uNjM1bC0xOSA2LjVhLjUuNSAwIDAgMC0uMDI0LjkzN2w3LjkzIDMuMThhMiAyIDAgMCAxIDEuMTEyIDEuMTF6IiAvPgogIDxwYXRoIGQ9Im0yMS44NTQgMi4xNDctMTAuOTQgMTAuOTM5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/send
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }], ["path", { "d": "m21.854 2.147-10.94 10.939" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/square.svelte
function Square($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "square" },
		sanitize_props($$props),
		{
			/**
			* @component @name Square
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/square
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["rect", {
				"width": "18",
				"height": "18",
				"x": "3",
				"y": "3",
				"rx": "2"
			}]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/terminal.svelte
function Terminal($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "terminal" },
		sanitize_props($$props),
		{
			/**
			* @component @name Terminal
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTloOCIgLz4KICA8cGF0aCBkPSJtNCAxNyA2LTYtNi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/terminal
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "M12 19h8" }], ["path", { "d": "m4 17 6-6-6-6" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/triangle-alert.svelte
function Triangle_alert($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "triangle-alert" },
		sanitize_props($$props),
		{
			/**
			* @component @name TriangleAlert
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMjEuNzMgMTgtOC0xNGEyIDIgMCAwIDAtMy40OCAwbC04IDE0QTIgMiAwIDAgMCA0IDIxaDE2YTIgMiAwIDAgMCAxLjczLTMiIC8+CiAgPHBhdGggZD0iTTEyIDl2NCIgLz4KICA8cGF0aCBkPSJNMTIgMTdoLjAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/triangle-alert
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
				["path", { "d": "M12 9v4" }],
				["path", { "d": "M12 17h.01" }]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/user-round-cog.svelte
function User_round_cog($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "user-round-cog" },
		sanitize_props($$props),
		{
			/**
			* @component @name UserRoundCog
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTQuMzA1IDE5LjUzLjkyMy0uMzgyIiAvPgogIDxwYXRoIGQ9Im0xNS4yMjggMTYuODUyLS45MjMtLjM4MyIgLz4KICA8cGF0aCBkPSJtMTYuODUyIDE1LjIyOC0uMzgzLS45MjMiIC8+CiAgPHBhdGggZD0ibTE2Ljg1MiAyMC43NzItLjM4My45MjQiIC8+CiAgPHBhdGggZD0ibTE5LjE0OCAxNS4yMjguMzgzLS45MjMiIC8+CiAgPHBhdGggZD0ibTE5LjUzIDIxLjY5Ni0uMzgyLS45MjQiIC8+CiAgPHBhdGggZD0iTTIgMjFhOCA4IDAgMCAxIDEwLjQzNC03LjYyIiAvPgogIDxwYXRoIGQ9Im0yMC43NzIgMTYuODUyLjkyNC0uMzgzIiAvPgogIDxwYXRoIGQ9Im0yMC43NzIgMTkuMTQ4LjkyNC4zODMiIC8+CiAgPGNpcmNsZSBjeD0iMTAiIGN5PSI4IiByPSI1IiAvPgogIDxjaXJjbGUgY3g9IjE4IiBjeT0iMTgiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/user-round-cog
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [
				["path", { "d": "m14.305 19.53.923-.382" }],
				["path", { "d": "m15.228 16.852-.923-.383" }],
				["path", { "d": "m16.852 15.228-.383-.923" }],
				["path", { "d": "m16.852 20.772-.383.924" }],
				["path", { "d": "m19.148 15.228.383-.923" }],
				["path", { "d": "m19.53 21.696-.382-.924" }],
				["path", { "d": "M2 21a8 8 0 0 1 10.434-7.62" }],
				["path", { "d": "m20.772 16.852.924-.383" }],
				["path", { "d": "m20.772 19.148.924.383" }],
				["circle", {
					"cx": "10",
					"cy": "8",
					"r": "5"
				}],
				["circle", {
					"cx": "18",
					"cy": "18",
					"r": "3"
				}]
			],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region ../../node_modules/.pnpm/lucide-svelte@1.0.1_svelte@5.55.5/node_modules/lucide-svelte/dist/icons/x.svelte
function X($$renderer, $$props) {
	Icon($$renderer, spread_props([
		{ name: "x" },
		sanitize_props($$props),
		{
			/**
			* @component @name X
			* @description Lucide SVG icon component, renders SVG Element with children.
			*
			* @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggNiA2IDE4IiAvPgogIDxwYXRoIGQ9Im02IDYgMTIgMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/x
			* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
			*
			* @param {Object} props - Lucide icons props and any valid SVG attribute
			* @returns {FunctionalComponent} Svelte component
			*
			*/
			iconNode: [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]],
			children: ($$renderer) => {
				$$renderer.push(`<!--[-->`);
				slot($$renderer, $$props, "default", {});
				$$renderer.push(`<!--]-->`);
			},
			$$slots: { default: true }
		}
	]));
}
//#endregion
//#region src/lib/components/agent/ChatComposer.svelte
function ChatComposer($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		let { activeSession, activeProvider, draftAttachments, prompt = "", model = "", permissionMode = "", interactionMode = "build", effort = "", settingsMessage, settingsLocked, permissionOptions, onSaveSettings, onSendPrompt, onPromptKeydown, onUploadFiles, onRemoveAttachment, onCancelAgent } = $$props;
		let busy = derived(() => activeSession.status === "running" || activeSession.status === "queued");
		let modelOptions = derived(() => modelOptionsForProvider(activeProvider));
		let effortOptions = derived(() => effortOptionsForProvider(activeProvider, model));
		let compactEffortOptions = derived(() => effortOptions().filter((option) => option.length > 0));
		let defaultModelValue = derived(() => activeProvider?.defaultModel ?? "");
		let defaultEffortValue = derived(() => effortDefaultForProvider(activeProvider, effectiveModelForProvider(activeProvider, model)));
		let modelSelection = "";
		let customModelDraft = "";
		let effortSelection = "";
		function selectModel() {
			if (modelSelection === "__custom__") {
				if (!customModelDraft.trim()) customModelDraft = model.trim();
				model = customModelDraft;
			} else model = modelSelection;
			persistSettings();
		}
		function selectEffort() {
			effort = effortSelection;
			persistSettings();
		}
		async function persistSettings() {
			if (settingsLocked) return;
			await Promise.resolve();
			await onSaveSettings();
		}
		$$renderer.push(`<div class="composer-shell svelte-18m51qu"><div class="composer svelte-18m51qu">`);
		if (busy()) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div class="composer-loading svelte-18m51qu" aria-hidden="true"></div>`);
		} else $$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]--> `);
		if (draftAttachments.length > 0) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div class="attachment-tray svelte-18m51qu"><!--[-->`);
			const each_array = ensure_array_like(draftAttachments);
			for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
				let attachment = each_array[$$index];
				$$renderer.push(`<span class="attachment-chip svelte-18m51qu"${attr("title", attachment.path)}>${escape_html(attachment.kind === "project_file" ? "Project" : "Upload")}: ${escape_html(attachment.name)} <button type="button" aria-label="Remove attachment" class="svelte-18m51qu">`);
				X($$renderer, {
					size: 12,
					"aria-hidden": "true"
				});
				$$renderer.push(`<!----></button></span>`);
			}
			$$renderer.push(`<!--]--></div>`);
		} else $$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]--> <textarea placeholder="Ask anything..." aria-label="Message" class="svelte-18m51qu">`);
		const $$body = escape_html(prompt);
		if ($$body) $$renderer.push(`${$$body}`);
		$$renderer.push(`</textarea> <div class="composer-footer svelte-18m51qu"><div class="footer-settings svelte-18m51qu"><label class="footer-control model-control svelte-18m51qu" title="Model"><span class="sr-only svelte-18m51qu">Model</span> `);
		$$renderer.select({
			value: modelSelection,
			"aria-label": "Model",
			disabled: settingsLocked,
			onchange: (event) => {
				modelSelection = event.currentTarget.value;
				selectModel();
			},
			class: ""
		}, ($$renderer) => {
			$$renderer.push(`<!--[-->`);
			const each_array_1 = ensure_array_like(modelOptions());
			for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
				let option = each_array_1[$$index_1];
				$$renderer.option({
					value: option.value,
					class: ""
				}, ($$renderer) => {
					$$renderer.push(`${escape_html(option.label)}${escape_html(option.value === defaultModelValue() ? " (default)" : "")}`);
				}, "svelte-18m51qu", { "default-option": option.value === defaultModelValue() });
			}
			$$renderer.push(`<!--]-->`);
			if (modelSelection === "__custom__") {
				$$renderer.push("<!--[0-->");
				$$renderer.option({ value: CUSTOM_MODEL_VALUE }, ($$renderer) => {
					$$renderer.push(`Custom model`);
				});
			} else $$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]-->`);
		}, "svelte-18m51qu");
		$$renderer.push(`</label> `);
		if (modelSelection === "__custom__") {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<input class="footer-custom-model svelte-18m51qu"${attr("value", customModelDraft)} placeholder="custom model slug" aria-label="Custom model"${attr("disabled", settingsLocked, true)}/>`);
		} else $$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]--> <label class="footer-control effort-control svelte-18m51qu" title="Effort"><span class="sr-only svelte-18m51qu">Effort</span> `);
		$$renderer.select({
			value: effortSelection,
			"aria-label": "Effort",
			disabled: settingsLocked,
			onchange: (event) => {
				effortSelection = event.currentTarget.value;
				selectEffort();
			},
			class: ""
		}, ($$renderer) => {
			$$renderer.push(`<!--[-->`);
			const each_array_2 = ensure_array_like(compactEffortOptions());
			for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
				let option = each_array_2[$$index_2];
				$$renderer.option({
					value: option,
					class: ""
				}, ($$renderer) => {
					$$renderer.push(`${escape_html(option)}${escape_html(option === defaultEffortValue() ? " (default)" : "")}`);
				}, "svelte-18m51qu", { "default-option": option === defaultEffortValue() });
			}
			$$renderer.push(`<!--]-->`);
		}, "svelte-18m51qu");
		$$renderer.push(`</label> <label class="footer-control permission-control svelte-18m51qu" title="Permission mode"><span class="sr-only svelte-18m51qu">Permission mode</span> `);
		$$renderer.select({
			value: permissionMode,
			"aria-label": "Permission mode",
			disabled: settingsLocked,
			onchange: (event) => {
				permissionMode = event.currentTarget.value;
				persistSettings();
			},
			class: ""
		}, ($$renderer) => {
			$$renderer.push(`<!--[-->`);
			const each_array_3 = ensure_array_like(permissionOptions);
			for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
				let option = each_array_3[$$index_3];
				$$renderer.option({ value: option.value }, ($$renderer) => {
					$$renderer.push(`${escape_html(option.label)}`);
				});
			}
			$$renderer.push(`<!--]-->`);
		}, "svelte-18m51qu");
		$$renderer.push(`</label></div> <div class="footer-actions svelte-18m51qu"><button type="button" class="icon-button svelte-18m51qu" aria-label="Upload attachments" title="Upload attachments">`);
		Paperclip($$renderer, {
			size: 14,
			"aria-hidden": "true"
		});
		$$renderer.push(`<!----></button> <button type="button"${attr_class("mode-button svelte-18m51qu", void 0, { "active": interactionMode === "plan" })}${attr("disabled", settingsLocked, true)}${attr("aria-pressed", interactionMode === "plan")}${attr("aria-label", interactionMode === "build" ? "Switch to plan mode" : "Switch to build mode")}${attr("title", interactionMode === "build" ? "Build mode" : "Plan mode")}>`);
		if (interactionMode === "build") {
			$$renderer.push("<!--[0-->");
			Hammer($$renderer, {
				size: 13,
				"aria-hidden": "true"
			});
		} else {
			$$renderer.push("<!--[-1-->");
			Route($$renderer, {
				size: 13,
				"aria-hidden": "true"
			});
		}
		$$renderer.push(`<!--]--></button> `);
		if (busy()) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<button type="button" class="stop-button svelte-18m51qu" aria-label="Stop generation" title="Stop generation">`);
			Square($$renderer, {
				size: 13,
				"aria-hidden": "true"
			});
			$$renderer.push(`<!----></button>`);
		} else {
			$$renderer.push("<!--[-1-->");
			$$renderer.push(`<button type="button" class="send-button svelte-18m51qu"${attr("disabled", !prompt.trim(), true)} aria-label="Send message" title="Send message">`);
			Send_horizontal($$renderer, {
				size: 15,
				"aria-hidden": "true"
			});
			$$renderer.push(`<!----></button>`);
		}
		$$renderer.push(`<!--]--></div></div> <input type="file" multiple="" class="file-input svelte-18m51qu"/></div></div>`);
		bind_props($$props, {
			prompt,
			model,
			permissionMode,
			interactionMode,
			effort
		});
	});
}
//#endregion
//#region src/lib/components/agent/ChatHeaderBar.svelte
function ChatHeaderBar($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		let { activeSession, editingTitle = false, titleDraft = ""} = $$props;
		$$renderer.push(`<header${attr_class(`chat-header chat-header--${stringify(activeSession.provider)}`, "svelte-1jt4gki")}><div class="chat-heading svelte-1jt4gki"><button class="icon-button back-button svelte-1jt4gki" aria-label="Back to chats" title="Back">`);
		Arrow_left($$renderer, {
			size: 16,
			"aria-hidden": "true"
		});
		$$renderer.push(`<!----></button> <div${attr_class(`provider-mark provider-mark--${stringify(activeSession.provider)}`, "svelte-1jt4gki")} aria-hidden="true">`);
		ProviderIcon($$renderer, {
			provider: activeSession.provider,
			size: 15
		});
		$$renderer.push(`<!----></div> <div class="thread-title svelte-1jt4gki">`);
		if (editingTitle) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<form class="svelte-1jt4gki"><input${attr("value", titleDraft)} aria-label="Chat title" class="svelte-1jt4gki"/> <button type="submit" class="svelte-1jt4gki">Save</button> <button type="button" class="svelte-1jt4gki">Cancel</button></form>`);
		} else {
			$$renderer.push("<!--[-1-->");
			$$renderer.push(`<strong${attr("title", activeSession.title)} class="svelte-1jt4gki">${escape_html(activeSession.title)}</strong> <span class="svelte-1jt4gki">${escape_html(sessionSubtitle(activeSession))}</span>`);
		}
		$$renderer.push(`<!--]--></div></div> <div class="header-actions svelte-1jt4gki"><button class="icon-button svelte-1jt4gki" aria-label="Rename chat" title="Rename">`);
		Pencil($$renderer, {
			size: 15,
			"aria-hidden": "true"
		});
		$$renderer.push(`<!----></button></div></header>`);
	});
}
//#endregion
//#region src/lib/components/agent/ChatThreadList.svelte
function ChatThreadList($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		var $$store_subs;
		let { sessions, activeSessionId, providers, isThreadRoute, showArchived = false, messagesBySession, onNewSession, onOpenThread, onToggleArchive, onImportExisting } = $$props;
		let createMenuOpen = false;
		let listLabel = derived(() => `${sessions.length} ${showArchived ? "archived" : "active"} chats`);
		$$renderer.push(`<aside${attr_class("thread-rail svelte-1ygw0to", void 0, { "index-panel": !isThreadRoute })}><div class="rail-header svelte-1ygw0to"><div class="rail-title svelte-1ygw0to"><p class="svelte-1ygw0to">Chats</p> <span class="svelte-1ygw0to">${escape_html(listLabel())}</span></div></div> <div class="history-switch svelte-1ygw0to"><div class="create-menu-wrap svelte-1ygw0to"><button type="button" class="create-toggle svelte-1ygw0to" aria-haspopup="menu"${attr("aria-expanded", createMenuOpen)}>`);
		Plus($$renderer, {
			size: 14,
			"aria-hidden": "true"
		});
		$$renderer.push(`<!----> <span class="svelte-1ygw0to">New chat</span> `);
		Chevron_down($$renderer, {
			size: 13,
			"aria-hidden": "true"
		});
		$$renderer.push(`<!----></button> `);
		$$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]--></div> <button type="button" class="history-toggle svelte-1ygw0to"${attr("aria-pressed", showArchived)}>`);
		if (showArchived) {
			$$renderer.push("<!--[0-->");
			Rotate_ccw($$renderer, {
				size: 14,
				"aria-hidden": "true"
			});
			$$renderer.push(`<!----> <span class="svelte-1ygw0to">Active</span>`);
		} else {
			$$renderer.push("<!--[-1-->");
			Archive($$renderer, {
				size: 14,
				"aria-hidden": "true"
			});
			$$renderer.push(`<!----> <span class="svelte-1ygw0to">Archived</span>`);
		}
		$$renderer.push(`<!--]--></button></div> `);
		if (onImportExisting) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div class="import-row svelte-1ygw0to"><button class="import-button svelte-1ygw0to">`);
			Download($$renderer, {
				size: 13,
				"aria-hidden": "true"
			});
			$$renderer.push(`<!----> <span class="svelte-1ygw0to">Import existing CLI sessions</span></button></div>`);
		} else $$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]--> <div class="session-list svelte-1ygw0to"><!--[-->`);
		const each_array_1 = ensure_array_like(sessions);
		for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
			let session = each_array_1[$$index_1];
			const state = threadState(session);
			$$renderer.push(`<article${attr_class(`session-card session-card--${stringify(session.provider)}`, "svelte-1ygw0to", { "active": activeSessionId === session.id })}><button class="session-open svelte-1ygw0to"><div class="session-head svelte-1ygw0to"><span${attr_class(`session-provider-icon session-provider-icon--${stringify(session.provider)}`, "svelte-1ygw0to")}${attr("title", session.provider === "claude" ? "Claude" : "OpenAI")}>`);
			ProviderIcon($$renderer, {
				provider: session.provider,
				size: 13
			});
			$$renderer.push(`<!----></span> <span class="session-title svelte-1ygw0to">${escape_html(session.title)}</span> `);
			if (state.tone === "running" || state.tone === "error") {
				$$renderer.push("<!--[0-->");
				$$renderer.push(`<span${attr_class(`status-dot ${stringify(state.tone)}`, "svelte-1ygw0to")}${attr("title", state.label)}></span>`);
			} else $$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]--></div> <p class="session-preview svelte-1ygw0to">${escape_html(sessionPreview(session, messagesBySession))}</p> <div class="session-meta svelte-1ygw0to"><span class="svelte-1ygw0to">${escape_html(formatDateTime(session.updatedAt, store_get($$store_subs ??= {}, "$appSettings", appSettings).dateFormat, store_get($$store_subs ??= {}, "$appSettings", appSettings).timeFormat))}</span></div></button> <button class="archive-button svelte-1ygw0to"${attr("aria-label", session.archived ? "Unarchive chat" : "Archive chat")}${attr("title", session.archived ? "Unarchive" : "Archive")}>`);
			if (session.archived) {
				$$renderer.push("<!--[0-->");
				Rotate_ccw($$renderer, {
					size: 14,
					"aria-hidden": "true"
				});
			} else {
				$$renderer.push("<!--[-1-->");
				Archive($$renderer, {
					size: 14,
					"aria-hidden": "true"
				});
			}
			$$renderer.push(`<!--]--></button></article>`);
		}
		$$renderer.push(`<!--]--> `);
		if (sessions.length === 0) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div class="rail-empty svelte-1ygw0to"><p class="svelte-1ygw0to">${escape_html(showArchived ? "No archived chats" : "No chats yet")}</p> <span class="svelte-1ygw0to">${escape_html(showArchived ? "Archived chats will appear here." : "Claude and Codex sessions will appear here.")}</span></div>`);
		} else $$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]--></div></aside>`);
		if ($$store_subs) unsubscribe_stores($$store_subs);
		bind_props($$props, { showArchived });
	});
}
//#endregion
//#region src/lib/components/agent/ChatTimeline.svelte
function ChatTimeline($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		var $$store_subs;
		let { activeSession, messages, rawEvents, showRaw, showScrollToBottom, scroller = null, onTimelineScroll, onScrollToEnd, onCopy, onStructuredResponse } = $$props;
		let expandedIds = /* @__PURE__ */ new Set();
		let selectedChoices = {};
		function contentPreview(content) {
			const first = content.trimStart().split("\n")[0];
			return first.length > 90 ? first.slice(0, 90) + "…" : first;
		}
		function richIcon(kind) {
			if (kind === "ask-user") return Message_square_text;
			if (kind === "plan") return List_checks;
			if (kind === "approval") return Triangle_alert;
			if (kind === "command") return Terminal;
			if (kind === "file-change") return File_pen_line;
			if (kind === "search") return Search;
			if (kind === "image") return Image;
			if (kind === "subagent") return User_round_cog;
			if (kind === "mcp") return Network;
			return Hammer;
		}
		function richDetailsAlwaysVisible(rich) {
			return rich.canRespond || rich.questions.length > 0 || rich.kind === "approval";
		}
		function richPreviewText(rich) {
			const first = (rich.command || rich.subtitle || rich.body || rich.changes.map((change) => change.path).join(", ") || rich.planSteps.map((item) => item.step).join(", ")).trim().split("\n")[0] ?? "";
			return first.length > 120 ? first.slice(0, 120) + "..." : first;
		}
		function choiceKey(message, question, option) {
			return `${message.id}:${question.question}:${option.label}`;
		}
		function selectedLabels(message, question) {
			return question.options.filter((option) => selectedChoices[choiceKey(message, question, option)]).map((option) => option.label);
		}
		$$renderer.push(`<div class="message-stage svelte-1yfcmet">`);
		if (showRaw) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div class="raw-list svelte-1yfcmet"><!--[-->`);
			const each_array = ensure_array_like(rawEvents);
			for (let index = 0, $$length = each_array.length; index < $$length; index++) {
				let event = each_array[index];
				$$renderer.push(`<pre class="raw-event svelte-1yfcmet">${escape_html(JSON.stringify(event, null, 2))}</pre>`);
			}
			$$renderer.push(`<!--]--> `);
			if (rawEvents.length === 0) {
				$$renderer.push("<!--[0-->");
				$$renderer.push(`<div class="empty-state svelte-1yfcmet"><p class="svelte-1yfcmet">No raw events</p> <span class="svelte-1yfcmet">Events will appear when this chat starts working.</span></div>`);
			} else $$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]--></div>`);
		} else {
			$$renderer.push("<!--[-1-->");
			$$renderer.push(`<div class="timeline svelte-1yfcmet"><!--[-->`);
			const each_array_1 = ensure_array_like(messages);
			for (let $$index_6 = 0, $$length = each_array_1.length; $$index_6 < $$length; $$index_6++) {
				let message = each_array_1[$$index_6];
				const rich = richMessage(message);
				$$renderer.push(`<article${attr_class(`message-row ${stringify(message.role)}`, "svelte-1yfcmet")}>`);
				if (message.role === "user") {
					$$renderer.push("<!--[0-->");
					$$renderer.push(`<div class="user-bubble svelte-1yfcmet"><pre class="svelte-1yfcmet">${escape_html(message.content)}</pre> `);
					if (messageAttachments(message).length > 0) {
						$$renderer.push("<!--[0-->");
						$$renderer.push(`<div class="message-attachments svelte-1yfcmet"><!--[-->`);
						const each_array_2 = ensure_array_like(messageAttachments(message));
						for (let $$index_1 = 0, $$length = each_array_2.length; $$index_1 < $$length; $$index_1++) {
							let attachment = each_array_2[$$index_1];
							$$renderer.push(`<span${attr("title", attachment.path)} class="svelte-1yfcmet">${escape_html(attachment.kind === "project_file" ? "Project" : "Upload")}: ${escape_html(attachment.name)}</span>`);
						}
						$$renderer.push(`<!--]--></div>`);
					} else $$renderer.push("<!--[-1-->");
					$$renderer.push(`<!--]--> <div class="message-footer svelte-1yfcmet"><button title="Copy" class="svelte-1yfcmet">`);
					Clipboard($$renderer, {
						size: 12,
						"aria-hidden": "true"
					});
					$$renderer.push(`<!----></button> <span class="svelte-1yfcmet">${escape_html(formatTime(message.createdAt, store_get($$store_subs ??= {}, "$appSettings", appSettings).timeFormat))}</span></div></div>`);
				} else if (message.role === "assistant") {
					$$renderer.push("<!--[1-->");
					$$renderer.push(`<div class="assistant-message svelte-1yfcmet"><pre class="svelte-1yfcmet">${escape_html(message.content || "(empty response)")}</pre> <div class="message-footer svelte-1yfcmet"><span class="svelte-1yfcmet">${escape_html(formatTime(message.createdAt, store_get($$store_subs ??= {}, "$appSettings", appSettings).timeFormat))}</span> <button title="Copy" class="svelte-1yfcmet">`);
					Clipboard($$renderer, {
						size: 12,
						"aria-hidden": "true"
					});
					$$renderer.push(`<!----></button></div></div>`);
				} else if (rich) {
					$$renderer.push("<!--[2-->");
					const expanded = expandedIds.has(message.id);
					const Icon = richIcon(rich.kind);
					const alwaysVisible = richDetailsAlwaysVisible(rich);
					const detailsVisible = expanded || alwaysVisible;
					const preview = richPreviewText(rich);
					$$renderer.push(`<div${attr_class(`rich-message tone-${stringify(rich.tone)}`, "svelte-1yfcmet")}><div class="rich-header svelte-1yfcmet"><span class="rich-icon svelte-1yfcmet">`);
					if (Icon) {
						$$renderer.push("<!--[-->");
						Icon($$renderer, {
							size: 14,
							"aria-hidden": "true"
						});
						$$renderer.push("<!--]-->");
					} else {
						$$renderer.push("<!--[!-->");
						$$renderer.push("<!--]-->");
					}
					$$renderer.push(`</span> <div class="rich-title-block svelte-1yfcmet"><strong class="svelte-1yfcmet">${escape_html(rich.title)}</strong> `);
					if (rich.subtitle) {
						$$renderer.push("<!--[0-->");
						$$renderer.push(`<span class="svelte-1yfcmet">${escape_html(rich.subtitle)}</span>`);
					} else $$renderer.push("<!--[-1-->");
					$$renderer.push(`<!--]--></div> `);
					if (!alwaysVisible) {
						$$renderer.push("<!--[0-->");
						$$renderer.push(`<button class="rich-raw-toggle svelte-1yfcmet"${attr("aria-expanded", expanded)}${attr("aria-label", expanded ? "Collapse details" : "Expand details")}${attr("title", expanded ? "Collapse details" : "Expand details")}>`);
						if (expanded) {
							$$renderer.push("<!--[0-->");
							Chevron_down($$renderer, {
								size: 12,
								"aria-hidden": "true"
							});
						} else {
							$$renderer.push("<!--[-1-->");
							Chevron_right($$renderer, {
								size: 12,
								"aria-hidden": "true"
							});
						}
						$$renderer.push(`<!--]--></button>`);
					} else $$renderer.push("<!--[-1-->");
					$$renderer.push(`<!--]--></div> `);
					if (detailsVisible) {
						$$renderer.push("<!--[0-->");
						if (rich.questions.length > 0) {
							$$renderer.push("<!--[0-->");
							$$renderer.push(`<div class="question-stack svelte-1yfcmet"><!--[-->`);
							const each_array_3 = ensure_array_like(rich.questions);
							for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
								let question = each_array_3[$$index_3];
								$$renderer.push(`<section class="question-card svelte-1yfcmet"><div class="question-head svelte-1yfcmet"><span class="svelte-1yfcmet">${escape_html(question.header)}</span> `);
								if (question.multiSelect) {
									$$renderer.push("<!--[0-->");
									$$renderer.push(`<small class="svelte-1yfcmet">Multiple choices</small>`);
								} else $$renderer.push("<!--[-1-->");
								$$renderer.push(`<!--]--></div> <p class="svelte-1yfcmet">${escape_html(question.question)}</p> <div class="option-list svelte-1yfcmet"><!--[-->`);
								const each_array_4 = ensure_array_like(question.options);
								for (let $$index_2 = 0, $$length = each_array_4.length; $$index_2 < $$length; $$index_2++) {
									let option = each_array_4[$$index_2];
									$$renderer.push(`<button${attr_class("svelte-1yfcmet", void 0, { "chosen": selectedChoices[choiceKey(message, question, option)] })}><span class="option-check svelte-1yfcmet">`);
									if (question.multiSelect && selectedChoices[choiceKey(message, question, option)]) {
										$$renderer.push("<!--[0-->");
										Check($$renderer, {
											size: 12,
											"aria-hidden": "true"
										});
									} else $$renderer.push("<!--[-1-->");
									$$renderer.push(`<!--]--></span> <span class="svelte-1yfcmet"><strong class="svelte-1yfcmet">${escape_html(option.label)}</strong> `);
									if (option.description) {
										$$renderer.push("<!--[0-->");
										$$renderer.push(`<small class="svelte-1yfcmet">${escape_html(option.description)}</small>`);
									} else $$renderer.push("<!--[-1-->");
									$$renderer.push(`<!--]--></span></button>`);
								}
								$$renderer.push(`<!--]--></div> `);
								if (question.multiSelect) {
									$$renderer.push("<!--[0-->");
									$$renderer.push(`<button class="send-choice svelte-1yfcmet"${attr("disabled", selectedLabels(message, question).length === 0, true)}>`);
									Send($$renderer, {
										size: 12,
										"aria-hidden": "true"
									});
									$$renderer.push(`<!----> Send selection</button>`);
								} else $$renderer.push("<!--[-1-->");
								$$renderer.push(`<!--]--></section>`);
							}
							$$renderer.push(`<!--]--></div>`);
						} else $$renderer.push("<!--[-1-->");
						$$renderer.push(`<!--]--> `);
						if (rich.planSteps.length > 0) {
							$$renderer.push("<!--[0-->");
							$$renderer.push(`<ol class="plan-list svelte-1yfcmet"><!--[-->`);
							const each_array_5 = ensure_array_like(rich.planSteps);
							for (let $$index_4 = 0, $$length = each_array_5.length; $$index_4 < $$length; $$index_4++) {
								let item = each_array_5[$$index_4];
								$$renderer.push(`<li${attr_class(`status-${stringify(item.status.replaceAll(" ", "-"))}`, "svelte-1yfcmet")}><span class="svelte-1yfcmet">${escape_html(item.status)}</span> <p class="svelte-1yfcmet">${escape_html(item.step)}</p></li>`);
							}
							$$renderer.push(`<!--]--></ol>`);
						} else $$renderer.push("<!--[-1-->");
						$$renderer.push(`<!--]--> `);
						if (rich.command || rich.cwd) {
							$$renderer.push("<!--[0-->");
							$$renderer.push(`<div class="command-summary svelte-1yfcmet">`);
							if (rich.command) {
								$$renderer.push("<!--[0-->");
								$$renderer.push(`<code class="svelte-1yfcmet">${escape_html(rich.command)}</code>`);
							} else $$renderer.push("<!--[-1-->");
							$$renderer.push(`<!--]--> `);
							if (rich.cwd) {
								$$renderer.push("<!--[0-->");
								$$renderer.push(`<small class="svelte-1yfcmet">${escape_html(rich.cwd)}</small>`);
							} else $$renderer.push("<!--[-1-->");
							$$renderer.push(`<!--]--></div>`);
						} else $$renderer.push("<!--[-1-->");
						$$renderer.push(`<!--]--> `);
						if (rich.changes.length > 0) {
							$$renderer.push("<!--[0-->");
							$$renderer.push(`<div class="file-change-list svelte-1yfcmet"><!--[-->`);
							const each_array_6 = ensure_array_like(rich.changes);
							for (let $$index_5 = 0, $$length = each_array_6.length; $$index_5 < $$length; $$index_5++) {
								let change = each_array_6[$$index_5];
								$$renderer.push(`<div class="file-change-row svelte-1yfcmet"><span class="svelte-1yfcmet">${escape_html(change.kind)}</span> <code class="svelte-1yfcmet">${escape_html(change.path)}</code></div> `);
								if (change.diff) {
									$$renderer.push("<!--[0-->");
									$$renderer.push(`<pre class="mini-diff svelte-1yfcmet">${escape_html(change.diff)}</pre>`);
								} else $$renderer.push("<!--[-1-->");
								$$renderer.push(`<!--]-->`);
							}
							$$renderer.push(`<!--]--></div>`);
						} else $$renderer.push("<!--[-1-->");
						$$renderer.push(`<!--]--> `);
						if (rich.body) {
							$$renderer.push("<!--[0-->");
							$$renderer.push(`<pre class="rich-body svelte-1yfcmet">${escape_html(rich.body)}</pre>`);
						} else $$renderer.push("<!--[-1-->");
						$$renderer.push(`<!--]-->`);
					} else if (preview) {
						$$renderer.push("<!--[1-->");
						$$renderer.push(`<p class="rich-preview svelte-1yfcmet">${escape_html(preview)}</p>`);
					} else $$renderer.push("<!--[-1-->");
					$$renderer.push(`<!--]--> <div class="message-footer svelte-1yfcmet"><span class="svelte-1yfcmet">${escape_html(formatTime(message.createdAt, store_get($$store_subs ??= {}, "$appSettings", appSettings).timeFormat))}</span> <button title="Copy" class="svelte-1yfcmet">`);
					Clipboard($$renderer, {
						size: 12,
						"aria-hidden": "true"
					});
					$$renderer.push(`<!----></button> <button title="Open in modal" class="svelte-1yfcmet">`);
					Expand($$renderer, {
						size: 12,
						"aria-hidden": "true"
					});
					$$renderer.push(`<!----></button></div></div>`);
				} else {
					$$renderer.push("<!--[-1-->");
					const expanded = expandedIds.has(message.id);
					$$renderer.push(`<div${attr_class("work-message svelte-1yfcmet", void 0, { "error": message.role === "error" })}><button class="work-header svelte-1yfcmet"${attr("aria-expanded", expanded)}><span class="work-icon svelte-1yfcmet">`);
					if (message.role === "error") {
						$$renderer.push("<!--[0-->");
						Triangle_alert($$renderer, {
							size: 12,
							"aria-hidden": "true"
						});
					} else if (message.role === "tool") {
						$$renderer.push("<!--[1-->");
						Terminal($$renderer, {
							size: 12,
							"aria-hidden": "true"
						});
					} else {
						$$renderer.push("<!--[-1-->");
						Hammer($$renderer, {
							size: 12,
							"aria-hidden": "true"
						});
					}
					$$renderer.push(`<!--]--></span> <span class="work-label svelte-1yfcmet">${escape_html(roleLabel(message.role))}</span> `);
					if (message.eventType) {
						$$renderer.push("<!--[0-->");
						$$renderer.push(`<small class="work-event svelte-1yfcmet">${escape_html(message.eventType)}</small>`);
					} else $$renderer.push("<!--[-1-->");
					$$renderer.push(`<!--]--> <span class="work-toggle svelte-1yfcmet">`);
					if (expanded) {
						$$renderer.push("<!--[0-->");
						Chevron_down($$renderer, {
							size: 11,
							"aria-hidden": "true"
						});
					} else {
						$$renderer.push("<!--[-1-->");
						Chevron_right($$renderer, {
							size: 11,
							"aria-hidden": "true"
						});
					}
					$$renderer.push(`<!--]--></span></button> `);
					if (!expanded && message.content) {
						$$renderer.push("<!--[0-->");
						$$renderer.push(`<p class="work-preview svelte-1yfcmet">${escape_html(contentPreview(message.content))}</p>`);
					} else $$renderer.push("<!--[-1-->");
					$$renderer.push(`<!--]--> `);
					if (expanded) {
						$$renderer.push("<!--[0-->");
						$$renderer.push(`<div class="work-body svelte-1yfcmet"><pre class="svelte-1yfcmet">${escape_html(message.content)}</pre> <div class="message-footer svelte-1yfcmet"><span class="svelte-1yfcmet">${escape_html(formatTime(message.createdAt, store_get($$store_subs ??= {}, "$appSettings", appSettings).timeFormat))}</span> <button title="Copy" class="svelte-1yfcmet">`);
						Clipboard($$renderer, {
							size: 12,
							"aria-hidden": "true"
						});
						$$renderer.push(`<!----></button> <button title="Open in modal" class="svelte-1yfcmet">`);
						Expand($$renderer, {
							size: 12,
							"aria-hidden": "true"
						});
						$$renderer.push(`<!----></button></div></div>`);
					} else $$renderer.push("<!--[-1-->");
					$$renderer.push(`<!--]--></div>`);
				}
				$$renderer.push(`<!--]--></article>`);
			}
			$$renderer.push(`<!--]--> `);
			if (messages.length === 0) {
				$$renderer.push("<!--[0-->");
				$$renderer.push(`<div class="empty-state svelte-1yfcmet"><p class="svelte-1yfcmet">Send a message to start the conversation.</p> <span class="svelte-1yfcmet">${escape_html(activeSession.provider === "claude" ? "Claude" : "Codex")} is ready.</span></div>`);
			} else $$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]--></div> `);
			if (showScrollToBottom) {
				$$renderer.push("<!--[0-->");
				$$renderer.push(`<div class="scroll-pill svelte-1yfcmet"><button aria-label="Scroll to bottom" class="svelte-1yfcmet">`);
				Chevron_down($$renderer, {
					size: 14,
					"aria-hidden": "true"
				});
				$$renderer.push(`<!----> Scroll to bottom</button></div>`);
			} else $$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]-->`);
		}
		$$renderer.push(`<!--]--></div> `);
		$$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]-->`);
		if ($$store_subs) unsubscribe_stores($$store_subs);
		bind_props($$props, { scroller });
	});
}
//#endregion
//#region src/lib/components/extensions/ExtensionsToggle.svelte
function ExtensionsToggle($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		var $$store_subs;
		let { sessionId } = $$props;
		let expanded = false;
		let view = derived(() => store_get($$store_subs ??= {}, "$sessionExtensionsBySession", sessionExtensionsBySession)[sessionId] ?? null);
		let enabledChipCount = derived(() => view() ? view().skills.filter((s) => s.effectiveState === "on").length + view().mcpServers.filter((m) => m.effectiveEnabled).length : 0);
		let totalCount = derived(() => view() ? view().skills.length + view().mcpServers.length : 0);
		if (view() && totalCount() > 0) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div${attr_class("ext-toggle svelte-1t1fqzd", void 0, { "open": expanded })}><button type="button" class="toggle-summary svelte-1t1fqzd"><span class="label svelte-1t1fqzd">Extensions</span> <span class="count svelte-1t1fqzd">${escape_html(enabledChipCount())}/${escape_html(totalCount())} on</span> <span class="chev svelte-1t1fqzd" aria-hidden="true">${escape_html("▼")}</span></button> `);
			$$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]--></div>`);
		} else $$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]-->`);
		if ($$store_subs) unsubscribe_stores($$store_subs);
	});
}
//#endregion
//#region src/lib/components/agent/AgentChat.svelte
function AgentChat($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		var $$store_subs;
		let { projectId, sessionId = null } = $$props;
		let prompt = "";
		let showRaw = false;
		let showArchived = false;
		let model = "";
		let permissionMode = "";
		let interactionMode = "build";
		let effort = "";
		let settingsMessage = "";
		let titleDraft = "";
		let editingTitle = false;
		let scroller = null;
		let isAtEnd = true;
		let showImportModal = false;
		let promptHistory = [];
		let historyIndex = -1;
		let historyDraft = "";
		const claudePermissionOptions = [
			{
				value: "",
				label: "Default"
			},
			{
				value: "default",
				label: "Default"
			},
			{
				value: "acceptEdits",
				label: "Accept edits"
			},
			{
				value: "auto",
				label: "Auto"
			},
			{
				value: "dontAsk",
				label: "Don't ask"
			},
			{
				value: "bypassPermissions",
				label: "Bypass"
			}
		];
		const codexPermissionOptions = [
			{
				value: "",
				label: "Default"
			},
			{
				value: "read-only",
				label: "Read only"
			},
			{
				value: "workspace-write",
				label: "Workspace write"
			},
			{
				value: "full-auto",
				label: "Full auto"
			},
			{
				value: "danger-full-access",
				label: "Danger full access"
			}
		];
		let isThreadRoute = derived(() => Boolean(sessionId));
		let allProjectSessions = derived(() => [...store_get($$store_subs ??= {}, "$agentSessions", agentSessions)].filter((session) => session.projectId === projectId).sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()));
		let projectSessions = derived(() => allProjectSessions().filter((session) => session.archived === showArchived));
		let activeSession = derived(() => sessionId ? allProjectSessions().find((session) => session.id === sessionId) ?? null : null);
		let messages = derived(() => activeSession() ? store_get($$store_subs ??= {}, "$agentMessages", agentMessages)[activeSession().id] ?? [] : []);
		let attachments = derived(() => activeSession() ? store_get($$store_subs ??= {}, "$agentAttachments", agentAttachments)[activeSession().id] ?? [] : []);
		let draftAttachments = derived(() => attachments().filter((attachment) => attachment.messageId === null));
		let rawEvents = derived(() => activeSession() ? store_get($$store_subs ??= {}, "$agentRawEvents", agentRawEvents)[activeSession().id] ?? [] : []);
		let activeProvider = derived(() => activeSession() ? store_get($$store_subs ??= {}, "$agentProviders", agentProviders).find((provider) => provider.id === activeSession().provider) ?? null : null);
		let permissionOptions = derived(() => activeSession()?.provider === "claude" ? claudePermissionOptions : codexPermissionOptions);
		let settingsLocked = derived(() => isBusy(activeSession()));
		let showScrollToBottom = derived(() => !isAtEnd && messages().length > 0);
		async function newSession(provider) {
			const session = await createAgentSession(projectId, provider, provider === "claude" ? "Claude" : "Codex");
			if (!session) return;
			await goto(resolve(`/chat/${session.id}`));
		}
		async function saveSettings() {
			if (!activeSession() || settingsLocked()) return;
			settingsMessage = await updateAgentSessionSettings(activeSession().id, {
				model: model.trim() || null,
				permissionMode: permissionMode || null,
				interactionMode,
				effort: effort || null
			}) ? "Saved" : "Save failed";
		}
		async function toggleArchive(session, event) {
			event?.stopPropagation();
			await updateAgentSession(session.id, { archived: !session.archived });
		}
		async function openThread(id) {
			await goto(resolve(`/chat/${id}`));
		}
		function sendPrompt() {
			const text = prompt.trim();
			if (!text || !activeSession()) return;
			if (promptHistory.at(-1) !== text) promptHistory = [...promptHistory, text];
			historyIndex = -1;
			historyDraft = "";
			sendAgentMessage(activeSession().id, text, draftAttachments().map((attachment) => attachment.id));
			prompt = "";
		}
		function sendStructuredResponse(content) {
			if (!content.trim() || !activeSession()) return;
			sendAgentMessage(activeSession().id, content.trim());
			requestAnimationFrame(() => scrollToEnd(true));
		}
		function onPromptKeydown(e) {
			if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
				e.preventDefault();
				sendPrompt();
				return;
			}
			if (e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
			if (promptHistory.length === 0) return;
			const textarea = e.currentTarget;
			const selectionStart = textarea.selectionStart ?? 0;
			if (selectionStart !== (textarea.selectionEnd ?? selectionStart)) return;
			const beforeCursor = prompt.slice(0, selectionStart);
			const afterCursor = prompt.slice(selectionStart);
			const atFirstLine = !beforeCursor.includes("\n");
			const atLastLine = !afterCursor.includes("\n");
			if (e.key === "ArrowUp") {
				if (!atFirstLine) return;
				e.preventDefault();
				if (historyIndex === -1) historyDraft = prompt;
				historyIndex = historyIndex === -1 ? promptHistory.length - 1 : Math.max(0, historyIndex - 1);
				prompt = promptHistory[historyIndex] ?? prompt;
				requestAnimationFrame(() => textarea.setSelectionRange(prompt.length, prompt.length));
				return;
			}
			if (!atLastLine || historyIndex === -1) return;
			e.preventDefault();
			historyIndex += 1;
			if (historyIndex >= promptHistory.length) {
				historyIndex = -1;
				prompt = historyDraft;
				historyDraft = "";
			} else prompt = promptHistory[historyIndex] ?? prompt;
			requestAnimationFrame(() => textarea.setSelectionRange(prompt.length, prompt.length));
		}
		async function uploadFiles(event) {
			if (!activeSession()) return;
			const input = event.currentTarget;
			const files = Array.from(input.files ?? []);
			if (files.length === 0) return;
			for (const file of files) await uploadAgentAttachment(activeSession().id, file);
			input.value = "";
		}
		async function removeAttachment(attachment) {
			if (!activeSession()) return;
			await deleteAgentAttachment(activeSession().id, attachment.id);
		}
		function copy(content) {
			navigator.clipboard?.writeText(content);
		}
		function scrollToEnd(smooth = true) {
			if (!scroller) return;
			scroller.scrollTo({
				top: scroller.scrollHeight,
				behavior: smooth ? "smooth" : "auto"
			});
			isAtEnd = true;
		}
		function onTimelineScroll() {
			if (!scroller) return;
			isAtEnd = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight < 80;
		}
		let $$settled = true;
		let $$inner_renderer;
		function $$render_inner($$renderer) {
			$$renderer.push(`<div${attr_class("agent-shell svelte-1e2b6ap", void 0, {
				"index-route": !isThreadRoute(),
				"thread-route": isThreadRoute()
			})}>`);
			ChatThreadList($$renderer, {
				activeSessionId: activeSession()?.id ?? null,
				isThreadRoute: isThreadRoute(),
				messagesBySession: store_get($$store_subs ??= {}, "$agentMessages", agentMessages),
				onNewSession: newSession,
				onOpenThread: openThread,
				onToggleArchive: toggleArchive,
				onImportExisting: () => showImportModal = true,
				providers: store_get($$store_subs ??= {}, "$agentProviders", agentProviders),
				sessions: projectSessions(),
				get showArchived() {
					return showArchived;
				},
				set showArchived($$value) {
					showArchived = $$value;
					$$settled = false;
				}
			});
			$$renderer.push(`<!----> `);
			if (isThreadRoute()) {
				$$renderer.push("<!--[0-->");
				$$renderer.push(`<section class="chat-pane svelte-1e2b6ap">`);
				if (activeSession()) {
					$$renderer.push("<!--[0-->");
					ChatHeaderBar($$renderer, {
						activeSession: activeSession(),
						editingTitle,
						titleDraft
					});
					$$renderer.push(`<!----> `);
					ExtensionsToggle($$renderer, { sessionId: activeSession().id });
					$$renderer.push(`<!----> `);
					ChatTimeline($$renderer, {
						activeSession: activeSession(),
						messages: messages(),
						onCopy: copy,
						onScrollToEnd: scrollToEnd,
						onStructuredResponse: sendStructuredResponse,
						onTimelineScroll,
						rawEvents: rawEvents(),
						showRaw,
						showScrollToBottom: showScrollToBottom(),
						get scroller() {
							return scroller;
						},
						set scroller($$value) {
							scroller = $$value;
							$$settled = false;
						}
					});
					$$renderer.push(`<!----> `);
					ChatComposer($$renderer, {
						activeProvider: activeProvider(),
						activeSession: activeSession(),
						draftAttachments: draftAttachments(),
						permissionOptions: permissionOptions(),
						onCancelAgent: cancelAgent,
						onPromptKeydown,
						onRemoveAttachment: removeAttachment,
						onSaveSettings: saveSettings,
						onSendPrompt: sendPrompt,
						onUploadFiles: uploadFiles,
						settingsLocked: settingsLocked(),
						settingsMessage,
						get effort() {
							return effort;
						},
						set effort($$value) {
							effort = $$value;
							$$settled = false;
						},
						get interactionMode() {
							return interactionMode;
						},
						set interactionMode($$value) {
							interactionMode = $$value;
							$$settled = false;
						},
						get model() {
							return model;
						},
						set model($$value) {
							model = $$value;
							$$settled = false;
						},
						get permissionMode() {
							return permissionMode;
						},
						set permissionMode($$value) {
							permissionMode = $$value;
							$$settled = false;
						},
						get prompt() {
							return prompt;
						},
						set prompt($$value) {
							prompt = $$value;
							$$settled = false;
						}
					});
					$$renderer.push(`<!---->`);
				} else {
					$$renderer.push("<!--[-1-->");
					$$renderer.push(`<div class="overview-state svelte-1e2b6ap"><div class="svelte-1e2b6ap"><strong class="svelte-1e2b6ap">Chat not found</strong> <p class="svelte-1e2b6ap">This chat is not part of the selected project.</p></div></div>`);
				}
				$$renderer.push(`<!--]--></section>`);
			} else $$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]--></div> `);
			if (showImportModal) {
				$$renderer.push("<!--[0-->");
				ImportSessionsModal($$renderer);
			} else $$renderer.push("<!--[-1-->");
			$$renderer.push(`<!--]-->`);
		}
		do {
			$$settled = true;
			$$inner_renderer = $$renderer.copy();
			$$render_inner($$inner_renderer);
		} while (!$$settled);
		$$renderer.subsume($$inner_renderer);
		if ($$store_subs) unsubscribe_stores($$store_subs);
	});
}
//#endregion
//#region src/lib/components/panels/ChatPanel.svelte
function ChatPanel($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		var $$store_subs;
		let { sessionId = null } = $$props;
		let projectId = derived(() => store_get($$store_subs ??= {}, "$activeProjectId", activeProjectId) ?? "");
		let project = derived(() => store_get($$store_subs ??= {}, "$projects", projects).find((item) => item.id === projectId()) ?? null);
		let emptyTitle = derived(() => store_get($$store_subs ??= {}, "$projects", projects).length === 0 ? "No projects yet" : "No project selected");
		if (projectId() && project()) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div class="panel-fill svelte-mdu9js">`);
			AgentChat($$renderer, {
				projectId: projectId(),
				sessionId
			});
			$$renderer.push(`<!----></div>`);
		} else {
			$$renderer.push("<!--[-1-->");
			WorkspaceEmptyState($$renderer, {
				title: emptyTitle(),
				description: "Select or create a folder with the + button in the project bar, then choose a project."
			});
		}
		$$renderer.push(`<!--]-->`);
		if ($$store_subs) unsubscribe_stores($$store_subs);
	});
}

export { ChatPanel as C, Terminal as T };
//# sourceMappingURL=ChatPanel-ndj_srn8.js.map
