fix: address runtime warnings in build
This commit is contained in:
@@ -512,14 +512,14 @@ export async function runEmbeddedPiAgent(params: {
|
||||
let abortWarnTimer: NodeJS.Timeout | undefined;
|
||||
const abortTimer = setTimeout(
|
||||
() => {
|
||||
defaultRuntime.warn?.(
|
||||
defaultRuntime.log(
|
||||
`embedded run timeout: runId=${params.runId} sessionId=${params.sessionId} timeoutMs=${params.timeoutMs}`,
|
||||
);
|
||||
abortRun();
|
||||
if (!abortWarnTimer) {
|
||||
abortWarnTimer = setTimeout(() => {
|
||||
if (!session.isStreaming) return;
|
||||
defaultRuntime.warn?.(
|
||||
defaultRuntime.log(
|
||||
`embedded run abort still streaming: runId=${params.runId} sessionId=${params.sessionId}`,
|
||||
);
|
||||
}, 10_000);
|
||||
|
||||
@@ -802,7 +802,7 @@ export async function getReplyFromConfig(
|
||||
}
|
||||
typingTtlTimer = setTimeout(() => {
|
||||
if (!typingTimer) return;
|
||||
defaultRuntime.warn?.(
|
||||
defaultRuntime.log(
|
||||
`typing TTL reached (${typingTtlMs}ms); stopping typing indicator`,
|
||||
);
|
||||
cleanupTyping();
|
||||
|
||||
@@ -146,7 +146,11 @@ export class GatewayClient {
|
||||
const pending = this.pending.get(parsed.id);
|
||||
if (!pending) return;
|
||||
// If the payload is an ack with status accepted, keep waiting for final.
|
||||
const status = parsed.payload?.status;
|
||||
const payload = parsed.payload;
|
||||
const status =
|
||||
payload && typeof payload === "object" && "status" in payload
|
||||
? (payload as { status?: unknown }).status
|
||||
: undefined;
|
||||
if (pending.expectFinal && status === "accepted") {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user