From 08481c046f336518335e84cd7b12a389f4dfad8f Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 15 Dec 2025 08:43:33 +0900 Subject: [PATCH] refactor(non-interactive-env): remove regex-based TUI blocking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keep only environment variable configuration and stdin redirection. 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- src/hooks/non-interactive-env/constants.ts | 46 ---------------------- src/hooks/non-interactive-env/types.ts | 7 ---- 2 files changed, 53 deletions(-) diff --git a/src/hooks/non-interactive-env/constants.ts b/src/hooks/non-interactive-env/constants.ts index a9065de..88a1fee 100644 --- a/src/hooks/non-interactive-env/constants.ts +++ b/src/hooks/non-interactive-env/constants.ts @@ -9,49 +9,3 @@ export const NON_INTERACTIVE_ENV: Record = { GCM_INTERACTIVE: "never", HOMEBREW_NO_AUTO_UPDATE: "1", } - -export const TUI_PATTERNS = [ - /\b(?:vim?|nvim|nano|emacs|pico|joe|micro|helix|hx)\b/, - /^\s*(?:python|python3|ipython|node|bun|deno|irb|pry|ghci|erl|iex|lua|R)\s*$/, - /\btop\b(?!\s+\|)/, - /\bhtop\b/, - /\bbtop\b/, - /\bless\b(?!\s+\|)/, - /\bmore\b(?!\s+\|)/, - /\bman\b/, - /\bwatch\b/, - /\bncurses\b/, - /\bdialog\b/, - /\bwhiptail\b/, - /\bmc\b/, - /\branger\b/, - /\bnnn\b/, - /\blf\b/, - /\bvifm\b/, - /\bgitui\b/, - /\blazygit\b/, - /\blazydocker\b/, - /\bk9s\b/, - /\bselect\b.*\bin\b/, -] - -export const TUI_SUGGESTION = ` -[non-interactive-env] -This command requires a full interactive terminal (TUI) which cannot be emulated. - -**Recommendation**: Use tmux for TUI commands. - -Example with interactive-terminal skill: -\`\`\` -# Start a tmux session -tmux new-session -d -s interactive - -# Send your command -tmux send-keys -t interactive 'your-command-here' Enter - -# Capture output -tmux capture-pane -t interactive -p -\`\`\` - -Or use the 'interactive-terminal' skill for easier workflow. -` diff --git a/src/hooks/non-interactive-env/types.ts b/src/hooks/non-interactive-env/types.ts index 7911c4c..3cc53fa 100644 --- a/src/hooks/non-interactive-env/types.ts +++ b/src/hooks/non-interactive-env/types.ts @@ -1,10 +1,3 @@ export interface NonInteractiveEnvConfig { disabled?: boolean } - -export interface TUICheckResult { - isTUI: boolean - reason?: string - command?: string - matchedPattern?: string -}