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.js
CHANGED
|
@@ -4127,6 +4127,9 @@ var MODEL_QUIRKS = {
|
|
|
4127
4127
|
},
|
|
4128
4128
|
"qwen/": {
|
|
4129
4129
|
fuzzyFallback: true
|
|
4130
|
+
},
|
|
4131
|
+
"google/": {
|
|
4132
|
+
normalizedCoords: true
|
|
4130
4133
|
}
|
|
4131
4134
|
};
|
|
4132
4135
|
var getQuirks = function(model) {
|
|
@@ -4749,7 +4752,7 @@ var post10 = function(param) {
|
|
|
4749
4752
|
stream = new ReadableStream({
|
|
4750
4753
|
start: function start(controller) {
|
|
4751
4754
|
return _async_to_generator(function() {
|
|
4752
|
-
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,
|
|
4755
|
+
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;
|
|
4753
4756
|
return _ts_generator(this, function(_state) {
|
|
4754
4757
|
switch(_state.label){
|
|
4755
4758
|
case 0:
|
|
@@ -4795,24 +4798,45 @@ var post10 = function(param) {
|
|
|
4795
4798
|
tc = _step1.value;
|
|
4796
4799
|
;
|
|
4797
4800
|
if (((_tc_function = tc.function) === null || _tc_function === void 0 ? void 0 : _tc_function.name) === "computer_call") {
|
|
4801
|
+
;
|
|
4802
|
+
;
|
|
4798
4803
|
computerCallIndices.add(tc.index);
|
|
4799
|
-
|
|
4804
|
+
initialArgs = (_ref = (_tc_function1 = tc.function) === null || _tc_function1 === void 0 ? void 0 : _tc_function1.arguments) !== null && _ref !== void 0 ? _ref : "";
|
|
4805
|
+
argumentBuffers.set(tc.index, initialArgs);
|
|
4800
4806
|
passThrough.push(_object_spread_props(_object_spread({}, tc), {
|
|
4801
4807
|
function: _object_spread_props(_object_spread({}, tc.function), {
|
|
4802
4808
|
arguments: ""
|
|
4803
4809
|
})
|
|
4804
4810
|
}));
|
|
4811
|
+
if (initialArgs) {
|
|
4812
|
+
try {
|
|
4813
|
+
JSON.parse(initialArgs);
|
|
4814
|
+
denormalized = denormalizeComputerCallArguments({
|
|
4815
|
+
argumentsText: initialArgs,
|
|
4816
|
+
displayWidth: displayWidth,
|
|
4817
|
+
displayHeight: displayHeight,
|
|
4818
|
+
model: model
|
|
4819
|
+
});
|
|
4820
|
+
passThrough.push({
|
|
4821
|
+
index: tc.index,
|
|
4822
|
+
function: {
|
|
4823
|
+
arguments: denormalized
|
|
4824
|
+
}
|
|
4825
|
+
});
|
|
4826
|
+
emittedIndices.add(tc.index);
|
|
4827
|
+
} catch (unused) {}
|
|
4828
|
+
}
|
|
4805
4829
|
continue;
|
|
4806
4830
|
}
|
|
4807
4831
|
if (computerCallIndices.has(tc.index)) {
|
|
4808
4832
|
;
|
|
4809
4833
|
;
|
|
4810
|
-
buf = ((_argumentBuffers_get = argumentBuffers.get(tc.index)) !== null && _argumentBuffers_get !== void 0 ? _argumentBuffers_get : "") + ((
|
|
4834
|
+
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 : "");
|
|
4811
4835
|
argumentBuffers.set(tc.index, buf);
|
|
4812
4836
|
if (!emittedIndices.has(tc.index)) {
|
|
4813
4837
|
try {
|
|
4814
4838
|
JSON.parse(buf);
|
|
4815
|
-
|
|
4839
|
+
denormalized1 = denormalizeComputerCallArguments({
|
|
4816
4840
|
argumentsText: buf,
|
|
4817
4841
|
displayWidth: displayWidth,
|
|
4818
4842
|
displayHeight: displayHeight,
|
|
@@ -4821,7 +4845,7 @@ var post10 = function(param) {
|
|
|
4821
4845
|
passThrough.push({
|
|
4822
4846
|
index: tc.index,
|
|
4823
4847
|
function: {
|
|
4824
|
-
arguments:
|
|
4848
|
+
arguments: denormalized1
|
|
4825
4849
|
}
|
|
4826
4850
|
});
|
|
4827
4851
|
emittedIndices.add(tc.index);
|
|
@@ -4917,7 +4941,7 @@ var post10 = function(param) {
|
|
|
4917
4941
|
for(_iterator2 = Array.from(argumentBuffers)[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion1 = true){
|
|
4918
4942
|
_step_value = _sliced_to_array(_step2.value, 2), index = _step_value[0], buf1 = _step_value[1];
|
|
4919
4943
|
if (!emittedIndices.has(index) && buf1) {
|
|
4920
|
-
|
|
4944
|
+
denormalized2 = denormalizeComputerCallArguments({
|
|
4921
4945
|
argumentsText: buf1,
|
|
4922
4946
|
displayWidth: displayWidth,
|
|
4923
4947
|
displayHeight: displayHeight,
|
|
@@ -4933,7 +4957,7 @@ var post10 = function(param) {
|
|
|
4933
4957
|
{
|
|
4934
4958
|
index: index,
|
|
4935
4959
|
function: {
|
|
4936
|
-
arguments:
|
|
4960
|
+
arguments: denormalized2
|
|
4937
4961
|
}
|
|
4938
4962
|
}
|
|
4939
4963
|
]
|