Merge pull request #440 from samdickson22/sam/eng-1943-i-on-expanded-tool-modal-should-close-the-modal

feat: add 'i' key toggle to close expanded tool modal
This commit is contained in:
Dex
2025-08-14 14:26:56 -05:00
committed by GitHub

View File

@@ -84,6 +84,23 @@ export function ToolResultModal({
},
)
// Handle 'i' to close (toggle behavior)
useHotkeys(
'i',
ev => {
ev.preventDefault()
ev.stopPropagation()
if (toolResult || toolCall) {
onClose()
}
},
{
enabled: !!(toolResult || toolCall),
scopes: ToolResultModalHotkeysScope,
preventDefault: true,
},
)
const isOpen = !!(toolResult || toolCall)
useStealHotkeyScope(ToolResultModalHotkeysScope, isOpen)
@@ -167,7 +184,7 @@ export function ToolResultModal({
<kbd>j/k</kbd> or <kbd>/</kbd> to scroll
</span>
<span className="text-xs text-muted-foreground">
<kbd>ESC</kbd> to close
<kbd>i</kbd> or <kbd>ESC</kbd> to close
</span>
</div>
</DialogContent>