refactor: 统一项目名称从OpenFang到ZCLAW
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
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括: - 配置文件中的项目名称 - 代码注释和文档引用 - 环境变量和路径 - 类型定义和接口名称 - 测试用例和模拟数据 同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
This commit is contained in:
@@ -21,13 +21,15 @@ import { Loader2 } from 'lucide-react';
|
||||
import { isTauriRuntime, getLocalGatewayStatus, startLocalGateway } from './lib/tauri-gateway';
|
||||
import { useOnboarding } from './lib/use-onboarding';
|
||||
import { intelligenceClient } from './lib/intelligence-client';
|
||||
import { loadEmbeddingConfig } from './lib/embedding-client';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { useProposalNotifications, ProposalNotificationHandler } from './lib/useProposalNotifications';
|
||||
import { useToast } from './components/ui/Toast';
|
||||
import type { Clone } from './store/agentStore';
|
||||
|
||||
type View = 'main' | 'settings';
|
||||
|
||||
// Bootstrap component that ensures OpenFang is running before rendering main UI
|
||||
// Bootstrap component that ensures ZCLAW is running before rendering main UI
|
||||
function BootstrapScreen({ status }: { status: string }) {
|
||||
return (
|
||||
<div className="h-screen flex items-center justify-center bg-gray-50">
|
||||
@@ -125,7 +127,7 @@ function App() {
|
||||
// Don't clear pendingApprovalRun - keep it for reference
|
||||
}, []);
|
||||
|
||||
// Bootstrap: Start OpenFang Gateway before rendering main UI
|
||||
// Bootstrap: Start ZCLAW Gateway before rendering main UI
|
||||
useEffect(() => {
|
||||
let mounted = true;
|
||||
|
||||
@@ -140,7 +142,7 @@ function App() {
|
||||
const isRunning = status.portStatus === 'busy' || status.listenerPids.length > 0;
|
||||
|
||||
if (!isRunning && status.cliAvailable) {
|
||||
setBootstrapStatus('Starting OpenFang Gateway...');
|
||||
setBootstrapStatus('Starting ZCLAW Gateway...');
|
||||
console.log('[App] Local gateway not running, auto-starting...');
|
||||
|
||||
await startLocalGateway();
|
||||
@@ -230,7 +232,43 @@ function App() {
|
||||
// Non-critical, continue without heartbeat
|
||||
}
|
||||
|
||||
// Step 5: Bootstrap complete
|
||||
// Step 5: Restore embedding config to Rust backend
|
||||
try {
|
||||
const embConfig = loadEmbeddingConfig();
|
||||
if (embConfig.enabled && embConfig.provider !== 'local' && embConfig.apiKey) {
|
||||
setBootstrapStatus('Restoring embedding configuration...');
|
||||
await invoke('viking_configure_embedding', {
|
||||
provider: embConfig.provider,
|
||||
apiKey: embConfig.apiKey,
|
||||
model: embConfig.model || undefined,
|
||||
endpoint: embConfig.endpoint || undefined,
|
||||
});
|
||||
console.log('[App] Embedding configuration restored to backend');
|
||||
}
|
||||
} catch (embErr) {
|
||||
console.warn('[App] Failed to restore embedding config:', embErr);
|
||||
// Non-critical, semantic search will fall back to TF-IDF
|
||||
}
|
||||
|
||||
// Step 5b: Configure summary driver using active LLM (for L0/L1 generation)
|
||||
try {
|
||||
const { getDefaultModelConfig } = await import('./store/connectionStore');
|
||||
const modelConfig = getDefaultModelConfig();
|
||||
if (modelConfig && modelConfig.apiKey && modelConfig.baseUrl) {
|
||||
setBootstrapStatus('Configuring summary driver...');
|
||||
await invoke('viking_configure_summary_driver', {
|
||||
endpoint: modelConfig.baseUrl,
|
||||
apiKey: modelConfig.apiKey,
|
||||
model: modelConfig.model || undefined,
|
||||
});
|
||||
console.log('[App] Summary driver configured with active LLM');
|
||||
}
|
||||
} catch (sumErr) {
|
||||
console.warn('[App] Failed to configure summary driver:', sumErr);
|
||||
// Non-critical, summaries won't be auto-generated
|
||||
}
|
||||
|
||||
// Step 6: Bootstrap complete
|
||||
setBootstrapping(false);
|
||||
} catch (err) {
|
||||
console.error('[App] Bootstrap failed:', err);
|
||||
|
||||
Reference in New Issue
Block a user