feat: Add enableSubagents configuration and wire up subagent registration (#9988)

This commit is contained in:
Abhi
2025-10-01 16:54:00 -04:00
committed by GitHub
parent 5b16771567
commit 331ae7dbdf
14 changed files with 352 additions and 39 deletions
+53
View File
@@ -2534,6 +2534,59 @@ describe('loadCliConfig useRipgrep', () => {
expect(config.getUseModelRouter()).toBe(false);
});
});
describe('loadCliConfig enableSubagents', () => {
it('should be false by default when enableSubagents is not set in settings', async () => {
process.argv = ['node', 'script.js'];
const argv = await parseArguments({} as Settings);
const settings: Settings = {};
const config = await loadCliConfig(
settings,
[],
new ExtensionEnablementManager(
ExtensionStorage.getUserExtensionsDir(),
argv.extensions,
),
'test-session',
argv,
);
expect(config.getEnableSubagents()).toBe(false);
});
it('should be true when enableSubagents is set to true in settings', async () => {
process.argv = ['node', 'script.js'];
const argv = await parseArguments({} as Settings);
const settings: Settings = { experimental: { enableSubagents: true } };
const config = await loadCliConfig(
settings,
[],
new ExtensionEnablementManager(
ExtensionStorage.getUserExtensionsDir(),
argv.extensions,
),
'test-session',
argv,
);
expect(config.getEnableSubagents()).toBe(true);
});
it('should be false when enableSubagents is explicitly set to false in settings', async () => {
process.argv = ['node', 'script.js'];
const argv = await parseArguments({} as Settings);
const settings: Settings = { experimental: { enableSubagents: false } };
const config = await loadCliConfig(
settings,
[],
new ExtensionEnablementManager(
ExtensionStorage.getUserExtensionsDir(),
argv.extensions,
),
'test-session',
argv,
);
expect(config.getEnableSubagents()).toBe(false);
});
});
});
describe('screenReader configuration', () => {