Skip to content

v0.4.0

Choose a tag to compare

@ASidorenkoCode ASidorenkoCode released this 13 Feb 04:10
· 17 commits to master since this release

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