Releases: ASidorenkoCode/openslimedit
v1.0.1 — OpenSlimedit
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 (
oldStringas"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
Bug Fix: Hash reference lookup failures
Fixes "Hash reference not found" errors, particularly affecting Codex models using apply_patch.
Changes
- Hash ref normalization — tolerates whitespace, trailing
|, and spaces around:in model-provided hash references - Line truncation consistency —
computeFileHashesnow truncates lines >2000 chars before hashing, matching OpenCode's read tool output (previously produced different hashes for long lines) - 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"
- 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
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," }
]
}edittool (Anthropic): Multiple edits per call, same file. Edits applied bottom-to-top to avoid offset issues.apply_patchtool (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
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 Filesection with multiple@@ contextchunks - 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) vsapply_patch(multi-file, Codex) - Single-file fallback preserved for backwards compatibility
v0.4.0
open-hashline v0.4.0
New: Codex model support
Hashline now works with both Anthropic and Codex (GPT) models:
- Anthropic models use
edittool — hash refs resolve tooldString/newString - Codex models use
apply_patchtool — hash refs resolve to generatedpatchText
The plugin hooks whichever tool OpenCode presents to the model. Same three operations work for both:
- Replace line (
startHash) - Replace range (
startHash+endHash) - 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
editandapply_patchcompletions
v0.3.0
open-hashline v0.3.0
New
- Auto-configuration on install —
npm install open-hashlineorbun add open-hashlinenow automatically adds the plugin to.opencode/opencode.json. No manual config needed.
Changes
@opencode-ai/pluginmoved topeerDependencies(host provides it)- Added
repository,keywords,homepage,bugsto package.json for npm discoverability
Installation
npm install open-hashlineThat's it — start OpenCode and hashline is active.
v0.2.0
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
oldStringedits for files with stored hashes
Installation
npm install open-hashlineSee README for configuration.