agent-zero/plugins/_text_editor
linkliti ad02938ce9 feat(tools): drop agent prefix from tool log headlines
The subordinate, unknown, MCP, and generic fallback tool log headlines no longer repeat the agent name. The unknown tool inherits the prefix-free base heading and takes the class-level blank line used by sibling tools, MCP keeps the tool name visible as an argument row, parallel children without a resolvable dedicated tool log through the prefix-free fallback, and the input and text editor fallback headings drop the prefix too. Framework helper DOX and both plugin AGENTS files document the prefix-free fallback rows, and regression tests cover the named headings for method and no-method calls, the generic fallback rows, and source guards for the plugin fallbacks.

Validation: pytest tests/test_tool_heading_prefixes.py tests/test_text_editor_message_handler.py tests/test_parallel_tool.py
2026-10-21 23:37:32 +03:00
..
extensions Fix flashing process groups during memory search 2026-09-16 16:17:37 +02:00
helpers feat(tools): drop agent prefix from tool log headlines 2026-10-21 23:37:32 +03:00
prompts Keep text editor line edits explicitly supported 2026-09-12 18:30:53 +02:00
tools Share editor log presentation across local and remote tools 2026-09-06 20:35:27 +02:00
webui generated logos for builtin plugins 2026-03-19 17:35:03 +01:00
AGENTS.md feat(tools): drop agent prefix from tool log headlines 2026-10-21 23:37:32 +03:00
default_config.yaml refactor - plugin names and builtin plugins 2026-03-10 22:20:53 +01:00
plugin.yaml refactor - plugin names and builtin plugins 2026-03-10 22:20:53 +01:00
README.md Preserve file permissions and ownership when applying editor patches 2026-09-14 23:00:41 +02:00

Text Editor

Provide an LLM-friendly file editing tool for reading, writing, and patching text files.

What It Does

This plugin exposes a native text editing tool that agents can use to inspect files, write complete contents, and apply validated patch operations while tracking file freshness between reads and edits.

Main Behavior

  • Read
    • Reads whole files or line ranges with token-aware limits.
    • Records file metadata so later patch operations can detect stale edits.
  • Write
    • Writes full file contents and then re-reads the resulting file for confirmation.
  • Patch
    • Validates edit structures before applying them.
    • Rejects edits if the file changed since it was last observed.
    • Preserves file permissions and, when running as root, the existing owner and group.
    • Reads back the affected patch region after applying changes.
  • Extension hooks
    • Exposes before and after extension points for read, write, and patch operations.

Key Files

  • Tool
    • tools/text_editor.py implements method dispatch, stale-file checks, patching flow, and prompt responses.
  • Helpers
    • helpers/file_ops.py provides file info, read/write helpers, edit validation, and patch application.
  • Configuration
    • default_config.yaml defines read limits and token budgets.
  • Prompts
    • prompts/ contains the agent-facing success and error messages.

Configuration Scope

  • Settings section: agent
  • Per-project config: true
  • Per-agent config: true

Plugin Metadata

  • Name: _text_editor
  • Title: Text Editor
  • Description: Native tool to read, write, and patch text files in an LLM-friendly way.