feat: 新增技能编排引擎和工作流构建器组件
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
refactor: 统一Hands系统常量到单个源文件 refactor: 更新Hands中文名称和描述 fix: 修复技能市场在连接状态变化时重新加载 fix: 修复身份变更提案的错误处理逻辑 docs: 更新多个功能文档的验证状态和实现位置 docs: 更新Hands系统文档 test: 添加测试文件验证工作区路径
This commit is contained in:
@@ -211,6 +211,28 @@ function App() {
|
||||
|
||||
await intelligenceClient.heartbeat.start(defaultAgentId);
|
||||
console.log('[App] Heartbeat engine started for self-evolution');
|
||||
|
||||
// Set up periodic memory stats sync (every 5 minutes)
|
||||
const MEMORY_STATS_SYNC_INTERVAL = 5 * 60 * 1000;
|
||||
const statsSyncInterval = setInterval(async () => {
|
||||
try {
|
||||
const stats = await intelligenceClient.memory.stats();
|
||||
const taskCount = stats.byType?.['task'] || 0;
|
||||
await intelligenceClient.heartbeat.updateMemoryStats(
|
||||
defaultAgentId,
|
||||
taskCount,
|
||||
stats.totalEntries,
|
||||
stats.storageSizeBytes
|
||||
);
|
||||
console.log('[App] Memory stats synced (periodic)');
|
||||
} catch (err) {
|
||||
console.warn('[App] Periodic memory stats sync failed:', err);
|
||||
}
|
||||
}, MEMORY_STATS_SYNC_INTERVAL);
|
||||
|
||||
// Store interval for cleanup
|
||||
// @ts-expect-error - Global cleanup reference
|
||||
window.__ZCLAW_STATS_SYNC_INTERVAL__ = statsSyncInterval;
|
||||
} catch (err) {
|
||||
console.warn('[App] Failed to start heartbeat engine:', err);
|
||||
// Non-critical, continue without heartbeat
|
||||
@@ -229,6 +251,12 @@ function App() {
|
||||
|
||||
return () => {
|
||||
mounted = false;
|
||||
// Clean up periodic stats sync interval
|
||||
// @ts-expect-error - Global cleanup reference
|
||||
if (window.__ZCLAW_STATS_SYNC_INTERVAL__) {
|
||||
// @ts-expect-error - Global cleanup reference
|
||||
clearInterval(window.__ZCLAW_STATS_SYNC_INTERVAL__);
|
||||
}
|
||||
};
|
||||
}, [connect, onboardingNeeded, onboardingLoading]);
|
||||
|
||||
@@ -282,8 +310,41 @@ function App() {
|
||||
return (
|
||||
<AgentOnboardingWizard
|
||||
isOpen={true}
|
||||
onClose={() => {
|
||||
// Skip onboarding and mark as completed with default values
|
||||
onClose={async () => {
|
||||
// Skip onboarding but still create a default agent with default personality
|
||||
try {
|
||||
const { getGatewayClient } = await import('./lib/gateway-client');
|
||||
const client = getGatewayClient();
|
||||
if (client) {
|
||||
// Create default agent with versatile assistant personality
|
||||
const defaultAgent = await client.createClone({
|
||||
name: '全能助手',
|
||||
role: '全能型 AI 助手',
|
||||
nickname: '小龙',
|
||||
emoji: '🦞',
|
||||
personality: 'friendly',
|
||||
scenarios: ['coding', 'writing', 'research', 'product', 'data'],
|
||||
userName: 'User',
|
||||
userRole: 'user',
|
||||
communicationStyle: '亲切、耐心、善解人意,用易懂的语言解释复杂概念',
|
||||
});
|
||||
|
||||
if (defaultAgent?.clone) {
|
||||
setCurrentAgent({
|
||||
id: defaultAgent.clone.id,
|
||||
name: defaultAgent.clone.name,
|
||||
icon: defaultAgent.clone.emoji || '🦞',
|
||||
color: 'bg-gradient-to-br from-orange-500 to-red-500',
|
||||
lastMessage: defaultAgent.clone.role || '全能型 AI 助手',
|
||||
time: '',
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('[App] Failed to create default agent on skip:', err);
|
||||
}
|
||||
|
||||
// Mark onboarding as completed
|
||||
markCompleted({
|
||||
userName: 'User',
|
||||
userRole: 'user',
|
||||
|
||||
Reference in New Issue
Block a user