archondev 2.19.26 → 2.19.27
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 +38 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3683,6 +3683,10 @@ async function handleAgentConversationInput(cwd, input) {
|
|
|
3683
3683
|
await showLatestPlannedAtom(cwd);
|
|
3684
3684
|
return true;
|
|
3685
3685
|
}
|
|
3686
|
+
if (wantsProposalBeforeExecution(input)) {
|
|
3687
|
+
await showProposalForApproval(input);
|
|
3688
|
+
return true;
|
|
3689
|
+
}
|
|
3686
3690
|
const intent = detectUserIntent(input);
|
|
3687
3691
|
if (isReadOnlyExploreRequest(input) || intent.mode === "explore" && intent.confidence >= 0.7) {
|
|
3688
3692
|
console.log(chalk5.dim("\n> Got it! Analyzing the project...\n"));
|
|
@@ -3692,11 +3696,12 @@ async function handleAgentConversationInput(cwd, input) {
|
|
|
3692
3696
|
console.log(chalk5.dim("\n> Got it! Creating a task for this...\n"));
|
|
3693
3697
|
const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
|
|
3694
3698
|
await plan2(input, { conversational: true });
|
|
3695
|
-
if (
|
|
3696
|
-
await
|
|
3699
|
+
if (shouldAutoExecuteAfterPlanning(input)) {
|
|
3700
|
+
await continueWithCurrentTask(cwd);
|
|
3697
3701
|
return true;
|
|
3698
3702
|
}
|
|
3699
|
-
await
|
|
3703
|
+
await showLatestPlannedAtom(cwd);
|
|
3704
|
+
console.log(chalk5.dim('\nReply "continue" when you approve this plan, or tell me what to change.'));
|
|
3700
3705
|
return true;
|
|
3701
3706
|
}
|
|
3702
3707
|
function isReadOnlyExploreRequest(input) {
|
|
@@ -3711,7 +3716,27 @@ function isReferenceToPreviousRequest(input) {
|
|
|
3711
3716
|
}
|
|
3712
3717
|
function shouldStopAfterPlanning(input) {
|
|
3713
3718
|
const normalized = input.toLowerCase();
|
|
3714
|
-
return normalized.includes("plan before") || normalized.includes("before continuing") || normalized.includes("before we continue") || normalized.includes("show me your plan") || normalized.includes("give me your plan") || normalized.includes("come up with a plan") || normalized.includes("do not start yet");
|
|
3719
|
+
return normalized.includes("plan before") || normalized.includes("before continuing") || normalized.includes("before we continue") || normalized.includes("show me your plan") || normalized.includes("give me your plan") || normalized.includes("let me know what your plan") || normalized.includes("what your plan is") || normalized.includes("how to implement") || normalized.includes("come up with a plan") || normalized.includes("do not start yet");
|
|
3720
|
+
}
|
|
3721
|
+
function shouldAutoExecuteAfterPlanning(input) {
|
|
3722
|
+
const normalized = input.toLowerCase();
|
|
3723
|
+
return normalized.includes("execute now") || normalized.includes("implement now") || normalized.includes("start coding now") || normalized.includes("go ahead and execute") || normalized.includes("go ahead and implement") || normalized.includes("run it now");
|
|
3724
|
+
}
|
|
3725
|
+
function wantsProposalBeforeExecution(input) {
|
|
3726
|
+
const normalized = input.toLowerCase();
|
|
3727
|
+
return shouldStopAfterPlanning(input) || (normalized.includes("review") || normalized.includes("analyze") || normalized.includes("analyse")) && (normalized.includes("let me know") || normalized.includes("plan")) && (normalized.includes("first") || normalized.includes("before"));
|
|
3728
|
+
}
|
|
3729
|
+
async function showProposalForApproval(input) {
|
|
3730
|
+
console.log(chalk5.dim("\n> Understood. I will not create atoms yet.\n"));
|
|
3731
|
+
console.log(chalk5.bold("Proposed plan (for your approval):"));
|
|
3732
|
+
console.log(chalk5.dim(" 1. Review project files and locate the capsule markdown/source for day 1."));
|
|
3733
|
+
console.log(chalk5.dim(" 2. Evaluate day-1 content boundaries and recommend one capsule vs multiple capsules with rationale."));
|
|
3734
|
+
console.log(chalk5.dim(" 3. Draft a user-friendly capsule structure for day 1."));
|
|
3735
|
+
console.log(chalk5.dim(" 4. Present implementation plan and wait for your approval before creating atoms or executing."));
|
|
3736
|
+
if (input.trim()) {
|
|
3737
|
+
console.log();
|
|
3738
|
+
console.log(chalk5.dim('Reply "approve plan" to proceed, or tell me what to adjust in this plan.'));
|
|
3739
|
+
}
|
|
3715
3740
|
}
|
|
3716
3741
|
async function showLatestPlannedAtom(cwd) {
|
|
3717
3742
|
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-PJI6MCS3.js");
|
|
@@ -3871,6 +3896,11 @@ function containsActionIntent(input) {
|
|
|
3871
3896
|
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);
|
|
3872
3897
|
}
|
|
3873
3898
|
async function handlePostExploreAction(cwd, request, options = {}) {
|
|
3899
|
+
const sourceInput = options.originalInput?.trim() || request;
|
|
3900
|
+
if (wantsProposalBeforeExecution(sourceInput)) {
|
|
3901
|
+
await showProposalForApproval(sourceInput);
|
|
3902
|
+
return;
|
|
3903
|
+
}
|
|
3874
3904
|
const intent = detectUserIntent(request);
|
|
3875
3905
|
if (intent.mode === "app_builder" && intent.confidence >= 0.7) {
|
|
3876
3906
|
console.log(chalk5.dim("> Let me understand your project better...\n"));
|
|
@@ -3885,12 +3915,12 @@ async function handlePostExploreAction(cwd, request, options = {}) {
|
|
|
3885
3915
|
const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
|
|
3886
3916
|
await plan2(request, { conversational: true });
|
|
3887
3917
|
if (options.agentMode) {
|
|
3888
|
-
|
|
3889
|
-
if (shouldStopAfterPlanning(sourceInput)) {
|
|
3890
|
-
await showLatestPlannedAtom(cwd);
|
|
3891
|
-
} else {
|
|
3918
|
+
if (shouldAutoExecuteAfterPlanning(sourceInput)) {
|
|
3892
3919
|
await continueWithCurrentTask(cwd);
|
|
3920
|
+
return;
|
|
3893
3921
|
}
|
|
3922
|
+
await showLatestPlannedAtom(cwd);
|
|
3923
|
+
console.log(chalk5.dim('\nReply "continue" when you approve this plan, or tell me what to change.'));
|
|
3894
3924
|
}
|
|
3895
3925
|
}
|
|
3896
3926
|
async function planTask() {
|