ai 6.0.40 → 6.0.41
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 +6 -0
- package/dist/index.d.mts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +322 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +322 -349
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -20
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +1 -20
- package/dist/internal/index.mjs.map +1 -1
- package/docs/02-foundations/02-providers-and-models.mdx +1 -0
- package/docs/02-foundations/04-tools.mdx +89 -0
- package/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +0 -7
- package/package.json +1 -1
- package/src/agent/create-agent-ui-stream-response.test.ts +1 -1
- package/src/generate-text/__snapshots__/stream-text.test.ts.snap +4 -52
- package/src/generate-text/stream-text.test.ts +7 -407
- package/src/generate-text/stream-text.ts +0 -1
- package/src/types/usage.ts +0 -24
- package/src/ui/chat.ts +0 -6
- package/src/ui/process-ui-message-stream.ts +0 -5
- package/src/ui-message-stream/ui-message-chunks.ts +0 -3
|
@@ -655,7 +655,7 @@ exports[`streamText > result.pipeUIMessageStreamToResponse > should mask error m
|
|
|
655
655
|
"data: {"type":"finish-step"}
|
|
656
656
|
|
|
657
657
|
",
|
|
658
|
-
"data: {"type":"finish","finishReason":"error"
|
|
658
|
+
"data: {"type":"finish","finishReason":"error"}
|
|
659
659
|
|
|
660
660
|
",
|
|
661
661
|
"data: [DONE]
|
|
@@ -678,7 +678,7 @@ exports[`streamText > result.pipeUIMessageStreamToResponse > should support cust
|
|
|
678
678
|
"data: {"type":"finish-step"}
|
|
679
679
|
|
|
680
680
|
",
|
|
681
|
-
"data: {"type":"finish","finishReason":"error"
|
|
681
|
+
"data: {"type":"finish","finishReason":"error"}
|
|
682
682
|
|
|
683
683
|
",
|
|
684
684
|
"data: [DONE]
|
|
@@ -803,22 +803,6 @@ exports[`streamText > result.toUIMessageStream > should mask error messages by d
|
|
|
803
803
|
{
|
|
804
804
|
"finishReason": "error",
|
|
805
805
|
"type": "finish",
|
|
806
|
-
"usage": {
|
|
807
|
-
"cachedInputTokens": undefined,
|
|
808
|
-
"inputTokenDetails": {
|
|
809
|
-
"cacheReadTokens": undefined,
|
|
810
|
-
"cacheWriteTokens": undefined,
|
|
811
|
-
"noCacheTokens": undefined,
|
|
812
|
-
},
|
|
813
|
-
"inputTokens": undefined,
|
|
814
|
-
"outputTokenDetails": {
|
|
815
|
-
"reasoningTokens": undefined,
|
|
816
|
-
"textTokens": undefined,
|
|
817
|
-
},
|
|
818
|
-
"outputTokens": undefined,
|
|
819
|
-
"reasoningTokens": undefined,
|
|
820
|
-
"totalTokens": undefined,
|
|
821
|
-
},
|
|
822
806
|
},
|
|
823
807
|
]
|
|
824
808
|
`;
|
|
@@ -865,22 +849,6 @@ exports[`streamText > result.toUIMessageStream > should send tool call, tool cal
|
|
|
865
849
|
{
|
|
866
850
|
"finishReason": "stop",
|
|
867
851
|
"type": "finish",
|
|
868
|
-
"usage": {
|
|
869
|
-
"cachedInputTokens": undefined,
|
|
870
|
-
"inputTokenDetails": {
|
|
871
|
-
"cacheReadTokens": undefined,
|
|
872
|
-
"cacheWriteTokens": undefined,
|
|
873
|
-
"noCacheTokens": 3,
|
|
874
|
-
},
|
|
875
|
-
"inputTokens": 3,
|
|
876
|
-
"outputTokenDetails": {
|
|
877
|
-
"reasoningTokens": undefined,
|
|
878
|
-
"textTokens": 10,
|
|
879
|
-
},
|
|
880
|
-
"outputTokens": 10,
|
|
881
|
-
"reasoningTokens": undefined,
|
|
882
|
-
"totalTokens": 13,
|
|
883
|
-
},
|
|
884
852
|
},
|
|
885
853
|
]
|
|
886
854
|
`;
|
|
@@ -903,22 +871,6 @@ exports[`streamText > result.toUIMessageStream > should support custom error mes
|
|
|
903
871
|
{
|
|
904
872
|
"finishReason": "error",
|
|
905
873
|
"type": "finish",
|
|
906
|
-
"usage": {
|
|
907
|
-
"cachedInputTokens": undefined,
|
|
908
|
-
"inputTokenDetails": {
|
|
909
|
-
"cacheReadTokens": undefined,
|
|
910
|
-
"cacheWriteTokens": undefined,
|
|
911
|
-
"noCacheTokens": undefined,
|
|
912
|
-
},
|
|
913
|
-
"inputTokens": undefined,
|
|
914
|
-
"outputTokenDetails": {
|
|
915
|
-
"reasoningTokens": undefined,
|
|
916
|
-
"textTokens": undefined,
|
|
917
|
-
},
|
|
918
|
-
"outputTokens": undefined,
|
|
919
|
-
"reasoningTokens": undefined,
|
|
920
|
-
"totalTokens": undefined,
|
|
921
|
-
},
|
|
922
874
|
},
|
|
923
875
|
]
|
|
924
876
|
`;
|
|
@@ -937,7 +889,7 @@ exports[`streamText > result.toUIMessageStreamResponse > should mask error messa
|
|
|
937
889
|
"data: {"type":"finish-step"}
|
|
938
890
|
|
|
939
891
|
",
|
|
940
|
-
"data: {"type":"finish","finishReason":"error"
|
|
892
|
+
"data: {"type":"finish","finishReason":"error"}
|
|
941
893
|
|
|
942
894
|
",
|
|
943
895
|
"data: [DONE]
|
|
@@ -960,7 +912,7 @@ exports[`streamText > result.toUIMessageStreamResponse > should support custom e
|
|
|
960
912
|
"data: {"type":"finish-step"}
|
|
961
913
|
|
|
962
914
|
",
|
|
963
|
-
"data: {"type":"finish","finishReason":"error"
|
|
915
|
+
"data: {"type":"finish","finishReason":"error"}
|
|
964
916
|
|
|
965
917
|
",
|
|
966
918
|
"data: [DONE]
|