Merge 189541f463 into da71eaebd2
This commit is contained in:
commit
6caf2742db
@ -9,6 +9,7 @@ import { resolveThinkingDefault } from "../../agents/model-selection.js";
|
|||||||
import { resolveAgentTimeoutMs } from "../../agents/timeout.js";
|
import { resolveAgentTimeoutMs } from "../../agents/timeout.js";
|
||||||
import { dispatchInboundMessage } from "../../auto-reply/dispatch.js";
|
import { dispatchInboundMessage } from "../../auto-reply/dispatch.js";
|
||||||
import { createReplyDispatcher } from "../../auto-reply/reply/reply-dispatcher.js";
|
import { createReplyDispatcher } from "../../auto-reply/reply/reply-dispatcher.js";
|
||||||
|
import { registerAgentRunContext } from "../../infra/agent-events.js";
|
||||||
import {
|
import {
|
||||||
extractShortModelName,
|
extractShortModelName,
|
||||||
type ResponsePrefixContext,
|
type ResponsePrefixContext,
|
||||||
@ -369,6 +370,7 @@ export const chatHandlers: GatewayRequestHandlers = {
|
|||||||
});
|
});
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const clientRunId = p.idempotencyKey;
|
const clientRunId = p.idempotencyKey;
|
||||||
|
registerAgentRunContext(clientRunId, { sessionKey: p.sessionKey });
|
||||||
|
|
||||||
const sendPolicy = resolveSendPolicy({
|
const sendPolicy = resolveSendPolicy({
|
||||||
cfg,
|
cfg,
|
||||||
@ -430,6 +432,10 @@ export const chatHandlers: GatewayRequestHandlers = {
|
|||||||
startedAtMs: now,
|
startedAtMs: now,
|
||||||
expiresAtMs: resolveChatRunExpiresAtMs({ now, timeoutMs }),
|
expiresAtMs: resolveChatRunExpiresAtMs({ now, timeoutMs }),
|
||||||
});
|
});
|
||||||
|
context.addChatRun(clientRunId, {
|
||||||
|
sessionKey: p.sessionKey,
|
||||||
|
clientRunId,
|
||||||
|
});
|
||||||
|
|
||||||
const ackPayload = {
|
const ackPayload = {
|
||||||
runId: clientRunId,
|
runId: clientRunId,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user