mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:20:43 +00:00
fix(telegram): clarify model picker runtime scope
This commit is contained in:
@@ -1764,8 +1764,8 @@ export const registerTelegramHandlers = ({
|
||||
? "reset to default"
|
||||
: `changed to <b>${escapeHtml(selection.provider)}/${escapeHtml(selection.model)}</b>`;
|
||||
const scopeText = isDefaultSelection
|
||||
? "Session selection cleared. New replies use the agent's configured default."
|
||||
: "Session-only selection. The agent default in openclaw.json is unchanged; /reset or a new session may return to that default.";
|
||||
? "Session selection cleared. Runtime unchanged. New replies use the agent's configured default."
|
||||
: `Session-only model selection. Runtime unchanged. Use /model ${escapeHtml(selection.provider)}/${escapeHtml(selection.model)} --runtime <runtime> to switch harnesses. The agent default in openclaw.json is unchanged; /reset or a new session may return to that default.`;
|
||||
await editMessageWithButtons(
|
||||
`✅ Model ${actionText}\n\n${scopeText}`,
|
||||
[], // Empty buttons = remove inline keyboard
|
||||
|
||||
@@ -3768,7 +3768,7 @@ describe("createTelegramBot", () => {
|
||||
|
||||
expect(editMessageTextSpy).toHaveBeenCalledTimes(1);
|
||||
expect(String(editMessageTextSpy.mock.calls.at(-1)?.[2] ?? "")).toContain(
|
||||
"Session-only selection. The agent default in openclaw.json is unchanged",
|
||||
"Session-only model selection. Runtime unchanged.",
|
||||
);
|
||||
expect(
|
||||
editMessageTextSpy.mock.calls.some((call) =>
|
||||
|
||||
@@ -1062,7 +1062,7 @@ describe("createTelegramBot", () => {
|
||||
`${CHECK_MARK_EMOJI} Model reset to default`,
|
||||
);
|
||||
expect(editMessageTextSpy.mock.calls[0]?.[2]).toContain(
|
||||
"Session selection cleared. New replies use the agent's configured default.",
|
||||
"Session selection cleared. Runtime unchanged. New replies use the agent's configured default.",
|
||||
);
|
||||
|
||||
const entry = Object.values(loadSessionStore(storePath, { skipCache: true }))[0];
|
||||
@@ -1209,7 +1209,7 @@ describe("createTelegramBot", () => {
|
||||
`${CHECK_MARK_EMOJI} Model reset to default`,
|
||||
);
|
||||
expect(editMessageTextSpy.mock.calls[0]?.[2]).toContain(
|
||||
"Session selection cleared. New replies use the agent's configured default.",
|
||||
"Session selection cleared. Runtime unchanged. New replies use the agent's configured default.",
|
||||
);
|
||||
|
||||
const entry = Object.values(loadSessionStore(storePath, { skipCache: true }))[0];
|
||||
@@ -1281,7 +1281,7 @@ describe("createTelegramBot", () => {
|
||||
expect(editMessageTextSpy).toHaveBeenCalledWith(
|
||||
1234,
|
||||
17,
|
||||
`${CHECK_MARK_EMOJI} Model changed to <b>openai/gpt-5.4</b>\n\nSession-only selection. The agent default in openclaw.json is unchanged; /reset or a new session may return to that default.`,
|
||||
`${CHECK_MARK_EMOJI} Model changed to <b>openai/gpt-5.4</b>\n\nSession-only model selection. Runtime unchanged. Use /model openai/gpt-5.4 --runtime <runtime> to switch harnesses. The agent default in openclaw.json is unchanged; /reset or a new session may return to that default.`,
|
||||
expect.objectContaining({ parse_mode: "HTML" }),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user