Enhance FastEmbed Integration and GPU Management

- Updated Windows platform guidelines for path formats and Bash rules.
- Refactored CodexLens routes to improve GPU detection and indexing cancellation logic.
- Added FastEmbed installation status handling in the dashboard, including UI updates for installation and reinstallation options.
- Implemented local model management with improved API responses for downloaded models.
- Enhanced GPU selection logic in the model mode configuration.
- Improved error handling and user feedback for FastEmbed installation processes.
- Adjusted Python environment checks to avoid shell escaping issues on Windows.
This commit is contained in:
catlog22
2026-01-06 14:42:00 +08:00
parent 08099cdcb9
commit 6cb819cb3a
6 changed files with 659 additions and 100 deletions

View File

@@ -436,6 +436,32 @@ const i18n = {
'codexlens.modelListError': 'Failed to load models',
'codexlens.noModelsAvailable': 'No models available',
// FastEmbed Installation
'codexlens.fastembedNotInstalled': 'FastEmbed not installed',
'codexlens.fastembedDesc': 'FastEmbed provides local embedding models for semantic search',
'codexlens.selectMode': 'Select Mode',
'codexlens.cpuModeShort': 'Standard',
'codexlens.directmlModeShort': 'Windows GPU',
'codexlens.cudaModeShort': 'NVIDIA GPU',
'codexlens.installFastembed': 'Install FastEmbed',
'codexlens.installingFastembed': 'Installing FastEmbed...',
'codexlens.installMayTakeTime': 'This may take several minutes...',
'codexlens.fastembedInstalled': 'FastEmbed Installed',
'codexlens.fastembedInstallFailed': 'FastEmbed installation failed',
'codexlens.installFastembedFirst': 'Install FastEmbed above to manage local embedding models',
'codexlens.detectedGpus': 'Detected GPUs',
'codexlens.reinstallOptions': 'Reinstall Options',
'codexlens.reinstallDesc': 'Reinstall with a different GPU mode:',
'codexlens.confirmReinstall': 'This will reinstall FastEmbed. Continue?',
'codexlens.fastembedReinstalled': 'FastEmbed reinstalled',
'codexlens.reinstallingFastembed': 'Reinstalling FastEmbed...',
'codexlens.activeAccelerator': 'Active Accelerator',
'codexlens.active': 'Active',
'codexlens.downloadedModels': 'Downloaded Models',
'codexlens.noLocalModels': 'No models downloaded',
'codexlens.configuredModels': 'Configured in API Settings',
'codexlens.commonModels': 'Common Models',
// Model Download Progress
'codexlens.downloadingModel': 'Downloading',
'codexlens.connectingToHuggingFace': 'Connecting to Hugging Face...',
@@ -2418,6 +2444,32 @@ const i18n = {
'codexlens.modelListError': '加载模型列表失败',
'codexlens.noModelsAvailable': '没有可用模型',
// FastEmbed 安装
'codexlens.fastembedNotInstalled': 'FastEmbed 未安装',
'codexlens.fastembedDesc': 'FastEmbed 提供本地嵌入模型用于语义搜索',
'codexlens.selectMode': '选择模式',
'codexlens.cpuModeShort': '标准',
'codexlens.directmlModeShort': 'Windows GPU',
'codexlens.cudaModeShort': 'NVIDIA GPU',
'codexlens.installFastembed': '安装 FastEmbed',
'codexlens.installingFastembed': '正在安装 FastEmbed...',
'codexlens.installMayTakeTime': '这可能需要几分钟...',
'codexlens.fastembedInstalled': 'FastEmbed 已安装',
'codexlens.fastembedInstallFailed': 'FastEmbed 安装失败',
'codexlens.installFastembedFirst': '请先在上方安装 FastEmbed 以管理本地嵌入模型',
'codexlens.detectedGpus': '检测到的 GPU',
'codexlens.reinstallOptions': '重新安装选项',
'codexlens.reinstallDesc': '使用不同的 GPU 模式重新安装:',
'codexlens.confirmReinstall': '这将重新安装 FastEmbed。是否继续',
'codexlens.fastembedReinstalled': 'FastEmbed 已重新安装',
'codexlens.reinstallingFastembed': '正在重新安装 FastEmbed...',
'codexlens.activeAccelerator': '当前加速器',
'codexlens.active': '使用中',
'codexlens.downloadedModels': '已下载模型',
'codexlens.noLocalModels': '暂无已下载模型',
'codexlens.configuredModels': '已配置的 API 模型',
'codexlens.commonModels': '常用模型',
// 模型下载进度
'codexlens.downloadingModel': '正在下载',
'codexlens.connectingToHuggingFace': '正在连接 Hugging Face...',