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:
catlog22
2025-12-23 18:35:30 +08:00
parent 5ff2a43b70
commit 39056292b7
17 changed files with 1834 additions and 78 deletions

View File

@@ -41,6 +41,7 @@ const i18n = {
'nav.explorer': 'Explorer',
'nav.status': 'Status',
'nav.history': 'History',
'nav.codexLensManager': 'CodexLens',
'nav.memory': 'Memory',
'nav.contextMemory': 'Context',
'nav.coreMemory': 'Core Memory',
@@ -98,7 +99,8 @@ const i18n = {
'title.hookManager': 'Hook Manager',
'title.memoryModule': 'Memory Module',
'title.promptHistory': 'Prompt History',
'title.codexLensManager': 'CodexLens Manager',
// Search
'search.placeholder': 'Search...',
@@ -215,6 +217,7 @@ const i18n = {
'cli.default': 'Default',
'cli.install': 'Install',
'cli.uninstall': 'Uninstall',
'cli.openManager': 'Manager',
'cli.initIndex': 'Init Index',
'cli.geminiDesc': 'Google AI for code analysis',
'cli.qwenDesc': 'Alibaba AI assistant',
@@ -226,9 +229,11 @@ const i18n = {
// CodexLens Configuration
'codexlens.config': 'CodexLens Configuration',
'codexlens.configDesc': 'Manage code indexing, semantic search, and embedding models',
'codexlens.status': 'Status',
'codexlens.installed': 'Installed',
'codexlens.notInstalled': 'Not Installed',
'codexlens.installFirst': 'Install CodexLens to access semantic search and model management features',
'codexlens.indexes': 'Indexes',
'codexlens.currentWorkspace': 'Current Workspace',
'codexlens.indexStoragePath': 'Index Storage Path',
@@ -237,6 +242,8 @@ const i18n = {
'codexlens.newStoragePath': 'New Storage Path',
'codexlens.pathPlaceholder': 'e.g., /path/to/indexes or ~/.codexlens/indexes',
'codexlens.pathInfo': 'Supports ~ for home directory. Changes take effect immediately.',
'codexlens.pathUnchanged': 'Path unchanged',
'codexlens.pathEmpty': 'Path cannot be empty',
'codexlens.migrationRequired': 'Migration Required',
'codexlens.migrationWarning': 'After changing the path, existing indexes will need to be re-initialized for each workspace.',
'codexlens.actions': 'Actions',
@@ -244,6 +251,17 @@ const i18n = {
'codexlens.cleanCurrentWorkspace': 'Clean Current Workspace',
'codexlens.cleanAllIndexes': 'Clean All Indexes',
'codexlens.installCodexLens': 'Install CodexLens',
'codexlens.createIndex': 'Create Index',
'codexlens.embeddingModel': 'Embedding Model',
'codexlens.modelHint': 'Select embedding model for vector search (models with ✓ are installed)',
'codexlens.fullIndex': 'Full',
'codexlens.vectorIndex': 'Vector',
'codexlens.ftsIndex': 'FTS',
'codexlens.fullIndexDesc': 'FTS + Semantic search (recommended)',
'codexlens.vectorIndexDesc': 'Semantic search with embeddings only',
'codexlens.ftsIndexDesc': 'Fast full-text search only',
'codexlens.indexTypeHint': 'Full index includes FTS + semantic search. FTS only is faster but without AI-powered search.',
'codexlens.maintenance': 'Maintenance',
'codexlens.testSearch': 'Test Search',
'codexlens.testFunctionality': 'test CodexLens functionality',
'codexlens.textSearch': 'Text Search',
@@ -291,6 +309,17 @@ const i18n = {
'codexlens.cudaModeDesc': 'NVIDIA GPU (requires CUDA Toolkit)',
'common.recommended': 'Recommended',
'common.unavailable': 'Unavailable',
'common.auto': 'Auto',
// GPU Device Selection
'codexlens.selectGpuDevice': 'Select GPU Device',
'codexlens.discrete': 'Discrete',
'codexlens.integrated': 'Integrated',
'codexlens.selectingGpu': 'Selecting GPU...',
'codexlens.gpuSelected': 'GPU selected',
'codexlens.resettingGpu': 'Resetting GPU selection...',
'codexlens.gpuReset': 'GPU selection reset to auto',
'codexlens.resetToAuto': 'Reset to Auto',
'codexlens.modelManagement': 'Model Management',
'codexlens.loadingModels': 'Loading models...',
'codexlens.downloadModel': 'Download',
@@ -444,6 +473,19 @@ const i18n = {
'lang.windowsDisableSuccess': 'Windows platform guidelines disabled',
'lang.windowsEnableFailed': 'Failed to enable Windows platform guidelines',
'lang.windowsDisableFailed': 'Failed to disable Windows platform guidelines',
'lang.installRequired': 'Run "ccw install" to enable this feature',
// CCW Installation Status
'status.installed': 'Installed',
'status.incomplete': 'Incomplete',
'status.notInstalled': 'Not Installed',
'status.ccwInstall': 'CCW Workflows',
'status.ccwInstallDesc': 'Required workflow files for full functionality',
'status.required': 'Required',
'status.filesMissing': 'files missing',
'status.missingFiles': 'Missing files',
'status.runToFix': 'Run to fix',
'cli.promptFormat': 'Prompt Format',
'cli.promptFormatDesc': 'Format for multi-turn conversation concatenation',
'cli.storageBackend': 'Storage Backend',
@@ -1457,6 +1499,7 @@ const i18n = {
'nav.explorer': '文件浏览器',
'nav.status': '状态',
'nav.history': '历史',
'nav.codexLensManager': 'CodexLens',
'nav.memory': '记忆',
'nav.contextMemory': '活动',
'nav.coreMemory': '核心记忆',
@@ -1514,6 +1557,7 @@ const i18n = {
'title.hookManager': '钩子管理',
'title.memoryModule': '记忆模块',
'title.promptHistory': '提示历史',
'title.codexLensManager': 'CodexLens 管理',
// Search
'search.placeholder': '搜索...',
@@ -1631,6 +1675,7 @@ const i18n = {
'cli.default': '默认',
'cli.install': '安装',
'cli.uninstall': '卸载',
'cli.openManager': '管理',
'cli.initIndex': '初始化索引',
'cli.geminiDesc': 'Google AI 代码分析',
'cli.qwenDesc': '阿里通义 AI 助手',
@@ -1642,9 +1687,11 @@ const i18n = {
// CodexLens 配置
'codexlens.config': 'CodexLens 配置',
'codexlens.configDesc': '管理代码索引、语义搜索和嵌入模型',
'codexlens.status': '状态',
'codexlens.installed': '已安装',
'codexlens.notInstalled': '未安装',
'codexlens.installFirst': '安装 CodexLens 以访问语义搜索和模型管理功能',
'codexlens.indexes': '索引',
'codexlens.currentWorkspace': '当前工作区',
'codexlens.indexStoragePath': '索引存储路径',
@@ -1653,6 +1700,8 @@ const i18n = {
'codexlens.newStoragePath': '新存储路径',
'codexlens.pathPlaceholder': '例如:/path/to/indexes 或 ~/.codexlens/indexes',
'codexlens.pathInfo': '支持 ~ 表示用户目录。更改立即生效。',
'codexlens.pathUnchanged': '路径未变更',
'codexlens.pathEmpty': '路径不能为空',
'codexlens.migrationRequired': '需要迁移',
'codexlens.migrationWarning': '更改路径后,需要为每个工作区重新初始化索引。',
'codexlens.actions': '操作',
@@ -1660,6 +1709,17 @@ const i18n = {
'codexlens.cleanCurrentWorkspace': '清理当前工作空间',
'codexlens.cleanAllIndexes': '清理所有索引',
'codexlens.installCodexLens': '安装 CodexLens',
'codexlens.createIndex': '创建索引',
'codexlens.embeddingModel': '嵌入模型',
'codexlens.modelHint': '选择向量搜索的嵌入模型(带 ✓ 的已安装)',
'codexlens.fullIndex': '全部',
'codexlens.vectorIndex': '向量',
'codexlens.ftsIndex': 'FTS',
'codexlens.fullIndexDesc': 'FTS + 语义搜索(推荐)',
'codexlens.vectorIndexDesc': '仅语义嵌入搜索',
'codexlens.ftsIndexDesc': '仅快速全文搜索',
'codexlens.indexTypeHint': '完整索引包含 FTS + 语义搜索。仅 FTS 更快但无 AI 搜索功能。',
'codexlens.maintenance': '维护',
'codexlens.testSearch': '测试搜索',
'codexlens.testFunctionality': '测试 CodexLens 功能',
'codexlens.textSearch': '文本搜索',
@@ -1707,6 +1767,18 @@ const i18n = {
'codexlens.cudaModeDesc': 'NVIDIA GPU需要 CUDA Toolkit',
'common.recommended': '推荐',
'common.unavailable': '不可用',
'common.auto': '自动',
// GPU 设备选择
'codexlens.selectGpuDevice': '选择 GPU 设备',
'codexlens.discrete': '独立显卡',
'codexlens.integrated': '集成显卡',
'codexlens.selectingGpu': '选择 GPU 中...',
'codexlens.gpuSelected': 'GPU 已选择',
'codexlens.resettingGpu': '重置 GPU 选择中...',
'codexlens.gpuReset': 'GPU 选择已重置为自动',
'codexlens.resetToAuto': '重置为自动',
'codexlens.modelManagement': '模型管理',
'codexlens.loadingModels': '加载模型中...',
'codexlens.downloadModel': '下载',
@@ -1860,6 +1932,19 @@ const i18n = {
'lang.windowsDisableSuccess': 'Windows 平台规范已禁用',
'lang.windowsEnableFailed': '启用 Windows 平台规范失败',
'lang.windowsDisableFailed': '禁用 Windows 平台规范失败',
'lang.installRequired': '请运行 "ccw install" 以启用此功能',
// CCW 安装状态
'status.installed': '已安装',
'status.incomplete': '不完整',
'status.notInstalled': '未安装',
'status.ccwInstall': 'CCW 工作流',
'status.ccwInstallDesc': '完整功能所需的工作流文件',
'status.required': '必需',
'status.filesMissing': '个文件缺失',
'status.missingFiles': '缺失文件',
'status.runToFix': '修复命令',
'cli.promptFormat': '提示词格式',
'cli.promptFormatDesc': '多轮对话拼接格式',
'cli.storageBackend': '存储后端',