Commit c0b7aee
authored
refactor(tui): prompt deep-module PR 3 — canonical completion + async workspace index (#220)
* refactor(tui): unify prompt completion context
* feat(tui): index workspace mentions asynchronously
* ci(typos): allow @Caf completion-prefix test token
* fix(tui): address review findings on prompt completion
- Escape now dismisses the slash-argument menu (cancel_completion fallback)
instead of doing nothing when there is no draft command to strip.
- Strip trailing prose punctuation from unquoted @-mention highlight spans.
- Rank scoped @dir/name completions by the fragment's basename so prefix
priority applies to path-scoped fragments.
- Drain git stdout/stderr concurrently to avoid a pipe deadlock on verbose
output.
- Guard the mid-session HostPath.cwd() lookup so a removed working directory
no longer crashes the prompt turn.
- Collapse a dead SLASH_ARGUMENT branch in the completion parser.
- De-duplicate the PromptLifecycle test double, make the degraded-state test
helper multi-key-safe, and re-frame the backslash-whitespace parser test to
document the real (non-escape-aware) contract.
* fix(tui): cancel sibling stream reader when a git reader fails
The concurrent stdout/stderr drain in _run_git used asyncio.gather, which
leaves the sibling _read_bounded coroutine running after the first reader
raises — only the process was killed, so the other reader could keep draining
a closing pipe. Move the concurrent read into _read_streams, which uses
explicit tasks and cancels+awaits both readers on any failure (or cancellation)
before propagating. Adds a regression test for a reader-exception path.1 parent 30f7b17 commit c0b7aee
12 files changed
Lines changed: 1891 additions & 708 deletions
File tree
- src/pythinker_code/ui/shell
- prompting/completion
- tests/ui_and_conv
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
0 commit comments