fix(coding-agent): expand paste markers in ctx.ui.getEditorText(), closes #2084

This commit is contained in:
Mario Zechner
2026-03-14 04:08:24 +01:00
parent a79ca41190
commit b6181bed92
2 changed files with 2 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
### Fixed
- Fixed `ctx.ui.getEditorText()` in the extension API returning paste markers (e.g., `[paste #1 +24 lines]`) instead of the actual pasted content ([#2084](https://github.com/badlogic/pi-mono/issues/2084))
- Fixed startup crash when downloading `fd`/`ripgrep` on first run by using `pipeline()` instead of `finished(readable.pipe(writable))` so stream errors from timeouts are caught properly, and increased the download timeout from 10s to 120s ([#2066](https://github.com/badlogic/pi-mono/issues/2066))
## [0.58.0] - 2026-03-14

View File

@@ -1457,7 +1457,7 @@ export class InteractiveMode {
custom: (factory, options) => this.showExtensionCustom(factory, options),
pasteToEditor: (text) => this.editor.handleInput(`\x1b[200~${text}\x1b[201~`),
setEditorText: (text) => this.editor.setText(text),
getEditorText: () => this.editor.getText(),
getEditorText: () => this.editor.getExpandedText?.() ?? this.editor.getText(),
editor: (title, prefill) => this.showExtensionEditor(title, prefill),
setEditorComponent: (factory) => this.setCustomEditorComponent(factory),
get theme() {