@khorsheed/dsh-local-agent-codex 0.2.0-rc.3 → 0.2.1

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.
package/lib/client.js CHANGED
@@ -93,6 +93,83 @@ window.__ModuleLoader__.load({
93
93
  });
94
94
  return channel;
95
95
  }
96
+ /**
97
+ * Bind a settings card to the harness's own card-settings store (card-settings.ts
98
+ * on the host) layered over the row's host settings form: reads are the
99
+ * form's value with the stored overrides on top; writes go to the store only,
100
+ * never the profile patch — so they cannot be refused when several suites
101
+ * insert the same row. A host without the store keeps the plain row scope.
102
+ * @param ctx - the provider's client context.
103
+ * @param harness - the harness name (`dsh`, `kimi`, …).
104
+ * @param entryId - the plugin row id the base values come from.
105
+ * @returns the bound scope.
106
+ */
107
+ function bindCardSettingsScope(ctx, harness, entryId) {
108
+ const row = bindSettingsScope(ctx, entryId);
109
+ const gateway = () => {
110
+ const remote = ctx.get("remote.localAgentGateway");
111
+ return typeof remote?.cardSettings === "function" && typeof remote.setCardSettings === "function" ? remote : void 0;
112
+ };
113
+ const listeners = /* @__PURE__ */ new Set();
114
+ let stored;
115
+ let cached;
116
+ const emit = () => {
117
+ for (const listener of [...listeners]) listener();
118
+ };
119
+ const load = () => {
120
+ gateway()?.cardSettings(harness).then((result) => {
121
+ if (!result.ok || result.value === void 0) return;
122
+ stored = result.value;
123
+ emit();
124
+ }).catch(() => {});
125
+ };
126
+ const write = async (patch) => {
127
+ const remote = gateway();
128
+ if (remote === void 0) return false;
129
+ try {
130
+ const result = await remote.setCardSettings(harness, patch);
131
+ if (!result.ok || result.value === void 0) return false;
132
+ stored = result.value;
133
+ emit();
134
+ return true;
135
+ } catch {
136
+ return false;
137
+ }
138
+ };
139
+ return {
140
+ getSnapshot: () => {
141
+ const rowSnapshot = row.getSnapshot();
142
+ if (cached !== void 0 && cached.rowSnapshot === rowSnapshot && cached.stored === stored) return cached.snapshot;
143
+ const overrides = stored ?? {};
144
+ const snapshot = gateway() === void 0 ? rowSnapshot : {
145
+ ...rowSnapshot,
146
+ value: rowSnapshot.value === void 0 && stored === void 0 ? void 0 : {
147
+ ...rowSnapshot.value,
148
+ ...overrides
149
+ },
150
+ writable: true,
151
+ status: rowSnapshot.status === "loading" && stored !== void 0 ? "ready" : rowSnapshot.status === "unavailable" && stored !== void 0 ? "ready" : rowSnapshot.status
152
+ };
153
+ cached = {
154
+ rowSnapshot,
155
+ stored,
156
+ snapshot
157
+ };
158
+ return snapshot;
159
+ },
160
+ subscribe: (listener) => {
161
+ if (listeners.size === 0) load();
162
+ listeners.add(listener);
163
+ const off = row.subscribe(listener);
164
+ return () => {
165
+ listeners.delete(listener);
166
+ off();
167
+ };
168
+ },
169
+ set: (field, value) => gateway() === void 0 ? row.set(field, value) : write({ [field]: value }),
170
+ unset: (field) => gateway() === void 0 ? row.unset(field) : write({ [field]: null })
171
+ };
172
+ }
96
173
  //#endregion
97
174
  //#region src/client/locales.ts
98
175
  /** `local-agent-codex` namespace dictionaries. */
@@ -202,8 +279,13 @@ window.__ModuleLoader__.load({
202
279
  * re-probes so a mid-session credential loss cannot leave a stale green dot.
203
280
  * @module @khorsheed/dsh-local-agent/client — auth status bus
204
281
  */
205
- const statuses = /* @__PURE__ */ new Map();
206
- const listeners = /* @__PURE__ */ new Set();
282
+ const BUS_KEY = Symbol.for("dsh.local-agent.auth-status");
283
+ const bus = globalThis[BUS_KEY] ??= {
284
+ statuses: /* @__PURE__ */ new Map(),
285
+ listeners: /* @__PURE__ */ new Set()
286
+ };
287
+ const statuses = bus.statuses;
288
+ const listeners = bus.listeners;
207
289
  /** Record one harness's latest probe result and notify subscribers. */
208
290
  function publishAuthStatus(harnessId, status) {
209
291
  if (statuses.get(harnessId) === status) return;
@@ -261,30 +343,30 @@ window.__ModuleLoader__.load({
261
343
  document.head.appendChild(tag);
262
344
  }
263
345
  var ProviderAuthBlock_module_css_default = {
264
- "rosterError": "On5p7W_rosterError",
346
+ "promptText": "On5p7W_promptText",
347
+ "status": "On5p7W_status",
265
348
  "title": "On5p7W_title",
266
- "dotOff": "On5p7W_dotOff",
267
- "dotOn": "On5p7W_dotOn",
268
349
  "rowCard": "On5p7W_rowCard",
269
- "rowHead": "On5p7W_rowHead",
270
- "rowIdentity": "On5p7W_rowIdentity",
271
- "promptText": "On5p7W_promptText",
272
- "dotPending": "On5p7W_dotPending",
273
350
  "loginButton": "On5p7W_loginButton",
274
- "codeInput": "On5p7W_codeInput",
275
- "rowName": "On5p7W_rowName",
276
351
  "retryButton": "On5p7W_retryButton",
277
- "rowPending": "On5p7W_rowPending",
278
- "loginPrompt": "On5p7W_loginPrompt",
352
+ "rowActions": "On5p7W_rowActions",
279
353
  "logoutButton": "On5p7W_logoutButton",
354
+ "section": "On5p7W_section",
280
355
  "intro": "On5p7W_intro",
356
+ "dotPending": "On5p7W_dotPending",
357
+ "dotOn": "On5p7W_dotOn",
358
+ "rowName": "On5p7W_rowName",
359
+ "codeInput": "On5p7W_codeInput",
281
360
  "openPage": "On5p7W_openPage",
282
- "credentialDot": "On5p7W_credentialDot",
283
- "rowTag": "On5p7W_rowTag",
284
- "rowActions": "On5p7W_rowActions",
285
- "section": "On5p7W_section",
361
+ "rowPending": "On5p7W_rowPending",
362
+ "rowIdentity": "On5p7W_rowIdentity",
286
363
  "rows": "On5p7W_rows",
287
- "status": "On5p7W_status"
364
+ "rosterError": "On5p7W_rosterError",
365
+ "rowTag": "On5p7W_rowTag",
366
+ "dotOff": "On5p7W_dotOff",
367
+ "credentialDot": "On5p7W_credentialDot",
368
+ "rowHead": "On5p7W_rowHead",
369
+ "loginPrompt": "On5p7W_loginPrompt"
288
370
  };
289
371
  //#endregion
290
372
  //#region ../local-agent/src/client/ProviderAuthBlock.tsx
@@ -437,8 +519,8 @@ window.__ModuleLoader__.load({
437
519
  const statusKind = usePublishedAuthStatus(harness.id) ?? view.status;
438
520
  const authenticated = statusKind === "authenticated";
439
521
  const loginPending = pendingSince !== void 0;
440
- const loginable = view.loginable ?? true;
441
- const logoutable = view.logoutable ?? true;
522
+ const loginable = view.loginable ?? statusKind !== "unavailable";
523
+ const logoutable = view.logoutable ?? statusKind !== "unavailable";
442
524
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
443
525
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
444
526
  className: ProviderAuthBlock_module_css_default.rowHead,
@@ -471,7 +553,7 @@ window.__ModuleLoader__.load({
471
553
  statusKind === "checking" && t("loading"),
472
554
  statusKind === "authenticated" && t("settings.authenticated"),
473
555
  statusKind === "anonymous" && t("settings.notAuthenticated"),
474
- statusKind === "unavailable" && t("error")
556
+ statusKind === "unavailable" && t("settings.statusFailed")
475
557
  ]
476
558
  }),
477
559
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
@@ -563,10 +645,10 @@ window.__ModuleLoader__.load({
563
645
  document.head.appendChild(tag);
564
646
  }
565
647
  var AuthStatusDot_module_css_default = {
566
- "credentialDot": "OFjNUG_credentialDot",
567
- "dotPending": "OFjNUG_dotPending",
568
648
  "dotOn": "OFjNUG_dotOn",
569
- "dotOff": "OFjNUG_dotOff"
649
+ "credentialDot": "OFjNUG_credentialDot",
650
+ "dotOff": "OFjNUG_dotOff",
651
+ "dotPending": "OFjNUG_dotPending"
570
652
  };
571
653
  //#endregion
572
654
  //#region ../local-agent/src/client/AuthStatusDot.tsx
@@ -582,7 +664,7 @@ window.__ModuleLoader__.load({
582
664
  }
583
665
  //#endregion
584
666
  //#region \0dsh-css:../local-agent/src/client/ModelListSection.module.css.mjs
585
- const css$1 = "._4eeJ7W_block{flex-direction:column;gap:10px;display:flex}._4eeJ7W_blockTitle{color:var(--dsw-alias-label-primary);align-items:center;gap:6px;margin:0;font-size:13px;font-weight:500;line-height:1.4;display:flex}._4eeJ7W_info{appearance:none;color:var(--dsw-alias-label-tertiary);cursor:help;background:0 0;border:0;border-radius:50%;padding:0 2px;font-size:12px;line-height:1}._4eeJ7W_row{align-items:center;gap:12px;display:flex}._4eeJ7W_saved{color:var(--dsw-alias-state-success-primary);font-size:12px}._4eeJ7W_errorText{color:var(--dsw-alias-state-error-primary);font-size:12px}._4eeJ7W_hint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5}._4eeJ7W_modelInput{min-width:0;font:inherit;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:5px 8px;font-size:13px;line-height:1.4}._4eeJ7W_modelSave{appearance:none;font:inherit;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:8px;flex:none;padding:5px 10px;font-size:13px;line-height:1.4}._4eeJ7W_modelList{flex-direction:column;gap:8px;display:flex}._4eeJ7W_modelRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);cursor:grab;border-radius:8px;align-items:center;gap:8px;padding:6px 8px;display:flex}._4eeJ7W_modelRowDragging{opacity:.6;cursor:grabbing}._4eeJ7W_modelDrag{color:var(--dsw-alias-label-tertiary);cursor:grab;user-select:none}._4eeJ7W_modelRowValue{font-size:13px;font-family:var(--dsw-alias-font-mono,monospace);color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}._4eeJ7W_modelRowLabel{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;max-width:40%;font-size:12px;overflow:hidden}._4eeJ7W_modelDefaultChip{color:var(--dsw-alias-success,#1a9e54);background:color-mix(in srgb, var(--dsw-alias-success,#1a9e54) 12%, transparent);border-radius:999px;padding:1px 8px;font-size:11px;line-height:1.4}._4eeJ7W_modelDelete{appearance:none;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;padding:2px 4px;font-size:12px}._4eeJ7W_modelAdd{appearance:none;border:1px dashed var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;padding:5px 12px;font-size:13px}._4eeJ7W_dialogBackdrop{z-index:100;background:#00000052;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}._4eeJ7W_dialog{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;flex-direction:column;gap:10px;width:min(520px,100vw - 48px);max-height:min(560px,100vh - 96px);padding:16px;display:flex;box-shadow:0 12px 40px #00000059}._4eeJ7W_dialogHead{justify-content:space-between;align-items:center;display:flex}._4eeJ7W_dialogTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:600}._4eeJ7W_dialogClose{appearance:none;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;padding:2px 4px;font-size:13px}._4eeJ7W_dialogHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}._4eeJ7W_dialogToolbar{align-items:center;gap:8px;display:flex}._4eeJ7W_dialogToolbar ._4eeJ7W_modelInput{flex:1}._4eeJ7W_dialogSelectAll{appearance:none;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:0;padding:4px 6px;font-size:13px}._4eeJ7W_dialogList{border:1px solid var(--dsw-alias-border-l2);border-radius:8px;flex-direction:column;flex:1;gap:2px;min-height:120px;max-height:320px;padding:6px;display:flex;overflow-y:auto}._4eeJ7W_dialogItem{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}._4eeJ7W_dialogItemAdded{opacity:.55;cursor:default}._4eeJ7W_dialogItemValue{font-family:var(--dsw-alias-font-mono,monospace)}._4eeJ7W_dialogItemLabel{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}._4eeJ7W_dialogActions{justify-content:flex-end;gap:8px;display:flex}._4eeJ7W_dialogConfirm{appearance:none;color:var(--dsw-alias-text-on-brand,#fff);background:var(--dsw-alias-brand-primary);cursor:pointer;border:0;border-radius:8px;padding:6px 14px;font-size:13px}";
667
+ const css$1 = "._4eeJ7W_block{flex-direction:column;gap:10px;display:flex}._4eeJ7W_blockTitle{color:var(--dsw-alias-label-primary);align-items:center;gap:6px;margin:0;font-size:13px;font-weight:500;line-height:1.4;display:flex}._4eeJ7W_info{appearance:none;color:var(--dsw-alias-label-tertiary);cursor:help;background:0 0;border:0;border-radius:50%;padding:0 2px;font-size:12px;line-height:1}._4eeJ7W_row{align-items:center;gap:12px;display:flex}._4eeJ7W_saved{color:var(--dsw-alias-state-success-primary);font-size:12px}._4eeJ7W_errorText{color:var(--dsw-alias-state-error-primary);font-size:12px}._4eeJ7W_hint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5}._4eeJ7W_modelInput{min-width:0;font:inherit;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:5px 8px;font-size:13px;line-height:1.4}._4eeJ7W_modelSave{appearance:none;font:inherit;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:8px;flex:none;padding:5px 10px;font-size:13px;line-height:1.4}._4eeJ7W_modelList{flex-direction:column;gap:8px;display:flex}._4eeJ7W_modelRow{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);cursor:grab;border-radius:8px;align-items:center;gap:8px;padding:6px 8px;display:flex}._4eeJ7W_modelRowDragging{opacity:.6;cursor:grabbing}._4eeJ7W_modelDrag{color:var(--dsw-alias-label-tertiary);cursor:grab;user-select:none}._4eeJ7W_modelRowValue{font-size:13px;font-family:var(--dsw-alias-font-mono,monospace);color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}._4eeJ7W_modelRowLabel{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;max-width:40%;font-size:12px;overflow:hidden}._4eeJ7W_modelDefaultChip{color:var(--dsw-alias-success,#1a9e54);background:color-mix(in srgb, var(--dsw-alias-success,#1a9e54) 12%, transparent);border-radius:999px;padding:1px 8px;font-size:11px;line-height:1.4}._4eeJ7W_modelDelete{appearance:none;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;padding:2px 4px;font-size:12px}._4eeJ7W_modelAdd{appearance:none;border:1px dashed var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;padding:5px 12px;font-size:13px}._4eeJ7W_dialogBackdrop{z-index:100;background:#00000052;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}._4eeJ7W_dialog{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;flex-direction:column;gap:10px;width:min(520px,100vw - 48px);max-height:min(560px,100vh - 96px);padding:16px;display:flex;box-shadow:0 12px 40px #00000059}._4eeJ7W_dialogHead{justify-content:space-between;align-items:center;display:flex}._4eeJ7W_dialogTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:600}._4eeJ7W_dialogClose{appearance:none;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;padding:2px 4px;font-size:13px}._4eeJ7W_dialogHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}._4eeJ7W_dialogToolbar{align-items:center;gap:8px;display:flex}._4eeJ7W_dialogToolbar ._4eeJ7W_modelInput{flex:1}._4eeJ7W_dialogSelectAll{appearance:none;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:0;padding:4px 6px;font-size:13px}._4eeJ7W_dialogList{border:1px solid var(--dsw-alias-border-l2);border-radius:8px;flex-direction:column;flex:1;gap:2px;min-height:120px;max-height:320px;padding:6px;display:flex;overflow-y:auto}._4eeJ7W_dialogItem{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}._4eeJ7W_dialogItemAdded{opacity:.55;cursor:default}._4eeJ7W_dialogItemValue{font-family:var(--dsw-alias-font-mono,monospace)}._4eeJ7W_dialogItemLabel{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}._4eeJ7W_dialogActions{justify-content:flex-end;gap:8px;display:flex}._4eeJ7W_dialogConfirm{appearance:none;color:var(--dsw-alias-label-primary-foreground,#fff);background:var(--dsw-alias-button-primary-fill,#1f2329);cursor:pointer;border:0;border-radius:8px;padding:6px 14px;font-size:13px}._4eeJ7W_dialogConfirm:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,var(--dsw-alias-button-primary-fill,#1f2329))}._4eeJ7W_dialogConfirm:disabled{opacity:.4;cursor:default}";
586
668
  const tagId$1 = "@khorsheed/dsh-local-agent-codex/ModelListSection.module.css";
587
669
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
588
670
  const tag = document.createElement("style");
@@ -592,39 +674,39 @@ window.__ModuleLoader__.load({
592
674
  document.head.appendChild(tag);
593
675
  }
594
676
  var ModelListSection_module_css_default = {
677
+ "dialogItemLabel": "_4eeJ7W_dialogItemLabel",
678
+ "dialogSelectAll": "_4eeJ7W_dialogSelectAll",
679
+ "row": "_4eeJ7W_row",
680
+ "block": "_4eeJ7W_block",
681
+ "blockTitle": "_4eeJ7W_blockTitle",
682
+ "modelInput": "_4eeJ7W_modelInput",
683
+ "dialogItem": "_4eeJ7W_dialogItem",
684
+ "hint": "_4eeJ7W_hint",
685
+ "dialog": "_4eeJ7W_dialog",
595
686
  "modelList": "_4eeJ7W_modelList",
596
- "dialogActions": "_4eeJ7W_dialogActions",
597
687
  "modelRowDragging": "_4eeJ7W_modelRowDragging",
598
- "dialogConfirm": "_4eeJ7W_dialogConfirm",
599
- "block": "_4eeJ7W_block",
600
- "row": "_4eeJ7W_row",
688
+ "dialogList": "_4eeJ7W_dialogList",
689
+ "modelAdd": "_4eeJ7W_modelAdd",
601
690
  "errorText": "_4eeJ7W_errorText",
602
- "dialogItemLabel": "_4eeJ7W_dialogItemLabel",
603
- "dialogToolbar": "_4eeJ7W_dialogToolbar",
604
- "dialog": "_4eeJ7W_dialog",
605
- "modelRowLabel": "_4eeJ7W_modelRowLabel",
606
691
  "dialogTitle": "_4eeJ7W_dialogTitle",
607
- "modelDefaultChip": "_4eeJ7W_modelDefaultChip",
608
- "modelAdd": "_4eeJ7W_modelAdd",
609
- "dialogHint": "_4eeJ7W_dialogHint",
610
- "dialogItemValue": "_4eeJ7W_dialogItemValue",
611
- "saved": "_4eeJ7W_saved",
612
- "modelInput": "_4eeJ7W_modelInput",
613
- "blockTitle": "_4eeJ7W_blockTitle",
614
- "modelRow": "_4eeJ7W_modelRow",
615
692
  "modelSave": "_4eeJ7W_modelSave",
616
693
  "modelRowValue": "_4eeJ7W_modelRowValue",
617
- "info": "_4eeJ7W_info",
618
- "dialogHead": "_4eeJ7W_dialogHead",
619
- "dialogSelectAll": "_4eeJ7W_dialogSelectAll",
620
- "dialogItem": "_4eeJ7W_dialogItem",
694
+ "saved": "_4eeJ7W_saved",
695
+ "modelRow": "_4eeJ7W_modelRow",
696
+ "dialogActions": "_4eeJ7W_dialogActions",
697
+ "dialogClose": "_4eeJ7W_dialogClose",
621
698
  "modelDrag": "_4eeJ7W_modelDrag",
622
- "dialogBackdrop": "_4eeJ7W_dialogBackdrop",
623
- "dialogList": "_4eeJ7W_dialogList",
624
- "dialogItemAdded": "_4eeJ7W_dialogItemAdded",
699
+ "info": "_4eeJ7W_info",
625
700
  "modelDelete": "_4eeJ7W_modelDelete",
626
- "dialogClose": "_4eeJ7W_dialogClose",
627
- "hint": "_4eeJ7W_hint"
701
+ "dialogItemAdded": "_4eeJ7W_dialogItemAdded",
702
+ "dialogItemValue": "_4eeJ7W_dialogItemValue",
703
+ "dialogConfirm": "_4eeJ7W_dialogConfirm",
704
+ "dialogBackdrop": "_4eeJ7W_dialogBackdrop",
705
+ "dialogHead": "_4eeJ7W_dialogHead",
706
+ "dialogToolbar": "_4eeJ7W_dialogToolbar",
707
+ "dialogHint": "_4eeJ7W_dialogHint",
708
+ "modelDefaultChip": "_4eeJ7W_modelDefaultChip",
709
+ "modelRowLabel": "_4eeJ7W_modelRowLabel"
628
710
  };
629
711
  //#endregion
630
712
  //#region ../local-agent/src/client/ModelListSection.tsx
@@ -996,33 +1078,33 @@ window.__ModuleLoader__.load({
996
1078
  document.head.appendChild(tag);
997
1079
  }
998
1080
  var SettingsCard_module_css_default = {
999
- "header": "oWITGW_header",
1000
- "rowLabel": "oWITGW_rowLabel",
1001
- "errorText": "oWITGW_errorText",
1002
- "description": "oWITGW_description",
1003
- "info": "oWITGW_info",
1004
- "name": "oWITGW_name",
1005
- "card": "oWITGW_card",
1006
- "row": "oWITGW_row",
1007
- "chevron": "oWITGW_chevron",
1008
- "endpointFields": "oWITGW_endpointFields",
1009
- "endpointLabel": "oWITGW_endpointLabel",
1010
1081
  "configuredChip": "oWITGW_configuredChip",
1011
- "modelSave": "oWITGW_modelSave",
1012
1082
  "switchOn": "oWITGW_switchOn",
1013
1083
  "block": "oWITGW_block",
1014
- "headText": "oWITGW_headText",
1015
- "chevronOpen": "oWITGW_chevronOpen",
1084
+ "knob": "oWITGW_knob",
1085
+ "endpointFields": "oWITGW_endpointFields",
1086
+ "row": "oWITGW_row",
1087
+ "card": "oWITGW_card",
1088
+ "endpointField": "oWITGW_endpointField",
1089
+ "chevron": "oWITGW_chevron",
1090
+ "switch": "oWITGW_switch",
1016
1091
  "body": "oWITGW_body",
1092
+ "blockTitle": "oWITGW_blockTitle",
1093
+ "description": "oWITGW_description",
1094
+ "info": "oWITGW_info",
1095
+ "name": "oWITGW_name",
1096
+ "rowLabel": "oWITGW_rowLabel",
1097
+ "errorText": "oWITGW_errorText",
1017
1098
  "hint": "oWITGW_hint",
1099
+ "cardOpen": "oWITGW_cardOpen",
1100
+ "endpointLabel": "oWITGW_endpointLabel",
1101
+ "headText": "oWITGW_headText",
1018
1102
  "modelInput": "oWITGW_modelInput",
1019
- "switch": "oWITGW_switch",
1020
- "blockTitle": "oWITGW_blockTitle",
1021
- "nameRow": "oWITGW_nameRow",
1022
- "knob": "oWITGW_knob",
1103
+ "modelSave": "oWITGW_modelSave",
1023
1104
  "saved": "oWITGW_saved",
1024
- "endpointField": "oWITGW_endpointField",
1025
- "cardOpen": "oWITGW_cardOpen"
1105
+ "nameRow": "oWITGW_nameRow",
1106
+ "chevronOpen": "oWITGW_chevronOpen",
1107
+ "header": "oWITGW_header"
1026
1108
  };
1027
1109
  //#endregion
1028
1110
  //#region src/client/SettingsCard.tsx
@@ -1053,6 +1135,7 @@ window.__ModuleLoader__.load({
1053
1135
  const endpointUnavailable = endpointAuth === void 0 || endpointState === "unavailable";
1054
1136
  const endpointLoading = !endpointUnavailable && endpointState === null;
1055
1137
  const apiKeyConfigured = endpointState !== null && endpointState !== "unavailable" && endpointState.apiKeySet;
1138
+ const authPublished = usePublishedAuthStatus("codex");
1056
1139
  (0, react.useEffect)(() => {
1057
1140
  if (!active || endpointAuth === void 0) return;
1058
1141
  let stale = false;
@@ -1067,7 +1150,8 @@ window.__ModuleLoader__.load({
1067
1150
  }, [
1068
1151
  active,
1069
1152
  endpointAuth,
1070
- endpointSaved
1153
+ endpointSaved,
1154
+ authPublished
1071
1155
  ]);
1072
1156
  const saveEndpoint = () => {
1073
1157
  if (endpointAuth === void 0) return;
@@ -1092,8 +1176,9 @@ window.__ModuleLoader__.load({
1092
1176
  const write = (field, value) => {
1093
1177
  setSaved(false);
1094
1178
  setError(false);
1095
- scope.set(field, value).then(() => {
1096
- setSaved(true);
1179
+ scope.set(field, value).then((accepted) => {
1180
+ if (accepted === false) setError(true);
1181
+ else setSaved(true);
1097
1182
  }, () => {
1098
1183
  setError(true);
1099
1184
  });
@@ -1463,7 +1548,7 @@ window.__ModuleLoader__.load({
1463
1548
  en
1464
1549
  }), "local-agent-codex: dictionaries");
1465
1550
  const t = ctx.locale.bind(NS);
1466
- const scope = bindSettingsScope(ctx, "local-agent-codex");
1551
+ const scope = bindCardSettingsScope(ctx, "codex", "local-agent-codex");
1467
1552
  const authT = ctx.locale.bind("local-agent");
1468
1553
  const gateway = () => ctx.get("remote.localAgentGateway");
1469
1554
  const cardFace = () => ({