mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
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:
@@ -389,7 +389,8 @@ async function checkPythonEnvForDirectML(): Promise<PythonEnvInfo> {
|
||||
|
||||
try {
|
||||
// Get Python version and architecture in one call
|
||||
const checkScript = `import sys, struct; print(f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}|{struct.calcsize('P') * 8}")`;
|
||||
// Use % formatting instead of f-string to avoid Windows shell escaping issues with curly braces
|
||||
const checkScript = `import sys, struct; print('%d.%d.%d|%d' % (sys.version_info.major, sys.version_info.minor, sys.version_info.micro, struct.calcsize('P') * 8))`;
|
||||
const result = execSync(`"${pythonPath}" -c "${checkScript}"`, { encoding: 'utf-8', timeout: 10000 }).trim();
|
||||
const [version, archStr] = result.split('|');
|
||||
const architecture = parseInt(archStr, 10);
|
||||
|
||||
Reference in New Issue
Block a user