opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Dedupe file ref tags in TUI display

Open opencode-agent[bot] opened this issue 23 hours ago • 0 comments

The fix deduplicates file reference tags by tracking which files have already been seen using a Set. It uses the filename (or url for data URIs) as the unique key. When a duplicate is found, it returns an empty array instead of the file, effectively filtering it out.

The change is at packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1097. Now when users mention the same file multiple times in a prompt, only one tag badge will be displayed in the chat UI.

Closes #8298

New%20session%20-%202026-01-13T23%3A47%3A10.390Z opencode session  |  github run

opencode-agent[bot] avatar Jan 13 '26 23:01 opencode-agent[bot]