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 utility that selects a terminal editor from environment preferences and runs it while exposing resolved command details.
VISUAL when set; VISUAL="nano --wait" yields bin "nano", args ["--wait"] while EDITOR is ignored @testEDITOR when VISUAL is missing; EDITOR="code --wait --new-window" yields bin "code", args ["--wait", "--new-window"] @test"vim" on non-Windows, "notepad" on Windows) when neither variable is set @test@generates
export type EditorCommand = {
bin: string;
args: string[];
};
export type EditorRunResult = {
content: string;
command: EditorCommand;
exitStatus: number | null;
};
/**
* Resolves the editor command to run based on VISUAL, EDITOR, or platform fallback.
* @param env optional environment values to inspect
*/
export function resolveEditor(env?: NodeJS.ProcessEnv): EditorCommand;
/**
* Runs an editable session using the resolved editor.
* @param initialText optional prefilled contents
* @param env optional environment values to inspect
*/
export function runEditorSession(initialText?: string, env?: NodeJS.ProcessEnv): Promise<EditorRunResult>;Launches a user-configured external editor and exposes the resolved command and args. @satisfied-by