@acmecloud/core 1.0.12 → 1.0.13
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/agent/index.js +7 -2
- package/package.json +1 -1
- package/src/agent/index.ts +7 -2
package/dist/agent/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { builtInTools, toolExecutors, isCommandSafe } from "../tools/index.js";
|
|
|
4
4
|
import { getMcpTools } from "../mcp/index.js";
|
|
5
5
|
import { getSystemPrompt } from "../prompt/index.js";
|
|
6
6
|
// ── Configuration ──
|
|
7
|
-
const MAX_STEPS =
|
|
7
|
+
const MAX_STEPS = 300;
|
|
8
8
|
const MAX_OUTPUT_LENGTH = 30000;
|
|
9
9
|
const MAX_RETRIES = 2;
|
|
10
10
|
// ── Model-specific output token limits ──
|
|
@@ -488,7 +488,12 @@ export async function* runAgent(provider, modelName, messages, systemPrompt, abo
|
|
|
488
488
|
promptLength: system.length,
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
|
|
491
|
+
// Reached maximum steps - prompt user to continue in new session
|
|
492
|
+
yield { type: "text", text: `\n[Reached maximum steps (${MAX_STEPS})]\n\n` };
|
|
493
|
+
yield {
|
|
494
|
+
type: "text",
|
|
495
|
+
text: `The conversation has reached the step limit. To continue working on this task, please start a new session. Your progress has been saved.`,
|
|
496
|
+
};
|
|
492
497
|
yield { type: "messages", messages: currentMessages };
|
|
493
498
|
return [];
|
|
494
499
|
}
|
package/package.json
CHANGED
package/src/agent/index.ts
CHANGED
|
@@ -38,7 +38,7 @@ export type AgentEvent =
|
|
|
38
38
|
| { type: "mode-changed"; mode: AgentMode; planFile?: string };
|
|
39
39
|
|
|
40
40
|
// ── Configuration ──
|
|
41
|
-
const MAX_STEPS =
|
|
41
|
+
const MAX_STEPS = 300;
|
|
42
42
|
const MAX_OUTPUT_LENGTH = 30000;
|
|
43
43
|
const MAX_RETRIES = 2;
|
|
44
44
|
|
|
@@ -610,7 +610,12 @@ export async function* runAgent(
|
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
612
|
|
|
613
|
-
|
|
613
|
+
// Reached maximum steps - prompt user to continue in new session
|
|
614
|
+
yield { type: "text", text: `\n[Reached maximum steps (${MAX_STEPS})]\n\n` };
|
|
615
|
+
yield {
|
|
616
|
+
type: "text",
|
|
617
|
+
text: `The conversation has reached the step limit. To continue working on this task, please start a new session. Your progress has been saved.`,
|
|
618
|
+
};
|
|
614
619
|
yield { type: "messages", messages: currentMessages };
|
|
615
620
|
return [];
|
|
616
621
|
}
|