@protolabsai/proto 0.26.24 → 0.26.25
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 +38 -10
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -158294,13 +158294,36 @@ var init_pipeline = __esm({
|
|
|
158294
158294
|
baseRequest.stream = true;
|
|
158295
158295
|
baseRequest.stream_options = { include_usage: true };
|
|
158296
158296
|
}
|
|
158297
|
-
if (request4.config?.tools) {
|
|
158297
|
+
if (request4.config?.tools && request4.config.tools.length > 0) {
|
|
158298
158298
|
baseRequest.tools = await this.converter.convertGeminiToolsToOpenAI(request4.config.tools);
|
|
158299
158299
|
} else {
|
|
158300
|
-
|
|
158301
|
-
|
|
158302
|
-
|
|
158303
|
-
|
|
158300
|
+
baseRequest.messages = baseRequest.messages.flatMap((m3) => {
|
|
158301
|
+
if (m3.role === "tool") {
|
|
158302
|
+
const content = typeof m3.content === "string" ? m3.content : Array.isArray(m3.content) ? m3.content.map((p2) => typeof p2 === "string" ? p2 : "text" in p2 && typeof p2.text === "string" ? p2.text : "").join("") : "";
|
|
158303
|
+
if (!content)
|
|
158304
|
+
return [];
|
|
158305
|
+
const truncated = content.length > 2e3 ? content.slice(0, 2e3) + "\u2026" : content;
|
|
158306
|
+
return [
|
|
158307
|
+
{
|
|
158308
|
+
role: "assistant",
|
|
158309
|
+
content: `[tool result] ${truncated}`
|
|
158310
|
+
}
|
|
158311
|
+
];
|
|
158312
|
+
}
|
|
158313
|
+
if (m3.role === "assistant" && Array.isArray(m3.tool_calls) && (m3.tool_calls?.length ?? 0) > 0) {
|
|
158314
|
+
const { tool_calls: _toolCalls, ...rest } = m3;
|
|
158315
|
+
if (!rest.content || Array.isArray(rest.content) && rest.content.length === 0) {
|
|
158316
|
+
return [
|
|
158317
|
+
{
|
|
158318
|
+
...rest,
|
|
158319
|
+
content: "[tool call elided]"
|
|
158320
|
+
}
|
|
158321
|
+
];
|
|
158322
|
+
}
|
|
158323
|
+
return [rest];
|
|
158324
|
+
}
|
|
158325
|
+
return [m3];
|
|
158326
|
+
});
|
|
158304
158327
|
}
|
|
158305
158328
|
return this.config.provider.buildRequest(baseRequest, userPromptId);
|
|
158306
158329
|
}
|
|
@@ -171130,7 +171153,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
171130
171153
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
171131
171154
|
});
|
|
171132
171155
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
171133
|
-
const version2 = "0.26.
|
|
171156
|
+
const version2 = "0.26.25";
|
|
171134
171157
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
171135
171158
|
const baseHeaders = {
|
|
171136
171159
|
"User-Agent": userAgent2
|
|
@@ -286979,7 +287002,12 @@ async function generateRecap(config2, conversationHistory, abortSignal) {
|
|
|
286979
287002
|
contents,
|
|
286980
287003
|
config: {
|
|
286981
287004
|
abortSignal,
|
|
286982
|
-
thinkingConfig: { includeThoughts: false }
|
|
287005
|
+
thinkingConfig: { includeThoughts: false },
|
|
287006
|
+
// Empty tools array (truthy) bypasses pipeline.ts buildRequest's
|
|
287007
|
+
// tool-stripping path. Without this, assistant turns containing
|
|
287008
|
+
// tool_calls — i.e. most of the agent's actual work — are dropped
|
|
287009
|
+
// before the request leaves, starving the recap of context.
|
|
287010
|
+
tools: []
|
|
286983
287011
|
}
|
|
286984
287012
|
}, "recap");
|
|
286985
287013
|
const text = response.candidates?.[0]?.content?.parts?.map((p2) => p2.text ?? "").join("").trim();
|
|
@@ -416926,7 +416954,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
416926
416954
|
// packages/cli/src/utils/version.ts
|
|
416927
416955
|
async function getCliVersion() {
|
|
416928
416956
|
const pkgJson = await getPackageJson();
|
|
416929
|
-
return "0.26.
|
|
416957
|
+
return "0.26.25";
|
|
416930
416958
|
}
|
|
416931
416959
|
__name(getCliVersion, "getCliVersion");
|
|
416932
416960
|
|
|
@@ -424698,7 +424726,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
424698
424726
|
|
|
424699
424727
|
// packages/cli/src/generated/git-commit.ts
|
|
424700
424728
|
init_esbuild_shims();
|
|
424701
|
-
var GIT_COMMIT_INFO = "
|
|
424729
|
+
var GIT_COMMIT_INFO = "b5e5da8f6";
|
|
424702
424730
|
|
|
424703
424731
|
// packages/cli/src/utils/systemInfo.ts
|
|
424704
424732
|
async function getNpmVersion() {
|
|
@@ -492842,7 +492870,7 @@ var QwenAgent = class {
|
|
|
492842
492870
|
async initialize(args2) {
|
|
492843
492871
|
this.clientCapabilities = args2.clientCapabilities;
|
|
492844
492872
|
const authMethods = buildAuthMethods();
|
|
492845
|
-
const version2 = "0.26.
|
|
492873
|
+
const version2 = "0.26.25";
|
|
492846
492874
|
return {
|
|
492847
492875
|
protocolVersion: PROTOCOL_VERSION,
|
|
492848
492876
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.25",
|
|
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.26.
|
|
24
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.26.25"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|