Skip to content

Comments

feat: simplify the text editor to be more like pi#7426

Merged
michaelneale merged 4 commits intomainfrom
micn/simpler-local-text-edit
Feb 24, 2026
Merged

feat: simplify the text editor to be more like pi#7426
michaelneale merged 4 commits intomainfrom
micn/simpler-local-text-edit

Conversation

@michaelneale
Copy link
Collaborator

the text editor really fails hard on small models by trying to edit the whole file, this makes it more like the pi simple editor approach, which is able to run eval/gym tasks like "remove the feature" whereas the existing editor will not.

More an exemplar than a hard implementation for now...

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this is better. let's go with it

+ 1; // 1-indexed

let summary = format!(
"Successfully edited {} (replaced {} lines with {} lines at line {})",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could drop the ()

…xt-edit

* origin/main: (35 commits)
  docs: generate manpages (#7443)
  Blog/goose v1 25 0 release (#7433)
  fix: detect truncated LLM responses in apps extension (#7354)
  fix: removed unnecessary version for goose acp macro dependency (#7428)
  add flag to hide select voice providers (#7406)
  New navigation settings layout options and styling (#6645)
  refactor: MCP-compliant theme tokens and CSS class rename (#7275)
  Redirect llama.cpp logs through tracing to avoid polluting CLI stdout/stderr (#7434)
  refactor: change open recipe in new window to pass recipe id (#7392)
  fix: handle truncated tool calls that break conversation alternation (#7424)
  streamline some github actions (#7430)
  Enable bedrock prompt cache (#6710)
  fix: use BEGIN IMMEDIATE to prevent SQLite deadlocks (#7429)
  Display working dir (#7419)
  dev: add cmake to hermitized env (#7399)
  refactor: remove allows_unlisted_models flag, always allow custom model entry (#7255)
  feat: expose context window utilization to agent via MOIM (#7418)
  Small model naming (#7394)
  chore(deps): bump ajv in /documentation (#7416)
  doc: groq models (#7404)
  ...
- Drop the parenthetical stats from the assistant summary per review feedback
- Use cleaner 'Successfully replaced text in {path}.' format (inspired by pi)
- Keep line number info in user-facing output only
- Align Editor API success message to same format
The text_editor output changed from 'The file has been edited' and
'Text has been inserted at line N' to 'Successfully replaced text in'
and 'Successfully inserted ... at line N'. Update the 5 failing test
assertions accordingly.
@michaelneale michaelneale marked this pull request as ready for review February 24, 2026 00:16
Copilot AI review requested due to automatic review settings February 24, 2026 00:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies the text editor tool messages to work better with small language models by removing verbose instructional text and making assistant-facing messages more concise. The changes align with the "pi" simple editor approach mentioned in the description.

Changes:

  • Simplified assistant-facing messages to brief summaries without verbose instructions
  • Retained informative user-facing messages with code snippets showing changes in context
  • Updated test assertions to match new message format

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/goose-mcp/src/developer/text_editor.rs Simplified success messages for both text_editor_replace and text_editor_insert functions, removing verbose "Review the changes" instructions and making assistant messages more concise
crates/goose-mcp/src/developer/rmcp_developer.rs Updated test assertions to match new simplified message format for both replace and insert operations

@michaelneale michaelneale added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit edede63 Feb 24, 2026
25 checks passed
@michaelneale michaelneale deleted the micn/simpler-local-text-edit branch February 24, 2026 00:55
lifeizhou-ap added a commit that referenced this pull request Feb 24, 2026
* main:
  Simplified custom model flow with canonical models (#6934)
  feat: simplify the text editor to be more like pi (#7426)
  docs: add YouTube short embed to Neighborhood extension tutorial (#7456)
  fix: flake.nix build failure and deprecation warning (#7408)
  feat(claude-code): add permission prompt routing for approve mode (#7420)
  docs: generate manpages (#7443)
  Blog/goose v1 25 0 release (#7433)
  fix: detect truncated LLM responses in apps extension (#7354)
  fix: removed unnecessary version for goose acp macro dependency (#7428)
  add flag to hide select voice providers (#7406)
  New navigation settings layout options and styling (#6645)
  refactor: MCP-compliant theme tokens and CSS class rename (#7275)
  Redirect llama.cpp logs through tracing to avoid polluting CLI stdout/stderr (#7434)
  refactor: change open recipe in new window to pass recipe id (#7392)
  fix: handle truncated tool calls that break conversation alternation (#7424)
  streamline some github actions (#7430)
  Enable bedrock prompt cache (#6710)
  fix: use BEGIN IMMEDIATE to prevent SQLite deadlocks (#7429)
  Display working dir (#7419)
lifeizhou-ap added a commit that referenced this pull request Feb 24, 2026
* main: (171 commits)
  fix: TLDR CLI tab in Neighborhood MCP docs (#7461)
  fix(summon): restore skill supporting files and directory path in load output (#7457)
  Simplified custom model flow with canonical models (#6934)
  feat: simplify the text editor to be more like pi (#7426)
  docs: add YouTube short embed to Neighborhood extension tutorial (#7456)
  fix: flake.nix build failure and deprecation warning (#7408)
  feat(claude-code): add permission prompt routing for approve mode (#7420)
  docs: generate manpages (#7443)
  Blog/goose v1 25 0 release (#7433)
  fix: detect truncated LLM responses in apps extension (#7354)
  fix: removed unnecessary version for goose acp macro dependency (#7428)
  add flag to hide select voice providers (#7406)
  New navigation settings layout options and styling (#6645)
  refactor: MCP-compliant theme tokens and CSS class rename (#7275)
  Redirect llama.cpp logs through tracing to avoid polluting CLI stdout/stderr (#7434)
  refactor: change open recipe in new window to pass recipe id (#7392)
  fix: handle truncated tool calls that break conversation alternation (#7424)
  streamline some github actions (#7430)
  Enable bedrock prompt cache (#6710)
  fix: use BEGIN IMMEDIATE to prevent SQLite deadlocks (#7429)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants