@livx.cc/agentx 0.99.76 → 0.99.78
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/cli.js +7 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/tools.shell.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -361,13 +361,13 @@ function clauses(sentence) {
|
|
|
361
361
|
return sentence.split(/[,;:]\s*|\s+(?:so|but|and|then|because|however|therefore|thus|although|though)\s+/i).map((c) => c.trim()).filter(Boolean);
|
|
362
362
|
}
|
|
363
363
|
function endsOnAnnouncedAction(text) {
|
|
364
|
-
const sentences = text.split(/(?<=[.!?])\s+|\n+/).map((s) => s.trim()).filter(Boolean);
|
|
364
|
+
const sentences = text.split(/(?<=[.!?])\s+|\n+/).map((s) => s.replace(/^[\s#>*_`-]+|[*_`]+/g, "").trim()).filter(Boolean);
|
|
365
365
|
const last = sentences[sentences.length - 1];
|
|
366
|
-
if (!last || NEXT_STEP.test(
|
|
366
|
+
if (!last || sentences.slice(-2).some((s) => NEXT_STEP.test(s)) || SIGN_OFF.test(last) || AWAITS_USER.test(last)) return false;
|
|
367
367
|
if (PROGRESSIVE.test(last)) return true;
|
|
368
368
|
return clauses(last).some((c) => !NEXT_STEP.test(c) && !SIGN_OFF.test(c) && COMMITMENT.test(c));
|
|
369
369
|
}
|
|
370
|
-
var log3, p_sep, IMAGE_ELIDE_STUB, IMAGE_REF_SCHEME, REF_REGISTRY_MAX, refRegistry, isImageRefUrl, bearsImage, COMMITMENT, PROGRESSIVE, NEXT_STEP, SIGN_OFF;
|
|
370
|
+
var log3, p_sep, IMAGE_ELIDE_STUB, IMAGE_REF_SCHEME, REF_REGISTRY_MAX, refRegistry, isImageRefUrl, bearsImage, COMMITMENT, PROGRESSIVE, NEXT_STEP, SIGN_OFF, AWAITS_USER;
|
|
371
371
|
var init_llm = __esm({
|
|
372
372
|
"src/llm.ts"() {
|
|
373
373
|
"use strict";
|
|
@@ -385,6 +385,7 @@ var init_llm = __esm({
|
|
|
385
385
|
PROGRESSIVE = /^(?:also\s+|now\s+|then\s+)*(?:re-?)?(?:check|search|scan|read|verify|run|inspect|expand|look|examin|continu|proceed|try|fetch|load|open|test|build|grep|find|review|trac|dig|explor)\w*ing\b/i;
|
|
386
386
|
NEXT_STEP = /^next (?:step|run|up)\b/i;
|
|
387
387
|
SIGN_OFF = /^let me know\b/i;
|
|
388
|
+
AWAITS_USER = /^(?:do you )?(?:want|need) me to\b|\b(?:once|as soon as|after) you\b|\bwhen you(?:'re| are) ready\b/i;
|
|
388
389
|
}
|
|
389
390
|
});
|
|
390
391
|
|