Agent Zero AI framework
image response prompt, image view scroll
frdel3adec910c080
diff --git a/agents/agent0/prompts/agent.system.tool.response.md b/agents/agent0/prompts/agent.system.tool.response.mdindex b3618198e..cfe97f2ec 100644--- a/agents/agent0/prompts/agent.system.tool.response.md+++ b/agents/agent0/prompts/agent.system.tool.response.md@@ -8,10 +8,11 @@ use emojis as icons improve readabilityprefer using tablesfocus nice structured output key selling pointoutput full file paths not only names to be clickable-images shown with +images shown with  show images when possible when relevant also output full pathall math and variables wrap with latex notation delimiters <latex>x = ...</latex>, use only single line latex do formatting in markdown insteadspeech: text and lists are spoken, tables and code blocks not, therefore use tables for files and technicals, use text and lists for plain english, do not include technical details in lists+usage:~~~json{diff --git a/webui/components/modals/image-viewer/image-viewer-store.js b/webui/components/modals/image-viewer/image-viewer-store.jsindex 7c3f10b77..c494c28b9 100644--- a/webui/components/modals/image-viewer/image-viewer-store.js+++ b/webui/components/modals/image-viewer/image-viewer-store.js@@ -209,6 +209,40 @@ const model = {this.updateImageTransform();},+ onWheel(event) {+ // Trackpad scrolling on macOS reports both deltaX and deltaY.+ // Prevent the modal/page from scrolling and instead pan the image.+ if (!event) return;++ // Avoid fighting with an active drag.+ if (this.isDragging) {+ event.preventDefault();+ return;+ }++ // If image isn't ready, ignore.+ if (!this.currentImageUrl || !this.naturalWidth || !this.naturalHeight) return;++ event.preventDefault();++ // deltaMode: 0=pixels, 1=lines, 2=pages+ // Convert non-pixel deltas to an approximate pixel value.+ let dx = event.deltaX || 0;+ let dy = event.deltaY || 0;+ if (event.deltaMode === 1) {+ dx *= 16;+ dy *= 16;+ } else if (event.deltaMode === 2) {+ dx *= 800;+ dy *= 800;+ }++ // Pan in the direction of scrolling.+ this.panX -= dx;+ this.panY -= dy;+ this.updateImageTransform();+ },+endDrag() {if (!this.isDragging) return;this.isDragging = false;diff --git a/webui/components/modals/image-viewer/image-viewer.html b/webui/components/modals/image-viewer/image-viewer.htmlindex 228e4b6ed..9fd5e02e4 100644--- a/webui/components/modals/image-viewer/image-viewer.html+++ b/webui/components/modals/image-viewer/image-viewer.html@@ -16,6 +16,7 @@<div class="image-canvas"@pointerdown="$store.imageViewer.startDrag($event)"@pointermove="$store.imageViewer.onDrag($event)"+ @wheel="$store.imageViewer.onWheel($event)"@pointerup="$store.imageViewer.endDrag()"@pointercancel="$store.imageViewer.endDrag()"><img