archondev 2.19.7 → 2.19.8
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.js +21 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3315,10 +3315,12 @@ async function runExploreFlow(cwd, followUpInput) {
|
|
|
3315
3315
|
}
|
|
3316
3316
|
console.log();
|
|
3317
3317
|
console.log(chalk6.green("\u2713 Analysis complete! I'm ready to work on this project.\n"));
|
|
3318
|
-
const
|
|
3319
|
-
|
|
3318
|
+
const originalFollowUp = (followUpInput ?? "").trim();
|
|
3319
|
+
const actionableFollowUp = extractActionableFollowUpFromExplore(originalFollowUp);
|
|
3320
|
+
if (actionableFollowUp || containsActionIntent(originalFollowUp)) {
|
|
3321
|
+
const request = actionableFollowUp ?? originalFollowUp;
|
|
3320
3322
|
console.log(chalk6.dim("I finished the project scan. Continuing with your requested task...\n"));
|
|
3321
|
-
await handlePostExploreAction(cwd,
|
|
3323
|
+
await handlePostExploreAction(cwd, request);
|
|
3322
3324
|
await showMainMenu();
|
|
3323
3325
|
return;
|
|
3324
3326
|
}
|
|
@@ -3902,12 +3904,20 @@ function extractActionableFollowUpFromExplore(input) {
|
|
|
3902
3904
|
const trimmed = input.trim();
|
|
3903
3905
|
if (!trimmed) return null;
|
|
3904
3906
|
const normalized = trimmed.toLowerCase();
|
|
3905
|
-
const hasExploreSignal = /(
|
|
3906
|
-
const hasActionSignal =
|
|
3907
|
+
const hasExploreSignal = /(analy[sz]e|review|explore|scan|inspect|understand|get familiar)/.test(normalized);
|
|
3908
|
+
const hasActionSignal = containsActionIntent(trimmed);
|
|
3907
3909
|
if (!hasExploreSignal || !hasActionSignal) {
|
|
3908
3910
|
return null;
|
|
3909
3911
|
}
|
|
3910
|
-
const
|
|
3912
|
+
const intentCue = /\b(i would like to|i want to|i need to|how (can|could|do i)|can you|could you|would you|help me)\b/i;
|
|
3913
|
+
const cueMatch = trimmed.match(intentCue);
|
|
3914
|
+
if (cueMatch?.index !== void 0 && cueMatch.index > 0) {
|
|
3915
|
+
const candidate = trimmed.slice(cueMatch.index).trim();
|
|
3916
|
+
if (candidate.length > 10) {
|
|
3917
|
+
return candidate;
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
const transitions = [". ", " and then ", " then ", " and ", " - "];
|
|
3911
3921
|
for (const token of transitions) {
|
|
3912
3922
|
const idx = normalized.indexOf(token);
|
|
3913
3923
|
if (idx !== -1) {
|
|
@@ -3919,6 +3929,11 @@ function extractActionableFollowUpFromExplore(input) {
|
|
|
3919
3929
|
}
|
|
3920
3930
|
return trimmed;
|
|
3921
3931
|
}
|
|
3932
|
+
function containsActionIntent(input) {
|
|
3933
|
+
const normalized = input.trim().toLowerCase();
|
|
3934
|
+
if (!normalized) return false;
|
|
3935
|
+
return /(i would like to|i want to|i need to|how (can|could|do i)|can you|could you|would you|help me|create|build|generate|make|produce|plan|implement|write|fix|convert|compile)/.test(normalized);
|
|
3936
|
+
}
|
|
3922
3937
|
async function handlePostExploreAction(cwd, request) {
|
|
3923
3938
|
const intent = detectUserIntent(request);
|
|
3924
3939
|
if (intent.mode === "app_builder" && intent.confidence >= 0.7) {
|