Skip to content

Commit 25c099d

Browse files
Danilo Verde RibeiroDanilo Verde Ribeiro
authored andcommitted
Merge remote-tracking branch 'origin/main'
2 parents 7874524 + 23f384e commit 25c099d

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,6 @@ require('opencode').setup({
513513

514514
**Note:** Enhanced context types are disabled by default to minimize token usage and API costs. Enable only the context types that are relevant to your workflow.
515515

516-
<a id="file-mentions"></a>
517-
518516
### Adding more files to context through file mentions
519517

520518
You can reference files in your project directly in your conversations with Opencode. This is useful when you want to ask about or provide context about specific files. Type `@` in the input window to trigger the file picker.

lua/opencode/ui/session_formatter.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,14 @@ function M._format_message_header(message, msg_idx)
316316
if mode and mode ~= '' then
317317
display_name = mode:upper()
318318
else
319-
display_name = 'ASSISTANT'
319+
-- For the most recent assistant message, show current_mode if mode is missing
320+
-- This handles new messages that haven't been stamped yet
321+
local is_last_message = msg_idx == #state.messages
322+
if is_last_message and state.current_mode and state.current_mode ~= '' then
323+
display_name = state.current_mode:upper()
324+
else
325+
display_name = 'ASSISTANT'
326+
end
320327
end
321328
else
322329
display_name = role:upper()

0 commit comments

Comments
 (0)