mirror of
https://github.com/humanlayer/humanlayer.git
synced 2025-08-20 19:01:22 +03:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user