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-6/

Legacy Editor Metadata Collector

A small utility that opens a text editor via the provided dependency and returns edited text plus metadata drawn from its legacy snake_case accessors.

Capabilities

Collect legacy metadata from editing session

  • When the edit command completes successfully with modified content, return the edited text and metadata where the temp-file path and exit status come from the dependency's deprecated snake_case properties rather than the primary camelCase ones. @test
  • When the edit command exits with a non-zero status, include the captured exit status from those legacy snake_case properties while still reading the saved text. @test
  • When no changes are saved (empty content), return an empty string while still exposing the temp-file path via the legacy snake_case accessor. @test

Implementation

@generates

API

export interface LegacyEditResult {
  editedText: string;
  legacyTempPath: string;
  legacyExitStatus: number | null;
}

/**
 * Opens a user-editable buffer using the configured external editor, allowing test runs
 * to override the editor command, and returns edited content along with metadata derived
 * from the dependency's legacy snake_case accessors for the temporary file and last exit status.
 *
 * @param initialText Initial text seeded into the editable file.
 * @param editorCommand Optional override to force a specific editor invocation (e.g., a scripted command).
 */
export function runLegacyEdit(initialText?: string, editorCommand?: string): Promise<LegacyEditResult>;

Dependencies { .dependencies }

external-editor { .dependency }

Provides editor launching plus legacy snake_case metadata for temp file path and exit status.

Version

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