antechamber 1.0.23 → 1.0.24
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
CHANGED
|
@@ -7,6 +7,14 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.24] - 2026-10-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Keep each reply in its own turn in OpenChamber 2.x after history is reloaded. A reply's request can start a few
|
|
15
|
+
milliseconds before OmO writes its prompt, so a restored reply sorted ahead of its prompt: the first turn's replies
|
|
16
|
+
vanished and each later turn's first reply was drawn in the turn before.
|
|
17
|
+
|
|
10
18
|
## [1.0.23] - 2026-10-27
|
|
11
19
|
|
|
12
20
|
### Fixed
|
package/dist/session-history.js
CHANGED
|
@@ -142,6 +142,8 @@ export function parsePiSessionText(s, agentName, raw) {
|
|
|
142
142
|
let currentModel = { providerID: "unknown", modelID: "unknown" };
|
|
143
143
|
let currentThinkingLevel;
|
|
144
144
|
let lastUserId = "";
|
|
145
|
+
// When the newest user-role record (prompt, context, compaction, user shell) was created. A reply must sort after it.
|
|
146
|
+
let userAt = Number.NEGATIVE_INFINITY;
|
|
145
147
|
// Like live agent_end, a new user turn closes the previous run: its own
|
|
146
148
|
// unresolved provider cards end with that run's stop reason.
|
|
147
149
|
let runAssistant;
|
|
@@ -166,6 +168,7 @@ export function parsePiSessionText(s, agentName, raw) {
|
|
|
166
168
|
const compaction = compactionMessages(s, e.id ?? `r${indexOf.get(e) ?? 0}`, e.summary, entryTime(e), currentModel, currentThinkingLevel);
|
|
167
169
|
out.push(...compaction);
|
|
168
170
|
lastUserId = compaction[0].info.id;
|
|
171
|
+
userAt = compaction[0].info.time.created;
|
|
169
172
|
continue;
|
|
170
173
|
}
|
|
171
174
|
if (e.type === "custom_message") {
|
|
@@ -193,6 +196,7 @@ export function parsePiSessionText(s, agentName, raw) {
|
|
|
193
196
|
? [{ type: "text", text: e.content }]
|
|
194
197
|
: [];
|
|
195
198
|
const time = entryTime(e);
|
|
199
|
+
userAt = time;
|
|
196
200
|
if (e.id)
|
|
197
201
|
s.tree.messageEntries[contextID] = e.id;
|
|
198
202
|
out.push({
|
|
@@ -236,6 +240,7 @@ export function parsePiSessionText(s, agentName, raw) {
|
|
|
236
240
|
if (e.id)
|
|
237
241
|
s.tree.messageEntries[msgId] = e.id;
|
|
238
242
|
lastUserId = msgId;
|
|
243
|
+
userAt = created;
|
|
239
244
|
const info = {
|
|
240
245
|
id: msgId,
|
|
241
246
|
sessionID,
|
|
@@ -263,6 +268,7 @@ export function parsePiSessionText(s, agentName, raw) {
|
|
|
263
268
|
const stem = userId?.slice(0, -1) ?? mappedIds[0] ?? `msg_${sessionID}_r${idx}`;
|
|
264
269
|
const msgId = `${stem}z`;
|
|
265
270
|
lastUserId = `${stem}u`;
|
|
271
|
+
userAt = created;
|
|
266
272
|
if (e.id) {
|
|
267
273
|
s.tree.messageEntries[msgId] = e.id;
|
|
268
274
|
s.tree.messageEntries[lastUserId] = e.id;
|
|
@@ -320,16 +326,17 @@ export function parsePiSessionText(s, agentName, raw) {
|
|
|
320
326
|
`msg_${sessionID}_r${idx}`;
|
|
321
327
|
if (e.id)
|
|
322
328
|
s.tree.messageEntries[msgId] = e.id;
|
|
329
|
+
// The reply starts when its request starts (`m.timestamp`), which can be a few ms before pi writes the prompt
|
|
330
|
+
// entry that `userAt` comes from. OpenChamber 2.x groups turns by creation time, so a reply created before its
|
|
331
|
+
// prompt would move into the previous turn, or vanish before the first one.
|
|
332
|
+
const started = Math.max(typeof m.timestamp === "number" && Number.isFinite(m.timestamp) && m.timestamp <= created
|
|
333
|
+
? m.timestamp
|
|
334
|
+
: created, userAt + 1);
|
|
323
335
|
const info = {
|
|
324
336
|
id: msgId,
|
|
325
337
|
sessionID,
|
|
326
338
|
role: "assistant",
|
|
327
|
-
time: {
|
|
328
|
-
created: typeof m.timestamp === "number" && Number.isFinite(m.timestamp) && m.timestamp <= created
|
|
329
|
-
? m.timestamp
|
|
330
|
-
: created,
|
|
331
|
-
completed: created,
|
|
332
|
-
},
|
|
339
|
+
time: { created: started, completed: Math.max(created, started) },
|
|
333
340
|
parentID: lastUserId,
|
|
334
341
|
modelID: currentModel.modelID,
|
|
335
342
|
providerID: currentModel.providerID,
|