dsh-model-switch 0.4.67 → 0.4.69

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 (39) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/IMPLEMENTATION_PLAN.md +12 -1
  3. package/PRODUCT.md +3 -3
  4. package/README.en.md +17 -19
  5. package/README.md +17 -19
  6. package/cordis.patch.yml +9 -0
  7. package/lib/auto-review-CYvvootQ.js +1079 -0
  8. package/lib/auto-review.js +1 -1
  9. package/lib/automode-compat.js +1 -1
  10. package/lib/client.js +473 -47
  11. package/lib/compaction.js +1 -1
  12. package/lib/index.js +30 -6
  13. package/lib/prime-memory-compat.js +568 -1
  14. package/lib/prime-memory-route-DGUVfogE.js +117 -0
  15. package/lib/review-timeout-FB32BcnO.js +339 -0
  16. package/lib/review-timeout.js +1 -1
  17. package/lib/session-route-CRfpxarI.js +357 -0
  18. package/lib/session-title.js +1 -1
  19. package/lib/subagent-runtime-BgLqMl2z.js +424 -0
  20. package/lib/subagent-runtime-CluWLZio.js +412 -0
  21. package/lib/subagent-runtime-eNKrdb2H.js +424 -0
  22. package/lib/subagent-runtime.js +2 -289
  23. package/lib/tool-allowlist-cN9Z1XKn.js +489 -0
  24. package/lib/types/capabilities-rpc.d.ts +7 -0
  25. package/lib/types/client/ModelSwitchSettings.d.ts +6 -3
  26. package/lib/types/client/locales.d.ts +12 -2
  27. package/lib/types/client-contract.d.ts +33 -1
  28. package/lib/types/host-settings.d.ts +11 -0
  29. package/lib/types/prime-memory-compat.d.ts +7 -4
  30. package/lib/types/prime-memory-route.d.ts +22 -0
  31. package/lib/types/provider-group.d.ts +31 -3
  32. package/lib/types/session-route.d.ts +24 -3
  33. package/lib/types/subagent-runtime.d.ts +34 -0
  34. package/lib/types/tool-allowlist.d.ts +13 -0
  35. package/lib/types/vision-router-compat.d.ts +62 -0
  36. package/lib/types/vision-router-route.d.ts +94 -0
  37. package/lib/vision-router-compat-B9bkgJmh.js +312 -0
  38. package/lib/vision-router-compat.js +2 -0
  39. package/package.json +5 -1
package/lib/client.js CHANGED
@@ -46,6 +46,18 @@ window.__ModuleLoader__.load({
46
46
  label: "插件 · dsh-prime-memory",
47
47
  repo: "https://github.com/drscrewdriver/dsh-prime-memory"
48
48
  },
49
+ {
50
+ id: "dsh-vision-router",
51
+ kind: "plugin",
52
+ label: "插件 · dsh-vision-router",
53
+ repo: "https://github.com/ysr666/dsh-vision-router"
54
+ },
55
+ {
56
+ id: "dsh-univer-office",
57
+ kind: "plugin",
58
+ label: "插件 · dsh-univer-office",
59
+ repo: "https://github.com/dream-num/dsh-univer-office"
60
+ },
49
61
  {
50
62
  id: "dsh-embedded-browser",
51
63
  kind: "plugin",
@@ -58,6 +70,12 @@ window.__ModuleLoader__.load({
58
70
  label: "MCP · wincu(dsh-computer-use-win)",
59
71
  repo: "https://github.com/Yu-tao-Li/dsh-computer-use-win"
60
72
  },
73
+ {
74
+ id: "mcp:mineru-mcp",
75
+ kind: "mcp",
76
+ label: "MCP · mineru-mcp(@vandoor2/mineru-mcp)",
77
+ repo: "https://gitee.com/vandoor2/mineru-mcp"
78
+ },
61
79
  {
62
80
  id: "qqbot-extension",
63
81
  kind: "extension",
@@ -88,6 +106,7 @@ window.__ModuleLoader__.load({
88
106
  "job_output",
89
107
  "list_agents",
90
108
  "list_mcp_resource_templates",
109
+ "list_subagent_models",
91
110
  "list_mcp_resources",
92
111
  "load_workspace_dependencies",
93
112
  "present",
@@ -96,10 +115,13 @@ window.__ModuleLoader__.load({
96
115
  "read",
97
116
  "read_image",
98
117
  "read_mcp_resource",
118
+ "run_code",
99
119
  "schedule_create",
100
120
  "schedule_delete",
121
+ "schedule_edit",
101
122
  "schedule_list",
102
123
  "schedule_update",
124
+ "schedule_view",
103
125
  "send_message",
104
126
  "session_event_read",
105
127
  "session_event_search",
@@ -132,13 +154,15 @@ window.__ModuleLoader__.load({
132
154
  "write"
133
155
  ]);
134
156
  /** MCP server name → catalog id, for the servers this allowlist knows. */
135
- const MCP_SERVERS = /* @__PURE__ */ new Map([["wincu", "mcp:wincu"]]);
157
+ const MCP_SERVERS = /* @__PURE__ */ new Map([["wincu", "mcp:wincu"], ["mineru-mcp", "mcp:mineru-mcp"]]);
136
158
  /** Plugin identity by tool-name prefix (checked before the core catalog). */
137
159
  const PLUGIN_PREFIXES = [
138
160
  ["bcdp_", "dsh-browser-cdp"],
139
161
  ["browser_window_", "dsh-browser-cdp"],
140
162
  ["browser_embedded_", "dsh-embedded-browser"],
141
- ["ops_", "dsh-ops"]
163
+ ["ops_", "dsh-ops"],
164
+ ["vision_", "dsh-vision-router"],
165
+ ["univer_", "dsh-univer-office"]
142
166
  ];
143
167
  /**
144
168
  * Single plugin tools that carry no usable prefix.
@@ -200,6 +224,19 @@ window.__ModuleLoader__.load({
200
224
  * child session seeds its preset from `permissionPresets.current(parent.session)`,
201
225
  * and this bypass answers `'custom'` for an allowlisted call in flight — releasing
202
226
  * them would hand the child no `auto` preset at all, i.e. no review.
227
+ * Beyond that rule sit the entries the user explicitly released (2026-10-24:
228
+ * goal/schedule/terminal creation; 2026-11-20: the vision model calls, the
229
+ * mineru document_parse task, todo/goal updates, and the prime-memory write
230
+ * tools). These do have side effects — vision calls spend the configured
231
+ * backend's quota and send image content to it, document_parse spawns a parse
232
+ * task, the memory tools mutate the memory store — but everything they enable
233
+ * stays inside the same session and auto preset. Releasing them only skips the
234
+ * reviewer; it grants no permission the preset did not already grant. The
235
+ * delegation spawns stay excluded regardless: a child session seeds its preset
236
+ * from the parent's in-flight bypass answer, so releasing them would strip the
237
+ * child of the auto preset entirely (see DELEGATION_SPAWNS in the tests).
238
+ * schedule_edit was reviewed on 2026-11-20 and deliberately kept OUT: it can
239
+ * modify or delete tasks other sessions created.
203
240
  */
204
241
  const DEFAULT_READ_ONLY_TOOLS = [
205
242
  "read",
@@ -284,6 +321,48 @@ window.__ModuleLoader__.load({
284
321
  "mcp__wincu__windows_computer_use_tools",
285
322
  "mcp__wincu__windows_computer_use_wait",
286
323
  "mcp__wincu__windows_computer_use_wait_for",
324
+ "schedule_view",
325
+ "vision_colors",
326
+ "vision_crop",
327
+ "vision_trace",
328
+ "vision_extract_foreground",
329
+ "vision_materialize",
330
+ "vision_pixel_diff",
331
+ "vision_html_screenshot",
332
+ "vision_present",
333
+ "univer_status",
334
+ "univer_inspect",
335
+ "univer_lint",
336
+ "univer_api",
337
+ "mcp__mineru-mcp__get_task_progress",
338
+ "mcp__mineru-mcp__get_recent_logs",
339
+ "mcp__mineru-mcp__wait_for_task",
340
+ "vision_describe",
341
+ "vision_bootstrap",
342
+ "vision_ground",
343
+ "vision_detect",
344
+ "vision_ocr",
345
+ "vision_long_screenshot_ocr",
346
+ "mcp__mineru-mcp__document_parse",
347
+ "todo_write",
348
+ "update_goal",
349
+ "list_subagent_models",
350
+ "memory_write",
351
+ "memory_resolve_conflict",
352
+ "memory_room_admin",
353
+ "memory_room_review",
354
+ "memory_ruminate",
355
+ "memory_skill_archive",
356
+ "memory_skill_pin",
357
+ "memory_slot_close",
358
+ "memory_slot_write",
359
+ "memory_add",
360
+ "memory_update",
361
+ "memory_delete",
362
+ "memory_import",
363
+ "memory_migrate_relation",
364
+ "memory_reproject",
365
+ "memory_ruminate_cancel",
287
366
  "sessions_list__*",
288
367
  "bing_search__*"
289
368
  ];
@@ -472,7 +551,13 @@ window.__ModuleLoader__.load({
472
551
  /** Distillation route handed to the memory plugin when it follows its own default. */
473
552
  const MEMORY_SETTINGS_FIELDS = Object.freeze({
474
553
  provider: "memoryProvider",
475
- model: "memoryModel"
554
+ model: "memoryModel",
555
+ reasoningEffort: "memoryReasoningEffort"
556
+ });
557
+ /** Vision backend route handed to dsh-vision-router when it follows its own chain. */
558
+ const VISION_SETTINGS_FIELDS = Object.freeze({
559
+ provider: "visionProvider",
560
+ model: "visionModel"
476
561
  });
477
562
  function deriveSubagentSettings(settings) {
478
563
  return {
@@ -515,7 +600,14 @@ window.__ModuleLoader__.load({
515
600
  function deriveMemorySettings(settings) {
516
601
  return {
517
602
  ...settings.memoryProvider === void 0 ? {} : { provider: settings.memoryProvider },
518
- ...settings.memoryModel === void 0 ? {} : { model: settings.memoryModel }
603
+ ...settings.memoryModel === void 0 ? {} : { model: settings.memoryModel },
604
+ ...settings.memoryReasoningEffort === void 0 ? {} : { reasoningEffort: settings.memoryReasoningEffort }
605
+ };
606
+ }
607
+ function deriveVisionSettings(settings) {
608
+ return {
609
+ ...settings.visionProvider === void 0 ? {} : { provider: settings.visionProvider },
610
+ ...settings.visionModel === void 0 ? {} : { model: settings.visionModel }
519
611
  };
520
612
  }
521
613
  /** Whether both fields of a model route form a complete pair; an incomplete pair stays off. */
@@ -544,11 +636,23 @@ window.__ModuleLoader__.load({
544
636
  skipped: count(row.skipped)
545
637
  };
546
638
  })() : void 0;
639
+ const adapterRow = (input) => {
640
+ if (input === null || typeof input !== "object" || Array.isArray(input)) return void 0;
641
+ const row = input;
642
+ return {
643
+ installed: row.installed === true,
644
+ route: route(row.route),
645
+ routeSkipped: route(row.routeSkipped),
646
+ replays: count(row.replays)
647
+ };
648
+ };
547
649
  return {
548
650
  held: status.held === true,
549
651
  allowedCalls: count(status.allowedCalls),
550
652
  skippedReadOnly: count(status.skippedReadOnly),
551
- automode
653
+ automode,
654
+ primeMemory: adapterRow(status.primeMemory),
655
+ visionRouter: adapterRow(status.visionRouter)
552
656
  };
553
657
  }
554
658
  /**
@@ -752,7 +856,10 @@ window.__ModuleLoader__.load({
752
856
  "titleProvider",
753
857
  "titleModel",
754
858
  "memoryProvider",
755
- "memoryModel"
859
+ "memoryModel",
860
+ "memoryReasoningEffort",
861
+ "visionProvider",
862
+ "visionModel"
756
863
  ]);
757
864
  /** Own data property, so a literal '__proto__' provider id can never touch a prototype. */
758
865
  function setKey(target, key, value) {
@@ -786,24 +893,60 @@ window.__ModuleLoader__.load({
786
893
  * shapes are accepted: the stored entry array (keys live in each entry's
787
894
  * `provider` field) and a hand-written provider → routes map (keys are the
788
895
  * providers). All-empty entries stay: they pin a provider to every default.
896
+ * `-vision` twin groups fold into their base provider (see {@link foldTwinGroups}).
789
897
  */
790
898
  function normalizeProviderGroups(raw) {
791
899
  const groups = {};
792
- if (Array.isArray(raw)) {
793
- for (const entry of raw) {
794
- const view = normalizeEntry(entry);
795
- if (view === void 0 || view.provider === "") continue;
796
- setKey(groups, view.provider, view.group);
797
- }
798
- return groups;
900
+ if (Array.isArray(raw)) for (const entry of raw) {
901
+ const view = normalizeEntry(entry);
902
+ if (view === void 0 || view.provider === "") continue;
903
+ setKey(groups, view.provider, view.group);
799
904
  }
800
- if (raw !== null && typeof raw === "object") for (const [key, value] of Object.entries(raw)) {
905
+ else if (raw !== null && typeof raw === "object") for (const [key, value] of Object.entries(raw)) {
801
906
  if (key.trim() === "") continue;
802
907
  const view = normalizeEntry(value);
803
908
  if (view === void 0) continue;
804
909
  setKey(groups, key, view.group);
805
910
  }
806
- return groups;
911
+ return foldTwinGroups(groups);
912
+ }
913
+ /**
914
+ * The base provider id a dsh-vision-router twin route resolves to.
915
+ *
916
+ * dsh-vision-router materializes a `${provider}-vision` twin route for every
917
+ * enabled text provider (its own sync skips ids ending in `-vision`), and a
918
+ * session with vision on runs on that twin. Groups are keyed by the base
919
+ * provider: one group per provider whether vision is on or off.
920
+ * @param provider - the provider id a session or the deployment default names.
921
+ * @returns the base id (one trailing `-vision` stripped when the rest is non-empty), else the input unchanged.
922
+ */
923
+ function canonicalGroupProvider(provider) {
924
+ if (!provider.endsWith("-vision")) return provider;
925
+ const base = provider.slice(0, -7);
926
+ return base === "" ? provider : base;
927
+ }
928
+ /**
929
+ * Fold `-vision` twin groups into their base provider (read-side merge).
930
+ *
931
+ * A session with vision on keys its provider as `${base}-vision`, so a group
932
+ * saved under that twin id belongs to the same provider. The base entry wins
933
+ * on conflicts, the twin fills only fields the base leaves empty, and a twin
934
+ * without a base entry is rekeyed to its base. Storage converges on the next
935
+ * save, which re-emits entries from this normalized view.
936
+ */
937
+ function foldTwinGroups(groups) {
938
+ const source = new Map(Object.entries(groups).map(([key, value]) => [key, value]));
939
+ for (const [key, twin] of source) {
940
+ const base = canonicalGroupProvider(key);
941
+ if (base === key) continue;
942
+ const existing = source.get(base);
943
+ if (existing === void 0) source.set(base, twin);
944
+ else for (const field of ROUTE_FIELDS) if (existing[field] === void 0 && twin[field] !== void 0) existing[field] = twin[field];
945
+ source.delete(key);
946
+ }
947
+ const folded = {};
948
+ for (const [key, value] of source) setKey(folded, key, value);
949
+ return folded;
807
950
  }
808
951
  /**
809
952
  * The saved group for a provider.
@@ -829,7 +972,10 @@ window.__ModuleLoader__.load({
829
972
  titleProvider: group.titleProvider ?? "",
830
973
  titleModel: group.titleModel ?? "",
831
974
  memoryProvider: group.memoryProvider ?? "",
832
- memoryModel: group.memoryModel ?? ""
975
+ memoryModel: group.memoryModel ?? "",
976
+ memoryReasoningEffort: group.memoryReasoningEffort ?? "",
977
+ visionProvider: group.visionProvider ?? "",
978
+ visionModel: group.visionModel ?? ""
833
979
  };
834
980
  }
835
981
  /**
@@ -869,6 +1015,10 @@ window.__ModuleLoader__.load({
869
1015
  memory: {
870
1016
  provider: "memoryProvider",
871
1017
  model: "memoryModel"
1018
+ },
1019
+ vision: {
1020
+ provider: "visionProvider",
1021
+ model: "visionModel"
872
1022
  }
873
1023
  });
874
1024
  /** A non-blank string; blank values behave exactly like an absent field. */
@@ -1148,10 +1298,18 @@ window.__ModuleLoader__.load({
1148
1298
  * @returns catalog choices first (original order), then the missing providers.
1149
1299
  */
1150
1300
  function groupProviderChoices(groups, configured, current) {
1151
- const choices = deriveRouteChoices(groups, current === void 0 || current.trim() === "" ? void 0 : { provider: current }).providers;
1301
+ const listed = deriveRouteChoices(groups, current === void 0 || current.trim() === "" ? void 0 : { provider: current }).providers;
1302
+ const ids = new Set(listed.map((choice) => choice.id));
1303
+ const choices = listed.filter((choice) => {
1304
+ if (choice.id === current) return true;
1305
+ const base = canonicalGroupProvider(choice.id);
1306
+ return base === choice.id || !ids.has(base);
1307
+ });
1152
1308
  const seen = new Set(choices.map((choice) => choice.id));
1153
1309
  for (const provider of configured) {
1154
1310
  if (provider.trim() === "" || seen.has(provider)) continue;
1311
+ const base = canonicalGroupProvider(provider);
1312
+ if (base !== provider && configured.includes(base)) continue;
1155
1313
  seen.add(provider);
1156
1314
  choices.push({
1157
1315
  id: provider,
@@ -1517,6 +1675,23 @@ window.__ModuleLoader__.load({
1517
1675
  strokeLinecap: "round"
1518
1676
  })]
1519
1677
  });
1678
+ if (kind === "vision") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
1679
+ width: "18",
1680
+ height: "18",
1681
+ viewBox: "0 0 18 18",
1682
+ fill: "none",
1683
+ "aria-hidden": "true",
1684
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
1685
+ d: "M9 4.5C5.9 4.5 3.6 6.7 2.5 9c1.1 2.3 3.4 4.5 6.5 4.5S14.4 11.3 15.5 9C14.4 6.7 12.1 4.5 9 4.5Z",
1686
+ stroke: "currentColor",
1687
+ strokeLinejoin: "round"
1688
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
1689
+ cx: "9",
1690
+ cy: "9",
1691
+ r: "2",
1692
+ stroke: "currentColor"
1693
+ })]
1694
+ });
1520
1695
  return null;
1521
1696
  }
1522
1697
  function RouteCard({ title, summary, hint, note, icon, open, onToggle, disabled = false, badge, badgeWarn = false, trailing, expandable = true, children }) {
@@ -1596,7 +1771,7 @@ window.__ModuleLoader__.load({
1596
1771
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {})
1597
1772
  });
1598
1773
  }
1599
- function Field({ label, value, disabled, choices, onChange, full = false }) {
1774
+ function Field({ label, value, disabled, choices, onChange, full = false, emptyLabel = "—" }) {
1600
1775
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
1601
1776
  className: cx(ModelSwitchSettings_module_css_default.field, full && ModelSwitchSettings_module_css_default.fieldFull),
1602
1777
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -1611,7 +1786,7 @@ window.__ModuleLoader__.load({
1611
1786
  },
1612
1787
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
1613
1788
  value: "",
1614
- children: "—"
1789
+ children: emptyLabel
1615
1790
  }), choices.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
1616
1791
  value: option.id,
1617
1792
  children: [option.name, option.unavailable === true ? " ⚠" : ""]
@@ -1730,6 +1905,7 @@ window.__ModuleLoader__.load({
1730
1905
  const compaction = props.useCompactionSettings((value) => value);
1731
1906
  const sessionTitle = props.useTitleSettings((value) => value);
1732
1907
  const memory = props.useMemorySettings((value) => value);
1908
+ const vision = props.useVisionSettings((value) => value);
1733
1909
  const switchSettings = props.useSwitchSettings((value) => value);
1734
1910
  const [open, setOpen] = (0, react.useState)();
1735
1911
  const [subagentDraft, setSubagentDraft, resetSubagent] = useDraft(subagent);
@@ -1739,6 +1915,7 @@ window.__ModuleLoader__.load({
1739
1915
  const [compactionDraft, setCompactionDraft, resetCompaction] = useDraft(compaction);
1740
1916
  const [titleDraft, setTitleDraft, resetTitle] = useDraft(sessionTitle);
1741
1917
  const [memoryDraft, setMemoryDraft, resetMemory] = useDraft(memory);
1918
+ const [visionDraft, setVisionDraft, resetVision] = useDraft(vision);
1742
1919
  const [busy, setBusy] = (0, react.useState)();
1743
1920
  const [message, setMessage] = (0, react.useState)();
1744
1921
  const [groupProvider, setGroupProvider] = (0, react.useState)("");
@@ -1791,6 +1968,7 @@ window.__ModuleLoader__.load({
1791
1968
  compaction: capabilityGroupPins(providerGroups, "compaction"),
1792
1969
  title: capabilityGroupPins(providerGroups, "title"),
1793
1970
  memory: capabilityGroupPins(providerGroups, "memory"),
1971
+ vision: capabilityGroupPins(providerGroups, "vision"),
1794
1972
  subagent: capabilityGroupPins(providerGroups, "subagent")
1795
1973
  };
1796
1974
  /**
@@ -1818,6 +1996,15 @@ window.__ModuleLoader__.load({
1818
1996
  model: subagent.value.model ?? "",
1819
1997
  reasoningEffort: subagent.value.reasoningEffort
1820
1998
  } : void 0;
1999
+ const memoryPin = memory.value !== void 0 && routePairConfigured(memory.value) ? {
2000
+ provider: memory.value.provider ?? "",
2001
+ model: memory.value.model ?? "",
2002
+ reasoningEffort: memory.value.reasoningEffort
2003
+ } : void 0;
2004
+ const visionPin = vision.value !== void 0 && routePairConfigured(vision.value) ? {
2005
+ provider: vision.value.provider ?? "",
2006
+ model: vision.value.model ?? ""
2007
+ } : void 0;
1821
2008
  return {
1822
2009
  ...compactionPin === void 0 ? {} : {
1823
2010
  compactProvider: compactionPin.provider,
@@ -1835,6 +2022,15 @@ window.__ModuleLoader__.load({
1835
2022
  subagentProvider: fixedSubagent.provider,
1836
2023
  subagentModel: fixedSubagent.model,
1837
2024
  ...fixedSubagent.reasoningEffort === void 0 ? {} : { subagentReasoningEffort: fixedSubagent.reasoningEffort }
2025
+ },
2026
+ ...memoryPin === void 0 ? {} : {
2027
+ memoryProvider: memoryPin.provider,
2028
+ memoryModel: memoryPin.model,
2029
+ ...memoryPin.reasoningEffort === void 0 || memoryPin.reasoningEffort === "" ? {} : { memoryReasoningEffort: memoryPin.reasoningEffort }
2030
+ },
2031
+ ...visionPin === void 0 ? {} : {
2032
+ visionProvider: visionPin.provider,
2033
+ visionModel: visionPin.model
1838
2034
  }
1839
2035
  };
1840
2036
  };
@@ -1923,6 +2119,20 @@ window.__ModuleLoader__.load({
1923
2119
  const compactionOn = routePairConfigured(compaction.value);
1924
2120
  const titleChoices = deriveRouteChoices(groups, titleDraft);
1925
2121
  const memoryChoices = deriveRouteChoices(groups, memoryDraft);
2122
+ const visionChoices = deriveRouteChoices(groups, visionDraft);
2123
+ const memoryCatalogModel = matchCatalogModel(groups.find((group) => group.id === memoryDraft?.provider)?.models ?? [], memoryDraft?.model);
2124
+ const memoryEfforts = (() => {
2125
+ const efforts = (memoryCatalogModel?.model.reasoning?.efforts ?? []).map((effort) => ({
2126
+ id: effort.id,
2127
+ name: effort.name
2128
+ }));
2129
+ const current = memoryDraft?.reasoningEffort;
2130
+ if (current !== void 0 && current !== "" && !efforts.some((option) => option.id === current)) efforts.push({
2131
+ id: current,
2132
+ name: current
2133
+ });
2134
+ return efforts;
2135
+ })();
1926
2136
  const titleOn = routePairConfigured(sessionTitle.value);
1927
2137
  const catalogSeed = firstCatalogRoute(groups);
1928
2138
  const synced = [
@@ -2205,12 +2415,27 @@ window.__ModuleLoader__.load({
2205
2415
  const groupAutoReview = groupDraft === void 0 ? void 0 : draftPair(groupDraft.autoReviewProvider, groupDraft.autoReviewModel);
2206
2416
  const groupTitle = groupDraft === void 0 ? void 0 : draftPair(groupDraft.titleProvider, groupDraft.titleModel);
2207
2417
  const groupMemory = groupDraft === void 0 ? void 0 : draftPair(groupDraft.memoryProvider, groupDraft.memoryModel);
2418
+ const groupVision = groupDraft === void 0 ? void 0 : draftPair(groupDraft.visionProvider, groupDraft.visionModel);
2208
2419
  const groupSubagent = groupDraft === void 0 ? void 0 : draftPair(groupDraft.subagentProvider, groupDraft.subagentModel);
2209
2420
  const groupCompactionChoices = deriveRouteChoices(groups, groupCompaction);
2210
2421
  const groupAutoReviewChoices = deriveRouteChoices(groups, groupAutoReview);
2211
2422
  const groupTitleChoices = deriveRouteChoices(groups, groupTitle);
2212
2423
  const groupMemoryChoices = deriveRouteChoices(groups, groupMemory);
2424
+ const groupVisionChoices = deriveRouteChoices(groups, groupVision);
2213
2425
  const groupSubagentChoices = deriveRouteChoices(groups, groupSubagent);
2426
+ const groupMemoryCatalogModel = matchCatalogModel(groups.find((group) => group.id === groupDraft?.memoryProvider)?.models ?? [], groupDraft?.memoryModel ?? "");
2427
+ const groupMemoryEfforts = (() => {
2428
+ const efforts = (groupMemoryCatalogModel?.model.reasoning?.efforts ?? []).map((effort) => ({
2429
+ id: effort.id,
2430
+ name: effort.name
2431
+ }));
2432
+ const current = groupDraft?.memoryReasoningEffort;
2433
+ if (current !== void 0 && current !== "" && !efforts.some((option) => option.id === current)) efforts.push({
2434
+ id: current,
2435
+ name: current
2436
+ });
2437
+ return efforts;
2438
+ })();
2214
2439
  const groupSubMatched = matchCatalogModel(groups.find((group) => group.id === (groupDraft?.subagentProvider ?? ""))?.models ?? [], groupDraft?.subagentModel ?? "");
2215
2440
  const groupSubEfforts = (() => {
2216
2441
  const efforts = (groupSubMatched?.model.reasoning?.efforts ?? []).map((effort) => ({
@@ -2266,10 +2491,22 @@ window.__ModuleLoader__.load({
2266
2491
  const provider = active.memoryProvider ?? catalogSeed?.provider;
2267
2492
  const model = active.memoryModel ?? catalogSeed?.model;
2268
2493
  if (provider === void 0 || model === void 0) return draft;
2494
+ const effort = active.memoryReasoningEffort;
2269
2495
  return {
2270
2496
  ...draft,
2271
2497
  memoryProvider: provider,
2272
- memoryModel: model
2498
+ memoryModel: model,
2499
+ ...effort === void 0 || effort === "" ? {} : { memoryReasoningEffort: effort }
2500
+ };
2501
+ }
2502
+ if (kind === "vision") {
2503
+ const provider = active.visionProvider ?? catalogSeed?.provider;
2504
+ const model = active.visionModel ?? catalogSeed?.model;
2505
+ if (provider === void 0 || model === void 0) return draft;
2506
+ return {
2507
+ ...draft,
2508
+ visionProvider: provider,
2509
+ visionModel: model
2273
2510
  };
2274
2511
  }
2275
2512
  const provider = active.subagentProvider ?? catalogSeed?.provider;
@@ -2305,7 +2542,13 @@ window.__ModuleLoader__.load({
2305
2542
  if (kind === "memory") return {
2306
2543
  ...draft,
2307
2544
  memoryProvider: "",
2308
- memoryModel: ""
2545
+ memoryModel: "",
2546
+ memoryReasoningEffort: ""
2547
+ };
2548
+ if (kind === "vision") return {
2549
+ ...draft,
2550
+ visionProvider: "",
2551
+ visionModel: ""
2309
2552
  };
2310
2553
  return {
2311
2554
  ...draft,
@@ -2323,6 +2566,18 @@ window.__ModuleLoader__.load({
2323
2566
  if (groupProvider === "") return;
2324
2567
  run("providerGroups", () => props.saveProviderGroup(groupProvider, void 0));
2325
2568
  };
2569
+ /**
2570
+ * The vision adapter status line: what the host-side compat row last did.
2571
+ * Rendered only when a tool scan has delivered the live adapter state.
2572
+ */
2573
+ const visionStatusRow = reviewStatus?.visionRouter;
2574
+ const visionAdapterStatus = () => {
2575
+ if (visionStatusRow === void 0) return "";
2576
+ if (visionStatusRow.installed && visionStatusRow.route !== void 0) return props.t("visionLinked").replace("{route}", visionStatusRow.route);
2577
+ if (visionStatusRow.routeSkipped === "no-row") return props.t("visionLinkedMissing");
2578
+ if (visionStatusRow.routeSkipped === "rejected") return props.t("visionLinkedRejected");
2579
+ return props.t("visionLinkedUnset");
2580
+ };
2326
2581
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("main", {
2327
2582
  className: ModelSwitchSettings_module_css_default.section,
2328
2583
  children: [
@@ -2806,28 +3061,112 @@ window.__ModuleLoader__.load({
2806
3061
  className: ModelSwitchSettings_module_css_default.hint,
2807
3062
  children: props.t("memoryRouteHelp")
2808
3063
  }),
3064
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3065
+ className: ModelSwitchSettings_module_css_default.formGrid,
3066
+ children: [
3067
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3068
+ label: props.t("provider"),
3069
+ value: memoryDraft.provider ?? "",
3070
+ disabled: busy !== void 0 || !memory.writable,
3071
+ choices: memoryChoices.providers,
3072
+ onChange: (provider) => {
3073
+ const first = groups.find((group) => group.id === provider)?.models[0];
3074
+ setMemoryDraft({
3075
+ provider,
3076
+ ...first === void 0 ? {} : { model: first.id }
3077
+ });
3078
+ }
3079
+ }),
3080
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3081
+ label: props.t("model"),
3082
+ value: memoryDraft.model ?? "",
3083
+ disabled: busy !== void 0 || !memory.writable,
3084
+ choices: memoryChoices.models,
3085
+ onChange: (model) => {
3086
+ setMemoryDraft({
3087
+ ...memoryDraft,
3088
+ model
3089
+ });
3090
+ }
3091
+ }),
3092
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3093
+ label: props.t("memoryEffort"),
3094
+ value: memoryDraft.reasoningEffort ?? "",
3095
+ disabled: busy !== void 0 || !memory.writable,
3096
+ choices: memoryEfforts,
3097
+ emptyLabel: props.t("effortAuto"),
3098
+ onChange: (effort) => {
3099
+ setMemoryDraft({
3100
+ ...memoryDraft,
3101
+ reasoningEffort: effort
3102
+ });
3103
+ }
3104
+ })
3105
+ ]
3106
+ }),
3107
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Actions, {
3108
+ t: props.t,
3109
+ busy: busy === "memory",
3110
+ disabled: busy !== void 0 || !memory.writable,
3111
+ ...message?.route === "memory" ? { message: message.text } : {},
3112
+ onCancel: () => {
3113
+ resetMemory();
3114
+ setMessage(void 0);
3115
+ },
3116
+ onSave: () => {
3117
+ const effort = (memoryDraft.reasoningEffort ?? "").trim();
3118
+ run("memory", () => props.saveMemory([...pairOps(memoryDraft), {
3119
+ field: "reasoningEffort",
3120
+ value: effort === "" ? void 0 : effort
3121
+ }]));
3122
+ }
3123
+ })
3124
+ ] })
3125
+ }),
3126
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RouteCard, {
3127
+ title: props.t("vision"),
3128
+ summary: visionDraft === void 0 ? props.t("loading") : routePairConfigured(visionDraft) ? routeName(groups, visionDraft) : props.t("visionFollow"),
3129
+ hint: props.t("visionHelp"),
3130
+ note: groupNote(props.t, groupPins.vision),
3131
+ icon: "vision",
3132
+ open: open === "vision",
3133
+ onToggle: () => {
3134
+ toggle("vision");
3135
+ },
3136
+ children: visionDraft === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3137
+ className: ModelSwitchSettings_module_css_default.hint,
3138
+ children: props.t("loading")
3139
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
3140
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3141
+ className: ModelSwitchSettings_module_css_default.hint,
3142
+ children: props.t("visionRouteHelp")
3143
+ }),
3144
+ reviewStatus?.visionRouter === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3145
+ className: ModelSwitchSettings_module_css_default.hint,
3146
+ children: visionAdapterStatus()
3147
+ }),
2809
3148
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2810
3149
  className: ModelSwitchSettings_module_css_default.formGrid,
2811
3150
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
2812
3151
  label: props.t("provider"),
2813
- value: memoryDraft.provider ?? "",
2814
- disabled: busy !== void 0 || !memory.writable,
2815
- choices: memoryChoices.providers,
3152
+ value: visionDraft.provider ?? "",
3153
+ disabled: busy !== void 0 || !vision.writable,
3154
+ choices: visionChoices.providers,
2816
3155
  onChange: (provider) => {
2817
3156
  const first = groups.find((group) => group.id === provider)?.models[0];
2818
- setMemoryDraft({
3157
+ setVisionDraft({
2819
3158
  provider,
2820
3159
  ...first === void 0 ? {} : { model: first.id }
2821
3160
  });
2822
3161
  }
2823
3162
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
2824
3163
  label: props.t("model"),
2825
- value: memoryDraft.model ?? "",
2826
- disabled: busy !== void 0 || !memory.writable,
2827
- choices: memoryChoices.models,
3164
+ value: visionDraft.model ?? "",
3165
+ disabled: busy !== void 0 || !vision.writable,
3166
+ choices: visionChoices.models,
2828
3167
  onChange: (model) => {
2829
- setMemoryDraft({
2830
- ...memoryDraft,
3168
+ setVisionDraft({
3169
+ ...visionDraft,
2831
3170
  model
2832
3171
  });
2833
3172
  }
@@ -2835,15 +3174,15 @@ window.__ModuleLoader__.load({
2835
3174
  }),
2836
3175
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Actions, {
2837
3176
  t: props.t,
2838
- busy: busy === "memory",
2839
- disabled: busy !== void 0 || !memory.writable,
2840
- ...message?.route === "memory" ? { message: message.text } : {},
3177
+ busy: busy === "vision",
3178
+ disabled: busy !== void 0 || !vision.writable,
3179
+ ...message?.route === "vision" ? { message: message.text } : {},
2841
3180
  onCancel: () => {
2842
- resetMemory();
3181
+ resetVision();
2843
3182
  setMessage(void 0);
2844
3183
  },
2845
3184
  onSave: () => {
2846
- run("memory", () => props.saveCapability("memory", pairOps(memoryDraft)));
3185
+ run("vision", () => props.saveCapability("vision", pairOps(visionDraft)));
2847
3186
  }
2848
3187
  })
2849
3188
  ] })
@@ -3224,29 +3563,93 @@ window.__ModuleLoader__.load({
3224
3563
  }
3225
3564
  })]
3226
3565
  }), groupMemory === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3566
+ className: ModelSwitchSettings_module_css_default.formGrid,
3567
+ children: [
3568
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3569
+ label: props.t("provider"),
3570
+ value: groupMemory.provider,
3571
+ disabled: groupControlsDisabled,
3572
+ choices: groupMemoryChoices.providers,
3573
+ onChange: (provider) => {
3574
+ const first = groups.find((item) => item.id === provider)?.models[0];
3575
+ setGroupDraft((draft) => draft === void 0 ? draft : {
3576
+ ...draft,
3577
+ memoryProvider: provider,
3578
+ memoryModel: first?.id ?? ""
3579
+ });
3580
+ }
3581
+ }),
3582
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3583
+ label: props.t("model"),
3584
+ value: groupMemory.model,
3585
+ disabled: groupControlsDisabled,
3586
+ choices: groupMemoryChoices.models,
3587
+ onChange: (model) => {
3588
+ setGroupDraft((draft) => draft === void 0 ? draft : {
3589
+ ...draft,
3590
+ memoryModel: model
3591
+ });
3592
+ }
3593
+ }),
3594
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3595
+ label: props.t("memoryEffort"),
3596
+ value: groupDraft.memoryReasoningEffort ?? "",
3597
+ disabled: groupControlsDisabled,
3598
+ choices: groupMemoryEfforts,
3599
+ emptyLabel: props.t("effortAuto"),
3600
+ onChange: (effort) => {
3601
+ setGroupDraft((draft) => draft === void 0 ? draft : {
3602
+ ...draft,
3603
+ memoryReasoningEffort: effort
3604
+ });
3605
+ }
3606
+ })
3607
+ ]
3608
+ })] }),
3609
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3610
+ className: ModelSwitchSettings_module_css_default.rowCard,
3611
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3612
+ className: ModelSwitchSettings_module_css_default.rowCopy,
3613
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3614
+ className: ModelSwitchSettings_module_css_default.rowTitle,
3615
+ children: props.t("vision")
3616
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3617
+ className: ModelSwitchSettings_module_css_default.hint,
3618
+ children: groupVision === void 0 ? props.t("visionFollow") : routeName(groups, groupVision)
3619
+ })]
3620
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
3621
+ checked: groupVision !== void 0,
3622
+ disabled: groupControlsDisabled || groupVision === void 0 && catalogSeed === void 0,
3623
+ label: props.t("vision"),
3624
+ onChange: (value) => {
3625
+ if (value) enableGroupCapability("vision");
3626
+ else disableGroupCapability("vision");
3627
+ }
3628
+ })]
3629
+ }), groupVision === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3227
3630
  className: ModelSwitchSettings_module_css_default.formGrid,
3228
3631
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3229
3632
  label: props.t("provider"),
3230
- value: groupMemory.provider,
3633
+ value: groupVision.provider,
3231
3634
  disabled: groupControlsDisabled,
3232
- choices: groupMemoryChoices.providers,
3635
+ choices: groupVisionChoices.providers,
3233
3636
  onChange: (provider) => {
3234
3637
  const first = groups.find((item) => item.id === provider)?.models[0];
3235
3638
  setGroupDraft((draft) => draft === void 0 ? draft : {
3236
3639
  ...draft,
3237
- memoryProvider: provider,
3238
- memoryModel: first?.id ?? ""
3640
+ visionProvider: provider,
3641
+ visionModel: first?.id ?? ""
3239
3642
  });
3240
3643
  }
3241
3644
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
3242
3645
  label: props.t("model"),
3243
- value: groupMemory.model,
3646
+ value: groupVision.model,
3244
3647
  disabled: groupControlsDisabled,
3245
- choices: groupMemoryChoices.models,
3648
+ choices: groupVisionChoices.models,
3246
3649
  onChange: (model) => {
3247
3650
  setGroupDraft((draft) => draft === void 0 ? draft : {
3248
3651
  ...draft,
3249
- memoryModel: model
3652
+ visionModel: model
3250
3653
  });
3251
3654
  }
3252
3655
  })]
@@ -3398,11 +3801,21 @@ window.__ModuleLoader__.load({
3398
3801
  memoryFollow: "跟随记忆插件默认",
3399
3802
  memoryHelp: "为 dsh-prime-memory 的记忆蒸馏指定路由;两个字段都留空时跟随该插件自己的默认模型。保存后立即生效(写入该插件自己的 live 设置,运行中的实例会读到);只有反复重试仍写不进去时才回落到静态路由(下次启动生效)。",
3400
3803
  memoryRouteHelp: "按部署默认供应商的配置组解析;该供应商没有组时使用这里填写的平面默认。优先写该行的 live 设置(立即生效),不可用时写静态路由(llm.provider/llm.model),启动时生效。",
3804
+ memoryEffort: "思考强度",
3805
+ effortAuto: "自动(跟随模型)",
3806
+ vision: "识图模型",
3807
+ visionFollow: "跟随 Vision Router 默认",
3808
+ visionHelp: "为 dsh-vision-router 的识图后端链指定首选路由;两个字段都留空时该插件使用自己的后端链。配置后作为链首行写入(其余行保留为降级后备),经官方 ConfigEditor 热生效、无需重启。应选择支持图片输入的模型。",
3809
+ visionRouteHelp: "按部署默认供应商的配置组解析;该供应商没有组时使用这里填写的平面默认。清空两个字段后,识图链路交还 Vision Router 自己管理。",
3810
+ visionLinked: "已接管识图路由:{route}。",
3811
+ visionLinkedMissing: "未检测到 dsh-vision-router 插件;安装后自动接管。",
3812
+ visionLinkedUnset: "识图路由未配置,Vision Router 使用自身后端链。",
3813
+ visionLinkedRejected: "识图后端链写入被拒绝,详见宿主日志。",
3401
3814
  providerGroups: "供应商配置组",
3402
3815
  providerGroupsCard: "按供应商预设路由",
3403
3816
  providerGroupsSummary: "使用该供应商的会话自动采用对应组",
3404
- providerGroupsHelp: "为压缩、自动审查、会话命名与子代理按供应商分别保存路由。",
3405
- providerGroupsBodyHelp: "每个供应商保存一组压缩、自动审查、会话命名与子代理路由。会话自身的供应商与该组一致时,这四项能力按组实时解析,未固定项回落到上方卡片里的全局设置。切换某个会话的模型不会写入任何全局设置,因此不同供应商的多个会话并行时互不影响,会话中切换供应商后下一次调用也会立即跟随新供应商的配置组。",
3817
+ providerGroupsHelp: "为压缩、自动审查、会话命名、记忆蒸馏、识图与子代理按供应商分别保存路由。",
3818
+ providerGroupsBodyHelp: "每个供应商保存一组压缩、自动审查、会话命名、记忆蒸馏、识图与子代理路由。会话自身的供应商与该组一致时,这些能力按组实时解析,未固定项回落到上方卡片里的全局设置。同一供应商开/关视觉(-vision 孪生路由)共用同一个组。切换某个会话的模型不会写入任何全局设置,因此不同供应商的多个会话并行时互不影响,会话中切换供应商后下一次调用也会立即跟随新供应商的配置组。",
3406
3819
  providerGroupPick: "选择供应商以编辑其配置组。",
3407
3820
  providerGroupDelete: "删除该组",
3408
3821
  groupOverridesLabel: "组覆盖:{pins};无组时用上方默认值",
@@ -3488,11 +3901,21 @@ window.__ModuleLoader__.load({
3488
3901
  memoryFollow: "Follows the memory plugin default",
3489
3902
  memoryHelp: "Pin the distillation route for dsh-prime-memory. Both fields empty keeps that plugin on its own default model. Saved changes apply immediately through that plugin’s own live settings; only after the live attempts keep failing does the static route fall back to the next start.",
3490
3903
  memoryRouteHelp: "Resolved from the deployment default provider group; without a group the flat pair here applies. The live settings are preferred (immediate); the static route (llm.provider/llm.model) is the fallback that applies at start.",
3904
+ memoryEffort: "Reasoning effort",
3905
+ effortAuto: "Auto (follow the model)",
3906
+ vision: "Vision model",
3907
+ visionFollow: "Follows the Vision Router default",
3908
+ visionHelp: "Pin the preferred backend for dsh-vision-router’s vision chain; both fields empty keeps that plugin on its own chain. A configured route becomes the chain’s first row (the remaining rows stay as fallbacks), written through the official ConfigEditor and hot-applied without a restart. Pick a model that accepts image input.",
3909
+ visionRouteHelp: "Resolved from the deployment default provider group; without a group the flat pair here applies. Clearing both fields hands the chain back to Vision Router.",
3910
+ visionLinked: "Vision route held: {route}.",
3911
+ visionLinkedMissing: "dsh-vision-router is not installed; the takeover engages once it is.",
3912
+ visionLinkedUnset: "No vision route configured; Vision Router keeps its own chain.",
3913
+ visionLinkedRejected: "The vision backend-chain write was rejected; see the host log.",
3491
3914
  providerGroups: "Provider groups",
3492
3915
  providerGroupsCard: "Per-provider route presets",
3493
3916
  providerGroupsSummary: "Sessions using that provider adopt this group",
3494
- providerGroupsHelp: "Save compaction, auto-review, session-naming, and subagent routes per provider.",
3495
- providerGroupsBodyHelp: "Each provider stores one route group for compaction, auto review, session naming, and subagents. A session running on that provider resolves all four capabilities from the group and falls back to the cards above when a row is off. Switching a session’s model writes no global setting, so parallel sessions on different providers never affect each other, and mid-session provider switches take effect on the very next call.",
3917
+ providerGroupsHelp: "Save compaction, auto-review, session-naming, memory-distillation, vision, and subagent routes per provider.",
3918
+ providerGroupsBodyHelp: "Each provider stores one route group for compaction, auto review, session naming, memory distillation, vision, and subagents. A session running on that provider resolves these capabilities from the group and falls back to the cards above when a row is off. Vision on/off (-vision twin routes) share the same group per provider. Switching a session’s model writes no global setting, so parallel sessions on different providers never affect each other, and mid-session provider switches take effect on the very next call.",
3496
3919
  providerGroupPick: "Pick a provider to edit its group.",
3497
3920
  providerGroupDelete: "Delete group",
3498
3921
  groupOverridesLabel: "Group overrides: {pins}; without a group the default above applies",
@@ -6215,6 +6638,7 @@ window.__ModuleLoader__.load({
6215
6638
  const compaction = deriveConfigForm(owned, deriveCompactionSettings, COMPACTION_SETTINGS_FIELDS);
6216
6639
  const sessionTitle = deriveConfigForm(owned, deriveTitleSettings, TITLE_SETTINGS_FIELDS);
6217
6640
  const memory = deriveConfigForm(owned, deriveMemorySettings, MEMORY_SETTINGS_FIELDS);
6641
+ const vision = deriveConfigForm(owned, deriveVisionSettings, VISION_SETTINGS_FIELDS);
6218
6642
  const connectionRpc = (() => {
6219
6643
  try {
6220
6644
  const rpc = ctx.get("connection", false)?.rpc;
@@ -6254,13 +6678,15 @@ window.__ModuleLoader__.load({
6254
6678
  compactionSettings: compaction,
6255
6679
  titleSettings: sessionTitle,
6256
6680
  memorySettings: memory,
6681
+ visionSettings: vision,
6257
6682
  switchSettings: owned
6258
6683
  },
6259
6684
  capabilities: RUNTIME_CAPABILITIES,
6260
6685
  saveSubagent: (ops) => subagent.mutate(ops),
6261
6686
  saveCapability: (route, ops) => {
6262
- return (route === "search" ? search : route === "image" ? image : route === "compaction" ? compaction : route === "title" ? sessionTitle : route === "memory" ? memory : autoReview).mutate(ops);
6687
+ return (route === "search" ? search : route === "image" ? image : route === "compaction" ? compaction : route === "title" ? sessionTitle : route === "memory" ? memory : route === "vision" ? vision : autoReview).mutate(ops);
6263
6688
  },
6689
+ saveMemory: (ops) => memory.mutate(ops),
6264
6690
  saveReviewAllowlist: async ({ enabled, tools }) => {
6265
6691
  if (!await owned.mutate([{
6266
6692
  op: "set",