block remote URLs in look-at file_path validation

This commit is contained in:
Jeon Suyeol
2026-02-11 18:50:51 +09:00
parent 2df61a2199
commit 3eb7dc73b7
2 changed files with 30 additions and 0 deletions
+3
View File
@@ -16,6 +16,9 @@ export function validateArgs(args: LookAtArgs): string | null {
const hasFilePath = Boolean(args.file_path && args.file_path.length > 0)
const hasImageData = Boolean(args.image_data && args.image_data.length > 0)
if (hasFilePath && /^https?:\/\//i.test(args.file_path!)) {
return "Error: Remote URLs are not supported for file_path. Download the file first or use a local path."
}
if (!hasFilePath && !hasImageData) {
return `Error: Must provide either 'file_path' or 'image_data'. Usage:
- look_at(file_path="/path/to/file", goal="what to extract")