fix(plan): clarify that plan mode policies are combined with normal mode (#23158)

This commit is contained in:
ruomeng
2026-03-19 17:51:10 -04:00
committed by GitHub
parent 08063d7b0a
commit 98d1bec99f
2 changed files with 10 additions and 3 deletions

View File

@@ -116,7 +116,9 @@ describe('policiesCommand', () => {
expect(content).toContain(
'### Yolo Mode Policies (combined with normal mode policies)',
);
expect(content).toContain('### Plan Mode Policies');
expect(content).toContain(
'### Plan Mode Policies (combined with normal mode policies)',
);
expect(content).toContain(
'**DENY** tool: `dangerousTool` [Priority: 10]',
);
@@ -162,7 +164,9 @@ describe('policiesCommand', () => {
const content = (call[0] as { text: string }).text;
// Plan-only rules appear under Plan Mode section
expect(content).toContain('### Plan Mode Policies');
expect(content).toContain(
'### Plan Mode Policies (combined with normal mode policies)',
);
// glob ALLOW is plan-only, should appear in plan section
expect(content).toContain('**ALLOW** tool: `glob` [Priority: 70]');
// shell ALLOW has no modes (applies to all), appears in normal section

View File

@@ -100,7 +100,10 @@ const listPoliciesCommand: SlashCommand = {
'Yolo Mode Policies (combined with normal mode policies)',
uniqueYolo,
);
content += formatSection('Plan Mode Policies', uniquePlan);
content += formatSection(
'Plan Mode Policies (combined with normal mode policies)',
uniquePlan,
);
context.ui.addItem(
{