@protolabsai/proto 0.25.13 → 0.25.14
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/cli.js +41 -4
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -170894,7 +170894,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
170894
170894
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
170895
170895
|
});
|
|
170896
170896
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
170897
|
-
const version2 = "0.25.
|
|
170897
|
+
const version2 = "0.25.14";
|
|
170898
170898
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
170899
170899
|
const baseHeaders = {
|
|
170900
170900
|
"User-Agent": userAgent2
|
|
@@ -171950,6 +171950,27 @@ function extractCuratedHistory2(comprehensiveHistory) {
|
|
|
171950
171950
|
}
|
|
171951
171951
|
return curatedHistory;
|
|
171952
171952
|
}
|
|
171953
|
+
function trimToolErrorsFromContext(contents, maxTrimPairs = 6) {
|
|
171954
|
+
const trimmed2 = [...contents];
|
|
171955
|
+
let trimmed_count = 0;
|
|
171956
|
+
while (trimmed2.length >= 2 && trimmed_count < maxTrimPairs) {
|
|
171957
|
+
const last2 = trimmed2[trimmed2.length - 1];
|
|
171958
|
+
const prev = trimmed2[trimmed2.length - 2];
|
|
171959
|
+
if (last2.role !== "user")
|
|
171960
|
+
break;
|
|
171961
|
+
const allErrors = last2.parts?.every((p2) => p2.functionResponse !== void 0 && typeof p2.functionResponse.response?.["error"] === "string");
|
|
171962
|
+
if (!allErrors)
|
|
171963
|
+
break;
|
|
171964
|
+
if (prev.role !== "model")
|
|
171965
|
+
break;
|
|
171966
|
+
const hasToolCall2 = prev.parts?.some((p2) => p2.functionCall !== void 0);
|
|
171967
|
+
if (!hasToolCall2)
|
|
171968
|
+
break;
|
|
171969
|
+
trimmed2.splice(trimmed2.length - 2, 2);
|
|
171970
|
+
trimmed_count++;
|
|
171971
|
+
}
|
|
171972
|
+
return trimmed2;
|
|
171973
|
+
}
|
|
171953
171974
|
function isSchemaDepthError(errorMessage) {
|
|
171954
171975
|
return errorMessage.includes("maximum schema depth exceeded");
|
|
171955
171976
|
}
|
|
@@ -171995,6 +172016,7 @@ var init_geminiChat = __esm({
|
|
|
171995
172016
|
__name(isValidContentPart, "isValidContentPart");
|
|
171996
172017
|
__name(validateHistory2, "validateHistory");
|
|
171997
172018
|
__name(extractCuratedHistory2, "extractCuratedHistory");
|
|
172019
|
+
__name(trimToolErrorsFromContext, "trimToolErrorsFromContext");
|
|
171998
172020
|
InvalidStreamError = class extends Error {
|
|
171999
172021
|
static {
|
|
172000
172022
|
__name(this, "InvalidStreamError");
|
|
@@ -172125,6 +172147,21 @@ var init_geminiChat = __esm({
|
|
|
172125
172147
|
await new Promise((res) => setTimeout(res, delayMs));
|
|
172126
172148
|
continue;
|
|
172127
172149
|
}
|
|
172150
|
+
if (isTransientStreamError && error40.type === "NO_RESPONSE_TEXT") {
|
|
172151
|
+
const trimmedContents = trimToolErrorsFromContext(requestContents);
|
|
172152
|
+
if (trimmedContents.length < requestContents.length) {
|
|
172153
|
+
debugLogger22.warn(`NO_RESPONSE_TEXT: retrying with trimmed context (removed ${requestContents.length - trimmedContents.length} tool-error messages)`);
|
|
172154
|
+
try {
|
|
172155
|
+
const stream2 = await self2.makeApiCallAndProcessStream(model, trimmedContents, params, prompt_id);
|
|
172156
|
+
for await (const chunk of stream2) {
|
|
172157
|
+
yield { type: StreamEventType.CHUNK, value: chunk };
|
|
172158
|
+
}
|
|
172159
|
+
lastError = null;
|
|
172160
|
+
} catch {
|
|
172161
|
+
}
|
|
172162
|
+
}
|
|
172163
|
+
break;
|
|
172164
|
+
}
|
|
172128
172165
|
if (isTransientStreamError) {
|
|
172129
172166
|
break;
|
|
172130
172167
|
}
|
|
@@ -414871,7 +414908,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
414871
414908
|
// packages/cli/src/utils/version.ts
|
|
414872
414909
|
async function getCliVersion() {
|
|
414873
414910
|
const pkgJson = await getPackageJson();
|
|
414874
|
-
return "0.25.
|
|
414911
|
+
return "0.25.14";
|
|
414875
414912
|
}
|
|
414876
414913
|
__name(getCliVersion, "getCliVersion");
|
|
414877
414914
|
|
|
@@ -422643,7 +422680,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
422643
422680
|
|
|
422644
422681
|
// packages/cli/src/generated/git-commit.ts
|
|
422645
422682
|
init_esbuild_shims();
|
|
422646
|
-
var GIT_COMMIT_INFO = "
|
|
422683
|
+
var GIT_COMMIT_INFO = "a04b13211";
|
|
422647
422684
|
|
|
422648
422685
|
// packages/cli/src/utils/systemInfo.ts
|
|
422649
422686
|
async function getNpmVersion() {
|
|
@@ -490122,7 +490159,7 @@ var QwenAgent = class {
|
|
|
490122
490159
|
async initialize(args2) {
|
|
490123
490160
|
this.clientCapabilities = args2.clientCapabilities;
|
|
490124
490161
|
const authMethods = buildAuthMethods();
|
|
490125
|
-
const version2 = "0.25.
|
|
490162
|
+
const version2 = "0.25.14";
|
|
490126
490163
|
return {
|
|
490127
490164
|
protocolVersion: PROTOCOL_VERSION,
|
|
490128
490165
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.14",
|
|
4
4
|
"description": "proto - AI-powered coding agent",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bundled"
|
|
22
22
|
],
|
|
23
23
|
"config": {
|
|
24
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.25.
|
|
24
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.25.14"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|