@wrongstack/webui 0.308.1 → 0.308.2

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 (63) hide show
  1. package/dist/assets/{AgentRosterView-BTbwL6nH.js → AgentRosterView-BRsiLkYT.js} +1 -1
  2. package/dist/assets/{AnalyticsDashboard-ETUD_m7R.js → AnalyticsDashboard-wgm1_jI-.js} +1 -1
  3. package/dist/assets/{AudienceMemoryPanel-BosVQjIW.js → AudienceMemoryPanel-Dj2zRV6l.js} +1 -1
  4. package/dist/assets/{ChangesView-DQK4FtLh.js → ChangesView-Cc7SriFS.js} +1 -1
  5. package/dist/assets/{ChronicleDashboard-By8HsUSe.js → ChronicleDashboard-CyqJjnDP.js} +1 -1
  6. package/dist/assets/{CodeEditor-CbdYsnzn.js → CodeEditor-CrQxq-34.js} +1 -1
  7. package/dist/assets/{CodeMap-BXgrpv5t.js → CodeMap-CAhE44jp.js} +1 -1
  8. package/dist/assets/{ConfirmModal-lPWvstcy.js → ConfirmModal-gREeWWsa.js} +1 -1
  9. package/dist/assets/{CronJobsPanel-CScZrguV.js → CronJobsPanel-D6AfSxD8.js} +1 -1
  10. package/dist/assets/{DeadCodeScanPanel-DYJRfj4d.js → DeadCodeScanPanel-LOzt0Z1Z.js} +1 -1
  11. package/dist/assets/{DebugDashboard-b9gkedN0.js → DebugDashboard-CNdS9FFO.js} +1 -1
  12. package/dist/assets/{DesignGalleryView-Bxqluim4.js → DesignGalleryView-CDDM4pDl.js} +1 -1
  13. package/dist/assets/{GoalView-CD0amyz6.js → GoalView-mzLqil_K.js} +1 -1
  14. package/dist/assets/{KanbanView-D2ZkvBAt.js → KanbanView-Dlsji4r2.js} +1 -1
  15. package/dist/assets/{MailboxDetailView-DvZk7zUu.js → MailboxDetailView-Cxx74zQn.js} +1 -1
  16. package/dist/assets/{MemoryDrawer-Bx3dEdNU.js → MemoryDrawer-BnT2jWmE.js} +1 -1
  17. package/dist/assets/{MemoryManager-CN4Hywz0.js → MemoryManager-DlVmZ-0S.js} +1 -1
  18. package/dist/assets/{ModelPicker-CBOKANNP.js → ModelPicker-CsaLCgdi.js} +1 -1
  19. package/dist/assets/{OfficeMapPanel-bpCNnMzk.js → OfficeMapPanel-B_95mXEy.js} +1 -1
  20. package/dist/assets/{ProcessMonitor-BDV0vAQh.js → ProcessMonitor-Dmmbx4lh.js} +1 -1
  21. package/dist/assets/{PromptJournalView-Bb5ot9Ty.js → PromptJournalView-DBCw7oeQ.js} +1 -1
  22. package/dist/assets/{QueuePanel-w5a4slQa.js → QueuePanel-CKAGgWxS.js} +1 -1
  23. package/dist/assets/{RefreshDebugView-DUleI5Wz.js → RefreshDebugView-CKPQ_tKX.js} +1 -1
  24. package/dist/assets/{RequirementIntakeView-BxY6z83Q.js → RequirementIntakeView-B5JKkW9E.js} +1 -1
  25. package/dist/assets/{SageTabs-CimVRiPq.js → SageTabs-D04tfLki.js} +2 -2
  26. package/dist/assets/{SddFlowGraph-CwrPsUbP.js → SddFlowGraph-BCgIDw11.js} +1 -1
  27. package/dist/assets/{SddHub-DMCa8gys.js → SddHub-CkH8Kv7V.js} +1 -1
  28. package/dist/assets/{SessionInspectView-CccHo_-4.js → SessionInspectView-PA6jl9bt.js} +1 -1
  29. package/dist/assets/{SessionList-CXzEUHkx.js → SessionList-vOuy4gzk.js} +1 -1
  30. package/dist/assets/{SessionsDashboard-DZp3WVEz.js → SessionsDashboard-DXt34ZON.js} +1 -1
  31. package/dist/assets/{SetupScreen-Bo_XAjrP.js → SetupScreen-Cm50YBwk.js} +1 -1
  32. package/dist/assets/{SkillDetailView-DVAlzbDj.js → SkillDetailView-BBu6DBBh.js} +1 -1
  33. package/dist/assets/{SpecsView-CctUPWlo.js → SpecsView-DeHi6LWP.js} +1 -1
  34. package/dist/assets/{TechStackView-DlWg2aCJ.js → TechStackView-cARkf3Ep.js} +1 -1
  35. package/dist/assets/{TerminalPanel-Yb-lQFDz.js → TerminalPanel-HWOYFCGa.js} +1 -1
  36. package/dist/assets/{Toaster-BB1yPhku.js → Toaster-CQLQAp7y.js} +1 -1
  37. package/dist/assets/{i18n-DxZ0s97D.js → i18n-CcHSmDoO.js} +2 -2
  38. package/dist/assets/{index-CWC2RBlq.js → index-Bj3blCRO.js} +6 -6
  39. package/dist/assets/{roster-ws-C_u0NB5k.js → roster-ws-XgkT9mo8.js} +1 -1
  40. package/dist/assets/settings-50uwXQIW.js +1 -0
  41. package/dist/assets/settings-BPT8LWkU.js +1 -0
  42. package/dist/assets/settings-BmJI-gam.js +1 -0
  43. package/dist/assets/settings-CqFe8Jtz.js +1 -0
  44. package/dist/assets/settings-DeM0wvCG.js +1 -0
  45. package/dist/assets/settings-DijFr-kZ.js +1 -0
  46. package/dist/assets/settings-L9mLQIIP.js +1 -0
  47. package/dist/assets/{stores-JAIPqBZz.js → stores-kaIFQfXo.js} +1 -1
  48. package/dist/assets/{useWebSocket-BepkW6iB.js → useWebSocket-DjrFK4tQ.js} +1 -1
  49. package/dist/assets/ws-client-BVq0hf0a.js +1 -0
  50. package/dist/index.html +9 -9
  51. package/dist/index.js +246 -149
  52. package/dist/lib/ws-client-utils.d.ts +7 -6
  53. package/dist/types/connections.d.ts +10 -0
  54. package/dist/types/server-message.d.ts +4 -1
  55. package/package.json +8 -8
  56. package/dist/assets/settings-CcZ8Byag.js +0 -1
  57. package/dist/assets/settings-DmEF3l3H.js +0 -1
  58. package/dist/assets/settings-Evj_2PTQ.js +0 -1
  59. package/dist/assets/settings-ZtdXzV5f.js +0 -1
  60. package/dist/assets/settings-fv8qo7sz.js +0 -1
  61. package/dist/assets/settings-xB2OG18R.js +0 -1
  62. package/dist/assets/settings-xIdfpBZZ.js +0 -1
  63. package/dist/assets/ws-client-BWKbZ1w0.js +0 -1
package/dist/index.js CHANGED
@@ -4342,7 +4342,8 @@ var require_settings = __commonJS({
4342
4342
  }
4343
4343
  },
4344
4344
  serviceActionRestart: "Restart {{label}}",
4345
- webuiTransport: "WebUI transport"
4345
+ webuiTransport: "WebUI transport",
4346
+ serviceAutoRestarting: "Auto-restarting\u2026"
4346
4347
  },
4347
4348
  provider: {
4348
4349
  subscriptionHeading: "Subscription login",
@@ -9180,7 +9181,8 @@ var require_settings2 = __commonJS({
9180
9181
  }
9181
9182
  },
9182
9183
  serviceActionRestart: "Neustarten {{label}}",
9183
- webuiTransport: "WebUI-Transport"
9184
+ webuiTransport: "WebUI-Transport",
9185
+ serviceAutoRestarting: "Automatischer Neustart\u2026"
9184
9186
  },
9185
9187
  provider: {
9186
9188
  savedProviderCount_one: "{{count}} Anbieter",
@@ -14071,7 +14073,8 @@ var require_settings3 = __commonJS({
14071
14073
  }
14072
14074
  },
14073
14075
  serviceActionRestart: "Reiniciar {{label}}",
14074
- webuiTransport: "Transporte de WebUI"
14076
+ webuiTransport: "Transporte de WebUI",
14077
+ serviceAutoRestarting: "Reiniciando autom\xE1ticamente\u2026"
14075
14078
  },
14076
14079
  provider: {
14077
14080
  savedProviderCount_one: "{{count}} proveedor",
@@ -18963,7 +18966,8 @@ var require_settings4 = __commonJS({
18963
18966
  }
18964
18967
  },
18965
18968
  serviceActionRestart: "Red\xE9marrer {{label}}",
18966
- webuiTransport: "Transport WebUI"
18969
+ webuiTransport: "Transport WebUI",
18970
+ serviceAutoRestarting: "Red\xE9marrage automatique\u2026"
18967
18971
  },
18968
18972
  provider: {
18969
18973
  savedProviderCount_one: "{{count}} fournisseur",
@@ -23855,7 +23859,8 @@ var require_settings5 = __commonJS({
23855
23859
  }
23856
23860
  },
23857
23861
  serviceActionRestart: "Riavvia {{label}}",
23858
- webuiTransport: "Trasporto WebUI"
23862
+ webuiTransport: "Trasporto WebUI",
23863
+ serviceAutoRestarting: "Riavvio automatico\u2026"
23859
23864
  },
23860
23865
  provider: {
23861
23866
  savedProviderCount_one: "{{count}} provider",
@@ -28746,7 +28751,8 @@ var require_settings6 = __commonJS({
28746
28751
  }
28747
28752
  },
28748
28753
  serviceActionRestart: "Reiniciar {{label}}",
28749
- webuiTransport: "Transporte do WebUI"
28754
+ webuiTransport: "Transporte do WebUI",
28755
+ serviceAutoRestarting: "Reiniciando automaticamente\u2026"
28750
28756
  },
28751
28757
  provider: {
28752
28758
  savedProviderCount_one: "{{count}} provedor",
@@ -33637,7 +33643,8 @@ var require_settings7 = __commonJS({
33637
33643
  }
33638
33644
  },
33639
33645
  serviceActionRestart: "Yeniden ba\u015Flat {{label}}",
33640
- webuiTransport: "WebUI ta\u015F\u0131mas\u0131"
33646
+ webuiTransport: "WebUI ta\u015F\u0131mas\u0131",
33647
+ serviceAutoRestarting: "Otomatik yeniden ba\u015Flat\u0131l\u0131yor\u2026"
33641
33648
  },
33642
33649
  provider: {
33643
33650
  subscriptionHeading: "Abonelik giri\u015Fi",
@@ -36282,6 +36289,7 @@ var init_viz_store = __esm({
36282
36289
  function isActiveSessionMessage(msg) {
36283
36290
  const sessionId = msg.payload?.sessionId;
36284
36291
  const activeId = useSessionStore.getState().session?.id;
36292
+ if (sessionId === "") return false;
36285
36293
  return !sessionId || !activeId || sessionId === activeId;
36286
36294
  }
36287
36295
  function pipeViz(msg) {
@@ -47102,7 +47110,7 @@ var init_fallback_ref = __esm({
47102
47110
 
47103
47111
  // src/components/ModelPicker.tsx
47104
47112
  import { Check as Check14, ChevronDown as ChevronDown16, Cpu as Cpu11, RotateCcw as RotateCcw8, X as X16 } from "lucide-react";
47105
- import { useEffect as useEffect72, useMemo as useMemo33, useRef as useRef34, useState as useState69 } from "react";
47113
+ import { useEffect as useEffect72, useMemo as useMemo33, useRef as useRef35, useState as useState69 } from "react";
47106
47114
  import { jsx as jsx120, jsxs as jsxs114 } from "react/jsx-runtime";
47107
47115
  function ModelPicker({
47108
47116
  value,
@@ -47117,7 +47125,7 @@ function ModelPicker({
47117
47125
  const { t } = useTranslation();
47118
47126
  const [open, setOpen] = useState69(false);
47119
47127
  const [query, setQuery] = useState69("");
47120
- const ref = useRef34(null);
47128
+ const ref = useRef35(null);
47121
47129
  useEffect72(() => {
47122
47130
  if (!open) return;
47123
47131
  const onDown = (e) => {
@@ -47377,9 +47385,9 @@ var init_badge = __esm({
47377
47385
  });
47378
47386
 
47379
47387
  // src/hooks/useFieldKeyboardNav.ts
47380
- import { useCallback as useCallback35, useRef as useRef36 } from "react";
47388
+ import { useCallback as useCallback35, useRef as useRef37 } from "react";
47381
47389
  function useFieldKeyboardNav() {
47382
- const fieldRefs = useRef36([]);
47390
+ const fieldRefs = useRef37([]);
47383
47391
  const setFieldRef = useCallback35(
47384
47392
  (index) => (el) => {
47385
47393
  fieldRefs.current[index] = el;
@@ -47445,7 +47453,7 @@ var init_local_presets = __esm({
47445
47453
 
47446
47454
  // src/components/SetupScreen/ModelEditor.tsx
47447
47455
  import { Check as Check17, Loader2 as Loader215, Plus as Plus6, Search as Search11, X as X18 } from "lucide-react";
47448
- import { useCallback as useCallback36, useEffect as useEffect75, useRef as useRef37, useState as useState73 } from "react";
47456
+ import { useCallback as useCallback36, useEffect as useEffect75, useRef as useRef38, useState as useState73 } from "react";
47449
47457
  import { jsx as jsx130, jsxs as jsxs123 } from "react/jsx-runtime";
47450
47458
  function ModelEditor({
47451
47459
  models,
@@ -47458,8 +47466,8 @@ function ModelEditor({
47458
47466
  const [searching, setSearching] = useState73(false);
47459
47467
  const [showCustom, setShowCustom] = useState73(false);
47460
47468
  const [customId, setCustomId] = useState73("");
47461
- const searchRef = useRef37(void 0);
47462
- const customInputRef = useRef37(null);
47469
+ const searchRef = useRef38(void 0);
47470
+ const customInputRef = useRef38(null);
47463
47471
  const wsUrl = useConfigStore((s) => s.wsUrl);
47464
47472
  const search = useCallback36(
47465
47473
  (rawQuery) => {
@@ -47696,7 +47704,7 @@ import {
47696
47704
  TrendingUp as TrendingUp2,
47697
47705
  Users as Users7
47698
47706
  } from "lucide-react";
47699
- import { useCallback as useCallback47, useEffect as useEffect84, useMemo as useMemo39, useRef as useRef41, useState as useState84 } from "react";
47707
+ import { useCallback as useCallback47, useEffect as useEffect84, useMemo as useMemo39, useRef as useRef42, useState as useState84 } from "react";
47700
47708
  import { Fragment as Fragment37, jsx as jsx145, jsxs as jsxs137 } from "react/jsx-runtime";
47701
47709
  function fmtDuration3(ms) {
47702
47710
  const sec = Math.floor(ms / 1e3);
@@ -47751,7 +47759,7 @@ function AnalyticsDashboard() {
47751
47759
  const [stats, setStats] = useState84(null);
47752
47760
  const [loading, setLoading] = useState84(true);
47753
47761
  const [statsLoading, setStatsLoading] = useState84(false);
47754
- const wsRef = useRef41(null);
47762
+ const wsRef = useRef42(null);
47755
47763
  const fetchSummary = useCallback47(async () => {
47756
47764
  try {
47757
47765
  const res = await fetch("/api/analytics/summary");
@@ -51501,7 +51509,7 @@ var init_monaco_theme = __esm({
51501
51509
  import { DiffEditor, loader } from "@monaco-editor/react";
51502
51510
  import * as monaco2 from "monaco-editor";
51503
51511
  import { Check as Check20, Loader2 as Loader226, Save } from "lucide-react";
51504
- import { useCallback as useCallback53, useEffect as useEffect87, useRef as useRef42, useState as useState91 } from "react";
51512
+ import { useCallback as useCallback53, useEffect as useEffect87, useRef as useRef43, useState as useState91 } from "react";
51505
51513
  import { jsx as jsx156, jsxs as jsxs147 } from "react/jsx-runtime";
51506
51514
  function guessLanguage(path) {
51507
51515
  const ext = path.split(".").pop()?.toLowerCase() ?? "";
@@ -51513,7 +51521,7 @@ function MonacoDiffView({
51513
51521
  newText
51514
51522
  }) {
51515
51523
  const { t } = useTranslation();
51516
- const editorRef = useRef42(null);
51524
+ const editorRef = useRef43(null);
51517
51525
  const [dirty, setDirty] = useState91(false);
51518
51526
  const [saving, setSaving] = useState91(false);
51519
51527
  const [savedAt, setSavedAt] = useState91(null);
@@ -51855,7 +51863,7 @@ import {
51855
51863
  TriangleAlert as TriangleAlert2,
51856
51864
  X as X25
51857
51865
  } from "lucide-react";
51858
- import { useCallback as useCallback54, useEffect as useEffect89, useMemo as useMemo45, useRef as useRef43, useState as useState93 } from "react";
51866
+ import { useCallback as useCallback54, useEffect as useEffect89, useMemo as useMemo45, useRef as useRef44, useState as useState93 } from "react";
51859
51867
  import { jsx as jsx159, jsxs as jsxs150 } from "react/jsx-runtime";
51860
51868
  function defaultQuery() {
51861
51869
  return {
@@ -51887,7 +51895,7 @@ function ChronicleDashboard() {
51887
51895
  const [providerDaily, setProviderDaily] = useState93([]);
51888
51896
  const [taskOutcomes, setTaskOutcomes] = useState93([]);
51889
51897
  const [chronicleStatus, setChronicleStatus] = useState93(null);
51890
- const queryRef = useRef43(query);
51898
+ const queryRef = useRef44(query);
51891
51899
  queryRef.current = query;
51892
51900
  const run = useCallback54(
51893
51901
  (next) => {
@@ -52857,7 +52865,7 @@ var init_completion = __esm({
52857
52865
  });
52858
52866
 
52859
52867
  // src/hooks/useMemoryForFile.ts
52860
- import { useCallback as useCallback55, useEffect as useEffect90, useRef as useRef44, useState as useState94 } from "react";
52868
+ import { useCallback as useCallback55, useEffect as useEffect90, useRef as useRef45, useState as useState94 } from "react";
52861
52869
  function normalizePathForCompare(value) {
52862
52870
  return value.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/{2,}/g, "/").toLowerCase();
52863
52871
  }
@@ -52881,9 +52889,9 @@ function useMemoryForFile(options) {
52881
52889
  const [data, setData] = useState94(null);
52882
52890
  const [loading, setLoading] = useState94(false);
52883
52891
  const [error, setError] = useState94(null);
52884
- const requestSeq = useRef44(0);
52885
- const unsubscribeRef = useRef44(null);
52886
- const sendOptionsRef = useRef44(sendOptions);
52892
+ const requestSeq = useRef45(0);
52893
+ const unsubscribeRef = useRef45(null);
52894
+ const sendOptionsRef = useRef45(sendOptions);
52887
52895
  sendOptionsRef.current = sendOptions;
52888
52896
  const fetchNow = useCallback55(() => {
52889
52897
  if (!filePath) {
@@ -53776,7 +53784,7 @@ import {
53776
53784
  TerminalSquare as TerminalSquare2,
53777
53785
  Users as Users8
53778
53786
  } from "lucide-react";
53779
- import { useCallback as useCallback57, useEffect as useEffect92, useMemo as useMemo46, useRef as useRef45, useState as useState96 } from "react";
53787
+ import { useCallback as useCallback57, useEffect as useEffect92, useMemo as useMemo46, useRef as useRef46, useState as useState96 } from "react";
53780
53788
  import { Fragment as Fragment42, jsx as jsx162, jsxs as jsxs153 } from "react/jsx-runtime";
53781
53789
  function summarizeLineage(rows) {
53782
53790
  const sessions = /* @__PURE__ */ new Set();
@@ -53910,7 +53918,7 @@ function FileActivityDrawer({ file }) {
53910
53918
  const [chronicleLoading, setChronicleLoading] = useState96(false);
53911
53919
  const [chronicleError, setChronicleError] = useState96(null);
53912
53920
  const [gitBase, setGitBase] = useState96(null);
53913
- const resizeRef = useRef45(null);
53921
+ const resizeRef = useRef46(null);
53914
53922
  const wsUrl = useConfigStore((state) => state.wsUrl);
53915
53923
  const history = useCodemapActivityStore((state) => state.history);
53916
53924
  const activeOperations = useCodemapActivityStore((state) => state.activeOperations);
@@ -54643,7 +54651,7 @@ __export(CodeEditor_exports, {
54643
54651
  CodeEditor: () => CodeEditor
54644
54652
  });
54645
54653
  import { X as X27, Circle as Circle8, Send as Send5, FileText as FileText14 } from "lucide-react";
54646
- import { useCallback as useCallback58, useEffect as useEffect93, useMemo as useMemo47, useRef as useRef46, useState as useState97 } from "react";
54654
+ import { useCallback as useCallback58, useEffect as useEffect93, useMemo as useMemo47, useRef as useRef47, useState as useState97 } from "react";
54647
54655
  import Editor, { loader as loader2 } from "@monaco-editor/react";
54648
54656
  import * as monaco3 from "monaco-editor";
54649
54657
  import { jsx as jsx163, jsxs as jsxs154 } from "react/jsx-runtime";
@@ -54738,9 +54746,9 @@ function CodeEditor() {
54738
54746
  const activeFilePath = useFileStore((s) => s.activeFilePath);
54739
54747
  const updateContent = useFileStore((s) => s.updateContent);
54740
54748
  const { theme: appTheme } = useTheme();
54741
- const editorRef = useRef46(null);
54742
- const activeFilePathRef = useRef46(activeFilePath);
54743
- const completionCacheRef = useRef46(/* @__PURE__ */ new Map());
54749
+ const editorRef = useRef47(null);
54750
+ const activeFilePathRef = useRef47(activeFilePath);
54751
+ const completionCacheRef = useRef47(/* @__PURE__ */ new Map());
54744
54752
  const activeFile = useMemo47(
54745
54753
  () => openFiles.find((f) => f.path === activeFilePath) ?? null,
54746
54754
  [openFiles, activeFilePath]
@@ -57253,7 +57261,7 @@ import {
57253
57261
  useNodesState,
57254
57262
  useReactFlow
57255
57263
  } from "@xyflow/react";
57256
- import { useCallback as useCallback59, useDeferredValue, useEffect as useEffect94, useMemo as useMemo48, useRef as useRef47, useState as useState98 } from "react";
57264
+ import { useCallback as useCallback59, useDeferredValue, useEffect as useEffect94, useMemo as useMemo48, useRef as useRef48, useState as useState98 } from "react";
57257
57265
  import "@xyflow/react/dist/style.css";
57258
57266
  import { useVirtualizer } from "@tanstack/react-virtual";
57259
57267
  import { useShallow as useShallow13 } from "zustand/react/shallow";
@@ -57283,13 +57291,13 @@ function CodeMapInner() {
57283
57291
  const [pausedOperations, setPausedOperations] = useState98(null);
57284
57292
  const [pausedRecent, setPausedRecent] = useState98(null);
57285
57293
  const [agentTrailCount, setAgentTrailCount] = useState98(0);
57286
- const cache = useRef47(/* @__PURE__ */ new Map());
57287
- const pendingSelection = useRef47(null);
57288
- const lastFollowedActivity = useRef47(null);
57289
- const lastFitSignature = useRef47("");
57290
- const lastFlowStructuralKey = useRef47("");
57291
- const flowRebuildTimer = useRef47(null);
57292
- const symbolResolveInflight = useRef47(/* @__PURE__ */ new Set());
57294
+ const cache = useRef48(/* @__PURE__ */ new Map());
57295
+ const pendingSelection = useRef48(null);
57296
+ const lastFollowedActivity = useRef48(null);
57297
+ const lastFitSignature = useRef48("");
57298
+ const lastFlowStructuralKey = useRef48("");
57299
+ const flowRebuildTimer = useRef48(null);
57300
+ const symbolResolveInflight = useRef48(/* @__PURE__ */ new Set());
57293
57301
  const {
57294
57302
  history: activityHistory,
57295
57303
  pulses: activityPulses,
@@ -57374,8 +57382,8 @@ function CodeMapInner() {
57374
57382
  return () => window.clearTimeout(timer);
57375
57383
  }, [searchInput]);
57376
57384
  const indexGeneration = useCodemapIndexStore((state) => state.generation);
57377
- const lastSeenIndexGeneration = useRef47(0);
57378
- const treeScrollRef = useRef47(null);
57385
+ const lastSeenIndexGeneration = useRef48(0);
57386
+ const treeScrollRef = useRef48(null);
57379
57387
  useEffect94(() => {
57380
57388
  let cancelled = false;
57381
57389
  const forceRefresh = indexGeneration > lastSeenIndexGeneration.current;
@@ -59654,7 +59662,7 @@ var GoalView_exports = {};
59654
59662
  __export(GoalView_exports, {
59655
59663
  GoalView: () => GoalView
59656
59664
  });
59657
- import { useCallback as useCallback63, useEffect as useEffect97, useRef as useRef48, useState as useState103 } from "react";
59665
+ import { useCallback as useCallback63, useEffect as useEffect97, useRef as useRef49, useState as useState103 } from "react";
59658
59666
  import { Layers as Layers9, Loader2 as Loader233, Pause as Pause7, Play as Play5, Plus as Plus12, Rocket as Rocket4, Square as Square5, Undo2, X as X32, Zap as Zap22 } from "lucide-react";
59659
59667
  import { Fragment as Fragment48, jsx as jsx182, jsxs as jsxs173 } from "react/jsx-runtime";
59660
59668
  function GoalView({ onClose }) {
@@ -59683,7 +59691,7 @@ function GoalView({ onClose }) {
59683
59691
  const [chimeraReview, setChimeraReview] = useState103(false);
59684
59692
  const assessResult = useGoalAssessStore((s) => s.result);
59685
59693
  const assessLoading = useGoalAssessStore((s) => s.loading);
59686
- const assessDebounceRef = useRef48(null);
59694
+ const assessDebounceRef = useRef49(null);
59687
59695
  useEffect97(() => {
59688
59696
  if (assessDebounceRef.current) clearTimeout(assessDebounceRef.current);
59689
59697
  if (!goal.trim()) {
@@ -60495,7 +60503,7 @@ var init_useKanbanMeta = __esm({
60495
60503
 
60496
60504
  // src/components/ChipMultiSelect.tsx
60497
60505
  import { Check as Check24, ChevronDown as ChevronDown24, Plus as Plus13, X as X33 } from "lucide-react";
60498
- import { useEffect as useEffect100, useMemo as useMemo51, useRef as useRef49, useState as useState105 } from "react";
60506
+ import { useEffect as useEffect100, useMemo as useMemo51, useRef as useRef50, useState as useState105 } from "react";
60499
60507
  import { jsx as jsx183, jsxs as jsxs174 } from "react/jsx-runtime";
60500
60508
  function ChipMultiSelect({
60501
60509
  options,
@@ -60507,7 +60515,7 @@ function ChipMultiSelect({
60507
60515
  const { t } = useTranslation();
60508
60516
  const [open, setOpen] = useState105(false);
60509
60517
  const [query, setQuery] = useState105("");
60510
- const ref = useRef49(null);
60518
+ const ref = useRef50(null);
60511
60519
  useEffect100(() => {
60512
60520
  if (!open) return;
60513
60521
  const onDown = (e) => {
@@ -61300,7 +61308,7 @@ var init_KanbanBoundaryEditor = __esm({
61300
61308
 
61301
61309
  // src/components/KanbanCleanerAlert.tsx
61302
61310
  import { AlertTriangle as AlertTriangle20, ChevronDown as ChevronDown26, CircleAlert, Sparkles as Sparkles14 } from "lucide-react";
61303
- import { useEffect as useEffect103, useId as useId3, useRef as useRef50, useState as useState108 } from "react";
61311
+ import { useEffect as useEffect103, useId as useId3, useRef as useRef51, useState as useState108 } from "react";
61304
61312
  import { jsx as jsx187, jsxs as jsxs178 } from "react/jsx-runtime";
61305
61313
  function KanbanCleanerAlert({
61306
61314
  audit,
@@ -61308,7 +61316,7 @@ function KanbanCleanerAlert({
61308
61316
  }) {
61309
61317
  const [expanded, setExpanded] = useState108(true);
61310
61318
  const contentId = useId3();
61311
- const seenIssueIdsRef = useRef50(null);
61319
+ const seenIssueIdsRef = useRef51(null);
61312
61320
  useEffect103(() => {
61313
61321
  const ids = new Set(audit.issues.map((issue) => issue.id));
61314
61322
  const previous = seenIssueIdsRef.current;
@@ -61993,7 +62001,7 @@ var init_TaskRiskPanel = __esm({
61993
62001
 
61994
62002
  // src/components/KanbanColumnView.tsx
61995
62003
  import { Trash2 as Trash217 } from "lucide-react";
61996
- import { useEffect as useEffect104, useRef as useRef51, useState as useState109 } from "react";
62004
+ import { useEffect as useEffect104, useRef as useRef52, useState as useState109 } from "react";
61997
62005
  import { jsx as jsx190, jsxs as jsxs181 } from "react/jsx-runtime";
61998
62006
  function deriveTaskCardIntelligence(board, task, verificationActivity) {
61999
62007
  const assignment = task.assignment;
@@ -62085,7 +62093,7 @@ function KanbanColumnView({
62085
62093
  const { t } = useTranslation();
62086
62094
  const verificationActivity = useKanbanStore((state) => state.verificationActivity);
62087
62095
  const [dragOver, setDragOver] = useState109(false);
62088
- const dragDepthRef = useRef51(0);
62096
+ const dragDepthRef = useRef52(0);
62089
62097
  const [pendingDeleteTaskId, setPendingDeleteTaskId] = useState109(null);
62090
62098
  useEffect104(() => {
62091
62099
  if (dragTaskId === null) {
@@ -62098,7 +62106,7 @@ function KanbanColumnView({
62098
62106
  const timer = window.setTimeout(() => setPendingDeleteTaskId(null), 4e3);
62099
62107
  return () => window.clearTimeout(timer);
62100
62108
  }, [pendingDeleteTaskId]);
62101
- const intelligenceCacheRef = useRef51(/* @__PURE__ */ new Map());
62109
+ const intelligenceCacheRef = useRef52(/* @__PURE__ */ new Map());
62102
62110
  const boardSignature = boardIntelligenceSignature(board);
62103
62111
  const timeBucket = Math.floor(Date.now() / 6e4);
62104
62112
  useEffect104(() => {
@@ -67635,7 +67643,7 @@ __export(KanbanView_exports, {
67635
67643
  deriveTaskCardIntelligence: () => deriveTaskCardIntelligence
67636
67644
  });
67637
67645
  import { Copy as Copy9, History as History6, Plus as Plus17, Trash2 as Trash218, X as X41 } from "lucide-react";
67638
- import { useEffect as useEffect108, useMemo as useMemo59, useRef as useRef52, useState as useState118 } from "react";
67646
+ import { useEffect as useEffect108, useMemo as useMemo59, useRef as useRef53, useState as useState118 } from "react";
67639
67647
  import { Fragment as Fragment53, jsx as jsx212, jsxs as jsxs202 } from "react/jsx-runtime";
67640
67648
  function KanbanView({ onClose }) {
67641
67649
  const { t } = useTranslation();
@@ -67663,7 +67671,7 @@ function KanbanView({ onClose }) {
67663
67671
  const [boardPage, setBoardPage] = useState118(1);
67664
67672
  const registrySessionIds = useKanbanRegistrySessionIds();
67665
67673
  const [newTaskTitle, setNewTaskTitle] = useState118("");
67666
- const boardScrollRef = useRef52(null);
67674
+ const boardScrollRef = useRef53(null);
67667
67675
  useHorizontalScroll(boardScrollRef);
67668
67676
  const [selectedTaskId, setSelectedTaskId] = useState118(null);
67669
67677
  const [showHistory, setShowHistory] = useState118(false);
@@ -67674,11 +67682,11 @@ function KanbanView({ onClose }) {
67674
67682
  const [taskActivityRefresh, setTaskActivityRefresh] = useState118(0);
67675
67683
  const [dragTaskId, setDragTaskId] = useState118(null);
67676
67684
  const [viewMode, setViewMode] = useState118("board");
67677
- const pendingWorkbenchTaskRef = useRef52(null);
67685
+ const pendingWorkbenchTaskRef = useRef53(null);
67678
67686
  const [confirmDeleteBoard, setConfirmDeleteBoard] = useState118(false);
67679
- const armedDeleteBoardIdRef = useRef52(null);
67680
- const autoSelectedSessionRef = useRef52(null);
67681
- const skipBoardAutoSelectRef = useRef52(false);
67687
+ const armedDeleteBoardIdRef = useRef53(null);
67688
+ const autoSelectedSessionRef = useRef53(null);
67689
+ const skipBoardAutoSelectRef = useRef53(false);
67682
67690
  useEffect108(() => {
67683
67691
  if (!confirmDeleteBoard) return;
67684
67692
  const timer = window.setTimeout(() => {
@@ -67693,7 +67701,7 @@ function KanbanView({ onClose }) {
67693
67701
  }, [activeBoardId]);
67694
67702
  const ws = useMemo59(() => getWSClient(wsUrl), [wsUrl]);
67695
67703
  const selectedTask = activeBoard?.tasks.find((task) => task.id === selectedTaskId) ?? null;
67696
- const activeSessionIdsRef = useRef52([]);
67704
+ const activeSessionIdsRef = useRef53([]);
67697
67705
  const activeSessionIds = useMemo59(() => {
67698
67706
  const next = collectActiveSessionIds({
67699
67707
  sessionId,
@@ -69414,9 +69422,9 @@ var init_resolve = __esm({
69414
69422
  });
69415
69423
 
69416
69424
  // src/components/OfficeMapCanvas/use-recently-finished.ts
69417
- import { useMemo as useMemo60, useRef as useRef53 } from "react";
69425
+ import { useMemo as useMemo60, useRef as useRef54 } from "react";
69418
69426
  function useRecentlyFinishedFleetAgents(fleetAgents) {
69419
- const retained = useRef53(/* @__PURE__ */ new Map()).current;
69427
+ const retained = useRef54(/* @__PURE__ */ new Map()).current;
69420
69428
  return useMemo60(() => {
69421
69429
  const now = Date.now();
69422
69430
  const seen = /* @__PURE__ */ new Set();
@@ -70647,7 +70655,7 @@ var init_WatchMessageBubble = __esm({
70647
70655
  });
70648
70656
 
70649
70657
  // src/components/SessionWatchPanel.tsx
70650
- import { useCallback as useCallback64, useEffect as useEffect110, useMemo as useMemo62, useRef as useRef54, useState as useState120 } from "react";
70658
+ import { useCallback as useCallback64, useEffect as useEffect110, useMemo as useMemo62, useRef as useRef55, useState as useState120 } from "react";
70651
70659
  import { Bot as Bot21 } from "lucide-react";
70652
70660
  import { jsx as jsx217, jsxs as jsxs207 } from "react/jsx-runtime";
70653
70661
  function SessionWatchPanel({
@@ -70664,9 +70672,9 @@ function SessionWatchPanel({
70664
70672
  const [priority, setPriority] = useState120("high");
70665
70673
  const [thread, setThread] = useState120([]);
70666
70674
  const [interrupting, setInterrupting] = useState120(false);
70667
- const scrollRef = useRef54(null);
70668
- const stickRef = useRef54(true);
70669
- const aliveRef = useRef54(true);
70675
+ const scrollRef = useRef55(null);
70676
+ const stickRef = useRef55(true);
70677
+ const aliveRef = useRef55(true);
70670
70678
  const liveSessions = useMonitorStore((s) => s.liveSessions);
70671
70679
  const targetSession = useMemo62(
70672
70680
  () => liveSessions.find((x) => x.sessionId === sessionId),
@@ -72136,12 +72144,12 @@ import {
72136
72144
  } from "@xyflow/react";
72137
72145
  import "@xyflow/react/dist/style.css";
72138
72146
  import { Building2 as Building24 } from "lucide-react";
72139
- import { useCallback as useCallback65, useEffect as useEffect111, useMemo as useMemo63, useRef as useRef55, useState as useState121 } from "react";
72147
+ import { useCallback as useCallback65, useEffect as useEffect111, useMemo as useMemo63, useRef as useRef56, useState as useState121 } from "react";
72140
72148
  import { jsx as jsx224, jsxs as jsxs214 } from "react/jsx-runtime";
72141
72149
  function OfficeMapCanvas() {
72142
72150
  const { t } = useTranslation();
72143
72151
  const { fitView } = useReactFlow3();
72144
- const canvasRef = useRef55(null);
72152
+ const canvasRef = useRef56(null);
72145
72153
  const [canvasSize, setCanvasSize] = useState121({ width: 1280, height: 720 });
72146
72154
  useEffect111(() => {
72147
72155
  const canvas = canvasRef.current;
@@ -72218,15 +72226,15 @@ function OfficeMapCanvas() {
72218
72226
  setBroadcasting(false);
72219
72227
  }
72220
72228
  }, [broadcastDraft, broadcasting]);
72221
- const activeNodesRef = useRef55(/* @__PURE__ */ new Map());
72229
+ const activeNodesRef = useRef56(/* @__PURE__ */ new Map());
72222
72230
  const ACTIVE_MS = 4e3;
72223
- const edgeIntensitiesRef = useRef55(/* @__PURE__ */ new Map());
72224
- const vizActivityRef = useRef55(/* @__PURE__ */ new Map());
72225
- const layoutPosRef = useRef55(/* @__PURE__ */ new Map());
72226
- const prevAgentStatsRef = useRef55(
72231
+ const edgeIntensitiesRef = useRef56(/* @__PURE__ */ new Map());
72232
+ const vizActivityRef = useRef56(/* @__PURE__ */ new Map());
72233
+ const layoutPosRef = useRef56(/* @__PURE__ */ new Map());
72234
+ const prevAgentStatsRef = useRef56(
72227
72235
  /* @__PURE__ */ new Map()
72228
72236
  );
72229
- const prevNodeSigRef = useRef55("");
72237
+ const prevNodeSigRef = useRef56("");
72230
72238
  useEffect111(() => {
72231
72239
  const rfNodes = [];
72232
72240
  const rfEdges = [];
@@ -74223,7 +74231,7 @@ import {
74223
74231
  Trash2 as Trash221,
74224
74232
  X as X45
74225
74233
  } from "lucide-react";
74226
- import { useEffect as useEffect113, useRef as useRef56, useState as useState125 } from "react";
74234
+ import { useEffect as useEffect113, useRef as useRef57, useState as useState125 } from "react";
74227
74235
  import { Fragment as Fragment60, jsx as jsx232, jsxs as jsxs222 } from "react/jsx-runtime";
74228
74236
  function MemoryEditor({
74229
74237
  mode,
@@ -74235,7 +74243,7 @@ function MemoryEditor({
74235
74243
  onSubmit
74236
74244
  }) {
74237
74245
  const { t } = useTranslation();
74238
- const textRef = useRef56(null);
74246
+ const textRef = useRef57(null);
74239
74247
  const [agentRoles, setAgentRoles] = useState125([]);
74240
74248
  useEffect113(() => {
74241
74249
  textRef.current?.focus();
@@ -75408,7 +75416,7 @@ var init_MemoryManagerStatsBar = __esm({
75408
75416
 
75409
75417
  // src/components/MemoryManager/ReviewQueue.tsx
75410
75418
  import { AlertTriangle as AlertTriangle31, Check as Check35, Loader2 as Loader240, RefreshCw as RefreshCw25, X as X47 } from "lucide-react";
75411
- import { useCallback as useCallback67, useEffect as useEffect114, useRef as useRef57, useState as useState127 } from "react";
75419
+ import { useCallback as useCallback67, useEffect as useEffect114, useRef as useRef58, useState as useState127 } from "react";
75412
75420
  import { Fragment as Fragment63, jsx as jsx239, jsxs as jsxs229 } from "react/jsx-runtime";
75413
75421
  function ReviewQueue({
75414
75422
  listCandidates,
@@ -75424,7 +75432,7 @@ function ReviewQueue({
75424
75432
  const [busyId, setBusyId] = useState127(null);
75425
75433
  const [bulkBusy, setBulkBusy] = useState127(false);
75426
75434
  const [selected, setSelected] = useState127(() => /* @__PURE__ */ new Set());
75427
- const generationRef = useRef57(0);
75435
+ const generationRef = useRef58(0);
75428
75436
  const load = useCallback67(() => {
75429
75437
  const generation = ++generationRef.current;
75430
75438
  setLoading(true);
@@ -75745,7 +75753,7 @@ var init_selectors = __esm({
75745
75753
  });
75746
75754
 
75747
75755
  // src/components/MemoryManager/useMemoryManagerState.ts
75748
- import { useCallback as useCallback68, useEffect as useEffect115, useMemo as useMemo67, useRef as useRef58, useState as useState128 } from "react";
75756
+ import { useCallback as useCallback68, useEffect as useEffect115, useMemo as useMemo67, useRef as useRef59, useState as useState128 } from "react";
75749
75757
  function useMemoryManagerState() {
75750
75758
  const { t } = useTranslation();
75751
75759
  const {
@@ -75794,14 +75802,14 @@ function useMemoryManagerState() {
75794
75802
  const [statusCounts, setStatusCounts] = useState128({});
75795
75803
  const [drawerOpen, setDrawerOpen] = useState128(false);
75796
75804
  const [currentFilePath, setCurrentFilePath] = useState128(null);
75797
- const hasLoadedRef = useRef58(false);
75798
- const searchBreakdownGenerationRef = useRef58(0);
75799
- const searchBreakdownCleanupRef = useRef58(null);
75800
- const mountedRef = useRef58(true);
75801
- const listGenerationRef = useRef58(0);
75802
- const mutationGenerationRef = useRef58(0);
75803
- const listCleanupRef = useRef58(null);
75804
- const mutationCleanupRef = useRef58(null);
75805
+ const hasLoadedRef = useRef59(false);
75806
+ const searchBreakdownGenerationRef = useRef59(0);
75807
+ const searchBreakdownCleanupRef = useRef59(null);
75808
+ const mountedRef = useRef59(true);
75809
+ const listGenerationRef = useRef59(0);
75810
+ const mutationGenerationRef = useRef59(0);
75811
+ const listCleanupRef = useRef59(null);
75812
+ const mutationCleanupRef = useRef59(null);
75805
75813
  const knownFilePaths = useMemo67(() => {
75806
75814
  const paths = /* @__PURE__ */ new Set();
75807
75815
  for (const memory of memories) {
@@ -76000,7 +76008,7 @@ function useMemoryManagerState() {
76000
76008
  off();
76001
76009
  };
76002
76010
  }, [client2, getSageGraph, selectedId]);
76003
- const wasConnectedRef = useRef58(wsConnected);
76011
+ const wasConnectedRef = useRef59(wsConnected);
76004
76012
  useEffect115(() => {
76005
76013
  if (wsConnected && !wasConnectedRef.current && hasLoadedRef.current) loadMemories();
76006
76014
  wasConnectedRef.current = wsConnected;
@@ -76798,7 +76806,7 @@ import {
76798
76806
  Upload,
76799
76807
  X as X48
76800
76808
  } from "lucide-react";
76801
- import { useCallback as useCallback69, useEffect as useEffect116, useMemo as useMemo68, useRef as useRef59, useState as useState129 } from "react";
76809
+ import { useCallback as useCallback69, useEffect as useEffect116, useMemo as useMemo68, useRef as useRef60, useState as useState129 } from "react";
76802
76810
  import { Fragment as Fragment65, jsx as jsx241, jsxs as jsxs231 } from "react/jsx-runtime";
76803
76811
  function cleanStringArray(value) {
76804
76812
  if (!Array.isArray(value)) return void 0;
@@ -76881,7 +76889,7 @@ function AudienceMemoryPanel() {
76881
76889
  const [deletingId, setDeletingId] = useState129(null);
76882
76890
  const [creating, setCreating] = useState129(false);
76883
76891
  const [deleting, setDeleting] = useState129(false);
76884
- const deletingIdRef = useRef59(null);
76892
+ const deletingIdRef = useRef60(null);
76885
76893
  const refresh = useCallback69(() => {
76886
76894
  setLoading(true);
76887
76895
  setFeedback(null);
@@ -78943,7 +78951,7 @@ import {
78943
78951
  XCircle as XCircle10,
78944
78952
  Zap as Zap25
78945
78953
  } from "lucide-react";
78946
- import { useCallback as useCallback71, useEffect as useEffect119, useMemo as useMemo72, useRef as useRef60, useState as useState133 } from "react";
78954
+ import { useCallback as useCallback71, useEffect as useEffect119, useMemo as useMemo72, useRef as useRef61, useState as useState133 } from "react";
78947
78955
  import { Fragment as Fragment67, jsx as jsx248, jsxs as jsxs238 } from "react/jsx-runtime";
78948
78956
  function SddBoardView({ onClose }) {
78949
78957
  const { t } = useTranslation();
@@ -78972,7 +78980,7 @@ function SddBoardView({ onClose }) {
78972
78980
  (msg) => client2?.send?.(msg),
78973
78981
  [client2]
78974
78982
  );
78975
- const pendingDestroy = useRef60(null);
78983
+ const pendingDestroy = useRef61(null);
78976
78984
  const fireDestroy = useCallback71(
78977
78985
  (revertMerged) => {
78978
78986
  pendingDestroy.current = null;
@@ -79515,7 +79523,7 @@ import {
79515
79523
  X as X52,
79516
79524
  Zap as Zap26
79517
79525
  } from "lucide-react";
79518
- import { useCallback as useCallback72, useEffect as useEffect120, useMemo as useMemo73, useRef as useRef61, useState as useState134 } from "react";
79526
+ import { useCallback as useCallback72, useEffect as useEffect120, useMemo as useMemo73, useRef as useRef62, useState as useState134 } from "react";
79519
79527
  import { Fragment as Fragment68, jsx as jsx249, jsxs as jsxs239 } from "react/jsx-runtime";
79520
79528
  function SddWizard({
79521
79529
  onClose,
@@ -79545,7 +79553,7 @@ function SddWizard({
79545
79553
  (msg) => client2?.send?.(msg),
79546
79554
  [client2]
79547
79555
  );
79548
- const bottomRef = useRef61(null);
79556
+ const bottomRef = useRef62(null);
79549
79557
  useEffect120(() => {
79550
79558
  send({ type: "sdd.spec.get" });
79551
79559
  }, [send]);
@@ -80679,7 +80687,7 @@ import {
80679
80687
  Wrench as Wrench14,
80680
80688
  X as X54
80681
80689
  } from "lucide-react";
80682
- import { useCallback as useCallback75, useEffect as useEffect123, useMemo as useMemo74, useRef as useRef62, useState as useState137 } from "react";
80690
+ import { useCallback as useCallback75, useEffect as useEffect123, useMemo as useMemo74, useRef as useRef63, useState as useState137 } from "react";
80683
80691
  import { jsx as jsx253, jsxs as jsxs243 } from "react/jsx-runtime";
80684
80692
  function formatSessionDuration(entry) {
80685
80693
  const start = timestamp(entry.startedAt);
@@ -80902,8 +80910,8 @@ function SessionList({
80902
80910
  const [renameDraft, setRenameDraft] = useState137("");
80903
80911
  const [resumingId, setResumingId] = useState137(null);
80904
80912
  const [page, setPage] = useState137(1);
80905
- const resumeTimer = useRef62(null);
80906
- const renameInput = useRef62(null);
80913
+ const resumeTimer = useRef63(null);
80914
+ const renameInput = useRef63(null);
80907
80915
  const workspace = variant === "workspace";
80908
80916
  const displayName2 = useCallback75(
80909
80917
  (entry) => entry.name || sessionNicknames[entry.id] || entry.title || t("activity:sessions.empty"),
@@ -82367,7 +82375,7 @@ import {
82367
82375
  PanelRight as PanelRight2,
82368
82376
  BookOpen as BookOpen4
82369
82377
  } from "lucide-react";
82370
- import { lazy as lazy4, Suspense as Suspense4, useCallback as useCallback78, useEffect as useEffect126, useMemo as useMemo76, useRef as useRef63, useState as useState140 } from "react";
82378
+ import { lazy as lazy4, Suspense as Suspense4, useCallback as useCallback78, useEffect as useEffect126, useMemo as useMemo76, useRef as useRef64, useState as useState140 } from "react";
82371
82379
  import rehypeHighlight2 from "rehype-highlight";
82372
82380
  import { jsx as jsx256, jsxs as jsxs246 } from "react/jsx-runtime";
82373
82381
  function isWritableSkillSource(source) {
@@ -82413,16 +82421,16 @@ function SkillDetailView({ className }) {
82413
82421
  const [splitPreview, setSplitPreview] = useState140(false);
82414
82422
  const [draftSavedAt, setDraftSavedAt] = useState140(null);
82415
82423
  const [draftRestored, setDraftRestored] = useState140(false);
82416
- const lastSavedDraftRef = useRef63("");
82424
+ const lastSavedDraftRef = useRef64("");
82417
82425
  const [checkingForUpdates, setCheckingForUpdates] = useState140(false);
82418
82426
  const [updateResult, setUpdateResult] = useState140(null);
82419
82427
  const [copiedSourceUrl, setCopiedSourceUrl] = useState140(false);
82420
82428
  const [uninstallConfirmSkill, setUninstallConfirmSkill] = useState140(null);
82421
82429
  const [uninstalling, setUninstalling] = useState140(false);
82422
82430
  const [skills, setSkills] = useState140([]);
82423
- const skillsStateRef = useRef63(skillsState);
82431
+ const skillsStateRef = useRef64(skillsState);
82424
82432
  skillsStateRef.current = skillsState;
82425
- const isNavigatingBack = useRef63(false);
82433
+ const isNavigatingBack = useRef64(false);
82426
82434
  const editStats = useMemo76(() => {
82427
82435
  if (!editContent) return { lines: 0, words: 0, chars: 0 };
82428
82436
  const lines = editContent.split("\n").length;
@@ -86080,7 +86088,7 @@ import {
86080
86088
  Sparkles as Sparkles23,
86081
86089
  Shield as Shield6
86082
86090
  } from "lucide-react";
86083
- import { useCallback as useCallback81, useEffect as useEffect131, useRef as useRef64, useState as useState147 } from "react";
86091
+ import { useCallback as useCallback81, useEffect as useEffect131, useRef as useRef65, useState as useState147 } from "react";
86084
86092
  import { useShallow as useShallow16 } from "zustand/react/shallow";
86085
86093
  import { Fragment as Fragment74, jsx as jsx267, jsxs as jsxs257 } from "react/jsx-runtime";
86086
86094
  function SetupScreen() {
@@ -86108,7 +86116,7 @@ function SetupScreen() {
86108
86116
  const [popularRefreshNonce, setPopularRefreshNonce] = useState147(0);
86109
86117
  const [previousProviderCount, setPreviousProviderCount] = useState147(0);
86110
86118
  const [lastUpdatedAt, setLastUpdatedAt] = useState147(null);
86111
- const isInitialLoadRef = useRef64(true);
86119
+ const isInitialLoadRef = useRef65(true);
86112
86120
  useEffect131(() => {
86113
86121
  const controller = new AbortController();
86114
86122
  const localUrl = `${window.location.origin}/providers.json`;
@@ -86614,7 +86622,7 @@ import "@xterm/xterm/css/xterm.css";
86614
86622
  import { Plus as Plus24, RotateCcw as RotateCcw19, TerminalSquare as TerminalSquare7, Trash2 as Trash228, X as X58 } from "lucide-react";
86615
86623
  import {
86616
86624
  useEffect as useEffect132,
86617
- useRef as useRef65,
86625
+ useRef as useRef66,
86618
86626
  useState as useState148
86619
86627
  } from "react";
86620
86628
  import { jsx as jsx268, jsxs as jsxs258 } from "react/jsx-runtime";
@@ -86652,14 +86660,14 @@ function TerminalPanel({
86652
86660
  desktopShell = false,
86653
86661
  onClose
86654
86662
  }) {
86655
- const resizeCleanupRef = useRef65(null);
86663
+ const resizeCleanupRef = useRef66(null);
86656
86664
  const { t } = useTranslation();
86657
- const terminalCounterRef = useRef65(1);
86665
+ const terminalCounterRef = useRef66(1);
86658
86666
  const [height, setHeight] = useState148(() => readStoredTerminalHeight(desktopShell));
86659
86667
  const [tabs, setTabs] = useState148(() => [createTerminalTab(1)]);
86660
86668
  const [activeId, setActiveId] = useState148(() => tabs[0]?.id ?? "");
86661
86669
  const terminalCreateNonce = useUIStore((s) => s.terminalCreateNonce);
86662
- const lastTerminalCreateNonceRef = useRef65(terminalCreateNonce);
86670
+ const lastTerminalCreateNonceRef = useRef66(terminalCreateNonce);
86663
86671
  const projectName = useSessionStore((s) => s.projectName);
86664
86672
  const cwd = useSessionStore((s) => s.cwd);
86665
86673
  useEffect132(() => {
@@ -86925,11 +86933,11 @@ function TerminalSession({
86925
86933
  onRunning,
86926
86934
  onExit
86927
86935
  }) {
86928
- const containerRef = useRef65(null);
86929
- const termRef = useRef65(null);
86930
- const fitRef = useRef65(null);
86931
- const onRunningRef = useRef65(onRunning);
86932
- const onExitRef = useRef65(onExit);
86936
+ const containerRef = useRef66(null);
86937
+ const termRef = useRef66(null);
86938
+ const fitRef = useRef66(null);
86939
+ const onRunningRef = useRef66(onRunning);
86940
+ const onExitRef = useRef66(onExit);
86933
86941
  const wsConnected = useConfigStore((s) => s.wsConnected);
86934
86942
  useEffect132(() => {
86935
86943
  onRunningRef.current = onRunning;
@@ -108872,7 +108880,7 @@ import {
108872
108880
  X as X23,
108873
108881
  Zap as Zap18
108874
108882
  } from "lucide-react";
108875
- import { useCallback as useCallback46, useEffect as useEffect83, useRef as useRef40, useState as useState83 } from "react";
108883
+ import { useCallback as useCallback46, useEffect as useEffect83, useRef as useRef41, useState as useState83 } from "react";
108876
108884
  import { useShallow as useShallow12 } from "zustand/react/shallow";
108877
108885
 
108878
108886
  // src/components/SettingsPanel/AgentSettingsTab.tsx
@@ -109570,7 +109578,7 @@ import {
109570
109578
  TriangleAlert,
109571
109579
  Wifi as Wifi2
109572
109580
  } from "lucide-react";
109573
- import { useCallback as useCallback28, useEffect as useEffect70, useMemo as useMemo31, useState as useState66 } from "react";
109581
+ import { useCallback as useCallback28, useEffect as useEffect70, useMemo as useMemo31, useRef as useRef34, useState as useState66 } from "react";
109574
109582
  import { Fragment as Fragment30, jsx as jsx112, jsxs as jsxs106 } from "react/jsx-runtime";
109575
109583
  var REFRESH_INTERVAL_MS = 15e3;
109576
109584
  function ConnectionsHealthSection() {
@@ -109582,6 +109590,8 @@ function ConnectionsHealthSection() {
109582
109590
  const [error, setError] = useState66(null);
109583
109591
  const [pendingActions, setPendingActions] = useState66(/* @__PURE__ */ new Set());
109584
109592
  const [actionFeedback, setActionFeedback] = useState66({});
109593
+ const [autoHealing, setAutoHealing] = useState66(/* @__PURE__ */ new Set());
109594
+ const feedbackTimersRef = useRef34(/* @__PURE__ */ new Map());
109585
109595
  const refresh = useCallback28(() => {
109586
109596
  if (!wsConnected || !client2) {
109587
109597
  setLoading(false);
@@ -109597,6 +109607,19 @@ function ConnectionsHealthSection() {
109597
109607
  setError(null);
109598
109608
  client2.send({ type: "connections.health" });
109599
109609
  }, [client2, t, wsConnected]);
109610
+ const refreshRef = useRef34(refresh);
109611
+ refreshRef.current = refresh;
109612
+ useEffect70(() => {
109613
+ refreshRef.current();
109614
+ }, [wsConnected]);
109615
+ const clearFeedbackTimer = (serviceId) => {
109616
+ const timers = feedbackTimersRef.current;
109617
+ const prior = timers.get(serviceId);
109618
+ if (prior !== void 0) {
109619
+ clearTimeout(prior);
109620
+ timers.delete(serviceId);
109621
+ }
109622
+ };
109600
109623
  const handleServiceAction = useCallback28(
109601
109624
  (serviceId, action) => {
109602
109625
  if (!client2 || !wsConnected) return;
@@ -109610,48 +109633,99 @@ function ConnectionsHealthSection() {
109610
109633
  if (!client2) return;
109611
109634
  const offResult = client2.on("connections.health_result", (message) => {
109612
109635
  if (message.type !== "connections.health_result") return;
109613
- setReport(message.payload);
109636
+ const report2 = message.payload;
109637
+ setReport(report2);
109614
109638
  setLoading(false);
109615
109639
  setError(null);
109640
+ setAutoHealing((prev) => {
109641
+ if (prev.size === 0) return prev;
109642
+ const next = new Set(prev);
109643
+ for (const service of report2.services) {
109644
+ if (next.has(service.id) && (service.status === "healthy" || service.status === "degraded")) {
109645
+ next.delete(service.id);
109646
+ }
109647
+ }
109648
+ return next;
109649
+ });
109616
109650
  });
109617
109651
  const offError = client2.on("connections.health_error", (message) => {
109618
109652
  if (message.type !== "connections.health_error") return;
109619
109653
  setLoading(false);
109620
109654
  setError(message.payload.message);
109621
109655
  });
109622
- const offActionResult = client2.on(
109623
- "connections.service_action_result",
109624
- (message) => {
109625
- if (message.type !== "connections.service_action_result") return;
109626
- const result = message.payload;
109627
- setPendingActions((prev) => {
109628
- const next = new Set(prev);
109629
- next.delete(result.serviceId ?? "");
109630
- return next;
109631
- });
109632
- setActionFeedback((prev) => ({
109633
- ...prev,
109634
- [result.serviceId ?? ""]: { success: result.success, message: result.message }
109635
- }));
109636
- const timer2 = window.setTimeout(() => {
109637
- setActionFeedback((prev) => ({
109638
- ...prev,
109639
- [result.serviceId ?? ""]: null
109640
- }));
109641
- }, 5e3);
109642
- void refresh();
109643
- return () => window.clearTimeout(timer2);
109656
+ const offActionResult = client2.on("connections.service_action_result", (message) => {
109657
+ if (message.type !== "connections.service_action_result") return;
109658
+ const result = message.payload;
109659
+ const serviceId = result.serviceId;
109660
+ if (!serviceId) return;
109661
+ setPendingActions((prev) => {
109662
+ const next = new Set(prev);
109663
+ next.delete(serviceId);
109664
+ return next;
109665
+ });
109666
+ setActionFeedback((prev) => ({
109667
+ ...prev,
109668
+ [serviceId]: { success: result.success, message: result.message }
109669
+ }));
109670
+ clearFeedbackTimer(serviceId);
109671
+ feedbackTimersRef.current.set(
109672
+ serviceId,
109673
+ setTimeout(() => {
109674
+ setActionFeedback((prev) => ({ ...prev, [serviceId]: null }));
109675
+ feedbackTimersRef.current.delete(serviceId);
109676
+ }, 5e3)
109677
+ );
109678
+ void refreshRef.current();
109679
+ });
109680
+ const offAutoHealStatus = client2.on("connections.auto_heal_status", (message) => {
109681
+ if (message.type !== "connections.auto_heal_status") return;
109682
+ const event = message.payload;
109683
+ const serviceId = event.serviceId;
109684
+ if (!serviceId) return;
109685
+ if (event.phase === "restarting") {
109686
+ clearFeedbackTimer(serviceId);
109687
+ setActionFeedback((prev) => ({ ...prev, [serviceId]: null }));
109688
+ setAutoHealing((prev) => new Set(prev).add(serviceId));
109689
+ return;
109644
109690
  }
109645
- );
109646
- refresh();
109647
- const timer = window.setInterval(refresh, REFRESH_INTERVAL_MS);
109691
+ setAutoHealing((prev) => {
109692
+ const next = new Set(prev);
109693
+ next.delete(serviceId);
109694
+ return next;
109695
+ });
109696
+ setActionFeedback((prev) => ({
109697
+ ...prev,
109698
+ [serviceId]: {
109699
+ success: event.phase === "restarted",
109700
+ // A policy refusal is not a failure of the daemon — render neutral.
109701
+ tone: event.phase === "refused" ? "neutral" : void 0,
109702
+ message: event.message
109703
+ }
109704
+ }));
109705
+ clearFeedbackTimer(serviceId);
109706
+ feedbackTimersRef.current.set(
109707
+ serviceId,
109708
+ setTimeout(() => {
109709
+ setActionFeedback((prev) => ({ ...prev, [serviceId]: null }));
109710
+ feedbackTimersRef.current.delete(serviceId);
109711
+ }, 5e3)
109712
+ );
109713
+ void refreshRef.current();
109714
+ });
109715
+ refreshRef.current();
109716
+ const timer = setInterval(() => refreshRef.current(), REFRESH_INTERVAL_MS);
109648
109717
  return () => {
109649
- window.clearInterval(timer);
109718
+ clearInterval(timer);
109719
+ for (const t2 of feedbackTimersRef.current.values()) clearTimeout(t2);
109720
+ feedbackTimersRef.current.clear();
109721
+ setAutoHealing(/* @__PURE__ */ new Set());
109722
+ setPendingActions(/* @__PURE__ */ new Set());
109650
109723
  offResult();
109651
109724
  offError();
109652
109725
  offActionResult();
109726
+ offAutoHealStatus();
109653
109727
  };
109654
- }, [client2, refresh]);
109728
+ }, [client2]);
109655
109729
  const services = useMemo31(() => {
109656
109730
  if (report) return report.services;
109657
109731
  if (!error) return [];
@@ -109719,6 +109793,7 @@ function ConnectionsHealthSection() {
109719
109793
  service,
109720
109794
  onAction: handleServiceAction,
109721
109795
  actionPending: pendingActions.has(service.id),
109796
+ autoRestarting: autoHealing.has(service.id),
109722
109797
  feedback: actionFeedback[service.id] ?? void 0
109723
109798
  },
109724
109799
  service.id
@@ -109733,6 +109808,7 @@ function ServiceCard({
109733
109808
  service,
109734
109809
  onAction,
109735
109810
  actionPending,
109811
+ autoRestarting,
109736
109812
  feedback
109737
109813
  }) {
109738
109814
  const { t } = useTranslation();
@@ -109785,14 +109861,35 @@ function ServiceCard({
109785
109861
  {
109786
109862
  variant: "outline",
109787
109863
  size: "sm",
109788
- disabled: actionPending,
109864
+ disabled: actionPending || autoRestarting,
109789
109865
  onClick: () => onAction(service.id, "restart"),
109790
109866
  className: "h-7 px-2 text-[10px]",
109791
109867
  title: t("settings:connection.serviceActionRestart", {
109792
109868
  defaultValue: `Restart ${displayLabel}`,
109793
109869
  label: displayLabel
109794
109870
  }),
109795
- children: /* @__PURE__ */ jsx112(RotateCcw7, { className: cn("h-3 w-3", actionPending && "animate-spin") })
109871
+ children: /* @__PURE__ */ jsx112(
109872
+ RotateCcw7,
109873
+ {
109874
+ className: cn("h-3 w-3", (actionPending || autoRestarting) && "animate-spin")
109875
+ }
109876
+ )
109877
+ }
109878
+ ),
109879
+ autoRestarting && /* @__PURE__ */ jsxs106(
109880
+ "span",
109881
+ {
109882
+ className: "flex shrink-0 items-center gap-1 rounded-full border border-primary/40 bg-primary/10 px-2 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-primary",
109883
+ "data-testid": "auto-restarting-badge",
109884
+ title: t("settings:connection.serviceAutoRestarting", {
109885
+ defaultValue: "Auto-restarting\u2026"
109886
+ }),
109887
+ children: [
109888
+ /* @__PURE__ */ jsx112(RefreshCw10, { className: "h-3 w-3 animate-spin" }),
109889
+ t("settings:connection.serviceAutoRestarting", {
109890
+ defaultValue: "Auto-restarting\u2026"
109891
+ })
109892
+ ]
109796
109893
  }
109797
109894
  ),
109798
109895
  /* @__PURE__ */ jsx112(StatusBadge, { status: service.status })
@@ -109803,7 +109900,7 @@ function ServiceCard({
109803
109900
  {
109804
109901
  className: cn(
109805
109902
  "mt-2 rounded px-2 py-1 text-[10px]",
109806
- feedback.success ? "border border-success/30 bg-success/10 text-success" : "border border-destructive/30 bg-destructive/10 text-destructive"
109903
+ feedback.tone === "neutral" ? "border border-border bg-muted text-muted-foreground" : feedback.success ? "border border-success/30 bg-success/10 text-success" : "border border-destructive/30 bg-destructive/10 text-destructive"
109807
109904
  ),
109808
109905
  children: feedback.message
109809
109906
  }
@@ -111199,7 +111296,7 @@ init_i18n();
111199
111296
  init_fallback_ref();
111200
111297
  init_local_prefs();
111201
111298
  import { Cpu as Cpu12, Layers as Layers4, ListPlus as ListPlus3 } from "lucide-react";
111202
- import { useCallback as useCallback32, useEffect as useEffect73, useMemo as useMemo34, useRef as useRef35, useState as useState70 } from "react";
111299
+ import { useCallback as useCallback32, useEffect as useEffect73, useMemo as useMemo34, useRef as useRef36, useState as useState70 } from "react";
111203
111300
  import { jsx as jsx122, jsxs as jsxs116 } from "react/jsx-runtime";
111204
111301
  function FallbacksSection({
111205
111302
  syncPref,
@@ -111264,7 +111361,7 @@ function FallbacksSection({
111264
111361
  localPrefs.fallbackProfiles,
111265
111362
  setFallbackProfiles
111266
111363
  ]);
111267
- const autoDefaultCreatedRef = useRef35(false);
111364
+ const autoDefaultCreatedRef = useRef36(false);
111268
111365
  useEffect73(() => {
111269
111366
  if (autoDefaultCreatedRef.current) return;
111270
111367
  if (Object.keys(localPrefs.fallbackProfiles).length > 0) return;
@@ -113114,7 +113211,7 @@ init_i18n();
113114
113211
  init_button();
113115
113212
  init_dialog();
113116
113213
  import { AlertTriangle as AlertTriangle15 } from "lucide-react";
113117
- import { useEffect as useEffect77, useRef as useRef38 } from "react";
113214
+ import { useEffect as useEffect77, useRef as useRef39 } from "react";
113118
113215
  import { jsx as jsx132, jsxs as jsxs125 } from "react/jsx-runtime";
113119
113216
  function ClearAllowlistDialog({
113120
113217
  open,
@@ -113123,7 +113220,7 @@ function ClearAllowlistDialog({
113123
113220
  onConfirm,
113124
113221
  onCancel
113125
113222
  }) {
113126
- const contentRef = useRef38(null);
113223
+ const contentRef = useRef39(null);
113127
113224
  const { t } = useTranslation();
113128
113225
  useEffect77(() => {
113129
113226
  if (!open) return;
@@ -113299,15 +113396,15 @@ import { Fragment as Fragment34, useCallback as useCallback40, useMemo as useMem
113299
113396
  // src/components/SettingsPanel/ModelCatalogPicker.tsx
113300
113397
  init_i18n();
113301
113398
  import { Loader2 as Loader217, Search as Search12, X as X19 } from "lucide-react";
113302
- import { useCallback as useCallback38, useEffect as useEffect78, useRef as useRef39, useState as useState75 } from "react";
113399
+ import { useCallback as useCallback38, useEffect as useEffect78, useRef as useRef40, useState as useState75 } from "react";
113303
113400
  import { jsx as jsx133, jsxs as jsxs126 } from "react/jsx-runtime";
113304
113401
  function ModelCatalogPicker({ ws, onSelect, onClose }) {
113305
113402
  const { t } = useTranslation();
113306
113403
  const [query, setQuery] = useState75("");
113307
113404
  const [results, setResults] = useState75([]);
113308
113405
  const [loading, setLoading] = useState75(false);
113309
- const debounceRef = useRef39(null);
113310
- const inflightQueryRef = useRef39("");
113406
+ const debounceRef = useRef40(null);
113407
+ const inflightQueryRef = useRef40("");
113311
113408
  useEffect78(() => {
113312
113409
  const off = ws.on("provider.models.search_result", (msg) => {
113313
113410
  if (msg.type !== "provider.models.search_result") return;
@@ -116665,7 +116762,7 @@ function SettingsPanel() {
116665
116762
  }))
116666
116763
  );
116667
116764
  const scrollAreaRef = useScrollPosition("settings");
116668
- const modelSwitchingRef = useRef40(false);
116765
+ const modelSwitchingRef = useRef41(false);
116669
116766
  const [modelSwitching, setModelSwitching] = useState83(false);
116670
116767
  const {
116671
116768
  provider,