lynkr 9.14.18 → 9.14.20
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/package.json +1 -1
- package/src/prompts/system.js +6 -1
package/package.json
CHANGED
package/src/prompts/system.js
CHANGED
|
@@ -147,10 +147,15 @@ function compressText(text, maxLength) {
|
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* Check if property name is self-explanatory
|
|
150
|
-
* @param {string} name - Property name
|
|
150
|
+
* @param {string|null} name - Property name, or null for a schema root
|
|
151
151
|
* @returns {boolean} True if name is obvious
|
|
152
152
|
*/
|
|
153
153
|
function isObviousFromName(name) {
|
|
154
|
+
// The schema ROOT is compressed with key=null (see
|
|
155
|
+
// compressSchemaDescriptions(out.input_schema, null)): there is no property
|
|
156
|
+
// name to judge. Treat any non-string key as "not obvious" instead of
|
|
157
|
+
// crashing on name.toLowerCase() — that throw aborted the whole pass.
|
|
158
|
+
if (typeof name !== 'string') return false;
|
|
154
159
|
const obvious = [
|
|
155
160
|
'id', 'name', 'type', 'value', 'data', 'text', 'content',
|
|
156
161
|
'message', 'query', 'command', 'url', 'path', 'file', 'filename',
|