fix(heartbeat): Tauri invoke 参数名修正 snake_case → camelCase
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
Tauri 2.x 默认将 Rust snake_case 参数重命名为 camelCase, 前端 invoke 必须使用 camelCase (agentId 而非 agent_id)。 修复 3 处 invoke 调用: - heartbeat_update_memory_stats (agentId, taskCount, totalEntries, storageSizeBytes) - heartbeat_record_correction (agentId, correctionType) - heartbeat_record_interaction (agentId)
This commit is contained in:
@@ -1190,10 +1190,10 @@ export const intelligenceClient = {
|
||||
if (isTauriRuntime()) {
|
||||
await tauriInvoke('heartbeat.updateMemoryStats', () =>
|
||||
invoke('heartbeat_update_memory_stats', {
|
||||
agent_id: agentId,
|
||||
task_count: taskCount,
|
||||
total_entries: totalEntries,
|
||||
storage_size_bytes: storageSizeBytes,
|
||||
agentId: agentId,
|
||||
taskCount: taskCount,
|
||||
totalEntries: totalEntries,
|
||||
storageSizeBytes: storageSizeBytes,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
@@ -1212,8 +1212,8 @@ export const intelligenceClient = {
|
||||
if (isTauriRuntime()) {
|
||||
await tauriInvoke('heartbeat.recordCorrection', () =>
|
||||
invoke('heartbeat_record_correction', {
|
||||
agent_id: agentId,
|
||||
correction_type: correctionType,
|
||||
agentId: agentId,
|
||||
correctionType: correctionType,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
@@ -1230,7 +1230,7 @@ export const intelligenceClient = {
|
||||
if (isTauriRuntime()) {
|
||||
await tauriInvoke('heartbeat.recordInteraction', () =>
|
||||
invoke('heartbeat_record_interaction', {
|
||||
agent_id: agentId,
|
||||
agentId: agentId,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user