blun-king-cli 5.2.4 → 5.2.5
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/blun-cli.js +4 -2
- package/package.json +1 -1
package/blun-cli.js
CHANGED
|
@@ -2812,8 +2812,10 @@ async function main() {
|
|
|
2812
2812
|
|
|
2813
2813
|
function detectIntent(text) {
|
|
2814
2814
|
var lower = text.toLowerCase();
|
|
2815
|
-
// Skip if text is long
|
|
2816
|
-
if (text.length >
|
|
2815
|
+
// Skip if text is long or looks like a chat message (not a command)
|
|
2816
|
+
if (text.length > 50) return null;
|
|
2817
|
+
// Skip if text has more than 4 words (likely a sentence, not a command)
|
|
2818
|
+
if (text.trim().split(/\s+/).length > 4) return null;
|
|
2817
2819
|
for (var i = 0; i < INTENTS.length; i++) {
|
|
2818
2820
|
var intent = INTENTS[i];
|
|
2819
2821
|
for (var j = 0; j < intent.patterns.length; j++) {
|