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()) {
|
if (isTauriRuntime()) {
|
||||||
await tauriInvoke('heartbeat.updateMemoryStats', () =>
|
await tauriInvoke('heartbeat.updateMemoryStats', () =>
|
||||||
invoke('heartbeat_update_memory_stats', {
|
invoke('heartbeat_update_memory_stats', {
|
||||||
agent_id: agentId,
|
agentId: agentId,
|
||||||
task_count: taskCount,
|
taskCount: taskCount,
|
||||||
total_entries: totalEntries,
|
totalEntries: totalEntries,
|
||||||
storage_size_bytes: storageSizeBytes,
|
storageSizeBytes: storageSizeBytes,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -1212,8 +1212,8 @@ export const intelligenceClient = {
|
|||||||
if (isTauriRuntime()) {
|
if (isTauriRuntime()) {
|
||||||
await tauriInvoke('heartbeat.recordCorrection', () =>
|
await tauriInvoke('heartbeat.recordCorrection', () =>
|
||||||
invoke('heartbeat_record_correction', {
|
invoke('heartbeat_record_correction', {
|
||||||
agent_id: agentId,
|
agentId: agentId,
|
||||||
correction_type: correctionType,
|
correctionType: correctionType,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -1230,7 +1230,7 @@ export const intelligenceClient = {
|
|||||||
if (isTauriRuntime()) {
|
if (isTauriRuntime()) {
|
||||||
await tauriInvoke('heartbeat.recordInteraction', () =>
|
await tauriInvoke('heartbeat.recordInteraction', () =>
|
||||||
invoke('heartbeat_record_interaction', {
|
invoke('heartbeat_record_interaction', {
|
||||||
agent_id: agentId,
|
agentId: agentId,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user