feat: expose local file paths for non-image media to enable agent file tools (#1516)

* feat: expose local file paths for non-image media to enable agent file tools

* fix: Golang Lint error
This commit is contained in:
dataCenter430 authored and GitHub committed 2026-03-14 12:09:11 +08:00
1 parent 555af137b4
commit 0c5d7500e8
3 files changed
+256 -53

No files matched your search

+1 -1
View File
@@ -881,7 +881,7 @@ func (al *AgentLoop) runAgentLoop(
opts.ChatID,
)
// Resolve media:// refs to base64 data URLs (streaming)
// Resolve media:// refs: images→base64 data URLs, non-images→local paths in content
cfg := al.GetConfig()
maxMediaSize := cfg.Agents.Defaults.GetMaxMediaSize()
messages = resolveMediaRefs(messages, al.mediaStore, maxMediaSize)