openclaw/src/agents
cristip73 c4e76eb635 fix: enable image attachments in chat messages for Claude API
Images were previously converted to markdown data URLs which Claude API
treats as plain text, not as actual images.

Changes:
- Add parseMessageWithAttachments() that returns {message, images[]}
- Pass images through the stack to session.prompt() as content blocks
- Filter null/empty attachments before parsing
- Strip data URL prefix if client sends it

This enables iOS and other clients to send images that Claude can actually see.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 20:00:25 +01:00
..
pi-extensions fix: align tool rename fallout 2026-01-09 05:54:34 +01:00
schema fix(agents): harden Cloud Code Assist compatibility 2026-01-10 18:06:35 +01:00
tools fix(tools): harden schemas and oauth tool names 2026-01-10 03:05:56 +00:00
agent-paths.test.ts fix(agents): default agent dir to multi-agent path 2026-01-06 21:54:42 +00:00
agent-paths.ts fix(agents): default agent dir to multi-agent path 2026-01-06 21:54:42 +00:00
agent-scope.test.ts feat: add per-agent elevated controls 2026-01-09 20:42:19 +00:00
agent-scope.ts feat(agent): add human-like delay between block replies 2026-01-10 17:12:50 +01:00
auth-health.test.ts feat(models): add oauth auth health 2026-01-09 00:34:38 +00:00
auth-health.ts feat: support token auth profiles 2026-01-09 08:13:04 +01:00
auth-profiles.test.ts fix: prevent claude-cli oauth downgrade (#654) (thanks @radek-paclt) 2026-01-10 15:50:25 +01:00
auth-profiles.ts fix: throttle cli credential sync 2026-01-10 17:44:03 +01:00
bash-process-registry.test.ts refactor: remove bash pty mode 2026-01-03 20:15:10 +00:00
bash-process-registry.ts fix: scope process sessions per agent 2026-01-07 23:35:04 +01:00
bash-tools.test.ts fix(ui): landing cleanup (#475) (thanks @rahthakor) 2026-01-09 19:53:32 +01:00
bash-tools.ts fix(agents): stabilize cli creds cache + bash cwd 2026-01-10 18:02:21 +01:00
claude-cli-runner.test.ts test: stabilize claude cli serialization test 2026-01-09 05:27:50 +00:00
claude-cli-runner.ts refactor: centralize session agent resolution 2026-01-10 01:57:54 +01:00
clawdbot-gateway-tool.test.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
clawdbot-tools.agents.test.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
clawdbot-tools.camera.test.ts fix(nodes-tool): add run invoke timeout (PR #433, thanks @sircrumpet) 2026-01-08 00:18:06 +00:00
clawdbot-tools.session-status.test.ts chore: normalize Clawdbot naming 2026-01-10 05:14:09 +01:00
clawdbot-tools.sessions.test.ts fix: clarify sessions_send delivery semantics 2026-01-10 00:34:24 +01:00
clawdbot-tools.subagents.test.ts test(gateway): cover internal provider defaults 2026-01-09 22:40:37 +01:00
clawdbot-tools.ts fix(gateway): avoid whatsapp fallback for internal runs 2026-01-09 22:33:05 +01:00
cli-credentials.test.ts fix(agents): stabilize cli creds cache + bash cwd 2026-01-10 18:02:21 +01:00
cli-credentials.ts fix(agents): stabilize cli creds cache + bash cwd 2026-01-10 18:02:21 +01:00
context-window-guard.test.ts fix: guard small context windows 2026-01-10 01:08:56 +01:00
context-window-guard.ts fix: guard small context windows 2026-01-10 01:08:56 +01:00
context.ts chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
defaults.ts feat(agent): enforce provider/model and identity defaults 2025-12-14 04:22:38 +00:00
failover-error.test.ts refactor: centralize failover error parsing 2026-01-10 01:26:06 +01:00
failover-error.ts refactor: centralize failover error parsing 2026-01-10 01:26:06 +01:00
identity.test.ts feat(agent): add human-like delay between block replies 2026-01-10 17:12:50 +01:00
identity.ts feat(agent): add human-like delay between block replies 2026-01-10 17:12:50 +01:00
lanes.ts fix(gateway): harden agent provider routing 2026-01-09 23:00:36 +01:00
minimax.live.test.ts feat: Add MiniMax Anthropic-compatible API support (minimax-api) 2026-01-09 18:13:18 +01:00
model-auth.test.ts fix: normalize z.ai provider ids in auth profiles 2026-01-07 05:31:01 +01:00
model-auth.ts feat(onboard): add OpenCode Zen as model provider 2026-01-10 01:09:34 +01:00
model-catalog.ts chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
model-fallback.test.ts refactor(agents): centralize failover handling 2026-01-09 21:31:18 +01:00
model-fallback.ts refactor(agents): centralize failover normalization 2026-01-09 22:15:06 +01:00
model-scan.test.ts feat: add model scan progress callbacks 2026-01-08 05:20:39 +01:00
model-scan.ts style: apply lint fixes 2026-01-08 04:44:15 +00:00
model-selection.test.ts refactor: centralize model override validation 2026-01-09 20:14:42 +01:00
model-selection.ts refactor: centralize model override validation 2026-01-09 20:14:42 +01:00
models-config.test.ts refactor(test): consolidate temp home + vitest setup 2026-01-09 16:41:05 +01:00
models-config.ts feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00
models.profiles.live.test.ts fix(openai): avoid invalid reasoning replay 2026-01-10 00:45:10 +00:00
openai-responses.reasoning-replay.test.ts fix(openai): avoid invalid reasoning replay 2026-01-10 00:45:10 +00:00
opencode-zen-models.test.ts fix(opencode-zen): keep legacy aliases + rationale (#669) (thanks @magimetal) 2026-01-10 18:25:43 +01:00
opencode-zen-models.ts fix(opencode-zen): keep legacy aliases + rationale (#669) (thanks @magimetal) 2026-01-10 18:25:43 +01:00
pi-embedded-block-chunker.test.ts refactor: cron payload migration cleanup (#621) 2026-01-09 22:56:55 +00:00
pi-embedded-block-chunker.ts fix: enable block streaming for Telegram when streamMode is 'block' 2026-01-10 01:11:41 +01:00
pi-embedded-helpers.test.ts test: adjust tool id sanitization 2026-01-10 18:15:15 +00:00
pi-embedded-helpers.ts style: format helper 2026-01-10 18:15:15 +00:00
pi-embedded-messaging.ts refactor: centralize messaging dedupe helpers 2026-01-10 16:02:56 +01:00
pi-embedded-runner-extraparams.test.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
pi-embedded-runner.test.ts fix: restore minimax tool calling 2026-01-10 18:15:15 +00:00
pi-embedded-runner.ts fix: enable image attachments in chat messages for Claude API 2026-01-10 20:00:25 +01:00
pi-embedded-subscribe.test.ts fix(agents): suppress partial replies with reasoning 2026-01-10 16:03:17 +01:00
pi-embedded-subscribe.ts fix: restore minimax tool calling 2026-01-10 18:15:15 +00:00
pi-embedded-utils.ts refactor: centralize reasoning tag handling 2026-01-10 00:53:48 +01:00
pi-embedded.ts feat: gate slash commands and add compact 2026-01-06 02:23:55 +01:00
pi-tool-definition-adapter.test.ts fix(tools): keep tool errors concise 2026-01-07 19:08:13 +00:00
pi-tool-definition-adapter.ts fix(tools): keep tool errors concise 2026-01-07 19:08:13 +00:00
pi-tools-agent-config.test.ts fix: restore Anthropic OAuth tool dispatch 2026-01-10 04:01:00 +01:00
pi-tools.test.ts fix: harden cloud code assist tool schema sanitizing (#665) (thanks @sebslight) 2026-01-10 18:07:26 +01:00
pi-tools.ts fix(tools): resolve Read/Write/Edit paths against workspace directory 2026-01-10 17:08:56 +01:00
pi-tools.workspace-paths.test.ts fix(agents): stabilize cli creds cache + bash cwd 2026-01-10 18:02:21 +01:00
sandbox-agent-config.test.ts feat: allow session_status in sandbox 2026-01-09 23:41:57 +00:00
sandbox-create-args.test.ts feat: add sandbox scope default 2026-01-07 02:52:41 +01:00
sandbox-merge.test.ts test: stabilize sandbox/doctor tests 2026-01-09 15:17:20 +01:00
sandbox-paths.ts feat: add per-session agent sandbox 2026-01-03 21:41:58 +01:00
sandbox.ts feat: auto-start sandbox browser 2026-01-10 02:06:21 +00:00
shell-utils.ts fix: clean agent bash lint 2025-12-25 03:29:36 +01:00
skills-install.ts style: format lint offenders 2026-01-07 00:04:44 +01:00
skills-status.ts style: tidy cli formatting 2026-01-08 08:26:40 +01:00
skills.test.ts refactor: centralize skills prompt resolution 2026-01-09 21:27:20 +01:00
skills.ts refactor: centralize skills prompt resolution 2026-01-09 21:27:20 +01:00
subagent-announce.ts fix: limit subagent bootstrap context 2026-01-10 00:01:16 +00:00
subagent-registry.ts fix: sessions label lookup and persistence (#570) (thanks @azade-c) 2026-01-09 15:32:49 +01:00
system-prompt.test.ts fix: restore Anthropic OAuth tool dispatch 2026-01-10 04:01:00 +01:00
system-prompt.ts fix: restore Anthropic OAuth tool dispatch 2026-01-10 04:01:00 +01:00
timeout.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
tool-display.json feat(agents): add session_status tool 2026-01-09 21:09:42 +01:00
tool-display.ts fix(build): import tool-display.json instead of fs.readFileSync (#312) 2026-01-06 10:55:02 -06:00
tool-images.test.ts fix: resolve camera tool handling 2026-01-02 17:44:25 +00:00
tool-images.ts chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
usage.test.ts fix: restore Anthropic token accounting 2026-01-06 18:52:01 +00:00
usage.ts style(agents): format usage helper 2026-01-06 19:54:50 +01:00
workspace.test.ts fix: limit subagent bootstrap context 2026-01-10 00:01:16 +00:00
workspace.ts fix: limit subagent bootstrap context 2026-01-10 00:01:16 +00:00
zai.live.test.ts chore: apply biome formatting 2026-01-01 17:30:15 +01:00