dsh-model-think-level 2.5.0 → 2.5.1
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/lib/client.js +5 -5
- package/lib/client.js.map +3 -3
- package/lib/history-compat.d.ts +5 -3
- package/lib/index.js +4 -2
- package/lib/index.js.map +2 -2
- package/package.json +1 -1
package/lib/history-compat.d.ts
CHANGED
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
* the provider demands:
|
|
32
32
|
*
|
|
33
33
|
* 1. `portable_ids` — drop the foreign item handle from every replayable block:
|
|
34
|
-
* the `id` inside a reasoning signature, the `
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* the `id` inside a reasoning signature, the whole `textSignature`, and the
|
|
35
|
+
* `itemId` half of a tool call's `callId|itemId`. The server then treats the
|
|
36
|
+
* item as new instead of resolving a foreign handle. A text signature cannot
|
|
37
|
+
* keep its `phase` once the id is gone: pi-ai only reads `{v:1, id, phase?}`,
|
|
38
|
+
* and a signature without a string `id` is sent verbatim as the item id.
|
|
37
39
|
* 2. `drop_reasoning` — additionally stop replaying historical reasoning items
|
|
38
40
|
* altogether (the `thinkingSignature` is removed; the visible thinking text
|
|
39
41
|
* stays in the local history untouched). Reasoning is the other thing bound
|
package/lib/index.js
CHANGED
|
@@ -3465,8 +3465,10 @@ function degradeBlock(block, stage) {
|
|
|
3465
3465
|
if (type === "text") {
|
|
3466
3466
|
const signature = block["textSignature"];
|
|
3467
3467
|
if (typeof signature !== "string") return void 0;
|
|
3468
|
-
|
|
3469
|
-
|
|
3468
|
+
if (stripSignatureId(signature) === void 0) return void 0;
|
|
3469
|
+
const copy = { ...block };
|
|
3470
|
+
delete copy["textSignature"];
|
|
3471
|
+
return copy;
|
|
3470
3472
|
}
|
|
3471
3473
|
if (type === "toolCall") {
|
|
3472
3474
|
const id = block["id"];
|