mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-05 09:58:45 +00:00
Use the compact editor, memory recall, and notification layouts for saved calls. Summarize default skill listings and configured vision analysis, and keep skill instructions and reference bodies in View details. Preserve recorded headings, Action fields, and full recorded results and arguments. Verify both saved and current card formats with WebUI regression coverage.
14 lines
635 B
JavaScript
14 lines
635 B
JavaScript
import { drawMessageToolSimple } from "/js/messages.js";
|
|
|
|
export default async function registerVisionHandler(extData) {
|
|
if (extData?.type === "vision_load" || extData?.tool_name === "vision_load") {
|
|
extData.handler = (log) => {
|
|
const displayKvps = { ...log.kvps };
|
|
const summary = String(log.content ?? "").split("\n", 1)[0];
|
|
if (/^Loaded images \(\d+\):/.test(summary)) delete displayKvps.paths;
|
|
const content = /^Analyzed \d+ image\(s\); \d+ skipped\.\r?$/.test(summary) ? summary.trimEnd() : log.content;
|
|
return drawMessageToolSimple({ ...log, code: "EYE", displayKvps }, content);
|
|
};
|
|
}
|
|
}
|