opencode
opencode copied to clipboard
Dedupe file ref tags in TUI display
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
opencode session | github run