@opencode-ai/ai 0.0.0-dev-18686 → 0.0.0-dev-18687
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.
|
@@ -1126,19 +1126,27 @@ const onContentBlockStop = Effect.fn("AnthropicMessages.onContentBlockStop")(fun
|
|
|
1126
1126
|
});
|
|
1127
1127
|
const onMessageDelta = (state, event) => {
|
|
1128
1128
|
const usage = mergeUsage(state.usage, mapUsage(event.usage, state.providerMetadataKey), state.providerMetadataKey);
|
|
1129
|
+
const pendingFinish = (() => {
|
|
1130
|
+
const stopReason = event.delta?.stop_reason;
|
|
1131
|
+
if (stopReason === null || stopReason === undefined)
|
|
1132
|
+
return state.pendingFinish;
|
|
1133
|
+
const stopSequence = event.delta?.stop_sequence;
|
|
1134
|
+
const finishMetadata = stopSequence === null || stopSequence === undefined
|
|
1135
|
+
? state.pendingFinish?.providerMetadata
|
|
1136
|
+
: providerMetadata(state.providerMetadataKey, { stopSequence });
|
|
1137
|
+
return {
|
|
1138
|
+
reason: {
|
|
1139
|
+
normalized: mapFinishReason(stopReason),
|
|
1140
|
+
raw: stopReason,
|
|
1141
|
+
},
|
|
1142
|
+
providerMetadata: finishMetadata,
|
|
1143
|
+
};
|
|
1144
|
+
})();
|
|
1129
1145
|
return [
|
|
1130
1146
|
{
|
|
1131
1147
|
...state,
|
|
1132
1148
|
usage,
|
|
1133
|
-
pendingFinish
|
|
1134
|
-
reason: {
|
|
1135
|
-
normalized: mapFinishReason(event.delta?.stop_reason),
|
|
1136
|
-
raw: event.delta?.stop_reason ?? undefined,
|
|
1137
|
-
},
|
|
1138
|
-
providerMetadata: event.delta?.stop_sequence === null || event.delta?.stop_sequence === undefined
|
|
1139
|
-
? undefined
|
|
1140
|
-
: providerMetadata(state.providerMetadataKey, { stopSequence: event.delta.stop_sequence }),
|
|
1141
|
-
},
|
|
1149
|
+
pendingFinish,
|
|
1142
1150
|
},
|
|
1143
1151
|
NO_EVENTS,
|
|
1144
1152
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-18687",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-dev-18687",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.3.13",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@smithy/eventstream-codec": "4.2.14",
|
|
41
41
|
"@smithy/util-utf8": "4.2.2",
|
|
42
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
42
|
+
"@opencode-ai/schema": "0.0.0-dev-18687",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-rc.112",
|
|
45
45
|
"google-auth-library": "10.5.0"
|