Skip to content

Commit 8a54af6

Browse files
committed
feat: display edit tool preview when asking for permission
1 parent a17400c commit 8a54af6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/opencode/ui/session_formatter.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ function M._format_tool(part)
546546
local metadata = (part.state and part.state.metadata) or {}
547547
local output = (part.state and part.state.output) or ''
548548

549+
if state.current_permission and state.current_permission.messageID == state.current_message.id then
550+
metadata = state.current_permission.metadata or metadata
551+
end
552+
549553
if tool == 'bash' then
550554
M._format_bash_tool(input --[[@as BashToolInput]], metadata --[[@as BashToolMetadata]])
551555
elseif tool == 'read' or tool == 'edit' or tool == 'write' then

0 commit comments

Comments
 (0)