Skip to content

Releases: ASidorenkoCode/openslimedit

v1.0.1 — OpenSlimedit

14 Feb 23:13

Choose a tag to compare

Renamed from open-hashline to OpenSlimedit. Complete rewrite of the approach — no more hash-based line references.

What's new:

  • Tool description compression (biggest token saver)
  • Compact read output (shorter paths, no footer boilerplate)
  • Line-range edit expansion (oldString as "55-64")

Benchmark results (token savings vs baseline):

  • Claude Opus 4.6: -21.8%
  • Claude Sonnet 4.5: -32.6%
  • GPT 5.2 Codex: -26.7%
  • Minimax M2.5 Free: -24.8%

No custom tools. No system prompt injection. Just install and save tokens.

v0.6.1

13 Feb 04:56

Choose a tag to compare

Bug Fix: Hash reference lookup failures

Fixes "Hash reference not found" errors, particularly affecting Codex models using apply_patch.

Changes

  1. Hash ref normalization — tolerates whitespace, trailing |, and spaces around : in model-provided hash references
  2. Line truncation consistencycomputeFileHashes now truncates lines >2000 chars before hashing, matching OpenCode's read tool output (previously produced different hashes for long lines)
  3. Recompute hashes after edits — instead of clearing stored hashes, recomputes from the new file content so stale-ref errors show "line N now has hash X" instead of generic "not found"
  4. Diagnostic error messages — when a hash isn't found, shows what hash IS at that line number, helping the model recover

Full Changelog: v0.6.0...v0.6.1

v0.6.0

13 Feb 04:28

Choose a tag to compare

What's New

Multi-edit support for Anthropic models (edit tool)

Both edit and apply_patch now accept an edits array, providing a consistent interface across model types:

{
  "edits": [
    { "filePath": "/src/config.ts", "startHash": "3:cc7", "content": "  version: \"2.0.0\"," },
    { "filePath": "/src/config.ts", "afterHash": "5:e60", "content": "  debug: true," }
  ]
}
  • edit tool (Anthropic): Multiple edits per call, same file. Edits applied bottom-to-top to avoid offset issues.
  • apply_patch tool (Codex): Multiple edits per call, multiple files supported.
  • Shared schema shape between both tools for consistency.

Full Changelog: v0.5.0...v0.6.0

v0.5.0

13 Feb 04:20

Choose a tag to compare

open-hashline v0.5.0

New: Multi-file edits

The apply_patch tool (Codex models) now accepts an edits array for batching multiple file changes in a single call:

{
  "edits": [
    { "filePath": "/project/src/config.ts", "startHash": "3:cc7", "content": "version: \"2.0.0\"" },
    { "filePath": "/project/src/index.ts", "afterHash": "10:a1b", "content": "// new import" }
  ]
}

Key details:

  • Multiple edits to the same file are grouped into one *** Update File section with multiple @@ context chunks
  • Edits are sorted by line number within each file for correct sequential application
  • All edited files have their hashes invalidated after the patch completes
  • Separate schemas: edit (single-file, Anthropic) vs apply_patch (multi-file, Codex)
  • Single-file fallback preserved for backwards compatibility

v0.4.0

13 Feb 04:10

Choose a tag to compare

open-hashline v0.4.0

New: Codex model support

Hashline now works with both Anthropic and Codex (GPT) models:

  • Anthropic models use edit tool — hash refs resolve to oldString/newString
  • Codex models use apply_patch tool — hash refs resolve to generated patchText

The plugin hooks whichever tool OpenCode presents to the model. Same three operations work for both:

  1. Replace line (startHash)
  2. Replace range (startHash + endHash)
  3. Insert after (afterHash)

How it works for Codex

Hash references are converted into the *** Begin Patch format:

*** Begin Patch
*** Update File: src/app.ts
@@ function greet() {
-  return "hello"
+  return "world"
*** End Patch

The @@ context line is derived from the line before the edit range for accurate positioning.

Other changes

  • Refactored shared logic (validateHash, ensureHashes, collectRange) to reduce duplication
  • Hash invalidation now covers both edit and apply_patch completions

v0.3.0

13 Feb 03:49

Choose a tag to compare

open-hashline v0.3.0

New

  • Auto-configuration on installnpm install open-hashline or bun add open-hashline now automatically adds the plugin to .opencode/opencode.json. No manual config needed.

Changes

  • @opencode-ai/plugin moved to peerDependencies (host provides it)
  • Added repository, keywords, homepage, bugs to package.json for npm discoverability

Installation

npm install open-hashline

That's it — start OpenCode and hashline is active.

v0.2.0

13 Feb 03:35

Choose a tag to compare

open-hashline v0.2.0

First public release.

Features

  • Hashline read output — every line tagged with <line>:<hash>| content markers
  • Three edit operations — replace line, replace range, insert after
  • Stale hash detection — rejects edits when file changed since last read
  • System prompt injection — instructs the model to use hashline references
  • Force hashline mode — rejects oldString edits for files with stored hashes

Installation

npm install open-hashline

See README for configuration.