block remote URLs in look-at file_path validation
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user