Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ export function isEagernessPrompt(options: PromptOptions): boolean {
return (options.eagernessPrompt !== undefined && [
PromptingStrategy.PatchBased02,
PromptingStrategy.PatchBased02WithRecentLineNumbers,
PromptingStrategy.PatchBased02Unified,
PromptingStrategy.PatchBased02WithoutRecentLineNumbers,
].includes(options.promptingStrategy)) // eagerness prompt option is only supported for patch-based strategies
|| [PromptingStrategy.XtabAggressiveness,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ describe('isEagernessPrompt', () => {
expect(isEagernessPrompt({ ...DEFAULT_OPTIONS, promptingStrategy: PromptingStrategy.PatchBased02, eagernessPrompt: 'aggressionHighLow' })).toBe(true);
expect(isEagernessPrompt({ ...DEFAULT_OPTIONS, promptingStrategy: PromptingStrategy.PatchBased02 })).toBe(false);
});

it('recognizes the optimized PatchBased02 aggression prompt option', () => {
expect(isEagernessPrompt({ ...DEFAULT_OPTIONS, promptingStrategy: PromptingStrategy.PatchBased02Unified, eagernessPrompt: 'aggressionHighLow' })).toBe(true);
expect(isEagernessPrompt({ ...DEFAULT_OPTIONS, promptingStrategy: PromptingStrategy.PatchBased02Unified })).toBe(false);
});

it('does not recognize eagerness for an unrelated strategy', () => {
expect(isEagernessPrompt({ ...DEFAULT_OPTIONS, promptingStrategy: PromptingStrategy.CopilotNesXtab, eagernessPrompt: 'aggressionHighLow' })).toBe(false);
});
});

describe('GlobalBudgetOptions', () => {
Expand Down
Loading