@juicesharp/rpiv-ask-user-question 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-ask-user-question",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "Pi extension. A structured questionnaire the model can put to you when it would otherwise guess, with typed options instead of free-form replies.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -93,7 +93,7 @@
93
93
  }
94
94
  },
95
95
  "dependencies": {
96
- "@juicesharp/rpiv-config": "^2.5.0",
96
+ "@juicesharp/rpiv-config": "^2.5.1",
97
97
  "typebox": "^1.1.24"
98
98
  }
99
99
  }
@@ -139,7 +139,9 @@ export class QuestionnaireSession {
139
139
  }
140
140
 
141
141
  private mirrorNotesDraft(s: QuestionnaireState): QuestionnaireState {
142
- const draft = this.notesInput.getText();
142
+ // Drafts restore through Editor.setText, which clears the backing paste map —
143
+ // read expanded so stored drafts never orphan a paste marker.
144
+ const draft = this.notesInput.getExpandedText?.() ?? this.notesInput.getText();
143
145
  return s.notesDraft === draft ? s : { ...s, notesDraft: draft };
144
146
  }
145
147
 
@@ -202,7 +204,7 @@ export class QuestionnaireSession {
202
204
  const lastLine = this.inlineInput.getLines().length - 1;
203
205
  return {
204
206
  keybindings: this.keybindings,
205
- inputBuffer: this.inlineInput.getText(),
207
+ inputBuffer: this.inlineInput.getExpandedText?.() ?? this.inlineInput.getText(),
206
208
  canMoveInputUp: cursor.line > 0,
207
209
  canMoveInputDown: cursor.line < lastLine,
208
210
  questions: this.questions,