mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 07:18:35 +00:00
fix: read thinking/verbose/reasoning levels from session entry in status
buildStatusMessage resolved thinkLevel, verboseLevel, and reasoningLevel without falling back to sessionEntry, unlike elevatedLevel which already had this fallback. When session_status tool calls buildStatusMessage without passing resolvedThink/resolvedVerbose/resolvedReasoning, the levels always fell back to agent defaults or "off", ignoring the runtime-set session values. Add sessionEntry fallback for thinkingLevel, verboseLevel, and reasoningLevel, consistent with how elevatedLevel already works. Closes #30126 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,28 @@ describe("buildStatusMessage", () => {
|
||||
expect(normalized).toContain("Queue: collect");
|
||||
});
|
||||
|
||||
it("falls back to sessionEntry levels when resolved levels are not passed", () => {
|
||||
const text = buildStatusMessage({
|
||||
agent: {
|
||||
model: "anthropic/pi:opus",
|
||||
},
|
||||
sessionEntry: {
|
||||
sessionId: "abc",
|
||||
updatedAt: 0,
|
||||
thinkingLevel: "high",
|
||||
verboseLevel: "full",
|
||||
reasoningLevel: "on",
|
||||
},
|
||||
sessionKey: "agent:main:main",
|
||||
queue: { mode: "collect", depth: 0 },
|
||||
});
|
||||
const normalized = normalizeTestText(text);
|
||||
|
||||
expect(normalized).toContain("Think: high");
|
||||
expect(normalized).toContain("verbose:full");
|
||||
expect(normalized).toContain("Reasoning: on");
|
||||
});
|
||||
|
||||
it("notes channel model overrides in status output", () => {
|
||||
const text = buildStatusMessage({
|
||||
config: {
|
||||
|
||||
Reference in New Issue
Block a user