mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 03:01:50 +03:00
fix (agents): accept read file_path alias in tool-start path checks
This commit is contained in:
@@ -75,7 +75,12 @@ export async function handleToolExecutionStart(
|
|||||||
|
|
||||||
if (toolName === "read") {
|
if (toolName === "read") {
|
||||||
const record = args && typeof args === "object" ? (args as Record<string, unknown>) : {};
|
const record = args && typeof args === "object" ? (args as Record<string, unknown>) : {};
|
||||||
const filePath = typeof record.path === "string" ? record.path.trim() : "";
|
const filePath =
|
||||||
|
typeof record.path === "string"
|
||||||
|
? record.path.trim()
|
||||||
|
: typeof record.file_path === "string"
|
||||||
|
? record.file_path.trim()
|
||||||
|
: "";
|
||||||
if (!filePath) {
|
if (!filePath) {
|
||||||
const argsPreview = typeof args === "string" ? args.slice(0, 200) : undefined;
|
const argsPreview = typeof args === "string" ? args.slice(0, 200) : undefined;
|
||||||
ctx.log.warn(
|
ctx.log.warn(
|
||||||
|
|||||||
Reference in New Issue
Block a user