@ljoukov/llm 3.0.13 → 3.0.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/dist/index.cjs +42 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +42 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8009,39 +8009,48 @@ function parseOptionalString(value) {
|
|
|
8009
8009
|
}
|
|
8010
8010
|
return trimmed;
|
|
8011
8011
|
}
|
|
8012
|
-
var codexReadFileInputSchema = import_zod6.z.
|
|
8013
|
-
|
|
8014
|
-
(value
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
(
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
}
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
}
|
|
8044
|
-
|
|
8012
|
+
var codexReadFileInputSchema = import_zod6.z.preprocess(
|
|
8013
|
+
(value) => {
|
|
8014
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
8015
|
+
return value;
|
|
8016
|
+
}
|
|
8017
|
+
const record = value;
|
|
8018
|
+
const filePath = parseOptionalString(record.file_path);
|
|
8019
|
+
const aliasPath = parseOptionalString(record.path);
|
|
8020
|
+
if (!filePath && aliasPath) {
|
|
8021
|
+
return {
|
|
8022
|
+
...record,
|
|
8023
|
+
file_path: aliasPath
|
|
8024
|
+
};
|
|
8025
|
+
}
|
|
8026
|
+
return value;
|
|
8027
|
+
},
|
|
8028
|
+
import_zod6.z.object({
|
|
8029
|
+
file_path: import_zod6.z.preprocess(
|
|
8030
|
+
(value) => parseOptionalString(value),
|
|
8031
|
+
import_zod6.z.string().min(1).describe(
|
|
8032
|
+
"Path to the file (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
|
|
8033
|
+
)
|
|
8034
|
+
),
|
|
8035
|
+
path: import_zod6.z.preprocess(
|
|
8036
|
+
(value) => parseOptionalString(value),
|
|
8037
|
+
import_zod6.z.string().min(1).optional().describe(
|
|
8038
|
+
"Alias for file_path. If both file_path and path are provided they must be identical."
|
|
8039
|
+
)
|
|
8040
|
+
),
|
|
8041
|
+
offset: import_zod6.z.number().int().min(1).nullish().describe("The line number to start reading from. Must be 1 or greater."),
|
|
8042
|
+
limit: import_zod6.z.number().int().min(1).nullish().describe("The maximum number of lines to return.")
|
|
8043
|
+
}).strict().superRefine((value, context) => {
|
|
8044
|
+
const aliasPath = value.path?.trim() ?? "";
|
|
8045
|
+
if (aliasPath.length > 0 && value.file_path !== aliasPath) {
|
|
8046
|
+
context.addIssue({
|
|
8047
|
+
code: import_zod6.z.ZodIssueCode.custom,
|
|
8048
|
+
message: "file_path and path must match when both are provided.",
|
|
8049
|
+
path: ["path"]
|
|
8050
|
+
});
|
|
8051
|
+
}
|
|
8052
|
+
})
|
|
8053
|
+
);
|
|
8045
8054
|
var codexListDirInputSchema = import_zod6.z.object({
|
|
8046
8055
|
dir_path: import_zod6.z.string().min(1).describe(
|
|
8047
8056
|
"Path to the directory to list (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
|