feat(chat): persist safe Codex next-turn model selection

This commit is contained in:
2026-10-20 16:32:42 +01:00
parent d92fa60259
commit ed0abb976d
16 changed files with 682 additions and 27 deletions
+16
View File
@@ -0,0 +1,16 @@
/** Harnesses with a verified catalog and model-selection path. */
export function supportsChatModels(backend) {
return ["", "opencode", "codex"].includes(String(backend ?? "").trim());
}
/** Never turn an unknown remote model into an invented model name. */
export function chatModelLabel(session) {
const model = String(session?.model ?? "").trim() || "Model";
return session?.model_selection === "next_turn" ? `${model} · next turn` : model;
}
export function chatModelSelectionNote(backend) {
return backend === "codex"
? "Saved by Pipelines for the next turn you send. Does not resume this thread or edit global Codex configuration."
: "Applies to the next turn in this chat.";
}