tessl install tessl/npm-external-editor@3.1.0Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT
Agent Success
Agent success rate when using this tile
79%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.05x
Baseline
Agent success rate without this tile
75%
A helper that collects text asynchronously by launching the user's external editor and returning the saved contents.
trimTrailingNewline is true, a single trailing newline at the end of the saved content is removed; otherwise the text is returned unchanged. @test@generates
export interface AsyncEditOptions {
fileOptions?: {
prefix?: string;
postfix?: string;
template?: string;
dir?: string;
mode?: number;
};
trimTrailingNewline?: boolean;
}
/**
* Launch the user's editor asynchronously with optional initial text.
* Resolves with the final text or rejects if editing fails.
*/
export function openDraft(
initialText?: string,
options?: AsyncEditOptions
): Promise<string>;Provides asynchronous editing via the user's configured external editor.