deepcode-ai 1.2.29 → 1.2.30
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.js +8 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2762,14 +2762,14 @@ var XmlToolCallStreamFilter = class {
|
|
|
2762
2762
|
}
|
|
2763
2763
|
};
|
|
2764
2764
|
function compactToolDescription(description, schemaMode) {
|
|
2765
|
-
const maxLength = schemaMode === "full" ? 240 : schemaMode === "compact" ? 140 :
|
|
2765
|
+
const maxLength = schemaMode === "full" ? 240 : schemaMode === "compact" ? 140 : 120;
|
|
2766
2766
|
if (description.length <= maxLength) {
|
|
2767
2767
|
return description;
|
|
2768
2768
|
}
|
|
2769
2769
|
return `${description.slice(0, maxLength - 3).trimEnd()}...`;
|
|
2770
2770
|
}
|
|
2771
2771
|
function simplifyToolSchema(schema, schemaMode) {
|
|
2772
|
-
const normalized2 = sanitizeSchemaNode(schema, schemaMode
|
|
2772
|
+
const normalized2 = sanitizeSchemaNode(schema, schemaMode);
|
|
2773
2773
|
if (normalized2 && typeof normalized2 === "object" && !Array.isArray(normalized2)) {
|
|
2774
2774
|
return normalized2;
|
|
2775
2775
|
}
|
|
@@ -2819,9 +2819,9 @@ function truncateToolOutput(output, maxLength = MAX_TOOL_OUTPUT_LENGTH) {
|
|
|
2819
2819
|
|
|
2820
2820
|
${end}`;
|
|
2821
2821
|
}
|
|
2822
|
-
function sanitizeSchemaNode(value, schemaMode
|
|
2822
|
+
function sanitizeSchemaNode(value, schemaMode) {
|
|
2823
2823
|
if (Array.isArray(value)) {
|
|
2824
|
-
return value.map((item) => sanitizeSchemaNode(item, schemaMode
|
|
2824
|
+
return value.map((item) => sanitizeSchemaNode(item, schemaMode)).filter((item) => item !== void 0);
|
|
2825
2825
|
}
|
|
2826
2826
|
if (!value || typeof value !== "object") {
|
|
2827
2827
|
return value;
|
|
@@ -2829,10 +2829,10 @@ function sanitizeSchemaNode(value, schemaMode, depth) {
|
|
|
2829
2829
|
const input = value;
|
|
2830
2830
|
const next = {};
|
|
2831
2831
|
for (const [key, child] of Object.entries(input)) {
|
|
2832
|
-
if (shouldDropSchemaKey(key, schemaMode
|
|
2832
|
+
if (shouldDropSchemaKey(key, schemaMode)) {
|
|
2833
2833
|
continue;
|
|
2834
2834
|
}
|
|
2835
|
-
const normalizedChild = sanitizeSchemaNode(child, schemaMode
|
|
2835
|
+
const normalizedChild = sanitizeSchemaNode(child, schemaMode);
|
|
2836
2836
|
if (normalizedChild !== void 0) {
|
|
2837
2837
|
next[key] = normalizedChild;
|
|
2838
2838
|
}
|
|
@@ -2850,16 +2850,13 @@ function sanitizeSchemaNode(value, schemaMode, depth) {
|
|
|
2850
2850
|
}
|
|
2851
2851
|
return next;
|
|
2852
2852
|
}
|
|
2853
|
-
function shouldDropSchemaKey(key, schemaMode
|
|
2853
|
+
function shouldDropSchemaKey(key, schemaMode) {
|
|
2854
2854
|
if (key === "$schema" || key === "definitions" || key === "$defs") {
|
|
2855
2855
|
return true;
|
|
2856
2856
|
}
|
|
2857
2857
|
if (schemaMode !== "full" && (key === "title" || key === "default" || key === "examples" || key === "example" || key === "deprecated")) {
|
|
2858
2858
|
return true;
|
|
2859
2859
|
}
|
|
2860
|
-
if (schemaMode === "minimal" && key === "description" && depth > 0) {
|
|
2861
|
-
return true;
|
|
2862
|
-
}
|
|
2863
2860
|
return false;
|
|
2864
2861
|
}
|
|
2865
2862
|
function extractFallbackToolCalls(assistantText, allowedToolNames) {
|
|
@@ -11505,7 +11502,7 @@ function parseVersion(version) {
|
|
|
11505
11502
|
if (!match) return null;
|
|
11506
11503
|
return [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
11507
11504
|
}
|
|
11508
|
-
var VERSION = "1.2.
|
|
11505
|
+
var VERSION = "1.2.30".length > 0 ? "1.2.30" : "0.0.0-dev";
|
|
11509
11506
|
async function updateCommand() {
|
|
11510
11507
|
writeStdoutLine(`Current version: ${VERSION}`);
|
|
11511
11508
|
const update = await checkForUpdate(VERSION, { force: true });
|