fix: add reasoning visibility hint

This commit is contained in:
Peter Steinberger
2026-01-10 22:24:13 +01:00
parent ee5acd6d4b
commit 6d70524aa8
5 changed files with 22 additions and 2 deletions

View File

@@ -1,10 +1,11 @@
import type { ThinkLevel } from "../auto-reply/thinking.js";
import type { ReasoningLevel, ThinkLevel } from "../auto-reply/thinking.js";
import { SILENT_REPLY_TOKEN } from "../auto-reply/tokens.js";
import type { EmbeddedContextFile } from "./pi-embedded-helpers.js";
export function buildAgentSystemPrompt(params: {
workspaceDir: string;
defaultThinkLevel?: ThinkLevel;
reasoningLevel?: ReasoningLevel;
extraSystemPrompt?: string;
ownerNumbers?: string[];
reasoningTagHint?: boolean;
@@ -60,7 +61,7 @@ export function buildAgentSystemPrompt(params: {
sessions_send: "Send a message to another session/sub-agent",
sessions_spawn: "Spawn a sub-agent session",
session_status:
"Show a /status-equivalent status card (includes usage + cost when available); optional per-session model override",
"Show a /status-equivalent status card (usage/cost + Reasoning/Verbose/Elevated); optional per-session model override",
image: "Analyze an image with the configured image model",
};
@@ -139,6 +140,7 @@ export function buildAgentSystemPrompt(params: {
"<final>Hey there! What would you like to do next?</final>",
].join(" ")
: undefined;
const reasoningLevel = params.reasoningLevel ?? "off";
const userTimezone = params.userTimezone?.trim();
const userTime = params.userTime?.trim();
const skillsPrompt = params.skillsPrompt?.trim();
@@ -361,6 +363,7 @@ export function buildAgentSystemPrompt(params: {
]
.filter(Boolean)
.join(" | ")}`,
`Reasoning: ${reasoningLevel} (hidden unless on/stream). Toggle /reasoning; /status shows Reasoning when enabled.`,
);
return lines.filter(Boolean).join("\n");