clay-server 2.45.0-beta.1 → 2.45.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/public/modules/app-panels.js +14 -18
- package/package.json +1 -1
|
@@ -178,25 +178,21 @@ function hasBeta(name) {
|
|
|
178
178
|
function rebuildModelList() {
|
|
179
179
|
if (!configModelList) return;
|
|
180
180
|
// Picker visibility by vendor+mode:
|
|
181
|
-
// Claude TUI -> shown (Claude TUI accepts mid-thread model swaps).
|
|
182
|
-
// Claude
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
// active queryInstance, so
|
|
188
|
-
// message
|
|
181
|
+
// Claude TUI -> shown, free (Claude TUI accepts mid-thread model swaps).
|
|
182
|
+
// GUI (Claude SDK + Codex) -> shown, but locked once the session has
|
|
183
|
+
// history. Both bind the model at session creation and
|
|
184
|
+
// changing mid-thread breaks tool schemas / cache reuse,
|
|
185
|
+
// so we allow the pick only before the first message.
|
|
186
|
+
// sdk-bridge setModel stores into sm.currentModel when
|
|
187
|
+
// there's no active queryInstance, so a pick made before
|
|
188
|
+
// the first message takes effect on session start.
|
|
189
189
|
var modelSection = configModelList.parentElement;
|
|
190
190
|
var s = store.snap();
|
|
191
191
|
var vendor = s.currentVendor || "claude";
|
|
192
|
-
|
|
193
|
-
if (modelSection) modelSection.style.display = hideModelPicker ? "none" : "";
|
|
192
|
+
if (modelSection) modelSection.style.display = "";
|
|
194
193
|
configModelList.innerHTML = "";
|
|
195
|
-
if (hideModelPicker) return;
|
|
196
194
|
|
|
197
|
-
var
|
|
198
|
-
&& s.activeSessionMode === "gui"
|
|
199
|
-
&& !!s.sessionHasHistory;
|
|
195
|
+
var lockedForGui = s.activeSessionMode === "gui" && !!s.sessionHasHistory;
|
|
200
196
|
|
|
201
197
|
var list = s.currentModels.length > 0 ? s.currentModels : (s.currentModel ? [{ value: s.currentModel, displayName: s.currentModel }] : []);
|
|
202
198
|
for (var i = 0; i < list.length; i++) {
|
|
@@ -207,12 +203,12 @@ function rebuildModelList() {
|
|
|
207
203
|
var btn = document.createElement("button");
|
|
208
204
|
btn.className = "config-radio-item";
|
|
209
205
|
if (value === s.currentModel) btn.classList.add("active");
|
|
210
|
-
if (
|
|
206
|
+
if (lockedForGui) btn.classList.add("locked");
|
|
211
207
|
btn.dataset.model = value;
|
|
212
208
|
btn.textContent = label;
|
|
213
|
-
if (
|
|
209
|
+
if (lockedForGui) {
|
|
214
210
|
btn.disabled = true;
|
|
215
|
-
btn.title = "Model is locked after the first message in a
|
|
211
|
+
btn.title = "Model is locked after the first message in a GUI session. Start a new session to change it.";
|
|
216
212
|
} else {
|
|
217
213
|
btn.addEventListener("click", function () {
|
|
218
214
|
var model = this.dataset.model;
|
|
@@ -227,7 +223,7 @@ function rebuildModelList() {
|
|
|
227
223
|
configModelList.appendChild(btn);
|
|
228
224
|
}
|
|
229
225
|
|
|
230
|
-
if (
|
|
226
|
+
if (lockedForGui) {
|
|
231
227
|
var hint = document.createElement("div");
|
|
232
228
|
hint.className = "config-model-hint";
|
|
233
229
|
hint.textContent = "Locked after first message — start a new session to change.";
|
package/package.json
CHANGED