update UI
This commit is contained in:
@@ -99,14 +99,19 @@ export async function runInteractiveProfilesSetup() {
|
|||||||
// Simple profiles (Claude, Codex) - specify the target file
|
// Simple profiles (Claude, Codex) - specify the target file
|
||||||
const targetFileName =
|
const targetFileName =
|
||||||
profileName === 'claude' ? 'CLAUDE.md' : 'AGENTS.md';
|
profileName === 'claude' ? 'CLAUDE.md' : 'AGENTS.md';
|
||||||
description = `Integration guide for ${displayName} (${targetFileName})`;
|
description = `Integration guide (${targetFileName})`;
|
||||||
} else {
|
} else {
|
||||||
// Full profiles with rules - check if they have MCP config
|
// Full profiles with rules - check if they have MCP config
|
||||||
const hasMcpConfig = profile.mcpConfig === true;
|
const hasMcpConfig = profile.mcpConfig === true;
|
||||||
if (hasMcpConfig) {
|
if (hasMcpConfig) {
|
||||||
description = `Rule profile and MCP config for ${displayName}`;
|
// Special case for Roo to mention agent modes
|
||||||
|
if (profileName === 'roo') {
|
||||||
|
description = `Rule profile, MCP config, and agent modes`;
|
||||||
|
} else {
|
||||||
|
description = `Rule profile and MCP config`;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
description = `Rule profile for ${displayName}`;
|
description = `Rule profile`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +119,7 @@ export async function runInteractiveProfilesSetup() {
|
|||||||
displayName,
|
displayName,
|
||||||
description
|
description
|
||||||
};
|
};
|
||||||
}).sort((a, b) => a.displayName.localeCompare(b.displayName)); // Alphabetize by display name
|
}).sort((a, b) => a.displayName.localeCompare(b.displayName));
|
||||||
|
|
||||||
const profileListText = profileDescriptions
|
const profileListText = profileDescriptions
|
||||||
.map(
|
.map(
|
||||||
|
|||||||
@@ -11,12 +11,21 @@ import { removeTaskMasterMCPConfiguration } from '../../../src/utils/mcp-config-
|
|||||||
const mockLog = {
|
const mockLog = {
|
||||||
info: jest.fn(),
|
info: jest.fn(),
|
||||||
error: jest.fn(),
|
error: jest.fn(),
|
||||||
debug: jest.fn()
|
debug: jest.fn(),
|
||||||
|
warn: jest.fn()
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mock the logger import
|
// Mock the logger import
|
||||||
jest.mock('../../../scripts/modules/utils.js', () => ({
|
jest.mock('../../../scripts/modules/utils.js', () => ({
|
||||||
log: (level, message) => mockLog[level]?.(message)
|
log: jest.fn((level, ...args) => {
|
||||||
|
// Handle the log function more robustly to avoid JSON parsing issues in tests
|
||||||
|
const mockFn = mockLog[level] || jest.fn();
|
||||||
|
// Convert objects to strings safely for testing
|
||||||
|
const safeArgs = args.map(arg =>
|
||||||
|
typeof arg === 'object' ? '[Object]' : String(arg)
|
||||||
|
);
|
||||||
|
return mockFn(...safeArgs);
|
||||||
|
})
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('Selective Rules Removal', () => {
|
describe('Selective Rules Removal', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user