@khorsheed/dsh-local-agent-claude-code 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/CHANGELOG.md +25 -1
- package/README.en.md +24 -112
- package/README.i18n.yaml +2 -2
- package/README.md +24 -108
- package/lib/client.js +157 -72
- package/lib/index.js +531 -186
- package/lib/types/claude-cli-provider.d.ts +73 -2
- package/lib/types/claude-cli-provider.js +330 -97
- package/lib/types/client/SettingsCard.js +11 -3
- package/lib/types/client/icons.d.ts +1 -1
- package/lib/types/client/index.js +2 -2
- package/lib/types/endpoint-auth.js +17 -1
- package/lib/types/index.js +4 -2
- package/lib/types/live-driver.d.ts +0 -5
- package/lib/types/live-driver.js +259 -101
- package/lib/types/model-broker.js +44 -2
- package/package.json +2 -2
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-claude-code` namespace dictionaries. */
|
|
@@ -204,8 +281,13 @@ window.__ModuleLoader__.load({
|
|
|
204
281
|
* re-probes so a mid-session credential loss cannot leave a stale green dot.
|
|
205
282
|
* @module @khorsheed/dsh-local-agent/client — auth status bus
|
|
206
283
|
*/
|
|
207
|
-
const
|
|
208
|
-
const
|
|
284
|
+
const BUS_KEY = Symbol.for("dsh.local-agent.auth-status");
|
|
285
|
+
const bus = globalThis[BUS_KEY] ??= {
|
|
286
|
+
statuses: /* @__PURE__ */ new Map(),
|
|
287
|
+
listeners: /* @__PURE__ */ new Set()
|
|
288
|
+
};
|
|
289
|
+
const statuses = bus.statuses;
|
|
290
|
+
const listeners = bus.listeners;
|
|
209
291
|
/** Record one harness's latest probe result and notify subscribers. */
|
|
210
292
|
function publishAuthStatus(harnessId, status) {
|
|
211
293
|
if (statuses.get(harnessId) === status) return;
|
|
@@ -263,30 +345,30 @@ window.__ModuleLoader__.load({
|
|
|
263
345
|
document.head.appendChild(tag);
|
|
264
346
|
}
|
|
265
347
|
var ProviderAuthBlock_module_css_default = {
|
|
266
|
-
"
|
|
267
|
-
"
|
|
268
|
-
"
|
|
269
|
-
"
|
|
348
|
+
"loginPrompt": "On5p7W_loginPrompt",
|
|
349
|
+
"title": "On5p7W_title",
|
|
350
|
+
"rowActions": "On5p7W_rowActions",
|
|
351
|
+
"rowName": "On5p7W_rowName",
|
|
352
|
+
"dotOff": "On5p7W_dotOff",
|
|
270
353
|
"codeInput": "On5p7W_codeInput",
|
|
271
|
-
"rowPending": "On5p7W_rowPending",
|
|
272
|
-
"status": "On5p7W_status",
|
|
273
|
-
"rows": "On5p7W_rows",
|
|
274
|
-
"section": "On5p7W_section",
|
|
275
354
|
"intro": "On5p7W_intro",
|
|
276
|
-
"dotPending": "On5p7W_dotPending",
|
|
277
|
-
"rowName": "On5p7W_rowName",
|
|
278
|
-
"loginButton": "On5p7W_loginButton",
|
|
279
|
-
"rowHead": "On5p7W_rowHead",
|
|
280
|
-
"logoutButton": "On5p7W_logoutButton",
|
|
281
|
-
"title": "On5p7W_title",
|
|
282
355
|
"promptText": "On5p7W_promptText",
|
|
283
|
-
"
|
|
284
|
-
"rowActions": "On5p7W_rowActions",
|
|
356
|
+
"dotOn": "On5p7W_dotOn",
|
|
285
357
|
"openPage": "On5p7W_openPage",
|
|
358
|
+
"section": "On5p7W_section",
|
|
359
|
+
"rows": "On5p7W_rows",
|
|
360
|
+
"rowTag": "On5p7W_rowTag",
|
|
361
|
+
"logoutButton": "On5p7W_logoutButton",
|
|
362
|
+
"retryButton": "On5p7W_retryButton",
|
|
286
363
|
"credentialDot": "On5p7W_credentialDot",
|
|
287
|
-
"
|
|
364
|
+
"status": "On5p7W_status",
|
|
288
365
|
"rowIdentity": "On5p7W_rowIdentity",
|
|
289
|
-
"
|
|
366
|
+
"rowCard": "On5p7W_rowCard",
|
|
367
|
+
"dotPending": "On5p7W_dotPending",
|
|
368
|
+
"loginButton": "On5p7W_loginButton",
|
|
369
|
+
"rosterError": "On5p7W_rosterError",
|
|
370
|
+
"rowPending": "On5p7W_rowPending",
|
|
371
|
+
"rowHead": "On5p7W_rowHead"
|
|
290
372
|
};
|
|
291
373
|
//#endregion
|
|
292
374
|
//#region ../local-agent/src/client/ProviderAuthBlock.tsx
|
|
@@ -439,8 +521,8 @@ window.__ModuleLoader__.load({
|
|
|
439
521
|
const statusKind = usePublishedAuthStatus(harness.id) ?? view.status;
|
|
440
522
|
const authenticated = statusKind === "authenticated";
|
|
441
523
|
const loginPending = pendingSince !== void 0;
|
|
442
|
-
const loginable = view.loginable ??
|
|
443
|
-
const logoutable = view.logoutable ??
|
|
524
|
+
const loginable = view.loginable ?? statusKind !== "unavailable";
|
|
525
|
+
const logoutable = view.logoutable ?? statusKind !== "unavailable";
|
|
444
526
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
445
527
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
446
528
|
className: ProviderAuthBlock_module_css_default.rowHead,
|
|
@@ -473,7 +555,7 @@ window.__ModuleLoader__.load({
|
|
|
473
555
|
statusKind === "checking" && t("loading"),
|
|
474
556
|
statusKind === "authenticated" && t("settings.authenticated"),
|
|
475
557
|
statusKind === "anonymous" && t("settings.notAuthenticated"),
|
|
476
|
-
statusKind === "unavailable" && t("
|
|
558
|
+
statusKind === "unavailable" && t("settings.statusFailed")
|
|
477
559
|
]
|
|
478
560
|
}),
|
|
479
561
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -565,10 +647,10 @@ window.__ModuleLoader__.load({
|
|
|
565
647
|
document.head.appendChild(tag);
|
|
566
648
|
}
|
|
567
649
|
var AuthStatusDot_module_css_default = {
|
|
568
|
-
"dotPending": "OFjNUG_dotPending",
|
|
569
650
|
"credentialDot": "OFjNUG_credentialDot",
|
|
570
651
|
"dotOn": "OFjNUG_dotOn",
|
|
571
|
-
"dotOff": "OFjNUG_dotOff"
|
|
652
|
+
"dotOff": "OFjNUG_dotOff",
|
|
653
|
+
"dotPending": "OFjNUG_dotPending"
|
|
572
654
|
};
|
|
573
655
|
//#endregion
|
|
574
656
|
//#region ../local-agent/src/client/AuthStatusDot.tsx
|
|
@@ -584,7 +666,7 @@ window.__ModuleLoader__.load({
|
|
|
584
666
|
}
|
|
585
667
|
//#endregion
|
|
586
668
|
//#region \0dsh-css:../local-agent/src/client/ModelListSection.module.css.mjs
|
|
587
|
-
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-
|
|
669
|
+
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}";
|
|
588
670
|
const tagId$1 = "@khorsheed/dsh-local-agent-claude-code/ModelListSection.module.css";
|
|
589
671
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
590
672
|
const tag = document.createElement("style");
|
|
@@ -594,39 +676,39 @@ window.__ModuleLoader__.load({
|
|
|
594
676
|
document.head.appendChild(tag);
|
|
595
677
|
}
|
|
596
678
|
var ModelListSection_module_css_default = {
|
|
597
|
-
"
|
|
598
|
-
"dialogItemAdded": "_4eeJ7W_dialogItemAdded",
|
|
599
|
-
"dialogItemValue": "_4eeJ7W_dialogItemValue",
|
|
679
|
+
"row": "_4eeJ7W_row",
|
|
600
680
|
"hint": "_4eeJ7W_hint",
|
|
681
|
+
"modelDelete": "_4eeJ7W_modelDelete",
|
|
682
|
+
"dialogList": "_4eeJ7W_dialogList",
|
|
601
683
|
"modelList": "_4eeJ7W_modelList",
|
|
602
|
-
"row": "_4eeJ7W_row",
|
|
603
684
|
"modelRowDragging": "_4eeJ7W_modelRowDragging",
|
|
604
|
-
"
|
|
685
|
+
"dialogClose": "_4eeJ7W_dialogClose",
|
|
686
|
+
"modelRowLabel": "_4eeJ7W_modelRowLabel",
|
|
687
|
+
"dialogItemValue": "_4eeJ7W_dialogItemValue",
|
|
688
|
+
"modelSave": "_4eeJ7W_modelSave",
|
|
605
689
|
"dialogItemLabel": "_4eeJ7W_dialogItemLabel",
|
|
606
|
-
"
|
|
690
|
+
"info": "_4eeJ7W_info",
|
|
691
|
+
"dialogItemAdded": "_4eeJ7W_dialogItemAdded",
|
|
692
|
+
"dialogItem": "_4eeJ7W_dialogItem",
|
|
607
693
|
"blockTitle": "_4eeJ7W_blockTitle",
|
|
608
|
-
"
|
|
609
|
-
"
|
|
610
|
-
"dialogSelectAll": "_4eeJ7W_dialogSelectAll",
|
|
611
|
-
"modelRowLabel": "_4eeJ7W_modelRowLabel",
|
|
612
|
-
"saved": "_4eeJ7W_saved",
|
|
613
|
-
"dialog": "_4eeJ7W_dialog",
|
|
694
|
+
"modelAdd": "_4eeJ7W_modelAdd",
|
|
695
|
+
"dialogHead": "_4eeJ7W_dialogHead",
|
|
614
696
|
"dialogTitle": "_4eeJ7W_dialogTitle",
|
|
615
|
-
"
|
|
697
|
+
"block": "_4eeJ7W_block",
|
|
616
698
|
"dialogToolbar": "_4eeJ7W_dialogToolbar",
|
|
617
|
-
"
|
|
618
|
-
"dialogBackdrop": "_4eeJ7W_dialogBackdrop",
|
|
619
|
-
"dialogHead": "_4eeJ7W_dialogHead",
|
|
620
|
-
"dialogList": "_4eeJ7W_dialogList",
|
|
621
|
-
"dialogConfirm": "_4eeJ7W_dialogConfirm",
|
|
622
|
-
"modelInput": "_4eeJ7W_modelInput",
|
|
699
|
+
"dialog": "_4eeJ7W_dialog",
|
|
623
700
|
"modelDrag": "_4eeJ7W_modelDrag",
|
|
624
|
-
"modelAdd": "_4eeJ7W_modelAdd",
|
|
625
|
-
"modelSave": "_4eeJ7W_modelSave",
|
|
626
701
|
"errorText": "_4eeJ7W_errorText",
|
|
627
|
-
"
|
|
628
|
-
"
|
|
629
|
-
"
|
|
702
|
+
"dialogActions": "_4eeJ7W_dialogActions",
|
|
703
|
+
"modelRow": "_4eeJ7W_modelRow",
|
|
704
|
+
"modelDefaultChip": "_4eeJ7W_modelDefaultChip",
|
|
705
|
+
"modelInput": "_4eeJ7W_modelInput",
|
|
706
|
+
"dialogConfirm": "_4eeJ7W_dialogConfirm",
|
|
707
|
+
"saved": "_4eeJ7W_saved",
|
|
708
|
+
"dialogBackdrop": "_4eeJ7W_dialogBackdrop",
|
|
709
|
+
"dialogSelectAll": "_4eeJ7W_dialogSelectAll",
|
|
710
|
+
"dialogHint": "_4eeJ7W_dialogHint",
|
|
711
|
+
"modelRowValue": "_4eeJ7W_modelRowValue"
|
|
630
712
|
};
|
|
631
713
|
//#endregion
|
|
632
714
|
//#region ../local-agent/src/client/ModelListSection.tsx
|
|
@@ -998,33 +1080,33 @@ window.__ModuleLoader__.load({
|
|
|
998
1080
|
document.head.appendChild(tag);
|
|
999
1081
|
}
|
|
1000
1082
|
var SettingsCard_module_css_default = {
|
|
1001
|
-
"
|
|
1083
|
+
"nameRow": "C-VWHa_nameRow",
|
|
1084
|
+
"endpointLabel": "C-VWHa_endpointLabel",
|
|
1085
|
+
"card": "C-VWHa_card",
|
|
1002
1086
|
"switch": "C-VWHa_switch",
|
|
1003
1087
|
"switchOn": "C-VWHa_switchOn",
|
|
1004
1088
|
"saved": "C-VWHa_saved",
|
|
1005
|
-
"hint": "C-VWHa_hint",
|
|
1006
|
-
"endpointLabel": "C-VWHa_endpointLabel",
|
|
1007
|
-
"errorText": "C-VWHa_errorText",
|
|
1008
|
-
"rowLabel": "C-VWHa_rowLabel",
|
|
1009
|
-
"description": "C-VWHa_description",
|
|
1010
|
-
"modelInput": "C-VWHa_modelInput",
|
|
1011
|
-
"body": "C-VWHa_body",
|
|
1012
1089
|
"modelSave": "C-VWHa_modelSave",
|
|
1013
|
-
"
|
|
1090
|
+
"endpointFields": "C-VWHa_endpointFields",
|
|
1091
|
+
"cardOpen": "C-VWHa_cardOpen",
|
|
1092
|
+
"header": "C-VWHa_header",
|
|
1093
|
+
"name": "C-VWHa_name",
|
|
1014
1094
|
"endpointField": "C-VWHa_endpointField",
|
|
1015
|
-
"headText": "C-VWHa_headText",
|
|
1016
|
-
"block": "C-VWHa_block",
|
|
1017
|
-
"chevron": "C-VWHa_chevron",
|
|
1018
1095
|
"chevronOpen": "C-VWHa_chevronOpen",
|
|
1019
|
-
"
|
|
1020
|
-
"
|
|
1021
|
-
"
|
|
1022
|
-
"card": "C-VWHa_card",
|
|
1096
|
+
"rowLabel": "C-VWHa_rowLabel",
|
|
1097
|
+
"modelInput": "C-VWHa_modelInput",
|
|
1098
|
+
"errorText": "C-VWHa_errorText",
|
|
1023
1099
|
"blockTitle": "C-VWHa_blockTitle",
|
|
1100
|
+
"info": "C-VWHa_info",
|
|
1101
|
+
"chevron": "C-VWHa_chevron",
|
|
1102
|
+
"hint": "C-VWHa_hint",
|
|
1024
1103
|
"row": "C-VWHa_row",
|
|
1025
|
-
"
|
|
1104
|
+
"headText": "C-VWHa_headText",
|
|
1105
|
+
"description": "C-VWHa_description",
|
|
1106
|
+
"body": "C-VWHa_body",
|
|
1107
|
+
"block": "C-VWHa_block",
|
|
1026
1108
|
"configuredChip": "C-VWHa_configuredChip",
|
|
1027
|
-
"
|
|
1109
|
+
"knob": "C-VWHa_knob"
|
|
1028
1110
|
};
|
|
1029
1111
|
//#endregion
|
|
1030
1112
|
//#region src/client/SettingsCard.tsx
|
|
@@ -1059,6 +1141,7 @@ window.__ModuleLoader__.load({
|
|
|
1059
1141
|
const endpointLoading = !endpointUnavailable && endpointState === null;
|
|
1060
1142
|
const apiKeyConfigured = endpointState !== null && endpointState !== "unavailable" && endpointState.apiKeySet;
|
|
1061
1143
|
const authTokenConfigured = endpointState !== null && endpointState !== "unavailable" && endpointState.authTokenSet;
|
|
1144
|
+
const authPublished = usePublishedAuthStatus("claude-code");
|
|
1062
1145
|
(0, react.useEffect)(() => {
|
|
1063
1146
|
if (!active || endpointAuth === void 0) return;
|
|
1064
1147
|
let stale = false;
|
|
@@ -1073,13 +1156,15 @@ window.__ModuleLoader__.load({
|
|
|
1073
1156
|
}, [
|
|
1074
1157
|
active,
|
|
1075
1158
|
endpointAuth,
|
|
1076
|
-
endpointSaved
|
|
1159
|
+
endpointSaved,
|
|
1160
|
+
authPublished
|
|
1077
1161
|
]);
|
|
1078
1162
|
const write = (field, value) => {
|
|
1079
1163
|
setSaved(false);
|
|
1080
1164
|
setError(false);
|
|
1081
|
-
scope.set(field, value).then(() => {
|
|
1082
|
-
|
|
1165
|
+
scope.set(field, value).then((accepted) => {
|
|
1166
|
+
if (accepted === false) setError(true);
|
|
1167
|
+
else setSaved(true);
|
|
1083
1168
|
}, () => {
|
|
1084
1169
|
setError(true);
|
|
1085
1170
|
});
|
|
@@ -1495,7 +1580,7 @@ window.__ModuleLoader__.load({
|
|
|
1495
1580
|
en
|
|
1496
1581
|
}), "local-agent-claude-code: dictionaries");
|
|
1497
1582
|
const t = ctx.locale.bind(NS);
|
|
1498
|
-
const scope =
|
|
1583
|
+
const scope = bindCardSettingsScope(ctx, "claude-code", "local-agent-claude-code");
|
|
1499
1584
|
const authT = ctx.locale.bind("local-agent");
|
|
1500
1585
|
const gateway = () => ctx.get("remote.localAgentGateway");
|
|
1501
1586
|
const cardFace = () => ({
|