Commit de7e021
fix: detect claude-terminal prompt with v2.1 placeholder hint (#766)
* fix: detect claude-terminal prompt with v2.1 placeholder hint
The tail-line regex required the prompt line to be exactly `❯` (or `❱` / `>`),
but Claude Code v2.1 renders the input row as `❯ Try "..."` so the regex never
matches and `waitForClaudeInputReady` times out after 60s.
Relax the pattern to `^[❯❱>](?:\s|$)` so any prompt char followed by whitespace
(or end-of-line) is accepted. The busy pattern still gates ready-detection, so
the placeholder hint cannot cause a false positive.
Refs #765
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: exclude numbered menu items from claude-terminal prompt detection
The previous regex `^[❯❱>](?:\s|$)` accepted lines like `❯ 1. Yes, I trust
this folder` as a ready prompt, which would cause `pasteText` to silently
forward the user's prompt body into a trust/permission dialog instead of
the real input box. The old `^[❯❱>]$` failed-loud with a 60s timeout in
this scenario; the v2.1 fix re-introduced it as a silent regression.
Tighten the pattern with a negative lookahead so any `<prompt> <digit>.`
sequence (numbered menus) is rejected, and add a regression test that
proves the trust dialog stays not-ready until claude transitions to a
real input row.
Refs #765
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 42ed7d6 commit de7e021
2 files changed
Lines changed: 81 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
201 | 281 | | |
202 | 282 | | |
203 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments