u
This commit is contained in:
@@ -236,7 +236,7 @@ function extractImageInputs(args = {}) {
|
||||
|
||||
/**
|
||||
* Fetches a database image by its content hash using store or authenticated local endpoint.
|
||||
* @param {string} hash 64-char SHA-256 hex
|
||||
* @param {string} hash 8-char SHA-256 Base62
|
||||
* @param {number} googleAuthId
|
||||
* @returns {Promise<Buffer>}
|
||||
*/
|
||||
@@ -323,7 +323,7 @@ export function createAnalyzeImageTool({ googleAuthId, model }) {
|
||||
// ── Load the bytes ────────────────────────────────────────────
|
||||
const items = [];
|
||||
for (const item of inputs) {
|
||||
// Only a path that actually carries a 64-char content hash is a database image.
|
||||
// Only a path that actually carries an 8-char content hash is a database image.
|
||||
// A bare "images/…" prefix is just the VFS folder, so it must NOT be treated as
|
||||
// a DB lookup or `images/candidates/x.avif` would be misread as a hash path.
|
||||
const hash = extractFullHash(item.path);
|
||||
@@ -355,7 +355,7 @@ export function createAnalyzeImageTool({ googleAuthId, model }) {
|
||||
throw new ToolError(
|
||||
`Image not found or empty: "${item.path}". ` +
|
||||
(hash
|
||||
? 'Database images must be addressed as "image/<fullHash>" with a 64-char hash.'
|
||||
? 'Database images must be addressed as "image/<fullHash>" with an 8-char hash.'
|
||||
: 'Store it first (search_images writes to "images/…") or check the path with find_files.')
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user