fix(coding-agent): expand paste markers in Ctrl+Q follow-ups

InputController.handleFollowUp read raw editor text via getText(),
bypassing the paste-store expansion the Enter path applies through
Editor.getExpandedText(). A large paste collapsed into a [Paste #N, +X
lines] marker was therefore sent verbatim to the model when queued with
Ctrl+Q / Ctrl+Enter, silently dropping the pasted content.

Switch the follow-up path to getExpandedText() so queued submissions
match the Enter path. Image markers are untouched; pendingImages
forwarding is unchanged.

Updated existing input-controller stubs (skill-queue, followup-image,
keybindings) to implement getExpandedText, matching the production
CustomEditor surface.

Fixes #3737
This commit is contained in:
roboomp
2026-06-28 16:42:39 +00:00
parent 2622ab13fe
commit 404a43e02b
6 changed files with 133 additions and 1 deletions
@@ -26,6 +26,7 @@ type FakeEditor = {
onSubmit?: (text: string) => Promise<void>;
setText(text: string): void;
getText(): string;
getExpandedText(): string;
addToHistory(text: string): void;
setActionKeys(action: string, keys: string[]): void;
setCustomKeyHandler(key: string, handler: () => void): void;
@@ -105,6 +106,9 @@ async function createContext() {
getText() {
return editorText;
},
getExpandedText() {
return editorText;
},
addToHistory: vi.fn(),
pasteText(text: string) {
editorText += text;