Skip to content

Commit 263d260

Browse files
committed
feat: make attempt_completion tool conditional based on task context
- Add isOrchestrated flag to Task class to track subtask context - Always include attempt_completion for orchestrated subtasks - Make attempt_completion optional for standard tasks via allowAttemptCompletion setting - Default behavior excludes attempt_completion for standard tasks - Add comprehensive tests for conditional inclusion logic - Update UI components to expose the new setting - Update snapshots to reflect new default behavior Fixes #7529
1 parent 1d46bd1 commit 263d260

26 files changed

+339
-249
lines changed

packages/types/src/global-settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const globalSettingsSchema = z.object({
6262
alwaysAllowFollowupQuestions: z.boolean().optional(),
6363
followupAutoApproveTimeoutMs: z.number().optional(),
6464
alwaysAllowUpdateTodoList: z.boolean().optional(),
65+
allowAttemptCompletion: z.boolean().optional(),
6566
allowedCommands: z.array(z.string()).optional(),
6667
deniedCommands: z.array(z.string()).optional(),
6768
commandExecutionTimeout: z.number().optional(),

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)