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:
@@ -27,6 +27,7 @@ import { TempDir } from "@oh-my-pi/pi-utils";
|
||||
type StubEditor = {
|
||||
setText: (text: string) => void;
|
||||
getText: () => string;
|
||||
getExpandedText: () => string;
|
||||
clearDraft: (historyText?: string) => void;
|
||||
addToHistory: Mock<(...args: unknown[]) => unknown>;
|
||||
onSubmit?: (text: string) => Promise<void>;
|
||||
@@ -67,6 +68,9 @@ function createStubInputControllerContext(opts: {
|
||||
getText() {
|
||||
return editorText;
|
||||
},
|
||||
getExpandedText() {
|
||||
return editorText;
|
||||
},
|
||||
clearDraft(historyText?: string) {
|
||||
if (historyText !== undefined) this.addToHistory(historyText);
|
||||
this.setText("");
|
||||
|
||||
Reference in New Issue
Block a user