Repository navigation
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