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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user