@wrongstack/webui 0.307.1 → 0.308.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 (42) hide show
  1. package/dist/assets/{AgentRosterView-Bb5m_XjZ.js → AgentRosterView-CIUKmLsb.js} +1 -1
  2. package/dist/assets/{AnalyticsDashboard-lqPCAo9u.js → AnalyticsDashboard-B5nVNt6L.js} +1 -1
  3. package/dist/assets/{AudienceMemoryPanel-putWTq5V.js → AudienceMemoryPanel-8nS326Uh.js} +1 -1
  4. package/dist/assets/{ChangesView-Cw-qvOLA.js → ChangesView-mapTz0_T.js} +1 -1
  5. package/dist/assets/{ChronicleDashboard-DQdMkTLQ.js → ChronicleDashboard-DUzceZNb.js} +1 -1
  6. package/dist/assets/{CodeEditor-BAv2f4se.js → CodeEditor-OjU9rotb.js} +1 -1
  7. package/dist/assets/{CronJobsPanel-DE5CVuSW.js → CronJobsPanel-DJaiJw1W.js} +1 -1
  8. package/dist/assets/{DebugDashboard-CgRH9SvC.js → DebugDashboard-BwSbR59I.js} +1 -1
  9. package/dist/assets/{DesignGalleryView-Uwo3JXyu.js → DesignGalleryView-DLKWmyVp.js} +1 -1
  10. package/dist/assets/{GoalView-Cc4B-0Qd.js → GoalView-BtSGdftD.js} +1 -1
  11. package/dist/assets/{KanbanView-CK4bvZfi.js → KanbanView-CyVG4DQu.js} +1 -1
  12. package/dist/assets/{MailboxDetailView-CGwtSBcH.js → MailboxDetailView-2NJVLrjb.js} +1 -1
  13. package/dist/assets/{MemoryDrawer-Cw1IiFCO.js → MemoryDrawer-n3cwB9m3.js} +1 -1
  14. package/dist/assets/{MemoryManager-l0R8JBzL.js → MemoryManager-CetsTR6O.js} +1 -1
  15. package/dist/assets/{ModelPicker-DC-XCx0f.js → ModelPicker-B21-QbDB.js} +1 -1
  16. package/dist/assets/{OfficeMapPanel-CUI0PJBI.js → OfficeMapPanel-BKHjEIu9.js} +1 -1
  17. package/dist/assets/{ProcessMonitor-DLD6PrVx.js → ProcessMonitor-9TOnqT6l.js} +1 -1
  18. package/dist/assets/{PromptJournalView-Cf1szLLw.js → PromptJournalView-0F-HTGHg.js} +1 -1
  19. package/dist/assets/{QueuePanel-O7IsaKUs.js → QueuePanel--PTd2-7z.js} +1 -1
  20. package/dist/assets/{RequirementIntakeView-Bg8ZoV7J.js → RequirementIntakeView-DnNSLw78.js} +1 -1
  21. package/dist/assets/{SageTabs-Bk8VDMmR.js → SageTabs-B-m4WBoA.js} +2 -2
  22. package/dist/assets/{SddHub-tQztZlHf.js → SddHub-DZCKF3Gw.js} +1 -1
  23. package/dist/assets/{SessionInspectView-BnoD3YER.js → SessionInspectView-Cf4ypYKn.js} +1 -1
  24. package/dist/assets/{SessionList-BRbF7FVS.js → SessionList-D4D2Cai9.js} +1 -1
  25. package/dist/assets/{SessionsDashboard-7heYIhHQ.js → SessionsDashboard-DoAbZStd.js} +1 -1
  26. package/dist/assets/{SetupScreen-CQW-6bhj.js → SetupScreen-CMrLwoo9.js} +1 -1
  27. package/dist/assets/{SkillDetailView-DdxB0JI4.js → SkillDetailView-sVjQG3qG.js} +1 -1
  28. package/dist/assets/{SpecsView-BAnFfPPH.js → SpecsView-B53AUOo3.js} +1 -1
  29. package/dist/assets/{TechStackView-DJeNOZE9.js → TechStackView-iONTty84.js} +1 -1
  30. package/dist/assets/{TerminalPanel-v3SC9LTq.js → TerminalPanel-1mqoe2_8.js} +1 -1
  31. package/dist/assets/{index-BRJ_UrGk.js → index-BUQkH6BW.js} +5 -5
  32. package/dist/assets/{roster-ws-CK52jAnG.js → roster-ws-Cinqwkgb.js} +1 -1
  33. package/dist/assets/{stores-DSGsI875.js → stores-B0SETQK4.js} +1 -1
  34. package/dist/assets/{useWebSocket-BFFntyS4.js → useWebSocket-DCx7NrvL.js} +1 -1
  35. package/dist/assets/vector-memory-panel-D1zQSMIW.js +1 -0
  36. package/dist/assets/ws-client-C2ppA8xa.js +1 -0
  37. package/dist/components/vector-memory-panel/index.d.ts +7 -0
  38. package/dist/components/vector-memory-panel/model.d.ts +37 -0
  39. package/dist/index.html +5 -5
  40. package/dist/index.js +619 -411
  41. package/package.json +8 -8
  42. package/dist/assets/ws-client-B3MVz75-.js +0 -1
package/dist/index.js CHANGED
@@ -35050,6 +35050,7 @@ var init_ws_client_domain_methods = __esm({
35050
35050
  this.send({ type: "provider.status.clear", payload: { providerId, model } });
35051
35051
  },
35052
35052
  newSession() {
35053
+ this.send({ type: "abort", payload: this.withSession({}) });
35053
35054
  this.send({ type: "session.new", payload: this.withSession({}) });
35054
35055
  },
35055
35056
  listProviders() {
@@ -84749,6 +84750,207 @@ var init_DeadCodeScanPanel = __esm({
84749
84750
  }
84750
84751
  });
84751
84752
 
84753
+ // src/components/vector-memory-panel/model.ts
84754
+ import { useEffect as useEffect128, useMemo as useMemo78, useState as useState143 } from "react";
84755
+ async function fetchVectorMemoryStatus(baseUrl = "") {
84756
+ const response = await fetch(`${baseUrl}/api/vector-memory/status`, {
84757
+ credentials: "include"
84758
+ });
84759
+ if (!response.ok) {
84760
+ throw new Error(`status failed: HTTP ${response.status}`);
84761
+ }
84762
+ return await response.json();
84763
+ }
84764
+ async function searchVectorMemory(query, opts = {}) {
84765
+ const params = new URLSearchParams();
84766
+ params.set("q", query);
84767
+ if (opts.limit !== void 0) params.set("limit", String(opts.limit));
84768
+ if (opts.threshold !== void 0) params.set("threshold", String(opts.threshold));
84769
+ const response = await fetch(
84770
+ `${opts.baseUrl ?? ""}/api/vector-memory/search?${params.toString()}`,
84771
+ { credentials: "include" }
84772
+ );
84773
+ if (!response.ok) {
84774
+ throw new Error(`search failed: HTTP ${response.status}`);
84775
+ }
84776
+ return await response.json();
84777
+ }
84778
+ var init_model2 = __esm({
84779
+ "src/components/vector-memory-panel/model.ts"() {
84780
+ "use strict";
84781
+ }
84782
+ });
84783
+
84784
+ // src/components/vector-memory-panel/index.tsx
84785
+ var vector_memory_panel_exports = {};
84786
+ __export(vector_memory_panel_exports, {
84787
+ VectorMemoryPanel: () => VectorMemoryPanel
84788
+ });
84789
+ import { useEffect as useEffect129, useState as useState144 } from "react";
84790
+ import { jsx as jsx263, jsxs as jsxs253 } from "react/jsx-runtime";
84791
+ function VectorMemoryPanel({
84792
+ baseUrl = ""
84793
+ } = {}) {
84794
+ const [status, setStatus] = useState144();
84795
+ const [statusError, setStatusError] = useState144();
84796
+ const [query, setQuery] = useState144("");
84797
+ const [limit, setLimit] = useState144(10);
84798
+ const [threshold, setThreshold] = useState144(void 0);
84799
+ const [hits, setHits] = useState144([]);
84800
+ const [searchError, setSearchError] = useState144();
84801
+ const [searching, setSearching] = useState144(false);
84802
+ useEffect129(() => {
84803
+ let cancelled = false;
84804
+ fetchVectorMemoryStatus(baseUrl).then((s) => {
84805
+ if (!cancelled) {
84806
+ setStatus(s);
84807
+ setStatusError(void 0);
84808
+ }
84809
+ }).catch((err) => {
84810
+ if (!cancelled) {
84811
+ setStatus(void 0);
84812
+ setStatusError(err instanceof Error ? err.message : String(err));
84813
+ }
84814
+ });
84815
+ return () => {
84816
+ cancelled = true;
84817
+ };
84818
+ }, [baseUrl]);
84819
+ const onSearch = async () => {
84820
+ const q = query.trim();
84821
+ if (q.length === 0) return;
84822
+ setSearching(true);
84823
+ setSearchError(void 0);
84824
+ try {
84825
+ const result = await searchVectorMemory(q, {
84826
+ limit,
84827
+ ...threshold !== void 0 ? { threshold } : {},
84828
+ baseUrl
84829
+ });
84830
+ setHits(result.hits);
84831
+ } catch (err) {
84832
+ setHits([]);
84833
+ setSearchError(err instanceof Error ? err.message : String(err));
84834
+ } finally {
84835
+ setSearching(false);
84836
+ }
84837
+ };
84838
+ if (statusError !== void 0) {
84839
+ return /* @__PURE__ */ jsxs253("div", { className: "vector-memory-panel vector-memory-panel--error", children: [
84840
+ /* @__PURE__ */ jsx263("h3", { children: "Vector Memory" }),
84841
+ /* @__PURE__ */ jsxs253("p", { children: [
84842
+ "Status unavailable: ",
84843
+ statusError
84844
+ ] })
84845
+ ] });
84846
+ }
84847
+ if (status === void 0) {
84848
+ return /* @__PURE__ */ jsxs253("div", { className: "vector-memory-panel vector-memory-panel--loading", children: [
84849
+ /* @__PURE__ */ jsx263("h3", { children: "Vector Memory" }),
84850
+ /* @__PURE__ */ jsx263("p", { children: "Loading status\u2026" })
84851
+ ] });
84852
+ }
84853
+ if (!status.enabled) {
84854
+ return /* @__PURE__ */ jsxs253("div", { className: "vector-memory-panel vector-memory-panel--disabled", children: [
84855
+ /* @__PURE__ */ jsx263("h3", { children: "Vector Memory" }),
84856
+ /* @__PURE__ */ jsx263("p", { children: "Disabled \u2014 the webui-server host does not have a vector memory store wired." })
84857
+ ] });
84858
+ }
84859
+ return /* @__PURE__ */ jsxs253("div", { className: "vector-memory-panel", children: [
84860
+ /* @__PURE__ */ jsx263("h3", { children: "Vector Memory" }),
84861
+ /* @__PURE__ */ jsxs253("dl", { className: "vector-memory-panel__status", children: [
84862
+ /* @__PURE__ */ jsx263("dt", { children: "Active provider" }),
84863
+ /* @__PURE__ */ jsx263("dd", { children: /* @__PURE__ */ jsx263("code", { children: status.providerId ?? "unknown" }) }),
84864
+ /* @__PURE__ */ jsx263("dt", { children: "Model" }),
84865
+ /* @__PURE__ */ jsx263("dd", { children: /* @__PURE__ */ jsx263("code", { children: status.modelId ?? "unknown" }) }),
84866
+ /* @__PURE__ */ jsx263("dt", { children: "Dimensions" }),
84867
+ /* @__PURE__ */ jsx263("dd", { children: status.dimensions ?? "unknown" }),
84868
+ /* @__PURE__ */ jsx263("dt", { children: "Entries / vectors" }),
84869
+ /* @__PURE__ */ jsxs253("dd", { children: [
84870
+ status.entries ?? 0,
84871
+ " / ",
84872
+ status.vectors ?? 0
84873
+ ] }),
84874
+ /* @__PURE__ */ jsx263("dt", { children: "Store path" }),
84875
+ /* @__PURE__ */ jsx263("dd", { children: /* @__PURE__ */ jsx263("code", { children: status.storePath ?? "(project root)" }) }),
84876
+ /* @__PURE__ */ jsx263("dt", { children: "Model cache" }),
84877
+ /* @__PURE__ */ jsx263("dd", { children: /* @__PURE__ */ jsx263("code", { children: status.modelCacheDir ?? "(project root)" }) }),
84878
+ /* @__PURE__ */ jsx263("dt", { children: "Providers" }),
84879
+ /* @__PURE__ */ jsx263("dd", { children: status.providers?.join(", ") ?? "" })
84880
+ ] }),
84881
+ /* @__PURE__ */ jsxs253("div", { className: "vector-memory-panel__search", children: [
84882
+ /* @__PURE__ */ jsx263("label", { htmlFor: "vm-query", children: "Query" }),
84883
+ /* @__PURE__ */ jsx263(
84884
+ "input",
84885
+ {
84886
+ id: "vm-query",
84887
+ type: "text",
84888
+ value: query,
84889
+ onChange: (e) => setQuery(e.currentTarget.value),
84890
+ onKeyDown: (e) => {
84891
+ if (e.key === "Enter") void onSearch();
84892
+ },
84893
+ placeholder: "apple banana"
84894
+ }
84895
+ ),
84896
+ /* @__PURE__ */ jsxs253("div", { className: "vector-memory-panel__controls", children: [
84897
+ /* @__PURE__ */ jsxs253("label", { children: [
84898
+ "limit",
84899
+ /* @__PURE__ */ jsx263(
84900
+ "input",
84901
+ {
84902
+ type: "number",
84903
+ min: 1,
84904
+ max: 50,
84905
+ value: limit,
84906
+ onChange: (e) => setLimit(Math.max(1, Math.min(50, Number(e.currentTarget.value) || 10)))
84907
+ }
84908
+ )
84909
+ ] }),
84910
+ /* @__PURE__ */ jsxs253("label", { children: [
84911
+ "threshold",
84912
+ /* @__PURE__ */ jsx263(
84913
+ "input",
84914
+ {
84915
+ type: "number",
84916
+ min: 0,
84917
+ max: 1,
84918
+ step: 0.05,
84919
+ value: threshold ?? "",
84920
+ onChange: (e) => {
84921
+ const raw = e.currentTarget.value;
84922
+ setThreshold(raw === "" ? void 0 : Number.parseFloat(raw));
84923
+ }
84924
+ }
84925
+ )
84926
+ ] }),
84927
+ /* @__PURE__ */ jsx263("button", { type: "button", onClick: () => void onSearch(), disabled: searching, children: searching ? "Searching\u2026" : "Search" })
84928
+ ] })
84929
+ ] }),
84930
+ searchError !== void 0 ? /* @__PURE__ */ jsxs253("p", { className: "vector-memory-panel__error", children: [
84931
+ "Search error: ",
84932
+ searchError
84933
+ ] }) : null,
84934
+ /* @__PURE__ */ jsxs253("ol", { className: "vector-memory-panel__hits", children: [
84935
+ hits.map((h) => /* @__PURE__ */ jsxs253("li", { className: "vector-memory-panel__hit", children: [
84936
+ /* @__PURE__ */ jsxs253("div", { className: "vector-memory-panel__hit-header", children: [
84937
+ /* @__PURE__ */ jsx263("span", { className: "vector-memory-panel__hit-score", children: h.score.toFixed(3) }),
84938
+ h.summary ? /* @__PURE__ */ jsx263("span", { className: "vector-memory-panel__hit-summary", children: h.summary }) : null
84939
+ ] }),
84940
+ /* @__PURE__ */ jsx263("p", { className: "vector-memory-panel__hit-text", children: h.text }),
84941
+ h.tags.length > 0 ? /* @__PURE__ */ jsx263("p", { className: "vector-memory-panel__hit-tags", children: h.tags.map((t) => /* @__PURE__ */ jsx263("span", { className: "vector-memory-panel__hit-tag", children: t }, t)) }) : null
84942
+ ] }, h.id)),
84943
+ hits.length === 0 && searching === false && query.trim().length > 0 ? /* @__PURE__ */ jsx263("li", { className: "vector-memory-panel__no-hits", children: "No results." }) : null
84944
+ ] })
84945
+ ] });
84946
+ }
84947
+ var init_vector_memory_panel = __esm({
84948
+ "src/components/vector-memory-panel/index.tsx"() {
84949
+ "use strict";
84950
+ init_model2();
84951
+ }
84952
+ });
84953
+
84752
84954
  // src/components/SetupScreen/key-operation.ts
84753
84955
  function waitForKeyOperationResult(ws, timeoutMs = 8e3) {
84754
84956
  return new Promise((resolve, reject) => {
@@ -84771,17 +84973,17 @@ var init_key_operation = __esm({
84771
84973
 
84772
84974
  // src/components/SetupScreen/CustomProviderSection.tsx
84773
84975
  import { ChevronRight as ChevronRight27, Loader2 as Loader251, Plus as Plus23 } from "lucide-react";
84774
- import { useState as useState143 } from "react";
84775
- import { jsx as jsx263, jsxs as jsxs253 } from "react/jsx-runtime";
84976
+ import { useState as useState145 } from "react";
84977
+ import { jsx as jsx264, jsxs as jsxs254 } from "react/jsx-runtime";
84776
84978
  function CustomProviderSection({ onKeySaved }) {
84777
84979
  const { t } = useTranslation();
84778
- const [expanded, setExpanded] = useState143(false);
84779
- const [providerId, setProviderId] = useState143("");
84780
- const [family, setFamily] = useState143("openai-compatible");
84781
- const [baseUrl, setBaseUrl] = useState143("");
84782
- const [key, setKey] = useState143("");
84783
- const [isSaving, setIsSaving] = useState143(false);
84784
- const [models, setModels] = useState143([]);
84980
+ const [expanded, setExpanded] = useState145(false);
84981
+ const [providerId, setProviderId] = useState145("");
84982
+ const [family, setFamily] = useState145("openai-compatible");
84983
+ const [baseUrl, setBaseUrl] = useState145("");
84984
+ const [key, setKey] = useState145("");
84985
+ const [isSaving, setIsSaving] = useState145(false);
84986
+ const [models, setModels] = useState145([]);
84785
84987
  const { setFieldRef, handleKeyDown } = useFieldKeyboardNav();
84786
84988
  const handleSave = async () => {
84787
84989
  if (!providerId.trim()) return;
@@ -84827,20 +85029,20 @@ function CustomProviderSection({ onKeySaved }) {
84827
85029
  setIsSaving(false);
84828
85030
  }
84829
85031
  };
84830
- return /* @__PURE__ */ jsxs253("div", { className: "rounded-xl border border-dashed border-border/60 overflow-hidden", children: [
84831
- /* @__PURE__ */ jsxs253(
85032
+ return /* @__PURE__ */ jsxs254("div", { className: "rounded-xl border border-dashed border-border/60 overflow-hidden", children: [
85033
+ /* @__PURE__ */ jsxs254(
84832
85034
  "button",
84833
85035
  {
84834
85036
  type: "button",
84835
85037
  onClick: () => setExpanded(!expanded),
84836
85038
  className: "w-full flex items-center gap-3 p-4 text-left hover:bg-muted/30 transition-colors",
84837
85039
  children: [
84838
- /* @__PURE__ */ jsx263("div", { className: "w-10 h-10 rounded-lg bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsx263(Plus23, { className: "h-5 w-5 text-muted-foreground" }) }),
84839
- /* @__PURE__ */ jsxs253("div", { className: "flex-1", children: [
84840
- /* @__PURE__ */ jsx263("h3", { className: "text-sm font-medium", children: t("setup:screen.custom.title") }),
84841
- /* @__PURE__ */ jsx263("p", { className: "text-xs text-muted-foreground", children: t("setup:screen.custom.description") })
85040
+ /* @__PURE__ */ jsx264("div", { className: "w-10 h-10 rounded-lg bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsx264(Plus23, { className: "h-5 w-5 text-muted-foreground" }) }),
85041
+ /* @__PURE__ */ jsxs254("div", { className: "flex-1", children: [
85042
+ /* @__PURE__ */ jsx264("h3", { className: "text-sm font-medium", children: t("setup:screen.custom.title") }),
85043
+ /* @__PURE__ */ jsx264("p", { className: "text-xs text-muted-foreground", children: t("setup:screen.custom.description") })
84842
85044
  ] }),
84843
- /* @__PURE__ */ jsx263(
85045
+ /* @__PURE__ */ jsx264(
84844
85046
  ChevronRight27,
84845
85047
  {
84846
85048
  className: cn(
@@ -84852,10 +85054,10 @@ function CustomProviderSection({ onKeySaved }) {
84852
85054
  ]
84853
85055
  }
84854
85056
  ),
84855
- expanded && /* @__PURE__ */ jsxs253("div", { className: "px-4 pb-4 space-y-3 border-t border-border/40", children: [
84856
- /* @__PURE__ */ jsxs253("div", { className: "space-y-1.5 pt-3", children: [
84857
- /* @__PURE__ */ jsx263("span", { className: "text-[11px] font-medium text-muted-foreground block", children: t("setup:screen.custom.localServers") }),
84858
- /* @__PURE__ */ jsx263("div", { className: "flex flex-wrap gap-1.5", children: LOCAL_SERVER_PRESETS.map((preset) => /* @__PURE__ */ jsx263(
85057
+ expanded && /* @__PURE__ */ jsxs254("div", { className: "px-4 pb-4 space-y-3 border-t border-border/40", children: [
85058
+ /* @__PURE__ */ jsxs254("div", { className: "space-y-1.5 pt-3", children: [
85059
+ /* @__PURE__ */ jsx264("span", { className: "text-[11px] font-medium text-muted-foreground block", children: t("setup:screen.custom.localServers") }),
85060
+ /* @__PURE__ */ jsx264("div", { className: "flex flex-wrap gap-1.5", children: LOCAL_SERVER_PRESETS.map((preset) => /* @__PURE__ */ jsx264(
84859
85061
  Button,
84860
85062
  {
84861
85063
  type: "button",
@@ -84874,10 +85076,10 @@ function CustomProviderSection({ onKeySaved }) {
84874
85076
  preset.id
84875
85077
  )) })
84876
85078
  ] }),
84877
- /* @__PURE__ */ jsxs253("div", { className: "grid grid-cols-2 gap-3", children: [
84878
- /* @__PURE__ */ jsxs253("div", { children: [
84879
- /* @__PURE__ */ jsx263("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.providerId") }),
84880
- /* @__PURE__ */ jsx263(
85079
+ /* @__PURE__ */ jsxs254("div", { className: "grid grid-cols-2 gap-3", children: [
85080
+ /* @__PURE__ */ jsxs254("div", { children: [
85081
+ /* @__PURE__ */ jsx264("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.providerId") }),
85082
+ /* @__PURE__ */ jsx264(
84881
85083
  Input,
84882
85084
  {
84883
85085
  placeholder: t("activity:customProviderSection.eGMyLlm"),
@@ -84889,9 +85091,9 @@ function CustomProviderSection({ onKeySaved }) {
84889
85091
  }
84890
85092
  )
84891
85093
  ] }),
84892
- /* @__PURE__ */ jsxs253("div", { children: [
84893
- /* @__PURE__ */ jsx263("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.family") }),
84894
- /* @__PURE__ */ jsxs253(
85094
+ /* @__PURE__ */ jsxs254("div", { children: [
85095
+ /* @__PURE__ */ jsx264("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.family") }),
85096
+ /* @__PURE__ */ jsxs254(
84895
85097
  "select",
84896
85098
  {
84897
85099
  value: family,
@@ -84900,18 +85102,18 @@ function CustomProviderSection({ onKeySaved }) {
84900
85102
  ref: setFieldRef(1),
84901
85103
  onKeyDown: (e) => handleKeyDown(e, 1),
84902
85104
  children: [
84903
- /* @__PURE__ */ jsx263("option", { value: "openai-compatible", children: t("setup:screen.custom.familyOpenAiCompatible") }),
84904
- /* @__PURE__ */ jsx263("option", { value: "openai", children: "OpenAI" }),
84905
- /* @__PURE__ */ jsx263("option", { value: "anthropic", children: "Anthropic" }),
84906
- /* @__PURE__ */ jsx263("option", { value: "google", children: "Google" })
85105
+ /* @__PURE__ */ jsx264("option", { value: "openai-compatible", children: t("setup:screen.custom.familyOpenAiCompatible") }),
85106
+ /* @__PURE__ */ jsx264("option", { value: "openai", children: "OpenAI" }),
85107
+ /* @__PURE__ */ jsx264("option", { value: "anthropic", children: "Anthropic" }),
85108
+ /* @__PURE__ */ jsx264("option", { value: "google", children: "Google" })
84907
85109
  ]
84908
85110
  }
84909
85111
  )
84910
85112
  ] })
84911
85113
  ] }),
84912
- /* @__PURE__ */ jsxs253("div", { children: [
84913
- /* @__PURE__ */ jsx263("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.baseUrl") }),
84914
- /* @__PURE__ */ jsx263(
85114
+ /* @__PURE__ */ jsxs254("div", { children: [
85115
+ /* @__PURE__ */ jsx264("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.baseUrl") }),
85116
+ /* @__PURE__ */ jsx264(
84915
85117
  Input,
84916
85118
  {
84917
85119
  placeholder: t("activity:customProviderSection.eGHttpLocalhost11434V1"),
@@ -84923,9 +85125,9 @@ function CustomProviderSection({ onKeySaved }) {
84923
85125
  }
84924
85126
  )
84925
85127
  ] }),
84926
- /* @__PURE__ */ jsxs253("div", { children: [
84927
- /* @__PURE__ */ jsx263("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.apiKey") }),
84928
- /* @__PURE__ */ jsx263(
85128
+ /* @__PURE__ */ jsxs254("div", { children: [
85129
+ /* @__PURE__ */ jsx264("span", { className: "text-[11px] font-medium text-muted-foreground mb-1 block", children: t("setup:screen.custom.apiKey") }),
85130
+ /* @__PURE__ */ jsx264(
84929
85131
  Input,
84930
85132
  {
84931
85133
  type: "password",
@@ -84938,8 +85140,8 @@ function CustomProviderSection({ onKeySaved }) {
84938
85140
  }
84939
85141
  )
84940
85142
  ] }),
84941
- /* @__PURE__ */ jsx263(ModelEditor, { models, onChange: setModels }),
84942
- /* @__PURE__ */ jsxs253(
85143
+ /* @__PURE__ */ jsx264(ModelEditor, { models, onChange: setModels }),
85144
+ /* @__PURE__ */ jsxs254(
84943
85145
  Button,
84944
85146
  {
84945
85147
  onClick: handleSave,
@@ -84948,7 +85150,7 @@ function CustomProviderSection({ onKeySaved }) {
84948
85150
  ref: setFieldRef(4),
84949
85151
  onKeyDown: (e) => handleKeyDown(e, 4, handleSave),
84950
85152
  children: [
84951
- isSaving ? /* @__PURE__ */ jsx263(Loader251, { className: "h-4 w-4 animate-spin mr-2" }) : null,
85153
+ isSaving ? /* @__PURE__ */ jsx264(Loader251, { className: "h-4 w-4 animate-spin mr-2" }) : null,
84952
85154
  t("setup:screen.custom.add")
84953
85155
  ]
84954
85156
  }
@@ -85034,9 +85236,9 @@ import {
85034
85236
  Loader2 as Loader252,
85035
85237
  Share2
85036
85238
  } from "lucide-react";
85037
- import { useEffect as useEffect128, useState as useState144 } from "react";
85239
+ import { useEffect as useEffect130, useState as useState146 } from "react";
85038
85240
  import QRCode from "qrcode";
85039
- import { Fragment as Fragment73, jsx as jsx264, jsxs as jsxs254 } from "react/jsx-runtime";
85241
+ import { Fragment as Fragment73, jsx as jsx265, jsxs as jsxs255 } from "react/jsx-runtime";
85040
85242
  function ProviderKeyCard({
85041
85243
  popular,
85042
85244
  catalogProvider,
@@ -85045,14 +85247,14 @@ function ProviderKeyCard({
85045
85247
  probeResult
85046
85248
  }) {
85047
85249
  const { t } = useTranslation();
85048
- const [key, setKey] = useState144("");
85049
- const [isSaving, setIsSaving] = useState144(false);
85050
- const [saved, setSaved] = useState144(!!savedProvider?.apiKeys.some((k) => k.isActive));
85051
- const [showModels, setShowModels] = useState144(false);
85052
- const [copied, setCopied] = useState144(false);
85053
- const [shareModalOpen, setShareModalOpen] = useState144(false);
85054
- const [qrDataUrl, setQrDataUrl] = useState144(null);
85055
- useEffect128(() => {
85250
+ const [key, setKey] = useState146("");
85251
+ const [isSaving, setIsSaving] = useState146(false);
85252
+ const [saved, setSaved] = useState146(!!savedProvider?.apiKeys.some((k) => k.isActive));
85253
+ const [showModels, setShowModels] = useState146(false);
85254
+ const [copied, setCopied] = useState146(false);
85255
+ const [shareModalOpen, setShareModalOpen] = useState146(false);
85256
+ const [qrDataUrl, setQrDataUrl] = useState146(null);
85257
+ useEffect130(() => {
85056
85258
  if (shareModalOpen && popular.referral) {
85057
85259
  QRCode.toDataURL(popular.referral.url, {
85058
85260
  width: 200,
@@ -85110,7 +85312,7 @@ function ProviderKeyCard({
85110
85312
  }
85111
85313
  };
85112
85314
  const hasModels = catalogProvider && catalogProvider.modelCount > 0;
85113
- return /* @__PURE__ */ jsxs254(
85315
+ return /* @__PURE__ */ jsxs255(
85114
85316
  "div",
85115
85317
  {
85116
85318
  className: cn(
@@ -85118,28 +85320,28 @@ function ProviderKeyCard({
85118
85320
  saved ? "border-success/30 bg-success/5" : `bg-gradient-to-br ${popular.color}`
85119
85321
  ),
85120
85322
  children: [
85121
- /* @__PURE__ */ jsxs254("div", { className: "flex items-start gap-3", children: [
85122
- /* @__PURE__ */ jsx264("span", { className: "text-2xl shrink-0 mt-0.5", children: popular.icon }),
85123
- /* @__PURE__ */ jsxs254("div", { className: "flex-1 min-w-0", children: [
85124
- /* @__PURE__ */ jsxs254("div", { className: "flex items-center gap-2", children: [
85125
- /* @__PURE__ */ jsx264("h3", { className: "text-sm font-semibold", children: popular.name }),
85126
- saved && /* @__PURE__ */ jsxs254("span", { className: "inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full bg-success/10 text-success border border-success/20", children: [
85127
- /* @__PURE__ */ jsx264(Check41, { className: "h-2.5 w-2.5" }),
85323
+ /* @__PURE__ */ jsxs255("div", { className: "flex items-start gap-3", children: [
85324
+ /* @__PURE__ */ jsx265("span", { className: "text-2xl shrink-0 mt-0.5", children: popular.icon }),
85325
+ /* @__PURE__ */ jsxs255("div", { className: "flex-1 min-w-0", children: [
85326
+ /* @__PURE__ */ jsxs255("div", { className: "flex items-center gap-2", children: [
85327
+ /* @__PURE__ */ jsx265("h3", { className: "text-sm font-semibold", children: popular.name }),
85328
+ saved && /* @__PURE__ */ jsxs255("span", { className: "inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full bg-success/10 text-success border border-success/20", children: [
85329
+ /* @__PURE__ */ jsx265(Check41, { className: "h-2.5 w-2.5" }),
85128
85330
  t("setup:screen.card.keySaved")
85129
85331
  ] }),
85130
- popular.referral && !saved && /* @__PURE__ */ jsxs254("span", { className: "inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full bg-warning/10 text-warning border border-warning/20", children: [
85131
- /* @__PURE__ */ jsx264(Gift, { className: "h-2.5 w-2.5" }),
85332
+ popular.referral && !saved && /* @__PURE__ */ jsxs255("span", { className: "inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full bg-warning/10 text-warning border border-warning/20", children: [
85333
+ /* @__PURE__ */ jsx265(Gift, { className: "h-2.5 w-2.5" }),
85132
85334
  t("setup:screen.card.referral")
85133
85335
  ] })
85134
85336
  ] }),
85135
- /* @__PURE__ */ jsx264("p", { className: "text-xs text-muted-foreground mt-0.5", children: popular.description }),
85136
- popular.referral && !saved && /* @__PURE__ */ jsxs254("p", { className: "text-[11px] text-warning/80 mt-1", children: [
85337
+ /* @__PURE__ */ jsx265("p", { className: "text-xs text-muted-foreground mt-0.5", children: popular.description }),
85338
+ popular.referral && !saved && /* @__PURE__ */ jsxs255("p", { className: "text-[11px] text-warning/80 mt-1", children: [
85137
85339
  "\u{1F381} ",
85138
85340
  popular.referral.reward
85139
85341
  ] }),
85140
- !saved ? /* @__PURE__ */ jsxs254("div", { className: "mt-3 space-y-2", children: [
85141
- /* @__PURE__ */ jsxs254("div", { className: "flex gap-2", children: [
85142
- /* @__PURE__ */ jsx264(
85342
+ !saved ? /* @__PURE__ */ jsxs255("div", { className: "mt-3 space-y-2", children: [
85343
+ /* @__PURE__ */ jsxs255("div", { className: "flex gap-2", children: [
85344
+ /* @__PURE__ */ jsx265(
85143
85345
  Input,
85144
85346
  {
85145
85347
  type: "password",
@@ -85150,18 +85352,18 @@ function ProviderKeyCard({
85150
85352
  className: "font-mono text-sm"
85151
85353
  }
85152
85354
  ),
85153
- /* @__PURE__ */ jsx264(
85355
+ /* @__PURE__ */ jsx265(
85154
85356
  Button,
85155
85357
  {
85156
85358
  onClick: handleSave,
85157
85359
  disabled: !key.trim() || isSaving,
85158
85360
  size: "sm",
85159
85361
  className: "shrink-0",
85160
- children: isSaving ? /* @__PURE__ */ jsx264(Loader252, { className: "h-4 w-4 animate-spin" }) : t("setup:screen.card.save")
85362
+ children: isSaving ? /* @__PURE__ */ jsx265(Loader252, { className: "h-4 w-4 animate-spin" }) : t("setup:screen.card.save")
85161
85363
  }
85162
85364
  )
85163
85365
  ] }),
85164
- popular.docsUrl && /* @__PURE__ */ jsxs254(
85366
+ popular.docsUrl && /* @__PURE__ */ jsxs255(
85165
85367
  "a",
85166
85368
  {
85167
85369
  href: popular.docsUrl,
@@ -85171,36 +85373,36 @@ function ProviderKeyCard({
85171
85373
  children: [
85172
85374
  t("setup:screen.card.getKey"),
85173
85375
  " ",
85174
- /* @__PURE__ */ jsx264(ExternalLink9, { className: "h-3 w-3" })
85376
+ /* @__PURE__ */ jsx265(ExternalLink9, { className: "h-3 w-3" })
85175
85377
  ]
85176
85378
  }
85177
85379
  ),
85178
- popular.referral && /* @__PURE__ */ jsxs254("div", { className: "flex items-center gap-2", children: [
85179
- /* @__PURE__ */ jsx264(
85380
+ popular.referral && /* @__PURE__ */ jsxs255("div", { className: "flex items-center gap-2", children: [
85381
+ /* @__PURE__ */ jsx265(
85180
85382
  "button",
85181
85383
  {
85182
85384
  type: "button",
85183
85385
  onClick: handleCopyReferral,
85184
85386
  className: "inline-flex items-center gap-1 text-[11px] text-warning/80 hover:text-warning transition-colors",
85185
- children: copied ? /* @__PURE__ */ jsxs254(Fragment73, { children: [
85186
- /* @__PURE__ */ jsx264(Check41, { className: "h-3 w-3" }),
85387
+ children: copied ? /* @__PURE__ */ jsxs255(Fragment73, { children: [
85388
+ /* @__PURE__ */ jsx265(Check41, { className: "h-3 w-3" }),
85187
85389
  " ",
85188
85390
  t("setup:screen.card.copied")
85189
- ] }) : /* @__PURE__ */ jsxs254(Fragment73, { children: [
85190
- /* @__PURE__ */ jsx264(Copy12, { className: "h-3 w-3" }),
85391
+ ] }) : /* @__PURE__ */ jsxs255(Fragment73, { children: [
85392
+ /* @__PURE__ */ jsx265(Copy12, { className: "h-3 w-3" }),
85191
85393
  " ",
85192
85394
  t("setup:screen.card.copyReferral")
85193
85395
  ] })
85194
85396
  }
85195
85397
  ),
85196
- /* @__PURE__ */ jsxs254(
85398
+ /* @__PURE__ */ jsxs255(
85197
85399
  "button",
85198
85400
  {
85199
85401
  type: "button",
85200
85402
  onClick: () => setShareModalOpen(true),
85201
85403
  className: "inline-flex items-center gap-1 text-[11px] text-warning/80 hover:text-warning transition-colors",
85202
85404
  children: [
85203
- /* @__PURE__ */ jsx264(Share2, { className: "h-3 w-3" }),
85405
+ /* @__PURE__ */ jsx265(Share2, { className: "h-3 w-3" }),
85204
85406
  " ",
85205
85407
  t("setup:screen.card.share")
85206
85408
  ]
@@ -85209,52 +85411,52 @@ function ProviderKeyCard({
85209
85411
  ] })
85210
85412
  ] }) : saved ? (
85211
85413
  /* Key saved — show enriched preset fields from the server */
85212
- /* @__PURE__ */ jsxs254("div", { className: "mt-3 space-y-1", children: [
85213
- savedProvider?.baseUrl && /* @__PURE__ */ jsxs254("div", { className: "text-[11px] text-muted-foreground/70 font-mono truncate", title: savedProvider.baseUrl, children: [
85214
- /* @__PURE__ */ jsxs254("span", { className: "text-muted-foreground/50", children: [
85414
+ /* @__PURE__ */ jsxs255("div", { className: "mt-3 space-y-1", children: [
85415
+ savedProvider?.baseUrl && /* @__PURE__ */ jsxs255("div", { className: "text-[11px] text-muted-foreground/70 font-mono truncate", title: savedProvider.baseUrl, children: [
85416
+ /* @__PURE__ */ jsxs255("span", { className: "text-muted-foreground/50", children: [
85215
85417
  t("activity:providerKey.url"),
85216
85418
  " "
85217
85419
  ] }),
85218
85420
  savedProvider.baseUrl
85219
85421
  ] }),
85220
- savedProvider?.models && savedProvider.models.length > 0 && /* @__PURE__ */ jsxs254("div", { className: "text-[11px] text-muted-foreground/70", children: [
85221
- /* @__PURE__ */ jsxs254("span", { className: "text-muted-foreground/50", children: [
85422
+ savedProvider?.models && savedProvider.models.length > 0 && /* @__PURE__ */ jsxs255("div", { className: "text-[11px] text-muted-foreground/70", children: [
85423
+ /* @__PURE__ */ jsxs255("span", { className: "text-muted-foreground/50", children: [
85222
85424
  t("activity:providerKey.models"),
85223
85425
  " "
85224
85426
  ] }),
85225
85427
  savedProvider.pickedModelId ?? savedProvider.models[0],
85226
- /* @__PURE__ */ jsxs254("span", { className: "text-muted-foreground/50", children: [
85428
+ /* @__PURE__ */ jsxs255("span", { className: "text-muted-foreground/50", children: [
85227
85429
  " (+",
85228
85430
  savedProvider.models.length - 1,
85229
85431
  " more)"
85230
85432
  ] })
85231
85433
  ] }),
85232
- probeResult === "probing" ? /* @__PURE__ */ jsxs254("div", { className: "flex items-center gap-1.5 text-[11px] text-muted-foreground mt-1", children: [
85233
- /* @__PURE__ */ jsx264(Loader252, { className: "h-3 w-3 animate-spin" }),
85434
+ probeResult === "probing" ? /* @__PURE__ */ jsxs255("div", { className: "flex items-center gap-1.5 text-[11px] text-muted-foreground mt-1", children: [
85435
+ /* @__PURE__ */ jsx265(Loader252, { className: "h-3 w-3 animate-spin" }),
85234
85436
  t("setup:screen.probe.checking", "Checking connection\u2026")
85235
- ] }) : probeResult?.ok ? /* @__PURE__ */ jsxs254("div", { className: "flex items-center gap-1.5 text-[11px] text-success mt-1", children: [
85236
- /* @__PURE__ */ jsx264(Check41, { className: "h-3 w-3" }),
85237
- /* @__PURE__ */ jsxs254("span", { children: [
85437
+ ] }) : probeResult?.ok ? /* @__PURE__ */ jsxs255("div", { className: "flex items-center gap-1.5 text-[11px] text-success mt-1", children: [
85438
+ /* @__PURE__ */ jsx265(Check41, { className: "h-3 w-3" }),
85439
+ /* @__PURE__ */ jsxs255("span", { children: [
85238
85440
  t("setup:screen.probe.connected", "Connected"),
85239
85441
  probeResult.modelCount != null && ` \xB7 ${probeResult.modelCount} ${t("setup:screen.probe.models", "models")}`,
85240
85442
  probeResult.elapsedMs != null && ` \xB7 ${probeResult.elapsedMs}ms`
85241
85443
  ] })
85242
- ] }) : probeResult && !probeResult.ok ? /* @__PURE__ */ jsxs254("div", { className: "flex items-start gap-1.5 text-[11px] text-destructive mt-1", children: [
85243
- /* @__PURE__ */ jsx264("span", { className: "mt-0.5 shrink-0", children: "\u2715" }),
85244
- /* @__PURE__ */ jsxs254("div", { className: "min-w-0", children: [
85245
- /* @__PURE__ */ jsx264("span", { className: "font-medium", children: t("setup:screen.probe.failed", "Probe failed") }),
85246
- probeResult.status === "no_base_url" && /* @__PURE__ */ jsx264("span", { className: "block text-destructive/70", children: t("setup:screen.probe.noBaseUrl", "No base URL configured") }),
85247
- probeResult.status === "unreachable" && /* @__PURE__ */ jsxs254("span", { className: "block text-destructive/70", children: [
85444
+ ] }) : probeResult && !probeResult.ok ? /* @__PURE__ */ jsxs255("div", { className: "flex items-start gap-1.5 text-[11px] text-destructive mt-1", children: [
85445
+ /* @__PURE__ */ jsx265("span", { className: "mt-0.5 shrink-0", children: "\u2715" }),
85446
+ /* @__PURE__ */ jsxs255("div", { className: "min-w-0", children: [
85447
+ /* @__PURE__ */ jsx265("span", { className: "font-medium", children: t("setup:screen.probe.failed", "Probe failed") }),
85448
+ probeResult.status === "no_base_url" && /* @__PURE__ */ jsx265("span", { className: "block text-destructive/70", children: t("setup:screen.probe.noBaseUrl", "No base URL configured") }),
85449
+ probeResult.status === "unreachable" && /* @__PURE__ */ jsxs255("span", { className: "block text-destructive/70", children: [
85248
85450
  t("setup:screen.probe.unreachable", "Could not connect"),
85249
85451
  probeResult.detail ? `: ${probeResult.detail}` : ""
85250
85452
  ] }),
85251
- probeResult.status !== "no_base_url" && probeResult.status !== "unreachable" && /* @__PURE__ */ jsxs254(Fragment73, { children: [
85252
- /* @__PURE__ */ jsx264("span", { className: "block text-destructive/70", children: probeResult.httpStatus != null ? `${t("setup:screen.probe.httpStatus", "Status")} ${probeResult.httpStatus}` : probeResult.status }),
85253
- probeResult.detail && /* @__PURE__ */ jsx264("span", { className: "block text-destructive/70 truncate max-w-[250px]", title: probeResult.detail, children: probeResult.detail })
85453
+ probeResult.status !== "no_base_url" && probeResult.status !== "unreachable" && /* @__PURE__ */ jsxs255(Fragment73, { children: [
85454
+ /* @__PURE__ */ jsx265("span", { className: "block text-destructive/70", children: probeResult.httpStatus != null ? `${t("setup:screen.probe.httpStatus", "Status")} ${probeResult.httpStatus}` : probeResult.status }),
85455
+ probeResult.detail && /* @__PURE__ */ jsx265("span", { className: "block text-destructive/70 truncate max-w-[250px]", title: probeResult.detail, children: probeResult.detail })
85254
85456
  ] })
85255
85457
  ] })
85256
85458
  ] }) : null,
85257
- hasModels && /* @__PURE__ */ jsxs254(
85459
+ hasModels && /* @__PURE__ */ jsxs255(
85258
85460
  "button",
85259
85461
  {
85260
85462
  type: "button",
@@ -85262,7 +85464,7 @@ function ProviderKeyCard({
85262
85464
  className: "text-[11px] text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1",
85263
85465
  children: [
85264
85466
  t("setup:screen.providers.modelsAvailable", { count: catalogProvider?.modelCount ?? 0 }),
85265
- showModels ? /* @__PURE__ */ jsx264(ChevronDown37, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx264(ChevronRight28, { className: "h-3 w-3" })
85467
+ showModels ? /* @__PURE__ */ jsx265(ChevronDown37, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx265(ChevronRight28, { className: "h-3 w-3" })
85266
85468
  ]
85267
85469
  }
85268
85470
  )
@@ -85270,30 +85472,30 @@ function ProviderKeyCard({
85270
85472
  ) : null
85271
85473
  ] })
85272
85474
  ] }),
85273
- /* @__PURE__ */ jsx264(Dialog, { open: shareModalOpen, onOpenChange: setShareModalOpen, children: /* @__PURE__ */ jsxs254(DialogContent, { className: "sm:max-w-md", children: [
85274
- /* @__PURE__ */ jsxs254(DialogHeader, { children: [
85275
- /* @__PURE__ */ jsxs254(DialogTitle, { className: "flex items-center gap-2", children: [
85276
- /* @__PURE__ */ jsx264(Gift, { className: "h-4 w-4 text-warning" }),
85475
+ /* @__PURE__ */ jsx265(Dialog, { open: shareModalOpen, onOpenChange: setShareModalOpen, children: /* @__PURE__ */ jsxs255(DialogContent, { className: "sm:max-w-md", children: [
85476
+ /* @__PURE__ */ jsxs255(DialogHeader, { children: [
85477
+ /* @__PURE__ */ jsxs255(DialogTitle, { className: "flex items-center gap-2", children: [
85478
+ /* @__PURE__ */ jsx265(Gift, { className: "h-4 w-4 text-warning" }),
85277
85479
  t("setup:screen.share.title", { name: popular.name })
85278
85480
  ] }),
85279
- /* @__PURE__ */ jsx264(DialogDescription, { children: t("setup:screen.share.description") })
85481
+ /* @__PURE__ */ jsx265(DialogDescription, { children: t("setup:screen.share.description") })
85280
85482
  ] }),
85281
- /* @__PURE__ */ jsx264("div", { className: "flex flex-col items-center gap-4 py-4", children: popular.referral && /* @__PURE__ */ jsxs254(Fragment73, { children: [
85282
- /* @__PURE__ */ jsx264("div", { className: "text-sm text-center", children: /* @__PURE__ */ jsxs254("p", { className: "font-medium text-warning", children: [
85483
+ /* @__PURE__ */ jsx265("div", { className: "flex flex-col items-center gap-4 py-4", children: popular.referral && /* @__PURE__ */ jsxs255(Fragment73, { children: [
85484
+ /* @__PURE__ */ jsx265("div", { className: "text-sm text-center", children: /* @__PURE__ */ jsxs255("p", { className: "font-medium text-warning", children: [
85283
85485
  "\u{1F381} ",
85284
85486
  popular.referral.reward
85285
85487
  ] }) }),
85286
- qrDataUrl ? /* @__PURE__ */ jsx264("div", { className: "rounded-lg border border-border p-2 bg-white", children: /* @__PURE__ */ jsx264(
85488
+ qrDataUrl ? /* @__PURE__ */ jsx265("div", { className: "rounded-lg border border-border p-2 bg-white", children: /* @__PURE__ */ jsx265(
85287
85489
  "img",
85288
85490
  {
85289
85491
  src: qrDataUrl,
85290
85492
  alt: t("setup:screen.card.qrAlt", { name: popular.name }),
85291
85493
  className: "w-[200px] h-[200px]"
85292
85494
  }
85293
- ) }) : /* @__PURE__ */ jsx264("div", { className: "w-[200px] h-[200px] rounded-lg border border-border flex items-center justify-center bg-muted", children: /* @__PURE__ */ jsx264(Loader252, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }),
85294
- /* @__PURE__ */ jsxs254("div", { className: "w-full space-y-2", children: [
85295
- /* @__PURE__ */ jsxs254("div", { className: "flex items-center justify-center gap-2", children: [
85296
- /* @__PURE__ */ jsxs254(
85495
+ ) }) : /* @__PURE__ */ jsx265("div", { className: "w-[200px] h-[200px] rounded-lg border border-border flex items-center justify-center bg-muted", children: /* @__PURE__ */ jsx265(Loader252, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }),
85496
+ /* @__PURE__ */ jsxs255("div", { className: "w-full space-y-2", children: [
85497
+ /* @__PURE__ */ jsxs255("div", { className: "flex items-center justify-center gap-2", children: [
85498
+ /* @__PURE__ */ jsxs255(
85297
85499
  "button",
85298
85500
  {
85299
85501
  type: "button",
@@ -85311,12 +85513,12 @@ function ProviderKeyCard({
85311
85513
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors",
85312
85514
  title: t("setup:screen.share.twitter"),
85313
85515
  children: [
85314
- /* @__PURE__ */ jsx264("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx264("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }),
85516
+ /* @__PURE__ */ jsx265("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx265("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }),
85315
85517
  "X"
85316
85518
  ]
85317
85519
  }
85318
85520
  ),
85319
- /* @__PURE__ */ jsxs254(
85521
+ /* @__PURE__ */ jsxs255(
85320
85522
  "button",
85321
85523
  {
85322
85524
  type: "button",
@@ -85334,12 +85536,12 @@ function ProviderKeyCard({
85334
85536
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors",
85335
85537
  title: t("setup:screen.share.linkedin"),
85336
85538
  children: [
85337
- /* @__PURE__ */ jsx264("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx264("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) }),
85539
+ /* @__PURE__ */ jsx265("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx265("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) }),
85338
85540
  t("activity:providerKey.linkedin")
85339
85541
  ]
85340
85542
  }
85341
85543
  ),
85342
- /* @__PURE__ */ jsxs254(
85544
+ /* @__PURE__ */ jsxs255(
85343
85545
  "button",
85344
85546
  {
85345
85547
  type: "button",
@@ -85356,12 +85558,12 @@ function ProviderKeyCard({
85356
85558
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors",
85357
85559
  title: t("setup:screen.share.telegram"),
85358
85560
  children: [
85359
- /* @__PURE__ */ jsx264("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx264("path", { d: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z" }) }),
85561
+ /* @__PURE__ */ jsx265("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx265("path", { d: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z" }) }),
85360
85562
  t("activity:providerKey.telegram")
85361
85563
  ]
85362
85564
  }
85363
85565
  ),
85364
- /* @__PURE__ */ jsxs254(
85566
+ /* @__PURE__ */ jsxs255(
85365
85567
  "button",
85366
85568
  {
85367
85569
  type: "button",
@@ -85379,12 +85581,12 @@ function ProviderKeyCard({
85379
85581
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors",
85380
85582
  title: t("setup:screen.share.whatsapp"),
85381
85583
  children: [
85382
- /* @__PURE__ */ jsx264("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx264("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.134 1.585 5.934L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }),
85584
+ /* @__PURE__ */ jsx265("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx265("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.134 1.585 5.934L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }),
85383
85585
  t("activity:providerKey.whatsapp")
85384
85586
  ]
85385
85587
  }
85386
85588
  ),
85387
- /* @__PURE__ */ jsxs254(
85589
+ /* @__PURE__ */ jsxs255(
85388
85590
  "button",
85389
85591
  {
85390
85592
  type: "button",
@@ -85402,12 +85604,12 @@ function ProviderKeyCard({
85402
85604
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors",
85403
85605
  title: t("setup:screen.share.reddit"),
85404
85606
  children: [
85405
- /* @__PURE__ */ jsx264("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx264("path", { d: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 0 1.108-.701 1.25 1.25 0 0 1 2.144.33zm-8.811 8.748c-.968 0-1.754.786-1.754 1.754 0 .968.786 1.754 1.754 1.754.968 0 1.754-.786 1.754-1.754 0-.968-.786-1.754-1.754-1.754zm7.944 0c-.968 0-1.754.786-1.754 1.754 0 .968.786 1.754 1.754 1.754.968 0 1.754-.786 1.754-1.754 0-.968-.786-1.754-1.754-1.754z" }) }),
85607
+ /* @__PURE__ */ jsx265("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx265("path", { d: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 0 1.108-.701 1.25 1.25 0 0 1 2.144.33zm-8.811 8.748c-.968 0-1.754.786-1.754 1.754 0 .968.786 1.754 1.754 1.754.968 0 1.754-.786 1.754-1.754 0-.968-.786-1.754-1.754-1.754zm7.944 0c-.968 0-1.754.786-1.754 1.754 0 .968.786 1.754 1.754 1.754.968 0 1.754-.786 1.754-1.754 0-.968-.786-1.754-1.754-1.754z" }) }),
85406
85608
  t("activity:providerKey.reddit")
85407
85609
  ]
85408
85610
  }
85409
85611
  ),
85410
- /* @__PURE__ */ jsxs254(
85612
+ /* @__PURE__ */ jsxs255(
85411
85613
  "button",
85412
85614
  {
85413
85615
  type: "button",
@@ -85425,12 +85627,12 @@ function ProviderKeyCard({
85425
85627
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border bg-card text-xs text-foreground hover:bg-muted transition-colors",
85426
85628
  title: t("setup:screen.share.facebook"),
85427
85629
  children: [
85428
- /* @__PURE__ */ jsx264("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx264("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" }) }),
85630
+ /* @__PURE__ */ jsx265("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx265("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" }) }),
85429
85631
  t("activity:providerKey.facebook")
85430
85632
  ]
85431
85633
  }
85432
85634
  ),
85433
- /* @__PURE__ */ jsxs254(
85635
+ /* @__PURE__ */ jsxs255(
85434
85636
  "button",
85435
85637
  {
85436
85638
  type: "button",
@@ -85448,14 +85650,14 @@ function ProviderKeyCard({
85448
85650
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-muted text-muted-foreground text-xs hover:bg-muted/80 transition-colors",
85449
85651
  title: t("setup:screen.share.email"),
85450
85652
  children: [
85451
- /* @__PURE__ */ jsx264("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx264("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25H4.5a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" }) }),
85653
+ /* @__PURE__ */ jsx265("svg", { role: "img", "aria-hidden": "true", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx265("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25H4.5a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" }) }),
85452
85654
  t("activity:providerKey.email")
85453
85655
  ]
85454
85656
  }
85455
85657
  )
85456
85658
  ] }),
85457
- /* @__PURE__ */ jsxs254("div", { className: "flex items-center gap-2", children: [
85458
- /* @__PURE__ */ jsx264(
85659
+ /* @__PURE__ */ jsxs255("div", { className: "flex items-center gap-2", children: [
85660
+ /* @__PURE__ */ jsx265(
85459
85661
  Input,
85460
85662
  {
85461
85663
  value: popular.referral.url,
@@ -85463,18 +85665,18 @@ function ProviderKeyCard({
85463
85665
  className: "font-mono text-xs flex-1"
85464
85666
  }
85465
85667
  ),
85466
- /* @__PURE__ */ jsx264(
85668
+ /* @__PURE__ */ jsx265(
85467
85669
  Button,
85468
85670
  {
85469
85671
  size: "sm",
85470
85672
  variant: "outline",
85471
85673
  onClick: handleCopyReferral,
85472
85674
  className: "shrink-0",
85473
- children: copied ? /* @__PURE__ */ jsx264(Check41, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx264(Copy12, { className: "h-4 w-4" })
85675
+ children: copied ? /* @__PURE__ */ jsx265(Check41, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx265(Copy12, { className: "h-4 w-4" })
85474
85676
  }
85475
85677
  )
85476
85678
  ] }),
85477
- /* @__PURE__ */ jsx264("p", { className: "text-[11px] text-muted-foreground text-center", children: t("setup:screen.share.hint") })
85679
+ /* @__PURE__ */ jsx265("p", { className: "text-[11px] text-muted-foreground text-center", children: t("setup:screen.share.hint") })
85478
85680
  ] })
85479
85681
  ] }) })
85480
85682
  ] }) })
@@ -85514,9 +85716,9 @@ import {
85514
85716
  Sparkles as Sparkles22,
85515
85717
  Shield as Shield6
85516
85718
  } from "lucide-react";
85517
- import { useCallback as useCallback81, useEffect as useEffect129, useRef as useRef64, useState as useState145 } from "react";
85719
+ import { useCallback as useCallback81, useEffect as useEffect131, useRef as useRef64, useState as useState147 } from "react";
85518
85720
  import { useShallow as useShallow16 } from "zustand/react/shallow";
85519
- import { Fragment as Fragment74, jsx as jsx265, jsxs as jsxs255 } from "react/jsx-runtime";
85721
+ import { Fragment as Fragment74, jsx as jsx266, jsxs as jsxs256 } from "react/jsx-runtime";
85520
85722
  function SetupScreen() {
85521
85723
  const { t } = useTranslation();
85522
85724
  const { model, setProvider, setModel, wsConnected, wsUrl } = useConfigStore(
@@ -85529,21 +85731,21 @@ function SetupScreen() {
85529
85731
  }))
85530
85732
  );
85531
85733
  useWebSocket();
85532
- const [catalogProviders, setCatalogProviders] = useState145([]);
85533
- const [catalogModels, setCatalogModels] = useState145({});
85534
- const [savedProviders, setSavedProviders] = useState145([]);
85535
- const [isLoadingCatalog, setIsLoadingCatalog] = useState145(false);
85536
- const [catalogError, setCatalogError] = useState145(null);
85537
- const [reloadNonce, setReloadNonce] = useState145(0);
85538
- const [savedProviderIds, setSavedProviderIds] = useState145(/* @__PURE__ */ new Set());
85539
- const [probeResults, setProbeResults] = useState145({});
85540
- const [popularProviders, setPopularProviders] = useState145(DEFAULT_POPULAR_PROVIDERS);
85541
- const [isLoadingPopular, setIsLoadingPopular] = useState145(false);
85542
- const [popularRefreshNonce, setPopularRefreshNonce] = useState145(0);
85543
- const [previousProviderCount, setPreviousProviderCount] = useState145(0);
85544
- const [lastUpdatedAt, setLastUpdatedAt] = useState145(null);
85734
+ const [catalogProviders, setCatalogProviders] = useState147([]);
85735
+ const [catalogModels, setCatalogModels] = useState147({});
85736
+ const [savedProviders, setSavedProviders] = useState147([]);
85737
+ const [isLoadingCatalog, setIsLoadingCatalog] = useState147(false);
85738
+ const [catalogError, setCatalogError] = useState147(null);
85739
+ const [reloadNonce, setReloadNonce] = useState147(0);
85740
+ const [savedProviderIds, setSavedProviderIds] = useState147(/* @__PURE__ */ new Set());
85741
+ const [probeResults, setProbeResults] = useState147({});
85742
+ const [popularProviders, setPopularProviders] = useState147(DEFAULT_POPULAR_PROVIDERS);
85743
+ const [isLoadingPopular, setIsLoadingPopular] = useState147(false);
85744
+ const [popularRefreshNonce, setPopularRefreshNonce] = useState147(0);
85745
+ const [previousProviderCount, setPreviousProviderCount] = useState147(0);
85746
+ const [lastUpdatedAt, setLastUpdatedAt] = useState147(null);
85545
85747
  const isInitialLoadRef = useRef64(true);
85546
- useEffect129(() => {
85748
+ useEffect131(() => {
85547
85749
  const controller = new AbortController();
85548
85750
  const localUrl = `${window.location.origin}/providers.json`;
85549
85751
  const githubUrl = "https://raw.githubusercontent.com/WrongStack/WrongStack/main/packages/webui/public/providers.json";
@@ -85611,10 +85813,10 @@ function SetupScreen() {
85611
85813
  });
85612
85814
  return () => controller.abort();
85613
85815
  }, [popularRefreshNonce]);
85614
- const [selectedProvider, setSelectedProvider] = useState145(null);
85615
- const [selectedModel, setSelectedModel] = useState145(null);
85616
- const [isLoadingModels, setIsLoadingModels] = useState145(false);
85617
- useEffect129(() => {
85816
+ const [selectedProvider, setSelectedProvider] = useState147(null);
85817
+ const [selectedModel, setSelectedModel] = useState147(null);
85818
+ const [isLoadingModels, setIsLoadingModels] = useState147(false);
85819
+ useEffect131(() => {
85618
85820
  if (!wsConnected) return;
85619
85821
  const wsClient = getWSClient(wsUrl);
85620
85822
  let catalogTimeout = setTimeout(() => {
@@ -85695,7 +85897,7 @@ function SetupScreen() {
85695
85897
  setSelectedModel(null);
85696
85898
  }, []);
85697
85899
  const hasAnyKey = savedProviderIds.size > 0;
85698
- useEffect129(() => {
85900
+ useEffect131(() => {
85699
85901
  if (!selectedProvider || !wsConnected) return;
85700
85902
  const wsClient = getWSClient(wsUrl);
85701
85903
  if (!catalogModels[selectedProvider]) {
@@ -85738,10 +85940,10 @@ function SetupScreen() {
85738
85940
  const catalogPage = usePagination(additionalCatalog, 10);
85739
85941
  const _savedProviderPage = usePagination(savedProviders, 9);
85740
85942
  const modelPage = usePagination(currentModels, 12, selectedProvider);
85741
- return /* @__PURE__ */ jsxs255("div", { className: "flex h-full min-h-0 min-w-0 flex-col", children: [
85742
- /* @__PURE__ */ jsxs255("header", { className: "flex shrink-0 flex-col gap-3 border-b bg-card px-4 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-6", children: [
85743
- /* @__PURE__ */ jsxs255("div", { className: "flex min-w-0 items-center gap-3", children: [
85744
- /* @__PURE__ */ jsx265(
85943
+ return /* @__PURE__ */ jsxs256("div", { className: "flex h-full min-h-0 min-w-0 flex-col", children: [
85944
+ /* @__PURE__ */ jsxs256("header", { className: "flex shrink-0 flex-col gap-3 border-b bg-card px-4 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-6", children: [
85945
+ /* @__PURE__ */ jsxs256("div", { className: "flex min-w-0 items-center gap-3", children: [
85946
+ /* @__PURE__ */ jsx266(
85745
85947
  "img",
85746
85948
  {
85747
85949
  src: "/wrongstack.svg",
@@ -85750,19 +85952,19 @@ function SetupScreen() {
85750
85952
  className: "ws-brand-logo h-10 w-10 shrink-0 border border-border/70 shadow-sm"
85751
85953
  }
85752
85954
  ),
85753
- /* @__PURE__ */ jsxs255("div", { className: "min-w-0", children: [
85754
- /* @__PURE__ */ jsx265("h1", { className: "truncate text-lg font-semibold", children: t("setup:screen.header.title") }),
85755
- /* @__PURE__ */ jsx265("p", { className: "text-xs text-muted-foreground sm:truncate", children: t("setup:screen.header.subtitle") })
85955
+ /* @__PURE__ */ jsxs256("div", { className: "min-w-0", children: [
85956
+ /* @__PURE__ */ jsx266("h1", { className: "truncate text-lg font-semibold", children: t("setup:screen.header.title") }),
85957
+ /* @__PURE__ */ jsx266("p", { className: "text-xs text-muted-foreground sm:truncate", children: t("setup:screen.header.subtitle") })
85756
85958
  ] })
85757
85959
  ] }),
85758
- hasAnyKey && selectedProvider ? /* @__PURE__ */ jsxs255("span", { className: "text-xs text-success/80", children: [
85759
- /* @__PURE__ */ jsx265(Check42, { className: "h-3 w-3 inline-block mr-1" }),
85960
+ hasAnyKey && selectedProvider ? /* @__PURE__ */ jsxs256("span", { className: "text-xs text-success/80", children: [
85961
+ /* @__PURE__ */ jsx266(Check42, { className: "h-3 w-3 inline-block mr-1" }),
85760
85962
  t("setup:screen.header.continue")
85761
85963
  ] }) : null
85762
85964
  ] }),
85763
- /* @__PURE__ */ jsx265(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs255("div", { className: "mx-auto max-w-3xl space-y-8 p-4 pb-4 sm:p-6", children: [
85764
- /* @__PURE__ */ jsxs255("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-sm", children: [
85765
- /* @__PURE__ */ jsxs255(
85965
+ /* @__PURE__ */ jsx266(ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs256("div", { className: "mx-auto max-w-3xl space-y-8 p-4 pb-4 sm:p-6", children: [
85966
+ /* @__PURE__ */ jsxs256("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-sm", children: [
85967
+ /* @__PURE__ */ jsxs256(
85766
85968
  "div",
85767
85969
  {
85768
85970
  className: cn(
@@ -85770,13 +85972,13 @@ function SetupScreen() {
85770
85972
  hasAnyKey ? "text-success" : "text-primary font-medium"
85771
85973
  ),
85772
85974
  children: [
85773
- /* @__PURE__ */ jsx265(KeyRound2, { className: "h-4 w-4" }),
85774
- /* @__PURE__ */ jsx265("span", { children: t("setup:screen.steps.addKeys") })
85975
+ /* @__PURE__ */ jsx266(KeyRound2, { className: "h-4 w-4" }),
85976
+ /* @__PURE__ */ jsx266("span", { children: t("setup:screen.steps.addKeys") })
85775
85977
  ]
85776
85978
  }
85777
85979
  ),
85778
- /* @__PURE__ */ jsx265(ChevronRight29, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
85779
- /* @__PURE__ */ jsxs255(
85980
+ /* @__PURE__ */ jsx266(ChevronRight29, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
85981
+ /* @__PURE__ */ jsxs256(
85780
85982
  "div",
85781
85983
  {
85782
85984
  className: cn(
@@ -85784,13 +85986,13 @@ function SetupScreen() {
85784
85986
  selectedProvider ? "text-primary font-medium" : "text-muted-foreground"
85785
85987
  ),
85786
85988
  children: [
85787
- /* @__PURE__ */ jsx265(Bot27, { className: "h-4 w-4" }),
85788
- /* @__PURE__ */ jsx265("span", { children: t("setup:screen.steps.pickModel") })
85989
+ /* @__PURE__ */ jsx266(Bot27, { className: "h-4 w-4" }),
85990
+ /* @__PURE__ */ jsx266("span", { children: t("setup:screen.steps.pickModel") })
85789
85991
  ]
85790
85992
  }
85791
85993
  ),
85792
- /* @__PURE__ */ jsx265(ChevronRight29, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
85793
- /* @__PURE__ */ jsxs255(
85994
+ /* @__PURE__ */ jsx266(ChevronRight29, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
85995
+ /* @__PURE__ */ jsxs256(
85794
85996
  "div",
85795
85997
  {
85796
85998
  className: cn(
@@ -85798,39 +86000,39 @@ function SetupScreen() {
85798
86000
  selectedProvider && selectedModel ? "text-primary font-medium" : "text-muted-foreground"
85799
86001
  ),
85800
86002
  children: [
85801
- /* @__PURE__ */ jsx265(Sparkles22, { className: "h-4 w-4" }),
85802
- /* @__PURE__ */ jsx265("span", { children: t("setup:screen.steps.start") })
86003
+ /* @__PURE__ */ jsx266(Sparkles22, { className: "h-4 w-4" }),
86004
+ /* @__PURE__ */ jsx266("span", { children: t("setup:screen.steps.start") })
85803
86005
  ]
85804
86006
  }
85805
86007
  )
85806
86008
  ] }),
85807
- /* @__PURE__ */ jsxs255("div", { className: "flex items-start gap-3 rounded-xl border border-primary/20 bg-primary/5 p-4", children: [
85808
- /* @__PURE__ */ jsx265(Shield6, { className: "h-5 w-5 text-primary shrink-0 mt-0.5" }),
85809
- /* @__PURE__ */ jsxs255("div", { children: [
85810
- /* @__PURE__ */ jsx265("p", { className: "text-sm font-medium", children: t("setup:screen.security.title") }),
85811
- /* @__PURE__ */ jsx265("p", { className: "text-xs text-muted-foreground mt-0.5", children: t("setup:screen.security.body") })
86009
+ /* @__PURE__ */ jsxs256("div", { className: "flex items-start gap-3 rounded-xl border border-primary/20 bg-primary/5 p-4", children: [
86010
+ /* @__PURE__ */ jsx266(Shield6, { className: "h-5 w-5 text-primary shrink-0 mt-0.5" }),
86011
+ /* @__PURE__ */ jsxs256("div", { children: [
86012
+ /* @__PURE__ */ jsx266("p", { className: "text-sm font-medium", children: t("setup:screen.security.title") }),
86013
+ /* @__PURE__ */ jsx266("p", { className: "text-xs text-muted-foreground mt-0.5", children: t("setup:screen.security.body") })
85812
86014
  ] })
85813
86015
  ] }),
85814
- catalogError ? /* @__PURE__ */ jsxs255("div", { className: "flex flex-col items-center text-center gap-4 py-12 rounded-xl border border-destructive/30 bg-destructive/5 px-6", children: [
85815
- /* @__PURE__ */ jsx265("div", { className: "w-12 h-12 rounded-xl bg-destructive/10 border border-destructive/30 flex items-center justify-center", children: /* @__PURE__ */ jsx265(Globe10, { className: "h-6 w-6 text-destructive" }) }),
85816
- /* @__PURE__ */ jsxs255("div", { children: [
85817
- /* @__PURE__ */ jsx265("p", { className: "text-sm font-medium text-destructive", children: t("setup:screen.errors.backendUnreachable") }),
85818
- /* @__PURE__ */ jsx265("p", { className: "text-xs text-muted-foreground mt-1 max-w-sm", children: catalogError })
86016
+ catalogError ? /* @__PURE__ */ jsxs256("div", { className: "flex flex-col items-center text-center gap-4 py-12 rounded-xl border border-destructive/30 bg-destructive/5 px-6", children: [
86017
+ /* @__PURE__ */ jsx266("div", { className: "w-12 h-12 rounded-xl bg-destructive/10 border border-destructive/30 flex items-center justify-center", children: /* @__PURE__ */ jsx266(Globe10, { className: "h-6 w-6 text-destructive" }) }),
86018
+ /* @__PURE__ */ jsxs256("div", { children: [
86019
+ /* @__PURE__ */ jsx266("p", { className: "text-sm font-medium text-destructive", children: t("setup:screen.errors.backendUnreachable") }),
86020
+ /* @__PURE__ */ jsx266("p", { className: "text-xs text-muted-foreground mt-1 max-w-sm", children: catalogError })
85819
86021
  ] }),
85820
- /* @__PURE__ */ jsxs255(Button, { onClick: handleRetryCatalog, size: "sm", variant: "outline", children: [
85821
- /* @__PURE__ */ jsx265(Loader253, { className: "h-4 w-4 mr-2" }),
86022
+ /* @__PURE__ */ jsxs256(Button, { onClick: handleRetryCatalog, size: "sm", variant: "outline", children: [
86023
+ /* @__PURE__ */ jsx266(Loader253, { className: "h-4 w-4 mr-2" }),
85822
86024
  t("setup:screen.errors.retry")
85823
86025
  ] })
85824
- ] }) : /* @__PURE__ */ jsxs255(Fragment74, { children: [
85825
- /* @__PURE__ */ jsxs255("div", { className: "space-y-3", children: [
85826
- /* @__PURE__ */ jsxs255("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
85827
- /* @__PURE__ */ jsx265("h2", { className: "text-sm font-medium text-muted-foreground uppercase tracking-wider", children: t("setup:screen.providers.popular") }),
85828
- /* @__PURE__ */ jsxs255("div", { className: "flex flex-wrap items-center gap-2", children: [
85829
- isLoadingPopular && /* @__PURE__ */ jsxs255("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
85830
- /* @__PURE__ */ jsx265(Loader253, { className: "h-3 w-3 animate-spin" }),
86026
+ ] }) : /* @__PURE__ */ jsxs256(Fragment74, { children: [
86027
+ /* @__PURE__ */ jsxs256("div", { className: "space-y-3", children: [
86028
+ /* @__PURE__ */ jsxs256("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
86029
+ /* @__PURE__ */ jsx266("h2", { className: "text-sm font-medium text-muted-foreground uppercase tracking-wider", children: t("setup:screen.providers.popular") }),
86030
+ /* @__PURE__ */ jsxs256("div", { className: "flex flex-wrap items-center gap-2", children: [
86031
+ isLoadingPopular && /* @__PURE__ */ jsxs256("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
86032
+ /* @__PURE__ */ jsx266(Loader253, { className: "h-3 w-3 animate-spin" }),
85831
86033
  t("setup:screen.providers.updating")
85832
86034
  ] }),
85833
- lastUpdatedAt && !isLoadingPopular && /* @__PURE__ */ jsx265(
86035
+ lastUpdatedAt && !isLoadingPopular && /* @__PURE__ */ jsx266(
85834
86036
  "span",
85835
86037
  {
85836
86038
  className: "text-[11px] text-muted-foreground",
@@ -85838,7 +86040,7 @@ function SetupScreen() {
85838
86040
  children: formatRelativeTime(lastUpdatedAt)
85839
86041
  }
85840
86042
  ),
85841
- /* @__PURE__ */ jsxs255(
86043
+ /* @__PURE__ */ jsxs256(
85842
86044
  "button",
85843
86045
  {
85844
86046
  type: "button",
@@ -85847,14 +86049,14 @@ function SetupScreen() {
85847
86049
  className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
85848
86050
  title: t("setup:screen.providers.refreshTitle"),
85849
86051
  children: [
85850
- /* @__PURE__ */ jsx265(RefreshCw31, { className: cn("h-3 w-3", isLoadingPopular && "animate-spin") }),
86052
+ /* @__PURE__ */ jsx266(RefreshCw31, { className: cn("h-3 w-3", isLoadingPopular && "animate-spin") }),
85851
86053
  t("setup:screen.providers.refresh")
85852
86054
  ]
85853
86055
  }
85854
86056
  )
85855
86057
  ] })
85856
86058
  ] }),
85857
- /* @__PURE__ */ jsx265("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: popularProviders.map((p) => /* @__PURE__ */ jsx265(
86059
+ /* @__PURE__ */ jsx266("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: popularProviders.map((p) => /* @__PURE__ */ jsx266(
85858
86060
  ProviderKeyCard,
85859
86061
  {
85860
86062
  popular: p,
@@ -85866,9 +86068,9 @@ function SetupScreen() {
85866
86068
  p.id
85867
86069
  )) })
85868
86070
  ] }),
85869
- additionalCatalog.length > 0 && /* @__PURE__ */ jsxs255("div", { className: "space-y-3", children: [
85870
- /* @__PURE__ */ jsx265("h2", { className: "text-sm font-medium text-muted-foreground uppercase tracking-wider", children: t("setup:screen.providers.more") }),
85871
- /* @__PURE__ */ jsx265("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: catalogPage.pageItems.map((p) => /* @__PURE__ */ jsx265(
86071
+ additionalCatalog.length > 0 && /* @__PURE__ */ jsxs256("div", { className: "space-y-3", children: [
86072
+ /* @__PURE__ */ jsx266("h2", { className: "text-sm font-medium text-muted-foreground uppercase tracking-wider", children: t("setup:screen.providers.more") }),
86073
+ /* @__PURE__ */ jsx266("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: catalogPage.pageItems.map((p) => /* @__PURE__ */ jsx266(
85872
86074
  ProviderKeyCard,
85873
86075
  {
85874
86076
  popular: {
@@ -85890,7 +86092,7 @@ function SetupScreen() {
85890
86092
  },
85891
86093
  p.id
85892
86094
  )) }),
85893
- /* @__PURE__ */ jsx265(
86095
+ /* @__PURE__ */ jsx266(
85894
86096
  Pagination,
85895
86097
  {
85896
86098
  page: catalogPage.page,
@@ -85901,19 +86103,19 @@ function SetupScreen() {
85901
86103
  }
85902
86104
  )
85903
86105
  ] }),
85904
- /* @__PURE__ */ jsxs255("div", { className: "space-y-3", children: [
85905
- /* @__PURE__ */ jsx265("h2", { className: "text-sm font-medium text-muted-foreground uppercase tracking-wider", children: t("setup:screen.providers.selfHosted") }),
85906
- /* @__PURE__ */ jsx265(CustomProviderSection, { onKeySaved: handleKeySaved })
86106
+ /* @__PURE__ */ jsxs256("div", { className: "space-y-3", children: [
86107
+ /* @__PURE__ */ jsx266("h2", { className: "text-sm font-medium text-muted-foreground uppercase tracking-wider", children: t("setup:screen.providers.selfHosted") }),
86108
+ /* @__PURE__ */ jsx266(CustomProviderSection, { onKeySaved: handleKeySaved })
85907
86109
  ] })
85908
86110
  ] }),
85909
- isLoadingCatalog && /* @__PURE__ */ jsx265("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx265(Loader253, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }),
85910
- selectedProvider && /* @__PURE__ */ jsxs255("div", { className: "space-y-3", children: [
85911
- /* @__PURE__ */ jsxs255("div", { className: "flex items-center justify-between", children: [
85912
- /* @__PURE__ */ jsxs255("h2", { className: "text-base font-semibold flex items-center gap-2", children: [
85913
- /* @__PURE__ */ jsx265(Sparkles22, { className: "h-4 w-4 text-primary" }),
86111
+ isLoadingCatalog && /* @__PURE__ */ jsx266("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx266(Loader253, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }),
86112
+ selectedProvider && /* @__PURE__ */ jsxs256("div", { className: "space-y-3", children: [
86113
+ /* @__PURE__ */ jsxs256("div", { className: "flex items-center justify-between", children: [
86114
+ /* @__PURE__ */ jsxs256("h2", { className: "text-base font-semibold flex items-center gap-2", children: [
86115
+ /* @__PURE__ */ jsx266(Sparkles22, { className: "h-4 w-4 text-primary" }),
85914
86116
  t("setup:screen.start.chooseModel")
85915
86117
  ] }),
85916
- /* @__PURE__ */ jsx265(
86118
+ /* @__PURE__ */ jsx266(
85917
86119
  "button",
85918
86120
  {
85919
86121
  type: "button",
@@ -85926,10 +86128,10 @@ function SetupScreen() {
85926
86128
  }
85927
86129
  )
85928
86130
  ] }),
85929
- /* @__PURE__ */ jsx265("p", { className: "text-xs text-muted-foreground", children: t("setup:screen.start.modelsFor", { provider: selectedProvider }) }),
85930
- isLoadingModels ? /* @__PURE__ */ jsx265("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx265(Loader253, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }) : currentModels.length > 0 ? /* @__PURE__ */ jsx265("div", { className: "grid grid-cols-1 gap-2", children: modelPage.pageItems.map((m) => {
86131
+ /* @__PURE__ */ jsx266("p", { className: "text-xs text-muted-foreground", children: t("setup:screen.start.modelsFor", { provider: selectedProvider }) }),
86132
+ isLoadingModels ? /* @__PURE__ */ jsx266("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx266(Loader253, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }) : currentModels.length > 0 ? /* @__PURE__ */ jsx266("div", { className: "grid grid-cols-1 gap-2", children: modelPage.pageItems.map((m) => {
85931
86133
  const ctx2 = m.contextWindow ? `${(m.contextWindow / 1e6).toFixed(0)}M ctx` : null;
85932
- return /* @__PURE__ */ jsx265(
86134
+ return /* @__PURE__ */ jsx266(
85933
86135
  "button",
85934
86136
  {
85935
86137
  type: "button",
@@ -85939,12 +86141,12 @@ function SetupScreen() {
85939
86141
  "hover:border-primary/40 hover:bg-primary/5",
85940
86142
  selectedModel === m.id ? "border-primary bg-primary/10 ring-1 ring-primary/30" : "border-border bg-card"
85941
86143
  ),
85942
- children: /* @__PURE__ */ jsxs255("div", { className: "flex items-start justify-between gap-2", children: [
85943
- /* @__PURE__ */ jsxs255("div", { className: "flex-1 min-w-0", children: [
85944
- /* @__PURE__ */ jsx265("span", { className: "font-medium text-sm", children: m.name }),
85945
- /* @__PURE__ */ jsxs255("div", { className: "flex flex-wrap items-center gap-1.5 mt-1", children: [
85946
- ctx2 && /* @__PURE__ */ jsx265("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground", children: ctx2 }),
85947
- m.capabilities.slice(0, 3).map((cap) => /* @__PURE__ */ jsx265(
86144
+ children: /* @__PURE__ */ jsxs256("div", { className: "flex items-start justify-between gap-2", children: [
86145
+ /* @__PURE__ */ jsxs256("div", { className: "flex-1 min-w-0", children: [
86146
+ /* @__PURE__ */ jsx266("span", { className: "font-medium text-sm", children: m.name }),
86147
+ /* @__PURE__ */ jsxs256("div", { className: "flex flex-wrap items-center gap-1.5 mt-1", children: [
86148
+ ctx2 && /* @__PURE__ */ jsx266("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground", children: ctx2 }),
86149
+ m.capabilities.slice(0, 3).map((cap) => /* @__PURE__ */ jsx266(
85948
86150
  "span",
85949
86151
  {
85950
86152
  className: "text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary border border-primary/20",
@@ -85954,13 +86156,13 @@ function SetupScreen() {
85954
86156
  ))
85955
86157
  ] })
85956
86158
  ] }),
85957
- selectedModel === m.id && /* @__PURE__ */ jsx265("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary", children: /* @__PURE__ */ jsx265(Check42, { className: "h-3 w-3 text-primary-foreground" }) })
86159
+ selectedModel === m.id && /* @__PURE__ */ jsx266("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary", children: /* @__PURE__ */ jsx266(Check42, { className: "h-3 w-3 text-primary-foreground" }) })
85958
86160
  ] })
85959
86161
  },
85960
86162
  m.id
85961
86163
  );
85962
- }) }) : /* @__PURE__ */ jsx265("p", { className: "text-sm text-muted-foreground py-8 text-center", children: t("setup:screen.errors.noModels") }),
85963
- /* @__PURE__ */ jsx265(
86164
+ }) }) : /* @__PURE__ */ jsx266("p", { className: "text-sm text-muted-foreground py-8 text-center", children: t("setup:screen.errors.noModels") }),
86165
+ /* @__PURE__ */ jsx266(
85964
86166
  Pagination,
85965
86167
  {
85966
86168
  page: modelPage.page,
@@ -85971,24 +86173,24 @@ function SetupScreen() {
85971
86173
  }
85972
86174
  )
85973
86175
  ] }),
85974
- selectedProvider && selectedModel && /* @__PURE__ */ jsxs255("div", { className: "sticky bottom-0 -mx-4 border-t bg-background/80 px-4 py-4 backdrop-blur-sm sm:-mx-6 sm:px-6", children: [
85975
- /* @__PURE__ */ jsx265("div", { className: "mb-3 flex min-w-0 items-center justify-between gap-2 text-sm text-muted-foreground", children: /* @__PURE__ */ jsxs255("span", { className: "min-w-0 truncate", children: [
86176
+ selectedProvider && selectedModel && /* @__PURE__ */ jsxs256("div", { className: "sticky bottom-0 -mx-4 border-t bg-background/80 px-4 py-4 backdrop-blur-sm sm:-mx-6 sm:px-6", children: [
86177
+ /* @__PURE__ */ jsx266("div", { className: "mb-3 flex min-w-0 items-center justify-between gap-2 text-sm text-muted-foreground", children: /* @__PURE__ */ jsxs256("span", { className: "min-w-0 truncate", children: [
85976
86178
  selectedProvider,
85977
86179
  " / ",
85978
86180
  selectedModel
85979
86181
  ] }) }),
85980
- /* @__PURE__ */ jsxs255("div", { className: "flex flex-col sm:flex-row gap-2", children: [
85981
- /* @__PURE__ */ jsxs255(Button, { onClick: handleStartSession, className: "flex-1", size: "lg", children: [
85982
- /* @__PURE__ */ jsx265(Bot27, { className: "h-4 w-4 mr-2" }),
86182
+ /* @__PURE__ */ jsxs256("div", { className: "flex flex-col sm:flex-row gap-2", children: [
86183
+ /* @__PURE__ */ jsxs256(Button, { onClick: handleStartSession, className: "flex-1", size: "lg", children: [
86184
+ /* @__PURE__ */ jsx266(Bot27, { className: "h-4 w-4 mr-2" }),
85983
86185
  t("setup:screen.start.startSession"),
85984
- /* @__PURE__ */ jsx265(ArrowRight5, { className: "h-4 w-4 ml-2" })
86186
+ /* @__PURE__ */ jsx266(ArrowRight5, { className: "h-4 w-4 ml-2" })
85985
86187
  ] }),
85986
- /* @__PURE__ */ jsxs255(Button, { onClick: handleSaveConfig, variant: "outline", className: "flex-1", size: "lg", children: [
85987
- /* @__PURE__ */ jsx265(Check42, { className: "h-4 w-4 mr-2" }),
86188
+ /* @__PURE__ */ jsxs256(Button, { onClick: handleSaveConfig, variant: "outline", className: "flex-1", size: "lg", children: [
86189
+ /* @__PURE__ */ jsx266(Check42, { className: "h-4 w-4 mr-2" }),
85988
86190
  t("setup:screen.start.saveConfig")
85989
86191
  ] })
85990
86192
  ] }),
85991
- /* @__PURE__ */ jsx265("p", { className: "text-[11px] text-muted-foreground/60 text-center mt-2", children: t("setup:screen.start.saveConfigHint") })
86193
+ /* @__PURE__ */ jsx266("p", { className: "text-[11px] text-muted-foreground/60 text-center mt-2", children: t("setup:screen.start.saveConfigHint") })
85992
86194
  ] })
85993
86195
  ] }) })
85994
86196
  ] });
@@ -86047,11 +86249,11 @@ import { Terminal as Terminal15 } from "@xterm/xterm";
86047
86249
  import "@xterm/xterm/css/xterm.css";
86048
86250
  import { Plus as Plus24, RotateCcw as RotateCcw19, TerminalSquare as TerminalSquare7, Trash2 as Trash228, X as X58 } from "lucide-react";
86049
86251
  import {
86050
- useEffect as useEffect130,
86252
+ useEffect as useEffect132,
86051
86253
  useRef as useRef65,
86052
- useState as useState146
86254
+ useState as useState148
86053
86255
  } from "react";
86054
- import { jsx as jsx266, jsxs as jsxs256 } from "react/jsx-runtime";
86256
+ import { jsx as jsx267, jsxs as jsxs257 } from "react/jsx-runtime";
86055
86257
  function defaultTerminalHeight(compact = false) {
86056
86258
  if (typeof window === "undefined") return 300;
86057
86259
  return clampTerminalHeight(window.innerHeight * (compact ? 0.32 : 0.4));
@@ -86089,14 +86291,14 @@ function TerminalPanel({
86089
86291
  const resizeCleanupRef = useRef65(null);
86090
86292
  const { t } = useTranslation();
86091
86293
  const terminalCounterRef = useRef65(1);
86092
- const [height, setHeight] = useState146(() => readStoredTerminalHeight(desktopShell));
86093
- const [tabs, setTabs] = useState146(() => [createTerminalTab(1)]);
86094
- const [activeId, setActiveId] = useState146(() => tabs[0]?.id ?? "");
86294
+ const [height, setHeight] = useState148(() => readStoredTerminalHeight(desktopShell));
86295
+ const [tabs, setTabs] = useState148(() => [createTerminalTab(1)]);
86296
+ const [activeId, setActiveId] = useState148(() => tabs[0]?.id ?? "");
86095
86297
  const terminalCreateNonce = useUIStore((s) => s.terminalCreateNonce);
86096
86298
  const lastTerminalCreateNonceRef = useRef65(terminalCreateNonce);
86097
86299
  const projectName = useSessionStore((s) => s.projectName);
86098
86300
  const cwd = useSessionStore((s) => s.cwd);
86099
- useEffect130(() => {
86301
+ useEffect132(() => {
86100
86302
  const onResize = () => {
86101
86303
  setHeight((current) => {
86102
86304
  const next = clampTerminalHeight(current);
@@ -86136,7 +86338,7 @@ function TerminalPanel({
86136
86338
  window.addEventListener("pointerup", cleanup, { once: true });
86137
86339
  window.addEventListener("pointercancel", cleanup, { once: true });
86138
86340
  };
86139
- useEffect130(() => () => resizeCleanupRef.current?.(), []);
86341
+ useEffect132(() => () => resizeCleanupRef.current?.(), []);
86140
86342
  const addTerminal = () => {
86141
86343
  setTabs((current) => {
86142
86344
  if (current.length >= MAX_TERMINALS) return current;
@@ -86146,7 +86348,7 @@ function TerminalPanel({
86146
86348
  return [...current, next];
86147
86349
  });
86148
86350
  };
86149
- useEffect130(() => {
86351
+ useEffect132(() => {
86150
86352
  if (terminalCreateNonce === lastTerminalCreateNonceRef.current) return;
86151
86353
  lastTerminalCreateNonceRef.current = terminalCreateNonce;
86152
86354
  addTerminal();
@@ -86195,7 +86397,7 @@ function TerminalPanel({
86195
86397
  );
86196
86398
  };
86197
86399
  const activeTab = tabs.find((tab) => tab.id === activeId) ?? tabs[0] ?? null;
86198
- return /* @__PURE__ */ jsxs256(
86400
+ return /* @__PURE__ */ jsxs257(
86199
86401
  "div",
86200
86402
  {
86201
86403
  "data-terminal-dock": true,
@@ -86206,7 +86408,7 @@ function TerminalPanel({
86206
86408
  desktopShell && "ws-terminal-desktop"
86207
86409
  ),
86208
86410
  children: [
86209
- /* @__PURE__ */ jsx266(
86411
+ /* @__PURE__ */ jsx267(
86210
86412
  "hr",
86211
86413
  {
86212
86414
  "aria-orientation": "horizontal",
@@ -86216,7 +86418,7 @@ function TerminalPanel({
86216
86418
  className: "h-1.5 cursor-ns-resize bg-muted/70 transition-colors hover:bg-primary/35 border-0"
86217
86419
  }
86218
86420
  ),
86219
- /* @__PURE__ */ jsxs256(
86421
+ /* @__PURE__ */ jsxs257(
86220
86422
  "div",
86221
86423
  {
86222
86424
  className: cn(
@@ -86224,13 +86426,13 @@ function TerminalPanel({
86224
86426
  desktopShell ? "px-2 py-1" : "px-3 py-1.5"
86225
86427
  ),
86226
86428
  children: [
86227
- /* @__PURE__ */ jsxs256("div", { className: "flex min-w-0 items-center gap-2 text-xs text-foreground", children: [
86228
- /* @__PURE__ */ jsx266(TerminalSquare7, { className: "h-3.5 w-3.5 shrink-0 text-primary" }),
86229
- /* @__PURE__ */ jsx266("span", { className: "font-medium", children: desktopShell ? t("activity:terminal.labelSingular") : t("activity:terminal.labelPlural") }),
86230
- /* @__PURE__ */ jsx266("span", { className: "min-w-0 truncate text-muted-foreground", children: projectName || cwd || t("activity:terminal.projectShell") })
86429
+ /* @__PURE__ */ jsxs257("div", { className: "flex min-w-0 items-center gap-2 text-xs text-foreground", children: [
86430
+ /* @__PURE__ */ jsx267(TerminalSquare7, { className: "h-3.5 w-3.5 shrink-0 text-primary" }),
86431
+ /* @__PURE__ */ jsx267("span", { className: "font-medium", children: desktopShell ? t("activity:terminal.labelSingular") : t("activity:terminal.labelPlural") }),
86432
+ /* @__PURE__ */ jsx267("span", { className: "min-w-0 truncate text-muted-foreground", children: projectName || cwd || t("activity:terminal.projectShell") })
86231
86433
  ] }),
86232
- /* @__PURE__ */ jsxs256("div", { className: "flex items-center gap-1", children: [
86233
- /* @__PURE__ */ jsx266(
86434
+ /* @__PURE__ */ jsxs257("div", { className: "flex items-center gap-1", children: [
86435
+ /* @__PURE__ */ jsx267(
86234
86436
  "button",
86235
86437
  {
86236
86438
  type: "button",
@@ -86238,10 +86440,10 @@ function TerminalPanel({
86238
86440
  disabled: tabs.length >= MAX_TERMINALS,
86239
86441
  title: tabs.length >= MAX_TERMINALS ? t("activity:terminal.maxTerminals", { count: MAX_TERMINALS }) : t("activity:terminal.newTerminal"),
86240
86442
  className: "inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40",
86241
- children: /* @__PURE__ */ jsx266(Plus24, { className: "h-4 w-4" })
86443
+ children: /* @__PURE__ */ jsx267(Plus24, { className: "h-4 w-4" })
86242
86444
  }
86243
86445
  ),
86244
- /* @__PURE__ */ jsx266(
86446
+ /* @__PURE__ */ jsx267(
86245
86447
  "button",
86246
86448
  {
86247
86449
  type: "button",
@@ -86249,10 +86451,10 @@ function TerminalPanel({
86249
86451
  disabled: !activeTab,
86250
86452
  title: t("activity:terminal.restart"),
86251
86453
  className: "inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40",
86252
- children: /* @__PURE__ */ jsx266(RotateCcw19, { className: "h-3.5 w-3.5" })
86454
+ children: /* @__PURE__ */ jsx267(RotateCcw19, { className: "h-3.5 w-3.5" })
86253
86455
  }
86254
86456
  ),
86255
- /* @__PURE__ */ jsx266(
86457
+ /* @__PURE__ */ jsx267(
86256
86458
  "button",
86257
86459
  {
86258
86460
  type: "button",
@@ -86260,31 +86462,31 @@ function TerminalPanel({
86260
86462
  disabled: tabs.length === 0,
86261
86463
  title: t("activity:terminal.closeAll"),
86262
86464
  className: "inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40",
86263
- children: /* @__PURE__ */ jsx266(Trash228, { className: "h-3.5 w-3.5" })
86465
+ children: /* @__PURE__ */ jsx267(Trash228, { className: "h-3.5 w-3.5" })
86264
86466
  }
86265
86467
  ),
86266
- /* @__PURE__ */ jsx266(
86468
+ /* @__PURE__ */ jsx267(
86267
86469
  "button",
86268
86470
  {
86269
86471
  type: "button",
86270
86472
  onClick: onClose,
86271
86473
  title: t("activity:terminal.closeDock"),
86272
86474
  className: "inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
86273
- children: /* @__PURE__ */ jsx266(X58, { className: "h-4 w-4" })
86475
+ children: /* @__PURE__ */ jsx267(X58, { className: "h-4 w-4" })
86274
86476
  }
86275
86477
  )
86276
86478
  ] })
86277
86479
  ]
86278
86480
  }
86279
86481
  ),
86280
- /* @__PURE__ */ jsx266(
86482
+ /* @__PURE__ */ jsx267(
86281
86483
  "div",
86282
86484
  {
86283
86485
  className: cn(
86284
86486
  "flex min-w-0 items-center gap-1 overflow-x-auto border-b border-border/70 bg-[hsl(var(--surface-2)/0.45)]",
86285
86487
  desktopShell ? "px-1.5 py-0.5" : "px-2 py-1"
86286
86488
  ),
86287
- children: tabs.map((tab) => /* @__PURE__ */ jsxs256(
86489
+ children: tabs.map((tab) => /* @__PURE__ */ jsxs257(
86288
86490
  "div",
86289
86491
  {
86290
86492
  className: cn(
@@ -86293,7 +86495,7 @@ function TerminalPanel({
86293
86495
  activeId === tab.id ? "border-primary/35 bg-primary/10 text-primary" : "border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-foreground"
86294
86496
  ),
86295
86497
  children: [
86296
- /* @__PURE__ */ jsxs256(
86498
+ /* @__PURE__ */ jsxs257(
86297
86499
  "button",
86298
86500
  {
86299
86501
  type: "button",
@@ -86301,7 +86503,7 @@ function TerminalPanel({
86301
86503
  title: tab.status === "exited" ? `${tab.name} exited` : tab.name,
86302
86504
  className: "inline-flex min-w-0 flex-1 items-center gap-2 px-2 text-left",
86303
86505
  children: [
86304
- /* @__PURE__ */ jsx266(
86506
+ /* @__PURE__ */ jsx267(
86305
86507
  "span",
86306
86508
  {
86307
86509
  className: cn(
@@ -86312,14 +86514,14 @@ function TerminalPanel({
86312
86514
  )
86313
86515
  }
86314
86516
  ),
86315
- /* @__PURE__ */ jsxs256("span", { className: "min-w-0 flex-1 truncate", children: [
86517
+ /* @__PURE__ */ jsxs257("span", { className: "min-w-0 flex-1 truncate", children: [
86316
86518
  tab.name,
86317
86519
  tab.status === "exited" && typeof tab.exitCode === "number" ? ` (${tab.exitCode})` : ""
86318
86520
  ] })
86319
86521
  ]
86320
86522
  }
86321
86523
  ),
86322
- /* @__PURE__ */ jsx266(
86524
+ /* @__PURE__ */ jsx267(
86323
86525
  "button",
86324
86526
  {
86325
86527
  type: "button",
@@ -86329,7 +86531,7 @@ function TerminalPanel({
86329
86531
  },
86330
86532
  className: "mr-1 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground opacity-70 hover:bg-accent hover:text-foreground hover:opacity-100",
86331
86533
  title: t("activity:terminal.closeTab", { name: tab.name }),
86332
- children: /* @__PURE__ */ jsx266(X58, { className: "h-3 w-3" })
86534
+ children: /* @__PURE__ */ jsx267(X58, { className: "h-3 w-3" })
86333
86535
  }
86334
86536
  )
86335
86537
  ]
@@ -86338,8 +86540,8 @@ function TerminalPanel({
86338
86540
  ))
86339
86541
  }
86340
86542
  ),
86341
- cwd && !desktopShell && /* @__PURE__ */ jsx266("div", { className: "min-w-0 truncate border-b border-border/60 bg-muted/30 px-3 py-1 text-[11px] font-mono text-muted-foreground", children: cwd }),
86342
- /* @__PURE__ */ jsx266("div", { className: "relative min-h-0 min-w-0 flex-1 overflow-hidden", children: tabs.map((tab) => /* @__PURE__ */ jsx266(
86543
+ cwd && !desktopShell && /* @__PURE__ */ jsx267("div", { className: "min-w-0 truncate border-b border-border/60 bg-muted/30 px-3 py-1 text-[11px] font-mono text-muted-foreground", children: cwd }),
86544
+ /* @__PURE__ */ jsx267("div", { className: "relative min-h-0 min-w-0 flex-1 overflow-hidden", children: tabs.map((tab) => /* @__PURE__ */ jsx267(
86343
86545
  TerminalSession,
86344
86546
  {
86345
86547
  id: tab.id,
@@ -86365,11 +86567,11 @@ function TerminalSession({
86365
86567
  const onRunningRef = useRef65(onRunning);
86366
86568
  const onExitRef = useRef65(onExit);
86367
86569
  const wsConnected = useConfigStore((s) => s.wsConnected);
86368
- useEffect130(() => {
86570
+ useEffect132(() => {
86369
86571
  onRunningRef.current = onRunning;
86370
86572
  onExitRef.current = onExit;
86371
86573
  }, [onExit, onRunning]);
86372
- useEffect130(() => {
86574
+ useEffect132(() => {
86373
86575
  const container = containerRef.current;
86374
86576
  if (!container) return;
86375
86577
  const term = new Terminal15({
@@ -86432,7 +86634,7 @@ function TerminalSession({
86432
86634
  fitRef.current = null;
86433
86635
  };
86434
86636
  }, [id, wsConnected]);
86435
- useEffect130(() => {
86637
+ useEffect132(() => {
86436
86638
  if (!active) return;
86437
86639
  window.requestAnimationFrame(() => {
86438
86640
  try {
@@ -86449,7 +86651,7 @@ function TerminalSession({
86449
86651
  }
86450
86652
  });
86451
86653
  }, [active, id]);
86452
- return /* @__PURE__ */ jsx266(
86654
+ return /* @__PURE__ */ jsx267(
86453
86655
  "div",
86454
86656
  {
86455
86657
  ref: containerRef,
@@ -86503,7 +86705,7 @@ __export(CronJobsPanel_exports, {
86503
86705
  });
86504
86706
  import { Clock as Clock20, PauseCircle as PauseCircle2, PlayCircle, RotateCw as RotateCw8 } from "lucide-react";
86505
86707
  import { useCallback as useCallback82 } from "react";
86506
- import { jsx as jsx268, jsxs as jsxs258 } from "react/jsx-runtime";
86708
+ import { jsx as jsx269, jsxs as jsxs259 } from "react/jsx-runtime";
86507
86709
  function fmtInterval(ms) {
86508
86710
  if (ms < 1e3) return `${ms}ms`;
86509
86711
  if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
@@ -86534,16 +86736,16 @@ function fmtTime4(iso) {
86534
86736
  }
86535
86737
  function StatusBadge3({ enabled, overdue }) {
86536
86738
  const { t } = useTranslation();
86537
- if (!enabled) return /* @__PURE__ */ jsxs258(Badge, { variant: "secondary", className: "gap-1", children: [
86538
- /* @__PURE__ */ jsx268(PauseCircle2, { className: "h-3 w-3" }),
86739
+ if (!enabled) return /* @__PURE__ */ jsxs259(Badge, { variant: "secondary", className: "gap-1", children: [
86740
+ /* @__PURE__ */ jsx269(PauseCircle2, { className: "h-3 w-3" }),
86539
86741
  t("activity:cronJobs.statusDisabled")
86540
86742
  ] });
86541
- if (overdue) return /* @__PURE__ */ jsxs258(Badge, { variant: "destructive", className: "gap-1", children: [
86542
- /* @__PURE__ */ jsx268(Clock20, { className: "h-3 w-3" }),
86743
+ if (overdue) return /* @__PURE__ */ jsxs259(Badge, { variant: "destructive", className: "gap-1", children: [
86744
+ /* @__PURE__ */ jsx269(Clock20, { className: "h-3 w-3" }),
86543
86745
  t("activity:cronJobs.statusOverdue")
86544
86746
  ] });
86545
- return /* @__PURE__ */ jsxs258(Badge, { variant: "outline", className: "gap-1 border-success/30 bg-success/10 text-success", children: [
86546
- /* @__PURE__ */ jsx268(PlayCircle, { className: "h-3 w-3" }),
86747
+ return /* @__PURE__ */ jsxs259(Badge, { variant: "outline", className: "gap-1 border-success/30 bg-success/10 text-success", children: [
86748
+ /* @__PURE__ */ jsx269(PlayCircle, { className: "h-3 w-3" }),
86547
86749
  t("activity:cronJobs.statusActive")
86548
86750
  ] });
86549
86751
  }
@@ -86565,62 +86767,62 @@ function CronJobsPanel({ open, onClose }) {
86565
86767
  },
86566
86768
  [onClose]
86567
86769
  );
86568
- return /* @__PURE__ */ jsx268(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs258(DialogContent, { className: "max-w-3xl max-h-[80vh] flex flex-col", children: [
86569
- /* @__PURE__ */ jsxs258(DialogHeader, { children: [
86570
- /* @__PURE__ */ jsxs258(DialogTitle, { className: "flex items-center gap-2", children: [
86571
- /* @__PURE__ */ jsx268(RotateCw8, { className: "h-5 w-5" }),
86770
+ return /* @__PURE__ */ jsx269(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs259(DialogContent, { className: "max-w-3xl max-h-[80vh] flex flex-col", children: [
86771
+ /* @__PURE__ */ jsxs259(DialogHeader, { children: [
86772
+ /* @__PURE__ */ jsxs259(DialogTitle, { className: "flex items-center gap-2", children: [
86773
+ /* @__PURE__ */ jsx269(RotateCw8, { className: "h-5 w-5" }),
86572
86774
  t("activity:cronJobs.heading")
86573
86775
  ] }),
86574
- /* @__PURE__ */ jsx268(DialogDescription, { children: t("activity:cronJobs.subtitle") })
86776
+ /* @__PURE__ */ jsx269(DialogDescription, { children: t("activity:cronJobs.subtitle") })
86575
86777
  ] }),
86576
- count > 0 && /* @__PURE__ */ jsxs258("div", { className: "flex flex-wrap items-center gap-3 text-sm text-muted-foreground border-b border-border/70 pb-3", children: [
86577
- /* @__PURE__ */ jsx268("span", { className: "font-medium text-foreground", children: t("activity:cronJobs.jobCount", { count }) }),
86578
- /* @__PURE__ */ jsx268("span", { className: "text-success", children: t("activity:cronJobs.enabledCount", { count: enabledCount }) }),
86579
- overdueCount > 0 && /* @__PURE__ */ jsx268("span", { className: "text-destructive", children: t("activity:cronJobs.overdueCount", { count: overdueCount }) }),
86580
- /* @__PURE__ */ jsx268("span", { children: t("activity:cronJobs.totalRuns", { count: totalRuns }) }),
86581
- /* @__PURE__ */ jsx268("span", { className: "text-muted-foreground/60", children: t("activity:cronJobs.maxConcurrent", { count: maxConcurrent }) })
86778
+ count > 0 && /* @__PURE__ */ jsxs259("div", { className: "flex flex-wrap items-center gap-3 text-sm text-muted-foreground border-b border-border/70 pb-3", children: [
86779
+ /* @__PURE__ */ jsx269("span", { className: "font-medium text-foreground", children: t("activity:cronJobs.jobCount", { count }) }),
86780
+ /* @__PURE__ */ jsx269("span", { className: "text-success", children: t("activity:cronJobs.enabledCount", { count: enabledCount }) }),
86781
+ overdueCount > 0 && /* @__PURE__ */ jsx269("span", { className: "text-destructive", children: t("activity:cronJobs.overdueCount", { count: overdueCount }) }),
86782
+ /* @__PURE__ */ jsx269("span", { children: t("activity:cronJobs.totalRuns", { count: totalRuns }) }),
86783
+ /* @__PURE__ */ jsx269("span", { className: "text-muted-foreground/60", children: t("activity:cronJobs.maxConcurrent", { count: maxConcurrent }) })
86582
86784
  ] }),
86583
- count === 0 && /* @__PURE__ */ jsxs258("div", { className: "flex flex-col items-center gap-2 py-12 text-muted-foreground", children: [
86584
- /* @__PURE__ */ jsx268(Clock20, { className: "h-8 w-8 opacity-40" }),
86585
- /* @__PURE__ */ jsx268("p", { className: "text-sm", children: t("activity:cronJobs.emptyTitle") }),
86586
- /* @__PURE__ */ jsxs258("p", { className: "text-xs", children: [
86785
+ count === 0 && /* @__PURE__ */ jsxs259("div", { className: "flex flex-col items-center gap-2 py-12 text-muted-foreground", children: [
86786
+ /* @__PURE__ */ jsx269(Clock20, { className: "h-8 w-8 opacity-40" }),
86787
+ /* @__PURE__ */ jsx269("p", { className: "text-sm", children: t("activity:cronJobs.emptyTitle") }),
86788
+ /* @__PURE__ */ jsxs259("p", { className: "text-xs", children: [
86587
86789
  t("activity:cronJobs.emptyUse"),
86588
86790
  " ",
86589
- /* @__PURE__ */ jsx268("code", { className: "rounded bg-muted px-1 py-0.5", children: "cron_schedule" }),
86791
+ /* @__PURE__ */ jsx269("code", { className: "rounded bg-muted px-1 py-0.5", children: "cron_schedule" }),
86590
86792
  " ",
86591
86793
  t("activity:cronJobs.emptyToAdd")
86592
86794
  ] })
86593
86795
  ] }),
86594
- count > 0 && /* @__PURE__ */ jsx268(ScrollArea, { className: "flex-1 -mx-6 px-6", children: /* @__PURE__ */ jsxs258("table", { className: "w-full text-sm", children: [
86595
- /* @__PURE__ */ jsx268("thead", { children: /* @__PURE__ */ jsxs258("tr", { className: "border-b border-border/50 text-left text-xs text-muted-foreground", children: [
86596
- /* @__PURE__ */ jsx268("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thStatus") }),
86597
- /* @__PURE__ */ jsx268("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thName") }),
86598
- /* @__PURE__ */ jsx268("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thInterval") }),
86599
- /* @__PURE__ */ jsx268("th", { className: "pb-2 pr-3 font-medium text-right", children: t("activity:cronJobs.thRuns") }),
86600
- /* @__PURE__ */ jsx268("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thNextRun") }),
86601
- /* @__PURE__ */ jsx268("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thLastRun") }),
86602
- /* @__PURE__ */ jsx268("th", { className: "pb-2 font-medium", children: t("activity:cronJobs.thAction") })
86796
+ count > 0 && /* @__PURE__ */ jsx269(ScrollArea, { className: "flex-1 -mx-6 px-6", children: /* @__PURE__ */ jsxs259("table", { className: "w-full text-sm", children: [
86797
+ /* @__PURE__ */ jsx269("thead", { children: /* @__PURE__ */ jsxs259("tr", { className: "border-b border-border/50 text-left text-xs text-muted-foreground", children: [
86798
+ /* @__PURE__ */ jsx269("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thStatus") }),
86799
+ /* @__PURE__ */ jsx269("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thName") }),
86800
+ /* @__PURE__ */ jsx269("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thInterval") }),
86801
+ /* @__PURE__ */ jsx269("th", { className: "pb-2 pr-3 font-medium text-right", children: t("activity:cronJobs.thRuns") }),
86802
+ /* @__PURE__ */ jsx269("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thNextRun") }),
86803
+ /* @__PURE__ */ jsx269("th", { className: "pb-2 pr-3 font-medium", children: t("activity:cronJobs.thLastRun") }),
86804
+ /* @__PURE__ */ jsx269("th", { className: "pb-2 font-medium", children: t("activity:cronJobs.thAction") })
86603
86805
  ] }) }),
86604
- /* @__PURE__ */ jsx268("tbody", { children: jobs.map((job) => /* @__PURE__ */ jsxs258("tr", { className: "border-b border-border/30 last:border-0", children: [
86605
- /* @__PURE__ */ jsx268("td", { className: "py-2.5 pr-3", children: /* @__PURE__ */ jsx268(StatusBadge3, { enabled: job.enabled, overdue: job.overdue }) }),
86606
- /* @__PURE__ */ jsx268("td", { className: "py-2.5 pr-3 font-mono text-xs font-medium max-w-[160px] truncate", title: job.name, children: job.name }),
86607
- /* @__PURE__ */ jsx268("td", { className: "py-2.5 pr-3 font-mono text-xs tabular-nums", children: fmtInterval(job.intervalMs) }),
86608
- /* @__PURE__ */ jsxs258("td", { className: "py-2.5 pr-3 text-right font-mono text-xs tabular-nums", children: [
86806
+ /* @__PURE__ */ jsx269("tbody", { children: jobs.map((job) => /* @__PURE__ */ jsxs259("tr", { className: "border-b border-border/30 last:border-0", children: [
86807
+ /* @__PURE__ */ jsx269("td", { className: "py-2.5 pr-3", children: /* @__PURE__ */ jsx269(StatusBadge3, { enabled: job.enabled, overdue: job.overdue }) }),
86808
+ /* @__PURE__ */ jsx269("td", { className: "py-2.5 pr-3 font-mono text-xs font-medium max-w-[160px] truncate", title: job.name, children: job.name }),
86809
+ /* @__PURE__ */ jsx269("td", { className: "py-2.5 pr-3 font-mono text-xs tabular-nums", children: fmtInterval(job.intervalMs) }),
86810
+ /* @__PURE__ */ jsxs259("td", { className: "py-2.5 pr-3 text-right font-mono text-xs tabular-nums", children: [
86609
86811
  job.runCount,
86610
- lastFiredAt[job.name] && /* @__PURE__ */ jsx268("span", { className: "ml-1 text-success", title: t("activity:cronJobs.lastFiredAtTitle", { time: lastFiredAt[job.name] }), children: "\u25CF" })
86812
+ lastFiredAt[job.name] && /* @__PURE__ */ jsx269("span", { className: "ml-1 text-success", title: t("activity:cronJobs.lastFiredAtTitle", { time: lastFiredAt[job.name] }), children: "\u25CF" })
86611
86813
  ] }),
86612
- /* @__PURE__ */ jsx268("td", { className: "py-2.5 pr-3 font-mono text-xs tabular-nums", children: fmtTime4(job.nextRun) }),
86613
- /* @__PURE__ */ jsx268("td", { className: "py-2.5 pr-3 font-mono text-xs tabular-nums", children: fmtTime4(job.lastRun) }),
86614
- /* @__PURE__ */ jsx268("td", { className: "py-2.5 font-mono text-xs max-w-[200px] truncate text-muted-foreground", title: job.action, children: job.action })
86814
+ /* @__PURE__ */ jsx269("td", { className: "py-2.5 pr-3 font-mono text-xs tabular-nums", children: fmtTime4(job.nextRun) }),
86815
+ /* @__PURE__ */ jsx269("td", { className: "py-2.5 pr-3 font-mono text-xs tabular-nums", children: fmtTime4(job.lastRun) }),
86816
+ /* @__PURE__ */ jsx269("td", { className: "py-2.5 font-mono text-xs max-w-[200px] truncate text-muted-foreground", title: job.action, children: job.action })
86615
86817
  ] }, job.name)) })
86616
86818
  ] }) }),
86617
- count > 0 && /* @__PURE__ */ jsxs258("p", { className: "text-xs text-muted-foreground pt-3 border-t border-border/70", children: [
86819
+ count > 0 && /* @__PURE__ */ jsxs259("p", { className: "text-xs text-muted-foreground pt-3 border-t border-border/70", children: [
86618
86820
  t("activity:cronJobs.footerUse"),
86619
86821
  " ",
86620
- /* @__PURE__ */ jsx268("code", { className: "rounded bg-muted px-1 py-0.5 text-[11px]", children: "cron_schedule" }),
86822
+ /* @__PURE__ */ jsx269("code", { className: "rounded bg-muted px-1 py-0.5 text-[11px]", children: "cron_schedule" }),
86621
86823
  " ",
86622
86824
  t("activity:cronJobs.footerToAdd"),
86623
- /* @__PURE__ */ jsx268("code", { className: "rounded bg-muted px-1 py-0.5 text-[11px] ml-1", children: "cron_cancel" }),
86825
+ /* @__PURE__ */ jsx269("code", { className: "rounded bg-muted px-1 py-0.5 text-[11px] ml-1", children: "cron_cancel" }),
86624
86826
  " ",
86625
86827
  t("activity:cronJobs.footerToRemove")
86626
86828
  ] })
@@ -86643,8 +86845,8 @@ __export(QueuePanel_exports, {
86643
86845
  QueuePanel: () => QueuePanel
86644
86846
  });
86645
86847
  import { ArrowDownAZ as ArrowDownAZ2, ArrowUpAZ as ArrowUpAZ2, Check as Check43, ListOrdered, Trash2 as Trash229, X as X59 } from "lucide-react";
86646
- import { useCallback as useCallback83, useMemo as useMemo78, useState as useState147 } from "react";
86647
- import { jsx as jsx269, jsxs as jsxs259 } from "react/jsx-runtime";
86848
+ import { useCallback as useCallback83, useMemo as useMemo79, useState as useState149 } from "react";
86849
+ import { jsx as jsx270, jsxs as jsxs260 } from "react/jsx-runtime";
86648
86850
  function QueuePanel({
86649
86851
  open,
86650
86852
  onClose,
@@ -86654,14 +86856,14 @@ function QueuePanel({
86654
86856
  const queue = useChatStore((s) => s.queue);
86655
86857
  const removeQueued = useChatStore((s) => s.removeQueued);
86656
86858
  const clearQueue = useChatStore((s) => s.clearQueue);
86657
- const [sortDir, setSortDir] = useState147("oldest");
86859
+ const [sortDir, setSortDir] = useState149("oldest");
86658
86860
  const handleRemove = useCallback83(
86659
86861
  (index) => {
86660
86862
  removeQueued(index);
86661
86863
  },
86662
86864
  [removeQueued]
86663
86865
  );
86664
- const sortedQueue = useMemo78(() => {
86866
+ const sortedQueue = useMemo79(() => {
86665
86867
  const indexed = queue.map((item, sourceIdx) => ({ item, sourceIdx }));
86666
86868
  indexed.sort(
86667
86869
  (a, b) => sortDir === "newest" ? b.item.addedAt - a.item.addedAt : a.item.addedAt - b.item.addedAt
@@ -86669,26 +86871,26 @@ function QueuePanel({
86669
86871
  return indexed;
86670
86872
  }, [queue, sortDir]);
86671
86873
  const allDispatched = queue.length > 0 && queue.every((q) => q.alreadyDispatched);
86672
- return /* @__PURE__ */ jsx269(Dialog, { open, onOpenChange: (v) => {
86874
+ return /* @__PURE__ */ jsx270(Dialog, { open, onOpenChange: (v) => {
86673
86875
  if (!v) onClose();
86674
- }, children: /* @__PURE__ */ jsxs259(
86876
+ }, children: /* @__PURE__ */ jsxs260(
86675
86877
  DialogContent,
86676
86878
  {
86677
86879
  className: cn("max-w-lg gap-0 overflow-hidden border-border/80 bg-card p-0 pt-[10dvh] flex flex-col max-h-[70dvh]", className),
86678
86880
  showCloseButton: false,
86679
86881
  children: [
86680
- /* @__PURE__ */ jsx269(DialogTitle, { className: "sr-only", children: t("activity:queue.heading") }),
86681
- /* @__PURE__ */ jsx269(DialogDescription, { className: "sr-only", children: t("activity:queue.subtitle", { count: queue.length }) }),
86682
- /* @__PURE__ */ jsxs259("div", { className: "flex items-center justify-between border-b border-border/70 bg-card/95 px-4 py-3 shrink-0", children: [
86683
- /* @__PURE__ */ jsxs259("div", { className: "flex items-center gap-2.5", children: [
86684
- /* @__PURE__ */ jsx269("span", { className: "flex items-center justify-center w-8 h-8 rounded-md border border-primary/20 bg-primary/10 text-primary", children: /* @__PURE__ */ jsx269(ListOrdered, { className: "h-4 w-4" }) }),
86685
- /* @__PURE__ */ jsxs259("div", { children: [
86686
- /* @__PURE__ */ jsx269("h2", { className: "text-sm font-semibold", children: t("activity:queue.heading") }),
86687
- /* @__PURE__ */ jsx269("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: t("activity:queue.subtitle", { count: queue.length }) })
86882
+ /* @__PURE__ */ jsx270(DialogTitle, { className: "sr-only", children: t("activity:queue.heading") }),
86883
+ /* @__PURE__ */ jsx270(DialogDescription, { className: "sr-only", children: t("activity:queue.subtitle", { count: queue.length }) }),
86884
+ /* @__PURE__ */ jsxs260("div", { className: "flex items-center justify-between border-b border-border/70 bg-card/95 px-4 py-3 shrink-0", children: [
86885
+ /* @__PURE__ */ jsxs260("div", { className: "flex items-center gap-2.5", children: [
86886
+ /* @__PURE__ */ jsx270("span", { className: "flex items-center justify-center w-8 h-8 rounded-md border border-primary/20 bg-primary/10 text-primary", children: /* @__PURE__ */ jsx270(ListOrdered, { className: "h-4 w-4" }) }),
86887
+ /* @__PURE__ */ jsxs260("div", { children: [
86888
+ /* @__PURE__ */ jsx270("h2", { className: "text-sm font-semibold", children: t("activity:queue.heading") }),
86889
+ /* @__PURE__ */ jsx270("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: t("activity:queue.subtitle", { count: queue.length }) })
86688
86890
  ] })
86689
86891
  ] }),
86690
- /* @__PURE__ */ jsxs259("div", { className: "flex items-center gap-1", children: [
86691
- /* @__PURE__ */ jsxs259(
86892
+ /* @__PURE__ */ jsxs260("div", { className: "flex items-center gap-1", children: [
86893
+ /* @__PURE__ */ jsxs260(
86692
86894
  "button",
86693
86895
  {
86694
86896
  type: "button",
@@ -86700,12 +86902,12 @@ function QueuePanel({
86700
86902
  title: sortDir === "newest" ? t("activity:queue.sortNewestTitle") : t("activity:queue.sortOldestTitle"),
86701
86903
  "data-testid": "queue-sort-toggle",
86702
86904
  children: [
86703
- sortDir === "newest" ? /* @__PURE__ */ jsx269(ArrowDownAZ2, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx269(ArrowUpAZ2, { className: "h-3 w-3" }),
86905
+ sortDir === "newest" ? /* @__PURE__ */ jsx270(ArrowDownAZ2, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx270(ArrowUpAZ2, { className: "h-3 w-3" }),
86704
86906
  sortDir === "newest" ? t("activity:queue.newest") : t("activity:queue.oldest")
86705
86907
  ]
86706
86908
  }
86707
86909
  ),
86708
- queue.length > 0 && !allDispatched && /* @__PURE__ */ jsxs259(
86910
+ queue.length > 0 && !allDispatched && /* @__PURE__ */ jsxs260(
86709
86911
  "button",
86710
86912
  {
86711
86913
  type: "button",
@@ -86714,21 +86916,21 @@ function QueuePanel({
86714
86916
  title: t("activity:queue.clearDispatchedTitle"),
86715
86917
  "data-testid": "queue-clear-all",
86716
86918
  children: [
86717
- /* @__PURE__ */ jsx269(Trash229, { className: "h-3 w-3" }),
86919
+ /* @__PURE__ */ jsx270(Trash229, { className: "h-3 w-3" }),
86718
86920
  t("activity:queue.clear")
86719
86921
  ]
86720
86922
  }
86721
86923
  )
86722
86924
  ] })
86723
86925
  ] }),
86724
- /* @__PURE__ */ jsx269("div", { className: "min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain", children: queue.length === 0 ? /* @__PURE__ */ jsxs259("div", { className: "flex flex-col items-center justify-center py-16 gap-3 text-muted-foreground", children: [
86725
- /* @__PURE__ */ jsx269(ListOrdered, { className: "h-10 w-10 opacity-15" }),
86726
- /* @__PURE__ */ jsx269("p", { className: "text-sm font-medium", children: t("activity:queue.emptyTitle") }),
86727
- /* @__PURE__ */ jsx269("p", { className: "text-xs text-center max-w-xs", children: t("activity:queue.emptyBody") })
86728
- ] }) : /* @__PURE__ */ jsx269("ul", { className: "divide-y divide-border/60", "data-testid": "queue-list", children: sortedQueue.map(({ item, sourceIdx }, idx) => {
86926
+ /* @__PURE__ */ jsx270("div", { className: "min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain", children: queue.length === 0 ? /* @__PURE__ */ jsxs260("div", { className: "flex flex-col items-center justify-center py-16 gap-3 text-muted-foreground", children: [
86927
+ /* @__PURE__ */ jsx270(ListOrdered, { className: "h-10 w-10 opacity-15" }),
86928
+ /* @__PURE__ */ jsx270("p", { className: "text-sm font-medium", children: t("activity:queue.emptyTitle") }),
86929
+ /* @__PURE__ */ jsx270("p", { className: "text-xs text-center max-w-xs", children: t("activity:queue.emptyBody") })
86930
+ ] }) : /* @__PURE__ */ jsx270("ul", { className: "divide-y divide-border/60", "data-testid": "queue-list", children: sortedQueue.map(({ item, sourceIdx }, idx) => {
86729
86931
  const meta2 = MODE_META2[item.mode];
86730
86932
  const dispatched = item.alreadyDispatched === true;
86731
- return /* @__PURE__ */ jsxs259(
86933
+ return /* @__PURE__ */ jsxs260(
86732
86934
  "li",
86733
86935
  {
86734
86936
  className: cn(
@@ -86738,12 +86940,12 @@ function QueuePanel({
86738
86940
  "data-testid": "queue-item",
86739
86941
  "data-dispatched": dispatched ? "true" : void 0,
86740
86942
  children: [
86741
- /* @__PURE__ */ jsxs259("div", { className: "flex items-start gap-3 min-w-0 flex-1", children: [
86742
- /* @__PURE__ */ jsxs259("span", { className: "mt-1 text-[10px] font-mono text-muted-foreground shrink-0 w-5 text-right tabular-nums", children: [
86943
+ /* @__PURE__ */ jsxs260("div", { className: "flex items-start gap-3 min-w-0 flex-1", children: [
86944
+ /* @__PURE__ */ jsxs260("span", { className: "mt-1 text-[10px] font-mono text-muted-foreground shrink-0 w-5 text-right tabular-nums", children: [
86743
86945
  idx + 1,
86744
86946
  "."
86745
86947
  ] }),
86746
- /* @__PURE__ */ jsx269(
86948
+ /* @__PURE__ */ jsx270(
86747
86949
  "span",
86748
86950
  {
86749
86951
  className: cn(
@@ -86756,21 +86958,21 @@ function QueuePanel({
86756
86958
  children: meta2.label
86757
86959
  }
86758
86960
  ),
86759
- /* @__PURE__ */ jsx269("p", { className: "text-sm leading-relaxed min-w-0 break-words flex-1", children: item.text.length > 120 ? `${item.text.slice(0, 117)}\u2026` : item.text }),
86760
- dispatched && /* @__PURE__ */ jsxs259(
86961
+ /* @__PURE__ */ jsx270("p", { className: "text-sm leading-relaxed min-w-0 break-words flex-1", children: item.text.length > 120 ? `${item.text.slice(0, 117)}\u2026` : item.text }),
86962
+ dispatched && /* @__PURE__ */ jsxs260(
86761
86963
  "span",
86762
86964
  {
86763
86965
  className: "shrink-0 mt-0.5 inline-flex items-center gap-1 text-[10px] font-semibold uppercase text-success",
86764
86966
  title: t("activity:queue.dispatchedTitle"),
86765
86967
  "data-testid": `queue-dispatched-${sourceIdx}`,
86766
86968
  children: [
86767
- /* @__PURE__ */ jsx269(Check43, { className: "h-3 w-3" }),
86969
+ /* @__PURE__ */ jsx270(Check43, { className: "h-3 w-3" }),
86768
86970
  t("activity:queue.dispatchedLabel")
86769
86971
  ]
86770
86972
  }
86771
86973
  )
86772
86974
  ] }),
86773
- !dispatched && /* @__PURE__ */ jsx269(
86975
+ !dispatched && /* @__PURE__ */ jsx270(
86774
86976
  "button",
86775
86977
  {
86776
86978
  type: "button",
@@ -86778,7 +86980,7 @@ function QueuePanel({
86778
86980
  className: "ml-1 p-1.5 rounded-md shrink-0 hover:bg-destructive/10 hover:text-destructive transition-colors",
86779
86981
  title: t("activity:queue.removeTitle"),
86780
86982
  "data-testid": `queue-remove-${sourceIdx}`,
86781
- children: /* @__PURE__ */ jsx269(X59, { className: "h-3.5 w-3.5" })
86983
+ children: /* @__PURE__ */ jsx270(X59, { className: "h-3.5 w-3.5" })
86782
86984
  }
86783
86985
  )
86784
86986
  ]
@@ -86786,7 +86988,7 @@ function QueuePanel({
86786
86988
  `${item.addedAt}-${sourceIdx}`
86787
86989
  );
86788
86990
  }) }) }),
86789
- queue.length > 0 && /* @__PURE__ */ jsx269("div", { className: "border-t border-border/70 bg-muted/20 px-4 py-2.5 shrink-0", children: /* @__PURE__ */ jsx269("p", { className: "text-[10px] text-muted-foreground text-center", children: t("activity:queue.footer") }) })
86991
+ queue.length > 0 && /* @__PURE__ */ jsx270("div", { className: "border-t border-border/70 bg-muted/20 px-4 py-2.5 shrink-0", children: /* @__PURE__ */ jsx270("p", { className: "text-[10px] text-muted-foreground text-center", children: t("activity:queue.footer") }) })
86790
86992
  ]
86791
86993
  }
86792
86994
  ) });
@@ -86832,7 +87034,7 @@ import "@fontsource/ibm-plex-mono/500.css";
86832
87034
  import "@fontsource/ibm-plex-mono/600.css";
86833
87035
 
86834
87036
  // src/App.tsx
86835
- import { lazy as lazy6, Suspense as Suspense6, useEffect as useEffect131 } from "react";
87037
+ import { lazy as lazy6, Suspense as Suspense6, useEffect as useEffect133 } from "react";
86836
87038
  import { useShallow as useShallow18 } from "zustand/react/shallow";
86837
87039
 
86838
87040
  // src/hooks/useDesktopBridge.ts
@@ -116369,7 +116571,7 @@ function SettingsPanel() {
116369
116571
 
116370
116572
  // src/components/ViewRouter.tsx
116371
116573
  init_stores();
116372
- import { Fragment as Fragment75, jsx as jsx267, jsxs as jsxs257 } from "react/jsx-runtime";
116574
+ import { Fragment as Fragment75, jsx as jsx268, jsxs as jsxs258 } from "react/jsx-runtime";
116373
116575
  var AnalyticsDashboard2 = lazy5(
116374
116576
  () => Promise.resolve().then(() => (init_AnalyticsDashboard(), AnalyticsDashboard_exports)).then((m) => ({ default: m.AnalyticsDashboard }))
116375
116577
  );
@@ -116424,6 +116626,9 @@ var TechStackView2 = lazy5(
116424
116626
  var DeadCodeScanPanel2 = lazy5(
116425
116627
  () => Promise.resolve().then(() => (init_DeadCodeScanPanel(), DeadCodeScanPanel_exports)).then((m) => ({ default: m.DeadCodeScanPanel }))
116426
116628
  );
116629
+ var VectorMemoryPanel2 = lazy5(
116630
+ () => Promise.resolve().then(() => (init_vector_memory_panel(), vector_memory_panel_exports)).then((m) => ({ default: m.VectorMemoryPanel }))
116631
+ );
116427
116632
  function ViewRouter({
116428
116633
  sessionId,
116429
116634
  desktopShell
@@ -116437,37 +116642,40 @@ function ViewRouter({
116437
116642
  }))
116438
116643
  );
116439
116644
  const hasSession = sessionId;
116440
- return /* @__PURE__ */ jsxs257(Fragment75, { children: [
116441
- currentView === "chat" && /* @__PURE__ */ jsxs257(Fragment75, { children: [
116442
- hasSession && /* @__PURE__ */ jsx267("div", { className: "ws-workspace-dock-wrap shrink-0 px-3 pt-2 sm:px-4", children: /* @__PURE__ */ jsx267(WorkspaceDock, {}) }),
116443
- /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.chat"), children: /* @__PURE__ */ jsx267(ChatView, {}) })
116645
+ return /* @__PURE__ */ jsxs258(Fragment75, { children: [
116646
+ currentView === "chat" && /* @__PURE__ */ jsxs258(Fragment75, { children: [
116647
+ hasSession && /* @__PURE__ */ jsx268("div", { className: "ws-workspace-dock-wrap shrink-0 px-3 pt-2 sm:px-4", children: /* @__PURE__ */ jsx268(WorkspaceDock, {}) }),
116648
+ /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.chat"), children: /* @__PURE__ */ jsx268(ChatView, {}) })
116444
116649
  ] }),
116445
- currentView === "settings" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.settings"), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(SettingsPanel, {}) }) }),
116446
- currentView === "memory" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.sageMemory"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.sageMemory") }) }), children: /* @__PURE__ */ jsx267(SageTabs2, {}) }) }),
116447
- currentView === "roster" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.agentRoster"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.agentRoster") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex min-h-0 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx267(AgentRosterView2, {}) }) }) }),
116448
- currentView === "context" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.contextDashboard"), children: /* @__PURE__ */ jsx267(ContextDashboard, {}) }),
116449
- currentView === "setup" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.setup"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(SetupScreen2, {}) }) }) }),
116450
- currentView === "goal" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.goal"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(GoalView2, { onClose: () => showPanel("chat") }) }) }) }),
116451
- currentView === "sddhub" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.sddHub"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(SddHub2, {}) }) }) }),
116452
- currentView === "kanban" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.kanban"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(KanbanView2, { onClose: () => showPanel("chat") }) }) }) }),
116453
- currentView === "sessions" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.sessions"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(SessionsDashboard2, {}) }) }) }),
116454
- currentView === "session-inspect" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.sessionInspect"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.sessionInspect") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(SessionInspectView2, {}) }) }) }),
116455
- currentView === "chronicle" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.chronicle"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(ChronicleDashboard2, {}) }) }) }),
116456
- currentView === "intake" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.requirementsIntake"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(RequirementIntakeView2, {}) }) }) }),
116457
- currentView === "prompts" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:nav.prompts"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:nav.prompts") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(PromptJournalView2, {}) }) }) }),
116458
- currentView === "debug" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.debugDashboard"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(DebugDashboard2, {}) }) }) }),
116459
- currentView === "refresh-debug" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.refreshDebug"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(RefreshDebugView2, {}) }) }) }),
116460
- currentView === "files" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.editor"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.editor") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(CodeEditor2, {}) }) }) }),
116461
- currentView === "changes" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.changes"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.changes") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(ChangesView2, { className: "h-full min-h-0" }) }) }) }),
116462
- currentView === "mailbox" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.mailbox"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(MailboxDetailView2, { className: "h-full min-h-0" }) }) }) }),
116463
- currentView === "design-gallery" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.designGallery"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(DesignGalleryView2, { className: "h-full" }) }) }) }),
116464
- currentView === "skill" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.skill"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(SkillDetailView2, { className: "h-full" }) }) }) }),
116465
- currentView === "officemap" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.officeMap"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.officeMap") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(OfficeMapPanel2, {}) }) }) }),
116466
- currentView === "analytics" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.analytics"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, {}), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(AnalyticsDashboard2, {}) }) }) }),
116467
- currentView === "codemap" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.codemap"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.codemap") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(CodeMap2, {}) }) }) }),
116468
- currentView === "techstack" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.techstack"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.techstack") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx267(TechStackView2, {}) }) }) }),
116469
- currentView === "deadcode" && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.deadcode"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.deadcode") }) }), children: /* @__PURE__ */ jsx267("div", { className: "flex-1 min-h-0 min-w-0 overflow-y-auto", children: /* @__PURE__ */ jsx267(DeadCodeScanPanel2, {}) }) }) }),
116470
- terminalOpen && /* @__PURE__ */ jsx267(ErrorBoundary, { level: "panel", name: t("activity:panels.terminal"), children: /* @__PURE__ */ jsx267(Suspense5, { fallback: /* @__PURE__ */ jsx267(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.terminal") }) }), children: /* @__PURE__ */ jsx267(TerminalPanelLazy, { desktopShell, onClose: () => setTerminalOpen(false) }) }) })
116650
+ currentView === "settings" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.settings"), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(SettingsPanel, {}) }) }),
116651
+ currentView === "memory" && /* @__PURE__ */ jsxs258(ErrorBoundary, { level: "panel", name: t("activity:panels.sageMemory"), children: [
116652
+ /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.sageMemory") }) }), children: /* @__PURE__ */ jsx268(SageTabs2, {}) }),
116653
+ /* @__PURE__ */ jsx268(VectorMemoryPanel2, {})
116654
+ ] }),
116655
+ currentView === "roster" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.agentRoster"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.agentRoster") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex min-h-0 min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx268(AgentRosterView2, {}) }) }) }),
116656
+ currentView === "context" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.contextDashboard"), children: /* @__PURE__ */ jsx268(ContextDashboard, {}) }),
116657
+ currentView === "setup" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.setup"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(SetupScreen2, {}) }) }) }),
116658
+ currentView === "goal" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.goal"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(GoalView2, { onClose: () => showPanel("chat") }) }) }) }),
116659
+ currentView === "sddhub" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.sddHub"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(SddHub2, {}) }) }) }),
116660
+ currentView === "kanban" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.kanban"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(KanbanView2, { onClose: () => showPanel("chat") }) }) }) }),
116661
+ currentView === "sessions" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.sessions"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(SessionsDashboard2, {}) }) }) }),
116662
+ currentView === "session-inspect" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.sessionInspect"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.sessionInspect") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(SessionInspectView2, {}) }) }) }),
116663
+ currentView === "chronicle" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.chronicle"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(ChronicleDashboard2, {}) }) }) }),
116664
+ currentView === "intake" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.requirementsIntake"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(RequirementIntakeView2, {}) }) }) }),
116665
+ currentView === "prompts" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:nav.prompts"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:nav.prompts") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(PromptJournalView2, {}) }) }) }),
116666
+ currentView === "debug" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.debugDashboard"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(DebugDashboard2, {}) }) }) }),
116667
+ currentView === "refresh-debug" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.refreshDebug"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(RefreshDebugView2, {}) }) }) }),
116668
+ currentView === "files" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.editor"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.editor") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(CodeEditor2, {}) }) }) }),
116669
+ currentView === "changes" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.changes"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.changes") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(ChangesView2, { className: "h-full min-h-0" }) }) }) }),
116670
+ currentView === "mailbox" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.mailbox"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(MailboxDetailView2, { className: "h-full min-h-0" }) }) }) }),
116671
+ currentView === "design-gallery" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.designGallery"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(DesignGalleryView2, { className: "h-full" }) }) }) }),
116672
+ currentView === "skill" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.skill"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(SkillDetailView2, { className: "h-full" }) }) }) }),
116673
+ currentView === "officemap" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.officeMap"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.officeMap") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(OfficeMapPanel2, {}) }) }) }),
116674
+ currentView === "analytics" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.analytics"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, {}), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(AnalyticsDashboard2, {}) }) }) }),
116675
+ currentView === "codemap" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.codemap"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.codemap") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(CodeMap2, {}) }) }) }),
116676
+ currentView === "techstack" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.techstack"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.techstack") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx268(TechStackView2, {}) }) }) }),
116677
+ currentView === "deadcode" && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.deadcode"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.deadcode") }) }), children: /* @__PURE__ */ jsx268("div", { className: "flex-1 min-h-0 min-w-0 overflow-y-auto", children: /* @__PURE__ */ jsx268(DeadCodeScanPanel2, {}) }) }) }),
116678
+ terminalOpen && /* @__PURE__ */ jsx268(ErrorBoundary, { level: "panel", name: t("activity:panels.terminal"), children: /* @__PURE__ */ jsx268(Suspense5, { fallback: /* @__PURE__ */ jsx268(PanelSuspense, { label: t("common:loadingNamed", { name: t("activity:panels.terminal") }) }), children: /* @__PURE__ */ jsx268(TerminalPanelLazy, { desktopShell, onClose: () => setTerminalOpen(false) }) }) })
116471
116679
  ] });
116472
116680
  }
116473
116681
  var SetupScreen2 = lazy5(() => Promise.resolve().then(() => (init_SetupScreen(), SetupScreen_exports)).then((m) => ({ default: m.SetupScreen })));
@@ -116477,7 +116685,7 @@ var TerminalPanelLazy = lazy5(
116477
116685
 
116478
116686
  // src/App.tsx
116479
116687
  init_i18n();
116480
- import { Fragment as Fragment76, jsx as jsx270, jsxs as jsxs260 } from "react/jsx-runtime";
116688
+ import { Fragment as Fragment76, jsx as jsx271, jsxs as jsxs261 } from "react/jsx-runtime";
116481
116689
  var _AnalyticsDashboard = lazy6(
116482
116690
  () => Promise.resolve().then(() => (init_AnalyticsDashboard(), AnalyticsDashboard_exports)).then((m) => ({ default: m.AnalyticsDashboard }))
116483
116691
  );
@@ -116615,7 +116823,7 @@ function AppInner() {
116615
116823
  setCronJobsOpen,
116616
116824
  setTerminalOpen
116617
116825
  });
116618
- useEffect131(() => {
116826
+ useEffect133(() => {
116619
116827
  if (typeof window === "undefined") return;
116620
116828
  if (window.location.pathname === "/debug") {
116621
116829
  navigateToView("debug");
@@ -116625,7 +116833,7 @@ function AppInner() {
116625
116833
  navigateToView("refresh-debug");
116626
116834
  }
116627
116835
  }, []);
116628
- useEffect131(() => {
116836
+ useEffect133(() => {
116629
116837
  const onOpenFile = (e) => {
116630
116838
  const { filePath } = e.detail;
116631
116839
  const ws = getWSClient(useConfigStore.getState().wsUrl);
@@ -116636,7 +116844,7 @@ function AppInner() {
116636
116844
  window.addEventListener("wrongstack:open-file", onOpenFile);
116637
116845
  return () => window.removeEventListener("wrongstack:open-file", onOpenFile);
116638
116846
  }, []);
116639
- useEffect131(() => {
116847
+ useEffect133(() => {
116640
116848
  const onSaveFile = (e) => {
116641
116849
  const { filePath } = e.detail;
116642
116850
  const file = useFileStore.getState().openFiles.find((f) => f.path === filePath);
@@ -116653,7 +116861,7 @@ function AppInner() {
116653
116861
  return () => window.removeEventListener("wrongstack:save-file", onSaveFile);
116654
116862
  }, []);
116655
116863
  const { isMobile } = useViewport();
116656
- useEffect131(() => {
116864
+ useEffect133(() => {
116657
116865
  if (isMobile) {
116658
116866
  const open = useUIStore.getState().sidebarOpen;
116659
116867
  if (open) setSidebarOpen(false);
@@ -116662,7 +116870,7 @@ function AppInner() {
116662
116870
  const mobileSidebarModal = isMobile && sidebarOpen;
116663
116871
  useWebSocketBootstrap();
116664
116872
  useF5Resilience();
116665
- useEffect131(() => {
116873
+ useEffect133(() => {
116666
116874
  const parts = [];
116667
116875
  if (isLoading) {
116668
116876
  const it = iteration ? ` iter ${iteration.index}${iteration.max ? `/${iteration.max}` : ""}` : "";
@@ -116685,7 +116893,7 @@ function AppInner() {
116685
116893
  toggleInspector,
116686
116894
  setInspectorTab
116687
116895
  });
116688
- return /* @__PURE__ */ jsxs260(
116896
+ return /* @__PURE__ */ jsxs261(
116689
116897
  "div",
116690
116898
  {
116691
116899
  "data-shell": desktopShell ? "desktop" : "browser",
@@ -116695,7 +116903,7 @@ function AppInner() {
116695
116903
  theme
116696
116904
  ),
116697
116905
  children: [
116698
- /* @__PURE__ */ jsx270(
116906
+ /* @__PURE__ */ jsx271(
116699
116907
  "a",
116700
116908
  {
116701
116909
  href: "#main-content",
@@ -116703,16 +116911,16 @@ function AppInner() {
116703
116911
  children: t("activity:app.skipToContent")
116704
116912
  }
116705
116913
  ),
116706
- currentView !== "setup" && /* @__PURE__ */ jsx270(ActivityBar, { desktopShell }),
116707
- sidebarOpen && currentView !== "setup" && /* @__PURE__ */ jsx270(SidePanel, { desktopShell }),
116708
- /* @__PURE__ */ jsxs260(
116914
+ currentView !== "setup" && /* @__PURE__ */ jsx271(ActivityBar, { desktopShell }),
116915
+ sidebarOpen && currentView !== "setup" && /* @__PURE__ */ jsx271(SidePanel, { desktopShell }),
116916
+ /* @__PURE__ */ jsxs261(
116709
116917
  "main",
116710
116918
  {
116711
116919
  id: "main-content",
116712
116920
  className: "flex-1 min-w-0 min-h-0 flex flex-col overflow-hidden bg-background/70",
116713
116921
  ...mobileSidebarModal ? { inert: true } : {},
116714
116922
  children: [
116715
- currentView !== "setup" && /* @__PURE__ */ jsx270(
116923
+ currentView !== "setup" && /* @__PURE__ */ jsx271(
116716
116924
  WorkbenchTopbar,
116717
116925
  {
116718
116926
  currentView,
@@ -116726,53 +116934,53 @@ function AppInner() {
116726
116934
  onSettings: () => openMainView("settings")
116727
116935
  }
116728
116936
  ),
116729
- currentView !== "setup" && /* @__PURE__ */ jsx270(ConnectionBanner, {}),
116730
- currentView !== "setup" && /* @__PURE__ */ jsx270(UpdateBanner, {}),
116731
- /* @__PURE__ */ jsx270(ViewRouter, { sessionId: sessionId ?? null, desktopShell })
116937
+ currentView !== "setup" && /* @__PURE__ */ jsx271(ConnectionBanner, {}),
116938
+ currentView !== "setup" && /* @__PURE__ */ jsx271(UpdateBanner, {}),
116939
+ /* @__PURE__ */ jsx271(ViewRouter, { sessionId: sessionId ?? null, desktopShell })
116732
116940
  ]
116733
116941
  }
116734
116942
  ),
116735
- currentView !== "setup" && /* @__PURE__ */ jsxs260(Fragment76, { children: [
116736
- /* @__PURE__ */ jsx270(ErrorBoundary, { level: "panel", name: t("activity:panels.inspector"), children: /* @__PURE__ */ jsx270(InspectorPanel, {}) }),
116737
- sessionId && currentView === "chat" && /* @__PURE__ */ jsx270(ErrorBoundary, { level: "panel", name: t("activity:panels.workspaceInspector"), children: /* @__PURE__ */ jsx270(WorkspaceDockInspector, { sessionId }) })
116943
+ currentView !== "setup" && /* @__PURE__ */ jsxs261(Fragment76, { children: [
116944
+ /* @__PURE__ */ jsx271(ErrorBoundary, { level: "panel", name: t("activity:panels.inspector"), children: /* @__PURE__ */ jsx271(InspectorPanel, {}) }),
116945
+ sessionId && currentView === "chat" && /* @__PURE__ */ jsx271(ErrorBoundary, { level: "panel", name: t("activity:panels.workspaceInspector"), children: /* @__PURE__ */ jsx271(WorkspaceDockInspector, { sessionId }) })
116738
116946
  ] }),
116739
- processMonitorOpen && /* @__PURE__ */ jsx270(ErrorBoundary, { level: "panel", name: t("activity:panels.processMonitor"), children: /* @__PURE__ */ jsx270(Suspense6, { fallback: null, children: /* @__PURE__ */ jsx270(
116947
+ processMonitorOpen && /* @__PURE__ */ jsx271(ErrorBoundary, { level: "panel", name: t("activity:panels.processMonitor"), children: /* @__PURE__ */ jsx271(Suspense6, { fallback: null, children: /* @__PURE__ */ jsx271(
116740
116948
  ProcessMonitor3,
116741
116949
  {
116742
116950
  open: processMonitorOpen,
116743
116951
  onClose: () => setProcessMonitorOpen(false)
116744
116952
  }
116745
116953
  ) }) }),
116746
- queuePanelOpen && /* @__PURE__ */ jsx270(ErrorBoundary, { level: "panel", name: t("activity:panels.queue"), children: /* @__PURE__ */ jsx270(Suspense6, { fallback: null, children: /* @__PURE__ */ jsx270(QueuePanel2, { open: queuePanelOpen, onClose: () => setQueuePanelOpen(false) }) }) }),
116747
- cronJobsOpen && /* @__PURE__ */ jsx270(ErrorBoundary, { level: "panel", name: t("activity:panels.cronJobs"), children: /* @__PURE__ */ jsx270(Suspense6, { fallback: null, children: /* @__PURE__ */ jsx270(CronJobsPanel2, { open: cronJobsOpen, onClose: () => setCronJobsOpen(false) }) }) }),
116748
- /* @__PURE__ */ jsx270(PromptLibraryModal, {}),
116749
- sideContextBreakdownOpen && /* @__PURE__ */ jsx270(
116954
+ queuePanelOpen && /* @__PURE__ */ jsx271(ErrorBoundary, { level: "panel", name: t("activity:panels.queue"), children: /* @__PURE__ */ jsx271(Suspense6, { fallback: null, children: /* @__PURE__ */ jsx271(QueuePanel2, { open: queuePanelOpen, onClose: () => setQueuePanelOpen(false) }) }) }),
116955
+ cronJobsOpen && /* @__PURE__ */ jsx271(ErrorBoundary, { level: "panel", name: t("activity:panels.cronJobs"), children: /* @__PURE__ */ jsx271(Suspense6, { fallback: null, children: /* @__PURE__ */ jsx271(CronJobsPanel2, { open: cronJobsOpen, onClose: () => setCronJobsOpen(false) }) }) }),
116956
+ /* @__PURE__ */ jsx271(PromptLibraryModal, {}),
116957
+ sideContextBreakdownOpen && /* @__PURE__ */ jsx271(
116750
116958
  ContextBreakdownModal,
116751
116959
  {
116752
116960
  open: sideContextBreakdownOpen,
116753
116961
  onClose: () => setSideContextBreakdownOpen(false)
116754
116962
  }
116755
116963
  ),
116756
- /* @__PURE__ */ jsx270(ConfirmDialog, {}),
116757
- /* @__PURE__ */ jsx270(ConfirmModalHost, {}),
116758
- /* @__PURE__ */ jsx270(PromptModalHost, {}),
116759
- /* @__PURE__ */ jsx270(CommandPalette, {}),
116760
- /* @__PURE__ */ jsx270(ShortcutsOverlay, {}),
116761
- /* @__PURE__ */ jsx270(QuickModelSwitcher, {}),
116762
- /* @__PURE__ */ jsx270(FallbackModal, {}),
116763
- /* @__PURE__ */ jsx270(Toaster, {})
116964
+ /* @__PURE__ */ jsx271(ConfirmDialog, {}),
116965
+ /* @__PURE__ */ jsx271(ConfirmModalHost, {}),
116966
+ /* @__PURE__ */ jsx271(PromptModalHost, {}),
116967
+ /* @__PURE__ */ jsx271(CommandPalette, {}),
116968
+ /* @__PURE__ */ jsx271(ShortcutsOverlay, {}),
116969
+ /* @__PURE__ */ jsx271(QuickModelSwitcher, {}),
116970
+ /* @__PURE__ */ jsx271(FallbackModal, {}),
116971
+ /* @__PURE__ */ jsx271(Toaster, {})
116764
116972
  ]
116765
116973
  }
116766
116974
  );
116767
116975
  }
116768
116976
  function App() {
116769
- return /* @__PURE__ */ jsx270(ErrorBoundary, { children: /* @__PURE__ */ jsx270(ThemeProvider, { defaultTheme: "system", children: /* @__PURE__ */ jsx270(AppInner, {}) }) });
116977
+ return /* @__PURE__ */ jsx271(ErrorBoundary, { children: /* @__PURE__ */ jsx271(ThemeProvider, { defaultTheme: "system", children: /* @__PURE__ */ jsx271(AppInner, {}) }) });
116770
116978
  }
116771
116979
 
116772
116980
  // src/main.tsx
116773
116981
  import "./index.css";
116774
- import { jsx as jsx271 } from "react/jsx-runtime";
116982
+ import { jsx as jsx272 } from "react/jsx-runtime";
116775
116983
  ReactDOM.createRoot(expectDefined13(document.getElementById("root"))).render(
116776
- /* @__PURE__ */ jsx271(React8.StrictMode, { children: /* @__PURE__ */ jsx271(App, {}) })
116984
+ /* @__PURE__ */ jsx272(React8.StrictMode, { children: /* @__PURE__ */ jsx272(App, {}) })
116777
116985
  );
116778
116986
  //# sourceMappingURL=index.js.map