From bb4bda42c42c5f7576da2f5416c2e48bbb0efb43 Mon Sep 17 00:00:00 2001 From: jnjpng Date: Tue, 27 Jan 2026 16:17:33 -0800 Subject: [PATCH] fix: enable paste support in hooks TUI inputs (#711) Co-authored-by: Letta --- src/cli/components/HooksManager.tsx | 48 +++++++++++++++++------------ 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/cli/components/HooksManager.tsx b/src/cli/components/HooksManager.tsx index 8f14510..d8d685c 100644 --- a/src/cli/components/HooksManager.tsx +++ b/src/cli/components/HooksManager.tsx @@ -2,7 +2,6 @@ // Interactive TUI for managing hooks configuration import { Box, Text, useInput } from "ink"; -import TextInput from "ink-text-input"; import { memo, useCallback, useEffect, useState } from "react"; import { type HookEvent, @@ -26,6 +25,7 @@ import { } from "../../hooks/writer"; import { useTerminalWidth } from "../hooks/useTerminalWidth"; import { colors } from "./colors"; +import { PasteAwareTextInput } from "./PasteAwareTextInput"; // Box drawing characters const BOX_TOP_LEFT = "╭"; @@ -512,16 +512,21 @@ export const HooksManager = memo(function HooksManager({ Tool matcher: - {boxTop(boxWidth - 2)} - - {BOX_VERTICAL} - + + + + - {boxBottom(boxWidth - 2)} Example Matchers: @@ -550,16 +555,21 @@ export const HooksManager = memo(function HooksManager({ {isCurrentToolEvent && } Command: - {boxTop(boxWidth - 2)} - - {BOX_VERTICAL} - + + + + - {boxBottom(boxWidth - 2)} Enter to continue · esc to go back