feat: change default max turns for new agents from 10 to 1000
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -252,7 +252,7 @@ describe("agent-generation module", () => {
|
||||
expect(spec.description).toBe("");
|
||||
expect(spec.systemPrompt).toBe("");
|
||||
expect(spec.thinkingLevel).toBe("off");
|
||||
expect(spec.maxTurns).toBe(10);
|
||||
expect(spec.maxTurns).toBe(1000);
|
||||
});
|
||||
|
||||
it("truncates title to 60 characters", () => {
|
||||
@@ -274,11 +274,11 @@ describe("agent-generation module", () => {
|
||||
it("clamps maxTurns to valid range", () => {
|
||||
const json = JSON.stringify({
|
||||
title: "Test",
|
||||
maxTurns: 999,
|
||||
maxTurns: 9999,
|
||||
});
|
||||
|
||||
const spec = parseGenerationResponse(json);
|
||||
expect(spec.maxTurns).toBe(500);
|
||||
expect(spec.maxTurns).toBe(2000);
|
||||
|
||||
const json2 = JSON.stringify({ title: "Test", maxTurns: -5 });
|
||||
const spec2 = parseGenerationResponse(json2);
|
||||
|
||||
@@ -85,7 +85,7 @@ You MUST respond with ONLY valid JSON (no markdown, no explanation):
|
||||
"description": "A brief 1-2 sentence description of the agent's purpose and expertise",
|
||||
"systemPrompt": "A detailed markdown system prompt for the agent. This should be comprehensive and include:\\n- Role definition\\n- Core responsibilities\\n- Specific areas of expertise\\n- Behavioral guidelines\\n- Output format expectations\\n- Edge case handling instructions",
|
||||
"thinkingLevel": "off | minimal | low | medium | high",
|
||||
"maxTurns": 10
|
||||
"maxTurns": 1000
|
||||
}
|
||||
|
||||
## Guidelines for System Prompt Generation
|
||||
@@ -400,8 +400,8 @@ export function parseGenerationResponse(text: string): AgentGenerationSpec {
|
||||
? (obj.thinkingLevel as AgentGenerationSpec["thinkingLevel"])
|
||||
: "off",
|
||||
maxTurns: typeof obj.maxTurns === "number"
|
||||
? Math.max(1, Math.min(500, Math.round(obj.maxTurns)))
|
||||
: 10,
|
||||
? Math.max(1, Math.min(2000, Math.round(obj.maxTurns)))
|
||||
: 1000,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user