tabminal 3.0.16 → 3.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/package.json +1 -1
- package/src/acp-manager.mjs +15 -5
package/package.json
CHANGED
package/src/acp-manager.mjs
CHANGED
|
@@ -1529,10 +1529,12 @@ export function buildRestoredToolCall(
|
|
|
1529
1529
|
previous = null,
|
|
1530
1530
|
baseline = null,
|
|
1531
1531
|
update = {},
|
|
1532
|
-
nextTimelineOrder = null
|
|
1532
|
+
nextTimelineOrder = null,
|
|
1533
|
+
options = {}
|
|
1533
1534
|
) {
|
|
1534
1535
|
const persisted = cloneSerializable(baseline, {}) || {};
|
|
1535
1536
|
const current = cloneSerializable(previous, {}) || {};
|
|
1537
|
+
const allowEmptyCreatedAt = options.allowEmptyCreatedAt === true;
|
|
1536
1538
|
const nextOrder = normalizePersistedTimelineOrder(current.order, 0)
|
|
1537
1539
|
|| (
|
|
1538
1540
|
typeof nextTimelineOrder === 'function'
|
|
@@ -1540,9 +1542,11 @@ export function buildRestoredToolCall(
|
|
|
1540
1542
|
: normalizePersistedTimelineOrder(persisted.order, 0)
|
|
1541
1543
|
)
|
|
1542
1544
|
|| 1;
|
|
1543
|
-
const
|
|
1545
|
+
const inheritedCreatedAt = String(
|
|
1544
1546
|
current.createdAt || persisted.createdAt || ''
|
|
1545
|
-
).trim()
|
|
1547
|
+
).trim();
|
|
1548
|
+
const createdAt = inheritedCreatedAt
|
|
1549
|
+
|| (allowEmptyCreatedAt ? '' : new Date().toISOString());
|
|
1546
1550
|
const nextToolCall = {
|
|
1547
1551
|
...persisted,
|
|
1548
1552
|
...current,
|
|
@@ -3148,7 +3152,10 @@ class AcpRuntime extends EventEmitter {
|
|
|
3148
3152
|
previous,
|
|
3149
3153
|
baseline,
|
|
3150
3154
|
update,
|
|
3151
|
-
() => this.#nextTimelineOrder(tab)
|
|
3155
|
+
() => this.#nextTimelineOrder(tab),
|
|
3156
|
+
{
|
|
3157
|
+
allowEmptyCreatedAt: !!tab.restoreCapture
|
|
3158
|
+
}
|
|
3152
3159
|
);
|
|
3153
3160
|
tab.toolCalls.set(update.toolCallId, nextToolCall);
|
|
3154
3161
|
broadcastUpdate = nextToolCall;
|
|
@@ -3165,7 +3172,10 @@ class AcpRuntime extends EventEmitter {
|
|
|
3165
3172
|
previous,
|
|
3166
3173
|
baseline,
|
|
3167
3174
|
update,
|
|
3168
|
-
() => this.#nextTimelineOrder(tab)
|
|
3175
|
+
() => this.#nextTimelineOrder(tab),
|
|
3176
|
+
{
|
|
3177
|
+
allowEmptyCreatedAt: !!tab.restoreCapture
|
|
3178
|
+
}
|
|
3169
3179
|
);
|
|
3170
3180
|
tab.toolCalls.set(update.toolCallId, nextToolCall);
|
|
3171
3181
|
broadcastUpdate = nextToolCall;
|