archondev 2.19.27 → 2.19.28
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 +24 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2615,6 +2615,7 @@ function detectWebProject(cwd) {
|
|
|
2615
2615
|
|
|
2616
2616
|
// src/cli/start.ts
|
|
2617
2617
|
var PAID_TIER_DEFAULT_CHAT_MODEL = "gemini-3.1-pro-preview";
|
|
2618
|
+
var pendingProposalRequest = null;
|
|
2618
2619
|
function uiText(rich, plain) {
|
|
2619
2620
|
return isTerminalSafeMode() ? plain : rich;
|
|
2620
2621
|
}
|
|
@@ -3675,6 +3676,10 @@ async function runAgentMode(cwd, state) {
|
|
|
3675
3676
|
async function handleAgentConversationInput(cwd, input) {
|
|
3676
3677
|
const normalized = input.trim().toLowerCase();
|
|
3677
3678
|
if (!normalized) return false;
|
|
3679
|
+
if (pendingProposalRequest && isPlanApprovalDirective(normalized)) {
|
|
3680
|
+
await applyApprovedProposal(cwd);
|
|
3681
|
+
return true;
|
|
3682
|
+
}
|
|
3678
3683
|
if (isContinuationDirective(normalized)) {
|
|
3679
3684
|
await continueWithCurrentTask(cwd);
|
|
3680
3685
|
return true;
|
|
@@ -3727,6 +3732,7 @@ function wantsProposalBeforeExecution(input) {
|
|
|
3727
3732
|
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
3733
|
}
|
|
3729
3734
|
async function showProposalForApproval(input) {
|
|
3735
|
+
pendingProposalRequest = input.trim();
|
|
3730
3736
|
console.log(chalk5.dim("\n> Understood. I will not create atoms yet.\n"));
|
|
3731
3737
|
console.log(chalk5.bold("Proposed plan (for your approval):"));
|
|
3732
3738
|
console.log(chalk5.dim(" 1. Review project files and locate the capsule markdown/source for day 1."));
|
|
@@ -3764,6 +3770,24 @@ function isContinuationDirective(input) {
|
|
|
3764
3770
|
const normalized = input.trim().toLowerCase();
|
|
3765
3771
|
return normalized === "continue" || normalized === "continue." || normalized === "go on" || normalized === "go ahead" || normalized === "next" || normalized === "proceed" || normalized === "do it";
|
|
3766
3772
|
}
|
|
3773
|
+
function isPlanApprovalDirective(input) {
|
|
3774
|
+
const normalized = input.trim().toLowerCase();
|
|
3775
|
+
return normalized === "approve" || normalized === "approve plan" || normalized === "approved" || normalized === "yes" || normalized === "yes, proceed" || normalized === "proceed" || normalized === "continue" || normalized === "continue.";
|
|
3776
|
+
}
|
|
3777
|
+
async function applyApprovedProposal(cwd) {
|
|
3778
|
+
const approvedRequest = pendingProposalRequest;
|
|
3779
|
+
if (!approvedRequest) return;
|
|
3780
|
+
pendingProposalRequest = null;
|
|
3781
|
+
console.log(chalk5.dim("\n> Great. I will create the task from your approved request.\n"));
|
|
3782
|
+
const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
|
|
3783
|
+
await plan2(approvedRequest, { conversational: true });
|
|
3784
|
+
if (shouldAutoExecuteAfterPlanning(approvedRequest)) {
|
|
3785
|
+
await continueWithCurrentTask(cwd);
|
|
3786
|
+
return;
|
|
3787
|
+
}
|
|
3788
|
+
await showLatestPlannedAtom(cwd);
|
|
3789
|
+
console.log(chalk5.dim('\nReply "continue" when you approve this plan, or tell me what to change.'));
|
|
3790
|
+
}
|
|
3767
3791
|
async function continueWithCurrentTask(cwd) {
|
|
3768
3792
|
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-PJI6MCS3.js");
|
|
3769
3793
|
const atoms = await listLocalAtoms2();
|