Fix: Preserve Per-Agent Exec Override After Session Compaction (#15833)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9dfe5bdf23
Co-authored-by: napetrov <18015221+napetrov@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
This commit is contained in:
Nikolay Petrov
2026-02-13 17:34:04 -08:00
committed by GitHub
parent 0b52a520d6
commit 3b5a9c14dd
5 changed files with 76 additions and 26 deletions

View File

@@ -1,7 +1,5 @@
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
import type { ReasoningLevel, ThinkLevel } from "../../auto-reply/thinking.js";
import type { OpenClawConfig } from "../../config/config.js";
import type { ExecToolDefaults } from "../bash-tools.js";
export function mapThinkingLevel(level?: ThinkLevel): ThinkingLevel {
// pi-agent-core supports "xhigh"; OpenClaw enables it for specific models.
@@ -11,14 +9,6 @@ export function mapThinkingLevel(level?: ThinkLevel): ThinkingLevel {
return level;
}
export function resolveExecToolDefaults(config?: OpenClawConfig): ExecToolDefaults | undefined {
const tools = config?.tools;
if (!tools?.exec) {
return undefined;
}
return tools.exec;
}
export function describeUnknownError(error: unknown): string {
if (error instanceof Error) {
return error.message;