Revert "enhance: Prebuilt terminal venv found but Python executable missing P…" (#1062)

This commit is contained in:
Tong Chen 2026-01-24 00:08:56 +08:00 committed by GitHub
parent 3bb75a3dba
commit 8a0e759906
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 133 additions and 103 deletions

View file

@ -426,14 +426,10 @@ export function createProcessUtilsMock() {
getBinaryPath: vi.fn(),
getCachePath: vi.fn(),
getVenvPath: vi.fn(),
getTerminalVenvPath: vi.fn(),
getPrebuiltTerminalVenvPath: vi.fn(),
findPrebuiltPythonExecutable: vi.fn(),
getVenvsBaseDir: vi.fn(),
cleanupOldVenvs: vi.fn(),
isBinaryExists: vi.fn(),
getUvEnv: vi.fn(),
TERMINAL_BASE_PACKAGES: ['pandas', 'numpy', 'matplotlib', 'requests', 'openpyxl', 'beautifulsoup4', 'pillow'],
mockState: {} as MockEnvironmentState,
setup: (mockState: MockEnvironmentState) => {
@ -486,14 +482,6 @@ export function createProcessUtilsMock() {
utilsMock.getVenvPath.mockImplementation((version: string) => {
return `${mockState.system.homedir}/.eigent/venvs/backend-${version}`
})
utilsMock.getTerminalVenvPath.mockImplementation((version: string) => {
return `${mockState.system.homedir}/.eigent/venvs/terminal-${version}`
})
utilsMock.getPrebuiltTerminalVenvPath.mockReturnValue(null)
utilsMock.findPrebuiltPythonExecutable.mockReturnValue(null)
utilsMock.getVenvsBaseDir.mockReturnValue(
`${mockState.system.homedir}/.eigent/venvs`