Skip to content

fix(tui): include attachment path in model context - #41455

Open
cakeni wants to merge 1 commit into
anomalyco:devfrom
cakeni:codex-image-path
Open

fix(tui): include attachment path in model context#41455
cakeni wants to merge 1 commit into
anomalyco:devfrom
cakeni:codex-image-path

Conversation

@cakeni

@cakeni cakeni commented Aug 9, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #41454

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Preserves a local attachment's source.path as a text part immediately before the binary image in model context. Providers that discard image filenames can therefore still expose the user-selected path to the agent. A focused regression test covers the V2 message conversion. Prepared with AI assistance and validated locally.

How did you verify your code works?

  • bun test test/session/message-v2.test.ts --timeout 30000 — 40 pass
  • bun test test/session/llm.test.ts --timeout 30000 — 28 pass
  • bun typecheck
  • bun run prettier --ignore-unknown --check packages/opencode/src/session/message-v2.ts packages/opencode/test/session/message-v2.test.ts
  • bun run oxlint packages/opencode/src/session/message-v2.ts packages/opencode/test/session/message-v2.test.ts — 0 errors; pre-existing warnings only
  • git diff --check

The full dependency install reached the unrelated tree-sitter-powershell postinstall, which requires a Visual Studio C++ workload unavailable in this environment; the targeted tests and package typecheck above completed successfully.

Screenshots / recordings

Not applicable; this changes model context only and has no visual UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tui: attached image path is omitted from model context

1 participant