fixed time out aria-core
This commit is contained in:
+18
-4
@@ -74,8 +74,8 @@ function pipelineStart(method, text) {
|
||||
pipelineStartTime = Date.now();
|
||||
if (pipelineTimeout) clearTimeout(pipelineTimeout);
|
||||
pipelineTimeout = setTimeout(() => {
|
||||
if (pipelineActive) pipelineEnd(false, "Timeout — keine Antwort nach 60s");
|
||||
}, 60000);
|
||||
if (pipelineActive) pipelineEnd(false, "Timeout — keine Antwort nach 10min");
|
||||
}, 600000);
|
||||
plog(`━━━ Pipeline Start: ${method} ━━━`);
|
||||
plog(`Nachricht: "${text}"`);
|
||||
}
|
||||
@@ -319,10 +319,23 @@ function handleGatewayMessage(msg) {
|
||||
if (event === "agent") {
|
||||
const data = payload.data || {};
|
||||
const delta = data.delta || "";
|
||||
if (delta && payload.stream === "assistant") {
|
||||
const stream = payload.stream || "";
|
||||
|
||||
if (delta && stream === "assistant") {
|
||||
broadcast({ type: "chat_delta", delta, payload });
|
||||
}
|
||||
// agent Events nicht einzeln loggen (zu viele)
|
||||
|
||||
// Tool-Nutzung erkennen und broadcasten
|
||||
if (stream === "tool_use" || data.type === "tool_use") {
|
||||
const toolName = data.name || data.tool || payload.tool || "";
|
||||
if (toolName) {
|
||||
broadcast({ type: "agent_activity", activity: "tool", tool: toolName, data });
|
||||
log("info", "gateway", `Tool: ${toolName}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Genereller Activity-Heartbeat (ARIA denkt)
|
||||
broadcast({ type: "agent_activity", activity: stream || "thinking" });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -338,6 +351,7 @@ function handleGatewayMessage(msg) {
|
||||
log("info", "gateway", `ANTWORT: "${text.slice(0, 200)}"`);
|
||||
if (pipelineActive) pipelineEnd(true, `"${text.slice(0, 120)}"`);
|
||||
broadcast({ type: "chat_final", text, payload });
|
||||
broadcast({ type: "agent_activity", activity: "idle" });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user