wingbot 3.76.4-alpha.16 → 3.76.4-alpha.17
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/.claude/settings.local.json +11 -0
- package/package.json +1 -1
- package/src/Ai.js +14 -22
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(npx mocha:*)",
|
|
5
|
+
"Bash(npx tsc *)",
|
|
6
|
+
"Bash(npm test *)",
|
|
7
|
+
"Bash(node -e \"const p = require\\('./bot/plugins/BTMLLM'\\); console.log\\('factory type:', typeof p\\); console.log\\('factory name:', p.name\\);\")",
|
|
8
|
+
"Bash(grep -n \"prompt\\\\`\\\\|tagged\\\\|render\\\\|compile\\\\|hbs\" /Users/ondrejveres/Wingbot/wingbot-llm/src/prompt.js)"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
}
|
package/package.json
CHANGED
package/src/Ai.js
CHANGED
|
@@ -9,8 +9,7 @@ const { vars } = require('./utils/stateVariables');
|
|
|
9
9
|
const { deepEqual } = require('./utils/deepMapTools');
|
|
10
10
|
const systemEntities = require('./systemEntities');
|
|
11
11
|
const CustomEntityDetectionModel = require('./wingbot/CustomEntityDetectionModel');
|
|
12
|
-
|
|
13
|
-
let uq = 1;
|
|
12
|
+
const GlobalIntents = require('./GlobalIntents');
|
|
14
13
|
|
|
15
14
|
/** @typedef {import('./AiMatching').Compare} Compare */
|
|
16
15
|
|
|
@@ -444,21 +443,16 @@ class Ai {
|
|
|
444
443
|
const rules = this.matcher.preprocessRule(intents);
|
|
445
444
|
const matcher = this._createIntentMatcher(rules, usedEntities);
|
|
446
445
|
const entitiesSetState = Ai.ai.matcher.getSetStateForEntityRules(rules);
|
|
447
|
-
const id = uq++;
|
|
448
446
|
|
|
449
|
-
const resolver = {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
title,
|
|
459
|
-
meta
|
|
460
|
-
}]])
|
|
461
|
-
};
|
|
447
|
+
const resolver = GlobalIntents.resolver(path, {
|
|
448
|
+
matcher,
|
|
449
|
+
usedEntities,
|
|
450
|
+
entitiesSetState,
|
|
451
|
+
local: false,
|
|
452
|
+
action: '/*',
|
|
453
|
+
title,
|
|
454
|
+
meta
|
|
455
|
+
});
|
|
462
456
|
|
|
463
457
|
return resolver;
|
|
464
458
|
}
|
|
@@ -488,12 +482,10 @@ class Ai {
|
|
|
488
482
|
const rules = this.matcher.preprocessRule(intents);
|
|
489
483
|
const matcher = this._createIntentMatcher(rules, usedEntities);
|
|
490
484
|
const entitiesSetState = Ai.ai.matcher.getSetStateForEntityRules(rules);
|
|
491
|
-
const id = uq++;
|
|
492
485
|
|
|
493
|
-
const resolver =
|
|
486
|
+
const resolver = GlobalIntents.resolver(
|
|
494
487
|
path,
|
|
495
|
-
|
|
496
|
-
id,
|
|
488
|
+
{
|
|
497
489
|
matcher,
|
|
498
490
|
usedEntities,
|
|
499
491
|
entitiesSetState,
|
|
@@ -501,8 +493,8 @@ class Ai {
|
|
|
501
493
|
action: '/*',
|
|
502
494
|
title,
|
|
503
495
|
meta: {}
|
|
504
|
-
}
|
|
505
|
-
|
|
496
|
+
}
|
|
497
|
+
);
|
|
506
498
|
|
|
507
499
|
return resolver;
|
|
508
500
|
}
|