mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
feat: Add CodexLens Manager to dashboard and enhance GPU management
- Introduced a new CodexLens Manager item in the dashboard for easier access. - Implemented GPU management commands in the CLI, including listing available GPUs, selecting a specific GPU, and resetting to automatic detection. - Enhanced the embedding generation process to utilize GPU resources more effectively, including batch size optimization for better performance. - Updated the embedder to support device ID options for GPU selection, ensuring compatibility with DirectML and CUDA. - Added detailed logging and error handling for GPU detection and selection processes. - Updated package version to 6.2.9 and added comprehensive documentation for Codex Agent Execution Protocol.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
let cliToolStatus = { gemini: {}, qwen: {}, codex: {}, claude: {} };
|
||||
let codexLensStatus = { ready: false };
|
||||
let semanticStatus = { available: false };
|
||||
let ccwInstallStatus = { installed: true, workflowsInstalled: true, missingFiles: [], installPath: '' };
|
||||
let defaultCliTool = 'gemini';
|
||||
let promptConcatFormat = localStorage.getItem('ccw-prompt-format') || 'plain'; // plain, yaml, json
|
||||
|
||||
@@ -38,10 +39,12 @@ async function loadAllStatuses() {
|
||||
cliToolStatus = data.cli || { gemini: {}, qwen: {}, codex: {}, claude: {} };
|
||||
codexLensStatus = data.codexLens || { ready: false };
|
||||
semanticStatus = data.semantic || { available: false };
|
||||
ccwInstallStatus = data.ccwInstall || { installed: true, workflowsInstalled: true, missingFiles: [], installPath: '' };
|
||||
|
||||
// Update badges
|
||||
updateCliBadge();
|
||||
updateCodexLensBadge();
|
||||
updateCcwInstallBadge();
|
||||
|
||||
return data;
|
||||
} catch (err) {
|
||||
@@ -187,6 +190,25 @@ function updateCodexLensBadge() {
|
||||
}
|
||||
}
|
||||
|
||||
function updateCcwInstallBadge() {
|
||||
const badge = document.getElementById('badgeCcwInstall');
|
||||
if (badge) {
|
||||
if (ccwInstallStatus.installed) {
|
||||
badge.textContent = t('status.installed');
|
||||
badge.classList.add('text-success');
|
||||
badge.classList.remove('text-warning', 'text-destructive');
|
||||
} else if (ccwInstallStatus.workflowsInstalled === false) {
|
||||
badge.textContent = t('status.incomplete');
|
||||
badge.classList.add('text-warning');
|
||||
badge.classList.remove('text-success', 'text-destructive');
|
||||
} else {
|
||||
badge.textContent = t('status.notInstalled');
|
||||
badge.classList.add('text-destructive');
|
||||
badge.classList.remove('text-success', 'text-warning');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ========== Rendering ==========
|
||||
function renderCliStatus() {
|
||||
const container = document.getElementById('cli-status-panel');
|
||||
@@ -310,6 +332,39 @@ function renderCliStatus() {
|
||||
</div>
|
||||
` : '';
|
||||
|
||||
// CCW Installation Status card (show warning if not fully installed)
|
||||
const ccwInstallHtml = !ccwInstallStatus.installed ? `
|
||||
<div class="cli-tool-card tool-ccw-install unavailable" style="border: 1px solid var(--warning); background: rgba(var(--warning-rgb), 0.05);">
|
||||
<div class="cli-tool-header">
|
||||
<span class="cli-tool-status status-unavailable" style="background: var(--warning);"></span>
|
||||
<span class="cli-tool-name">${t('status.ccwInstall')}</span>
|
||||
<span class="badge px-1.5 py-0.5 text-xs rounded bg-warning/20 text-warning">${t('status.required')}</span>
|
||||
</div>
|
||||
<div class="cli-tool-desc text-xs text-muted-foreground mt-1">
|
||||
${t('status.ccwInstallDesc')}
|
||||
</div>
|
||||
<div class="cli-tool-info mt-2">
|
||||
<span class="text-warning flex items-center gap-1">
|
||||
<i data-lucide="alert-triangle" class="w-3 h-3"></i>
|
||||
${ccwInstallStatus.missingFiles.length} ${t('status.filesMissing')}
|
||||
</span>
|
||||
</div>
|
||||
<div class="cli-tool-actions flex flex-col gap-2 mt-3">
|
||||
<div class="text-xs text-muted-foreground">
|
||||
<p class="mb-1">${t('status.missingFiles')}:</p>
|
||||
<ul class="list-disc list-inside text-xs opacity-70">
|
||||
${ccwInstallStatus.missingFiles.slice(0, 3).map(f => `<li>${f}</li>`).join('')}
|
||||
${ccwInstallStatus.missingFiles.length > 3 ? `<li>+${ccwInstallStatus.missingFiles.length - 3} more...</li>` : ''}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bg-muted/50 rounded p-2 mt-2">
|
||||
<p class="text-xs font-medium mb-1">${t('status.runToFix')}:</p>
|
||||
<code class="text-xs bg-background px-2 py-1 rounded block">ccw install</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
` : '';
|
||||
|
||||
// CLI Settings section
|
||||
const settingsHtml = `
|
||||
<div class="cli-settings-section">
|
||||
@@ -392,6 +447,7 @@ function renderCliStatus() {
|
||||
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
|
||||
</button>
|
||||
</div>
|
||||
${ccwInstallHtml}
|
||||
<div class="cli-tools-grid">
|
||||
${toolsHtml}
|
||||
${codexLensHtml}
|
||||
|
||||
@@ -143,6 +143,12 @@ function initNavigation() {
|
||||
} else {
|
||||
console.error('renderCoreMemoryView not defined - please refresh the page');
|
||||
}
|
||||
} else if (currentView === 'codexlens-manager') {
|
||||
if (typeof renderCodexLensManager === 'function') {
|
||||
renderCodexLensManager();
|
||||
} else {
|
||||
console.error('renderCodexLensManager not defined - please refresh the page');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -183,6 +189,8 @@ function updateContentTitle() {
|
||||
titleEl.textContent = t('title.helpGuide');
|
||||
} else if (currentView === 'core-memory') {
|
||||
titleEl.textContent = t('title.coreMemory');
|
||||
} else if (currentView === 'codexlens-manager') {
|
||||
titleEl.textContent = t('title.codexLensManager');
|
||||
} else if (currentView === 'liteTasks') {
|
||||
const names = { 'lite-plan': t('title.litePlanSessions'), 'lite-fix': t('title.liteFixSessions') };
|
||||
titleEl.textContent = names[currentLiteType] || t('title.liteTasks');
|
||||
|
||||
Reference in New Issue
Block a user