From 4c73ae213b8088f5cc4869b38385d00dccfcd4a6 Mon Sep 17 00:00:00 2001 From: dj-oyu <68707227+dj-oyu@users.noreply.github.com> Date: Thu, 19 Mar 2026 22:42:25 +0900 Subject: [PATCH] feat: log image descriptions at INFO level for debugging Show the generated (or cached) image description in logs so users can verify what the vision model produced and diagnose issues. Co-Authored-By: Claude Opus 4.6 (1M context) --- pkg/agent/loop_media.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/agent/loop_media.go b/pkg/agent/loop_media.go index 3086b44cb..792919e42 100644 --- a/pkg/agent/loop_media.go +++ b/pkg/agent/loop_media.go @@ -262,7 +262,10 @@ func (al *AgentLoop) describeImage( hash := mediacache.HashData([]byte(dataURL)) if al.mediaCache != nil { if cached, ok := al.mediaCache.Get(hash, mediacache.TypeImageDesc); ok { - logger.DebugCF("agent", "Image description cache hit", map[string]any{"hash": hash}) + logger.InfoCF("agent", "Image description (cached)", map[string]any{ + "hash": hash, + "description": cached, + }) return cached } } @@ -317,6 +320,11 @@ func (al *AgentLoop) describeImage( desc := strings.TrimSpace(resp.Content) + logger.InfoCF("agent", "Image described", map[string]any{ + "hash": hash, + "description": desc, + }) + // Store in cache if al.mediaCache != nil { if cErr := al.mediaCache.Put(hash, mediacache.TypeImageDesc, desc); cErr != nil {