fix(terminal): route quicktools inserts to active terminal(if opened)#2015
Conversation
|
Nice, I was also checking about it. GGs. |
Greptile SummaryThis PR routes quicktools text insertions (button presses and keyboard input) to the active terminal when a terminal tab is open, instead of always targeting the code editor. It adds Key changes:
Confidence Score: 4/5Mostly safe to merge; one minor return-value regression in the editor insert path should be addressed. The core terminal routing logic is sound and well-guarded. The only new finding is a P2 return-value change in the editor insert path (undefined instead of true), which does not affect current callers but breaks the existing return contract. Prior P1 findings from the previous review thread remain open (local PTY write vs display buffer, shift-key transformation in the insert action path). With those open threads, 4/5 is appropriate. src/handlers/quickTools.js — insertText return value for editor path (line 754), and the previously flagged local terminal paste path. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["actions('insert', value) / input event"] --> B["insertText(text)"]
B --> C{Active terminal tab?}
C -- Yes --> D{terminal.paste available?}
D -- Yes --> E["terminal.paste(text) ✅ PTY input"]
D -- No --> F{serverMode && isConnected?}
F -- Yes --> G["terminalComponent.write(text) WebSocket"]
F -- No --> H["return false ❌ (local mode, no insert)"]
C -- No --> I{editor available?}
I -- Yes --> J["editor.insert(text)"]
I -- No --> K["return false"]
Reviews (2): Last reviewed commit: "fix" | Re-trigger Greptile |
No description provided.