Compare commits
3 Commits
feat/confi
...
feat/mcpct
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce7df10e06 | ||
|
|
25c1bffdd0 | ||
| d56a074733 |
File diff suppressed because one or more lines are too long
@@ -510,6 +510,24 @@ describe('config prime-agent', () => {
|
||||
expect(exceptionSafeRead(join(tmpDir, '.mcpctl-project'))).toBeNull();
|
||||
});
|
||||
|
||||
it('the installed switcher extension publishes the active project to the footer', async () => {
|
||||
const settingsPath = join(tmpDir, 'settings.json');
|
||||
const cmd = createConfigCommand(
|
||||
{ configDeps: { configDir: tmpDir }, log },
|
||||
{ client, credentialsDeps: { configDir: tmpDir }, log },
|
||||
);
|
||||
await cmd.parseAsync(['prime-agent', '--project', 'ha', '-o', settingsPath, '--skip-skills', '--token', 'mcpctl_pat_x'], { from: 'user' });
|
||||
|
||||
const ext = readFileSync(join(tmpDir, 'extensions', 'mcpctl-switch.ts'), 'utf-8');
|
||||
// Footer status, refreshed on startup and on every reload (which is what
|
||||
// the switch itself triggers) — the mcpctl equivalent of the model name.
|
||||
expect(ext).toContain("pi.on('session_start'");
|
||||
expect(ext).toContain('ctx.ui.setStatus(STATUS_KEY');
|
||||
expect(ext).toContain('`mcpctl:${active}`');
|
||||
// notify() only accepts info|warning|error — 'success' is not a valid type.
|
||||
expect(ext).not.toContain("'success'");
|
||||
});
|
||||
|
||||
it('the installed switcher extension passes --skip-marker', async () => {
|
||||
const settingsPath = join(tmpDir, 'settings.json');
|
||||
const cmd = createConfigCommand(
|
||||
|
||||
Reference in New Issue
Block a user