antechamber 2.0.15 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/v2.js +32 -2
- package/extensions/antechamber/package.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.0.17] - 2026-11-26
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- An OmO edit that makes several replacements in one call now shows in OpenChamber 2.x as an edit card with its
|
|
15
|
+
diff, like a single replacement, instead of a generic card listing the `edits` array as JSON. OpenCode 2.x has no
|
|
16
|
+
`multiedit` tool, so OpenChamber did not recognize the name.
|
|
17
|
+
- The Open file and Open diff buttons of an expanded edit card in OpenChamber 2.x open the edited file. They guessed it
|
|
18
|
+
from the diff's header, which drops a leading `a/` or `b/`, and opened a file named "Diff" for a diff too long to
|
|
19
|
+
preview.
|
|
20
|
+
|
|
21
|
+
## [2.0.16] - 2026-11-23
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- OmO 5.1.81 (engine senpi 2026.11.19-5), up from 5.1.69.
|
|
26
|
+
|
|
10
27
|
## [2.0.15] - 2026-11-23
|
|
11
28
|
|
|
12
29
|
### Fixed
|
package/dist/v2.js
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
import { randomUUID } from "node:crypto";
|
|
25
25
|
import { getAgentName } from "./agent-name.js";
|
|
26
26
|
import { toV2Permission } from "./approvals.js";
|
|
27
|
+
import { isRecord } from "./guards.js";
|
|
27
28
|
import { questionFormID, toQuestionForm } from "./question-forms.js";
|
|
28
29
|
import { v2PromptAttachments } from "./prompt-parts.js";
|
|
29
30
|
function genId(prefix) {
|
|
@@ -191,13 +192,42 @@ function toV2AssistantMessage(info) {
|
|
|
191
192
|
}
|
|
192
193
|
/**
|
|
193
194
|
* OpenCode 2.x renamed `bash` to `shell`; OpenChamber 2.x draws a shell card (command, live output) only for `shell`.
|
|
195
|
+
* It also dropped `multiedit`: OpenChamber 2.x draws an unknown tool as its input, so the `edits` array showed as
|
|
196
|
+
* JSON. As `edit`, the card hides the input and draws the call's combined `metadata.patch` as a diff.
|
|
194
197
|
* A background `task` is OpenCode's background `subagent` call, the only call OpenChamber 2.x follows past its step.
|
|
195
198
|
*/
|
|
196
199
|
function v2ToolName(part) {
|
|
197
200
|
if (part.tool === "task" && part.state.status !== "pending" && part.state.input.background === true)
|
|
198
201
|
return "subagent";
|
|
202
|
+
if (part.tool === "multiedit")
|
|
203
|
+
return "edit";
|
|
199
204
|
return part.tool === "bash" ? "shell" : part.tool;
|
|
200
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* OpenCode 2.x reports an edit's diff per file in `metadata.files` (FileDiff.Info). From the top-level patch alone,
|
|
208
|
+
* OpenChamber 2.x's Open file and Open diff buttons guess the file from the patch header, which drops a leading `a/`
|
|
209
|
+
* or `b/`, and target a file named "Diff" for a patch too long to preview. Given a `files` entry it takes the card's
|
|
210
|
+
* +/- counts from it, so they are counted here. The patch moves into the entry rather than being sent twice: every
|
|
211
|
+
* top-level reader falls back to it, and one SSE frame carries the whole call (`MAX_SSE_PENDING_BYTES`).
|
|
212
|
+
*/
|
|
213
|
+
function completedMetadata(name, metadata = {}) {
|
|
214
|
+
const { patch, ...rest } = metadata;
|
|
215
|
+
const file = isRecord(rest.filediff) ? rest.filediff.file : undefined;
|
|
216
|
+
if (name !== "edit" || typeof file !== "string" || typeof patch !== "string")
|
|
217
|
+
return metadata;
|
|
218
|
+
let additions = 0;
|
|
219
|
+
let deletions = 0;
|
|
220
|
+
let inHunk = false;
|
|
221
|
+
for (const line of patch.split("\n")) {
|
|
222
|
+
if (line.startsWith("@@"))
|
|
223
|
+
inHunk = true;
|
|
224
|
+
else if (inHunk && line.startsWith("+"))
|
|
225
|
+
additions++;
|
|
226
|
+
else if (inHunk && line.startsWith("-"))
|
|
227
|
+
deletions++;
|
|
228
|
+
}
|
|
229
|
+
return { ...rest, files: [{ file, patch, additions, deletions, status: "modified" }] };
|
|
230
|
+
}
|
|
201
231
|
/**
|
|
202
232
|
* A background task whose call returned while the child still runs. pi completes the step before the child ends, and
|
|
203
233
|
* OpenChamber 2.x marks a running tool under a completed message "Interrupted". OpenCode 2.x settles such a call at
|
|
@@ -314,7 +344,7 @@ function toolContent(part) {
|
|
|
314
344
|
content: st.output !== "" ? [{ type: "text", text: st.output }] : [],
|
|
315
345
|
output: st.output,
|
|
316
346
|
title: st.title,
|
|
317
|
-
metadata: backgroundShell(part)?.metadata ?? st.metadata
|
|
347
|
+
metadata: backgroundShell(part)?.metadata ?? completedMetadata(name, st.metadata),
|
|
318
348
|
};
|
|
319
349
|
}
|
|
320
350
|
else {
|
|
@@ -758,7 +788,7 @@ export class V2EventTranslator {
|
|
|
758
788
|
frames.push(this.frame(directory, "session.tool.success", {
|
|
759
789
|
...base,
|
|
760
790
|
content: state.output !== "" ? [{ type: "text", text: state.output }] : [],
|
|
761
|
-
metadata: state.metadata
|
|
791
|
+
metadata: completedMetadata(name, state.metadata),
|
|
762
792
|
executed: false,
|
|
763
793
|
}));
|
|
764
794
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antechamber-openchamber",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.17",
|
|
4
4
|
"description": "OpenChamber extension for antechamber: installs and pins the antechamber server and OmO, draws the OmO Graph and the OmO Work section, and titles OmO tool cards",
|
|
5
5
|
"private": true,
|
|
6
6
|
"type": "module",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antechamber",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.17",
|
|
4
4
|
"description": "OpenCode-compatible HTTP/SSE server that lets OpenChamber drive the pi coding agent (and OmO) over RPC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"typescript": "^7.0.2"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"omo-ai": "5.1.
|
|
91
|
+
"omo-ai": "5.1.81"
|
|
92
92
|
},
|
|
93
93
|
"openchamber": {
|
|
94
94
|
"apiVersion": 1,
|