diff --git a/packages/tui/src/component/dialog-error-details.tsx b/packages/tui/src/component/dialog-error-details.tsx index 45531767d1..b0507bcdf6 100644 --- a/packages/tui/src/component/dialog-error-details.tsx +++ b/packages/tui/src/component/dialog-error-details.tsx @@ -51,11 +51,13 @@ export function DialogErrorDetails(props: { title: string; error: string; onBack Keymap.createLayer(() => ({ mode: "modal", - commands: [{ bind: "escape", title: "Back", group: "Dialog", run: props.onBack }], + commands: [ + { bind: "escape", title: "Back", group: "Dialog", run: props.onBack }, + { bind: "c", title: "Copy details", group: "Dialog", run: copy }, + ], })) useKeyboard((event) => { - if (event.name === "c") return copy() if (!scrollable()) return if (event.name === "up") return scroll?.scrollBy(-1) if (event.name === "down") return scroll?.scrollBy(1) @@ -72,7 +74,7 @@ export function DialogErrorDetails(props: { title: string; error: string; onBack {props.title} - esc back + esc ✗ Failed @@ -95,12 +97,17 @@ export function DialogErrorDetails(props: { title: string; error: string; onBack - {scrollable() ? "↑↓ scroll" : ""} + + + {scrollable() ? "↑/↓" : ""} + + {scrollable() ? " scroll" : ""} + - {copied() ? "✓ copied" : "copy details"} + {copied() ? "✓ copied" : "c"} - {copied() ? "" : " c"} + {copied() ? "" : " copy details"}