CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-external-editor

tessl install tessl/npm-external-editor@3.1.0

Edit 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%

task.mdevals/scenario-7/

Note Draft Editor

A helper that opens the user's default text editor with prefilled content so the final note comes from a real editing session.

Capabilities

Opens editor with template

  • When given a title and optional body, it writes a header line # <title> followed by the body (if provided) to a temporary file, opens the external editor, and returns exactly what the user saved. @test

Detects empty saves

  • If the user saves the file empty or only whitespace, it returns an empty string and reports that nothing was edited. @test

Tracks changes vs initial text

  • If the saved content differs from the initial template aside from trailing newlines, it reports wasEdited as true; otherwise it is false. @test

Implementation

@generates

API

export interface DraftResult {
  content: string;
  wasEdited: boolean;
}

export function openNoteDraft(title: string, body?: string): DraftResult;

Dependencies { .dependencies }

external-editor { .dependency }

Uses the user's default external text editor to synchronously edit the prefilled content.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/external-editor@3.1.x
tile.json