mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 07:17:40 +00:00
fix(image): accept @-prefixed file paths
This commit is contained in:
@@ -440,8 +440,11 @@ export function createImageTool(options?: {
|
||||
args && typeof args === "object"
|
||||
? (args as Record<string, unknown>)
|
||||
: {};
|
||||
const imageRaw =
|
||||
const imageRawInput =
|
||||
typeof record.image === "string" ? record.image.trim() : "";
|
||||
const imageRaw = imageRawInput.startsWith("@")
|
||||
? imageRawInput.slice(1).trim()
|
||||
: imageRawInput;
|
||||
if (!imageRaw) throw new Error("image required");
|
||||
const promptRaw =
|
||||
typeof record.prompt === "string" && record.prompt.trim()
|
||||
|
||||
Reference in New Issue
Block a user