fix(desktop): 替换 require() 为 ES import — 修复生产构建崩溃
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- connectionStore: 2 处 require() → loadConversationStore() 异步预加载 + 闭包引用 - saasStore: 1 处 require() → await import()(logout 是 async) - llm-service: 1 处 require() → 顶层 import(无循环依赖) - streamStore: 移除重复动态导入,统一使用顶层 useConnectionStore - tsc --noEmit 0 errors
This commit is contained in:
@@ -57,7 +57,6 @@ async function tryRecoverFromAuthError(error: string): Promise<string | null> {
|
||||
const newToken = await saasClient.refreshMutex();
|
||||
if (newToken) {
|
||||
// Update kernel config with refreshed token → triggers kernel re-init via changed api_key detection
|
||||
const { useConnectionStore } = await import('../connectionStore');
|
||||
const { getKernelClient } = await import('../../lib/kernel-client');
|
||||
const kernelClient = getKernelClient();
|
||||
const currentConfig = kernelClient.getConfig();
|
||||
|
||||
Reference in New Issue
Block a user