Merge pull request #3971 from MoerAI/fix/task-examples-add-run-in-background
fix(agents): add run_in_background to category task() examples in prompts (fixes #3960)
This commit is contained in:
@@ -102,6 +102,7 @@ Check the \`skill\` tool for available skills and their descriptions. For EVERY
|
||||
task(
|
||||
category="[selected-category]",
|
||||
load_skills=["skill-1", "skill-2"], // Include ALL relevant skills - ESPECIALLY user-installed ones
|
||||
run_in_background=false,
|
||||
prompt="..."
|
||||
)
|
||||
\`\`\`
|
||||
@@ -123,10 +124,10 @@ Any task involving UI, UX, CSS, styling, layout, animation, design, or frontend
|
||||
|
||||
\`\`\`typescript
|
||||
// CORRECT: Visual work → visual-engineering category
|
||||
task(category="visual-engineering", load_skills=["frontend-ui-ux"], prompt="Redesign the sidebar layout with new spacing...")
|
||||
task(category="visual-engineering", load_skills=["frontend-ui-ux"], run_in_background=false, prompt="Redesign the sidebar layout with new spacing...")
|
||||
|
||||
// WRONG: Visual work in wrong category - WILL PRODUCE INFERIOR RESULTS
|
||||
task(category="quick", load_skills=[], prompt="Redesign the sidebar layout with new spacing...")
|
||||
task(category="quick", load_skills=[], run_in_background=false, prompt="Redesign the sidebar layout with new spacing...")
|
||||
\`\`\`
|
||||
|
||||
| Task Domain | MUST Use Category |
|
||||
|
||||
@@ -381,6 +381,7 @@ When delegating, ALWAYS check if relevant skills should be loaded:
|
||||
task(
|
||||
category="visual-engineering",
|
||||
load_skills=["frontend-ui-ux"],
|
||||
run_in_background=false,
|
||||
prompt="1. TASK: Build the settings page... 2. EXPECTED OUTCOME: ..."
|
||||
)
|
||||
\`\`\`
|
||||
|
||||
@@ -142,7 +142,7 @@ export function buildGeminiToolCallExamples(): string {
|
||||
**User**: "Add a new /health endpoint to the API"
|
||||
**CORRECT**:
|
||||
\`\`\`
|
||||
→ Call Task(category="quick", load_skills=["typescript-programmer"], prompt="...")
|
||||
→ Call Task(category="quick", load_skills=["typescript-programmer"], run_in_background=false, prompt="...")
|
||||
→ (After agent completes) Read changed files to verify
|
||||
→ Call LspDiagnostics on changed files
|
||||
→ Report
|
||||
|
||||
Reference in New Issue
Block a user