Commit 0fae11c
Fix Bot
fix: preserve * _ ` inside quoted strings in _normalizeCommandText
The previous normalization stripped markdown chars (* _ `) from the entire
AI response text, including the content inside Termux("...") arguments.
This corrupted shell commands that use:
- * for glob patterns (e.g. ls /data/*.apk)
- _ in paths/variables (e.g. airodump-ng, $_VAR)
- ` for subshell (e.g. echo `cmd`)
Fix: tokenize the text into quoted / unquoted segments and only strip
markdown chars from unquoted segments. Quoted segments (both single and
double quoted, with backslash-escape awareness) are preserved verbatim.
Fixes broken command detection for complex Termux commands like:
Termux("su -c 'iw dev && grep -E \"type|channel\"'")1 parent 4b1e0dc commit 0fae11c
1 file changed
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3609 | 3609 | | |
3610 | 3610 | | |
3611 | 3611 | | |
3612 | | - | |
3613 | | - | |
3614 | | - | |
3615 | | - | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
3616 | 3643 | | |
3617 | 3644 | | |
3618 | 3645 | | |
| |||
0 commit comments