picoclaw/pkg/agent
shikihane 18b36af934 feat(agent): add resolveMediaRefs to convert media:// refs to base64 data URLs
Without this function, media:// refs stored by MediaStore are passed
directly to the LLM API, which rejects them as invalid URLs.

resolveMediaRefs() runs after BuildMessages() and before the LLM call,
converting each media:// ref to a data:image/...;base64,... URL that
vision-capable models can process.

Also adds mimeFromExtension() helper for MIME type inference from
file extensions when ContentType metadata is not available.
2026-03-02 18:08:32 +08:00
..
context.go feat(agent): wire Media through agent pipeline (cherry-pick PR #555) 2026-03-02 17:18:04 +08:00
context_cache_test.go refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
context_test.go fix: handle multi-tool-call orphan detection in sanitizeHistoryForProvider 2026-02-24 21:35:15 +08:00
instance.go fix(tools): allow /dev/null redirection and add read/write sandbox split (#967) 2026-03-02 12:22:02 +08:00
instance_test.go fix(agent): resolve fallback model aliases from model_list 2026-02-26 23:50:40 +08:00
loop.go feat(agent): add resolveMediaRefs to convert media:// refs to base64 data URLs 2026-03-02 18:08:32 +08:00
loop_test.go Merge pull request #861 from p3ddd/refactor/modernize 2026-03-01 15:38:59 +08:00
memory.go refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
mock_provider_test.go feat(fmt): Fix formatting 2026-02-19 22:05:15 +02:00
registry.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
registry_test.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00