mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: 更新 Code Index MCP 提供者支持,修改 CLAUDE.md 和相关样式
This commit is contained in:
@@ -158,3 +158,37 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Code Index MCP Toggle Buttons */
|
||||
.code-mcp-btn {
|
||||
padding: 0.375rem 0.75rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
border-radius: 0.375rem;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
background: transparent;
|
||||
color: hsl(var(--muted-foreground));
|
||||
}
|
||||
|
||||
.code-mcp-btn:hover {
|
||||
color: hsl(var(--foreground));
|
||||
background: hsl(var(--muted) / 0.5);
|
||||
}
|
||||
|
||||
.code-mcp-btn.active,
|
||||
.code-mcp-btn[class*="bg-primary"] {
|
||||
background: hsl(var(--primary));
|
||||
color: hsl(var(--primary-foreground));
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.code-mcp-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
background: hsl(var(--muted));
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.125rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -776,7 +776,9 @@ async function setCodeIndexMcpProvider(provider) {
|
||||
window.claudeCliToolsConfig.settings.codeIndexMcp = provider;
|
||||
}
|
||||
showRefreshToast(`Code Index MCP switched to ${provider === 'ace' ? 'ACE (Augment)' : 'CodexLens'}`, 'success');
|
||||
renderCliStatus();
|
||||
// Re-render both CLI status and settings section
|
||||
if (typeof renderCliStatus === 'function') renderCliStatus();
|
||||
if (typeof renderCliSettingsSection === 'function') renderCliSettingsSection();
|
||||
} else {
|
||||
const data = await response.json();
|
||||
showRefreshToast(`Failed to switch Code Index MCP: ${data.error}`, 'error');
|
||||
|
||||
@@ -546,7 +546,9 @@ const i18n = {
|
||||
'cli.recursiveQueryDesc': 'Aggregate CLI history and memory data from parent and child projects',
|
||||
'cli.maxContextFiles': 'Max Context Files',
|
||||
'cli.maxContextFilesDesc': 'Maximum files to include in smart context',
|
||||
|
||||
'cli.codeIndexMcp': 'Code Index MCP',
|
||||
'cli.codeIndexMcpDesc': 'Code search provider (updates CLAUDE.md context-tools reference)',
|
||||
|
||||
// CCW Install
|
||||
'ccw.install': 'CCW Install',
|
||||
'ccw.installations': 'installation',
|
||||
@@ -2254,7 +2256,9 @@ const i18n = {
|
||||
'cli.recursiveQueryDesc': '聚合显示父项目和子项目的 CLI 历史与内存数据',
|
||||
'cli.maxContextFiles': '最大上下文文件数',
|
||||
'cli.maxContextFilesDesc': '智能上下文包含的最大文件数',
|
||||
|
||||
'cli.codeIndexMcp': '代码索引 MCP',
|
||||
'cli.codeIndexMcpDesc': '代码搜索提供者 (更新 CLAUDE.md 的 context-tools 引用)',
|
||||
|
||||
// CCW Install
|
||||
'ccw.install': 'CCW 安装',
|
||||
'ccw.installations': '个安装',
|
||||
|
||||
@@ -987,6 +987,23 @@ function renderCliSettingsSection() {
|
||||
'</div>' +
|
||||
'<p class="cli-setting-desc">' + t('cli.maxContextFilesDesc') + '</p>' +
|
||||
'</div>' +
|
||||
'<div class="cli-setting-item">' +
|
||||
'<label class="cli-setting-label">' +
|
||||
'<i data-lucide="search" class="w-3 h-3"></i>' +
|
||||
t('cli.codeIndexMcp') +
|
||||
'</label>' +
|
||||
'<div class="cli-setting-control">' +
|
||||
'<div class="flex items-center bg-muted rounded-lg p-0.5">' +
|
||||
'<button class="code-mcp-btn px-3 py-1.5 text-xs font-medium rounded-md transition-all ' + (codeIndexMcpProvider === 'codexlens' ? 'bg-primary text-primary-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground') + '" onclick="setCodeIndexMcpProvider(\'codexlens\')">' +
|
||||
'CodexLens' +
|
||||
'</button>' +
|
||||
'<button class="code-mcp-btn px-3 py-1.5 text-xs font-medium rounded-md transition-all ' + (codeIndexMcpProvider === 'ace' ? 'bg-primary text-primary-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground') + '" onclick="setCodeIndexMcpProvider(\'ace\')">' +
|
||||
'ACE' +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<p class="cli-setting-desc">' + t('cli.codeIndexMcpDesc') + '</p>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
container.innerHTML = settingsHtml;
|
||||
|
||||
Reference in New Issue
Block a user