supercompat 3.16.0 → 3.16.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/dist/index.cjs +31 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4251,6 +4251,9 @@ var MODEL_QUIRKS = {
|
|
|
4251
4251
|
},
|
|
4252
4252
|
"qwen/": {
|
|
4253
4253
|
fuzzyFallback: true
|
|
4254
|
+
},
|
|
4255
|
+
"google/": {
|
|
4256
|
+
normalizedCoords: true
|
|
4254
4257
|
}
|
|
4255
4258
|
};
|
|
4256
4259
|
var getQuirks = function(model) {
|
|
@@ -4873,7 +4876,7 @@ var post10 = function(param) {
|
|
|
4873
4876
|
stream = new ReadableStream({
|
|
4874
4877
|
start: function start(controller) {
|
|
4875
4878
|
return _async_to_generator(function() {
|
|
4876
|
-
var computerCallIndices, argumentBuffers, emittedIndices, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, _chunk_choices, _choice_delta, choices, choice, passThrough, _iteratorNormalCompletion, _didIteratorError1, _iteratorError1, _iterator1, _step1, tc, _tc_function, _argumentBuffers_get,
|
|
4879
|
+
var computerCallIndices, argumentBuffers, emittedIndices, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, _chunk_choices, _choice_delta, choices, choice, passThrough, _iteratorNormalCompletion, _didIteratorError1, _iteratorError1, _iterator1, _step1, tc, _tc_function, _ref, _tc_function1, initialArgs, denormalized, _argumentBuffers_get, _ref1, _tc_function2, buf, denormalized1, modifiedChunk, err1, _iteratorNormalCompletion1, _didIteratorError2, _iteratorError2, _iterator2, _step2, _step_value, index, buf1, denormalized2, flushChunk;
|
|
4877
4880
|
return _ts_generator(this, function(_state) {
|
|
4878
4881
|
switch(_state.label){
|
|
4879
4882
|
case 0:
|
|
@@ -4919,24 +4922,45 @@ var post10 = function(param) {
|
|
|
4919
4922
|
tc = _step1.value;
|
|
4920
4923
|
;
|
|
4921
4924
|
if (((_tc_function = tc.function) === null || _tc_function === void 0 ? void 0 : _tc_function.name) === "computer_call") {
|
|
4925
|
+
;
|
|
4926
|
+
;
|
|
4922
4927
|
computerCallIndices.add(tc.index);
|
|
4923
|
-
|
|
4928
|
+
initialArgs = (_ref = (_tc_function1 = tc.function) === null || _tc_function1 === void 0 ? void 0 : _tc_function1.arguments) !== null && _ref !== void 0 ? _ref : "";
|
|
4929
|
+
argumentBuffers.set(tc.index, initialArgs);
|
|
4924
4930
|
passThrough.push(_object_spread_props(_object_spread({}, tc), {
|
|
4925
4931
|
function: _object_spread_props(_object_spread({}, tc.function), {
|
|
4926
4932
|
arguments: ""
|
|
4927
4933
|
})
|
|
4928
4934
|
}));
|
|
4935
|
+
if (initialArgs) {
|
|
4936
|
+
try {
|
|
4937
|
+
JSON.parse(initialArgs);
|
|
4938
|
+
denormalized = denormalizeComputerCallArguments({
|
|
4939
|
+
argumentsText: initialArgs,
|
|
4940
|
+
displayWidth: displayWidth,
|
|
4941
|
+
displayHeight: displayHeight,
|
|
4942
|
+
model: model
|
|
4943
|
+
});
|
|
4944
|
+
passThrough.push({
|
|
4945
|
+
index: tc.index,
|
|
4946
|
+
function: {
|
|
4947
|
+
arguments: denormalized
|
|
4948
|
+
}
|
|
4949
|
+
});
|
|
4950
|
+
emittedIndices.add(tc.index);
|
|
4951
|
+
} catch (unused) {}
|
|
4952
|
+
}
|
|
4929
4953
|
continue;
|
|
4930
4954
|
}
|
|
4931
4955
|
if (computerCallIndices.has(tc.index)) {
|
|
4932
4956
|
;
|
|
4933
4957
|
;
|
|
4934
|
-
buf = ((_argumentBuffers_get = argumentBuffers.get(tc.index)) !== null && _argumentBuffers_get !== void 0 ? _argumentBuffers_get : "") + ((
|
|
4958
|
+
buf = ((_argumentBuffers_get = argumentBuffers.get(tc.index)) !== null && _argumentBuffers_get !== void 0 ? _argumentBuffers_get : "") + ((_ref1 = (_tc_function2 = tc.function) === null || _tc_function2 === void 0 ? void 0 : _tc_function2.arguments) !== null && _ref1 !== void 0 ? _ref1 : "");
|
|
4935
4959
|
argumentBuffers.set(tc.index, buf);
|
|
4936
4960
|
if (!emittedIndices.has(tc.index)) {
|
|
4937
4961
|
try {
|
|
4938
4962
|
JSON.parse(buf);
|
|
4939
|
-
|
|
4963
|
+
denormalized1 = denormalizeComputerCallArguments({
|
|
4940
4964
|
argumentsText: buf,
|
|
4941
4965
|
displayWidth: displayWidth,
|
|
4942
4966
|
displayHeight: displayHeight,
|
|
@@ -4945,7 +4969,7 @@ var post10 = function(param) {
|
|
|
4945
4969
|
passThrough.push({
|
|
4946
4970
|
index: tc.index,
|
|
4947
4971
|
function: {
|
|
4948
|
-
arguments:
|
|
4972
|
+
arguments: denormalized1
|
|
4949
4973
|
}
|
|
4950
4974
|
});
|
|
4951
4975
|
emittedIndices.add(tc.index);
|
|
@@ -5041,7 +5065,7 @@ var post10 = function(param) {
|
|
|
5041
5065
|
for(_iterator2 = Array.from(argumentBuffers)[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion1 = true){
|
|
5042
5066
|
_step_value = _sliced_to_array(_step2.value, 2), index = _step_value[0], buf1 = _step_value[1];
|
|
5043
5067
|
if (!emittedIndices.has(index) && buf1) {
|
|
5044
|
-
|
|
5068
|
+
denormalized2 = denormalizeComputerCallArguments({
|
|
5045
5069
|
argumentsText: buf1,
|
|
5046
5070
|
displayWidth: displayWidth,
|
|
5047
5071
|
displayHeight: displayHeight,
|
|
@@ -5057,7 +5081,7 @@ var post10 = function(param) {
|
|
|
5057
5081
|
{
|
|
5058
5082
|
index: index,
|
|
5059
5083
|
function: {
|
|
5060
|
-
arguments:
|
|
5084
|
+
arguments: denormalized2
|
|
5061
5085
|
}
|
|
5062
5086
|
}
|
|
5063
5087
|
]
|