Skip to content

Commit 08481c0

Browse files
committed
refactor(non-interactive-env): remove regex-based TUI blocking
Keep only environment variable configuration and stdin redirection. 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent 192e8ad commit 08481c0

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

src/hooks/non-interactive-env/constants.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,3 @@ export const NON_INTERACTIVE_ENV: Record<string, string> = {
99
GCM_INTERACTIVE: "never",
1010
HOMEBREW_NO_AUTO_UPDATE: "1",
1111
}
12-
13-
export const TUI_PATTERNS = [
14-
/\b(?:vim?|nvim|nano|emacs|pico|joe|micro|helix|hx)\b/,
15-
/^\s*(?:python|python3|ipython|node|bun|deno|irb|pry|ghci|erl|iex|lua|R)\s*$/,
16-
/\btop\b(?!\s+\|)/,
17-
/\bhtop\b/,
18-
/\bbtop\b/,
19-
/\bless\b(?!\s+\|)/,
20-
/\bmore\b(?!\s+\|)/,
21-
/\bman\b/,
22-
/\bwatch\b/,
23-
/\bncurses\b/,
24-
/\bdialog\b/,
25-
/\bwhiptail\b/,
26-
/\bmc\b/,
27-
/\branger\b/,
28-
/\bnnn\b/,
29-
/\blf\b/,
30-
/\bvifm\b/,
31-
/\bgitui\b/,
32-
/\blazygit\b/,
33-
/\blazydocker\b/,
34-
/\bk9s\b/,
35-
/\bselect\b.*\bin\b/,
36-
]
37-
38-
export const TUI_SUGGESTION = `
39-
[non-interactive-env]
40-
This command requires a full interactive terminal (TUI) which cannot be emulated.
41-
42-
**Recommendation**: Use tmux for TUI commands.
43-
44-
Example with interactive-terminal skill:
45-
\`\`\`
46-
# Start a tmux session
47-
tmux new-session -d -s interactive
48-
49-
# Send your command
50-
tmux send-keys -t interactive 'your-command-here' Enter
51-
52-
# Capture output
53-
tmux capture-pane -t interactive -p
54-
\`\`\`
55-
56-
Or use the 'interactive-terminal' skill for easier workflow.
57-
`
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
export interface NonInteractiveEnvConfig {
22
disabled?: boolean
33
}
4-
5-
export interface TUICheckResult {
6-
isTUI: boolean
7-
reason?: string
8-
command?: string
9-
matchedPattern?: string
10-
}

0 commit comments

Comments
 (0)