@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
23 lines • 1.33 kB
TypeScript
import { type EditorComponent } from "@earendil-works/pi-tui";
/**
* Move the draft (and any collapsed markers) from one editor instance to
* another. Returns whether the image markers survived the move: image payloads
* live outside the editor, so the caller must drop them when the destination
* cannot own the markers - a dead literal `[Image #N]` with a live attachment
* behind it would misnumber every other attachment at submit.
*/
export declare function transferEditorContent(source: EditorComponent, target: EditorComponent): {
imageMarkersTransferred: boolean;
};
export declare function expandEditorSubmission(editor: EditorComponent, text: string): string;
/**
* Expand a submitted editor value. Unlike {@link expandEditorSubmission},
* which unconditionally prefers the live draft, this falls back to the
* authoritative callback value when the editor has already cleared itself.
* pi-tui's `Editor.submitValue()` clears the editor state and paste registry
* before invoking `onSubmit`, so a post-clear `getExpandedText()` returns "".
* Custom editors that submit before clearing still retain their non-empty
* expanded value for backwards compatibility.
*/
export declare function expandSubmittedText(editor: EditorComponent, text: string): string;
//# sourceMappingURL=editor-paste-transfer.d.ts.map