feat: execute omx dispatches via local-agent

This commit is contained in:
kris
2026-04-03 03:51:16 +08:00
parent ec45bed59f
commit 24241d1f64
12 changed files with 402 additions and 46 deletions

View File

@@ -738,13 +738,6 @@ async function queueAndStartOpenAiMasterAgentReply(params: {
userMemories: params.userMemories,
});
await completeTaskSafely({
taskId: params.taskId,
deviceId: candidate.deviceId,
status: "completed",
replyBody: generated.content,
requestId: generated.requestId,
});
await updateAiAccountHealth({
accountId: candidate.account.accountId,
status: "ready",
@@ -755,6 +748,13 @@ async function queueAndStartOpenAiMasterAgentReply(params: {
? candidate.account.switchReason
: `主 Agent 回复时自动切换到 ${candidate.account.label}`,
});
await completeTaskSafely({
taskId: params.taskId,
deviceId: candidate.deviceId,
status: "completed",
replyBody: generated.content,
requestId: generated.requestId,
});
return;
} catch (error) {
if (error instanceof Error && error.message === "MASTER_AGENT_TASK_NOT_FOUND") {