mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 10:08:13 +00:00
fix(native-chat): keep the session host under its line limit (#29869)
#29121 and #27925 each added lines to structured-agent-session-host.ts and passed CI on their own; together they left it at 302 countable lines, so static analysis fails on main. Move the late-dispatch and unanswered-dispatch delegates into the mutation delegates that already wrap the same context.
This commit is contained in:
@@ -58,6 +58,8 @@ import {
|
||||
type StructuredAgentSessionOptionsReader
|
||||
} from './structured-agent-session-options-read'
|
||||
import { writeStructuredAgentSessionOption } from './structured-agent-session-message-options'
|
||||
import { settleStructuredAgentSessionLateDispatch } from './structured-agent-session-late-dispatch'
|
||||
import { releaseStructuredAgentSessionUnansweredDispatches } from './structured-agent-session-unanswered-dispatch-release'
|
||||
|
||||
export function sendStructuredAgentSessionTurn(
|
||||
context: StructuredAgentSessionMutationContext,
|
||||
@@ -291,6 +293,11 @@ export function structuredAgentSessionMutationDelegates(
|
||||
readOptions: (
|
||||
sessionId: string,
|
||||
reader: StructuredAgentSessionOptionsReader = IN_PROCESS_OPTIONS_READER
|
||||
) => readStructuredAgentSessionOptions(context(), sessionId, reader)
|
||||
) => readStructuredAgentSessionOptions(context(), sessionId, reader),
|
||||
settleLateDispatch: (input: Parameters<typeof settleStructuredAgentSessionLateDispatch>[1]) =>
|
||||
settleStructuredAgentSessionLateDispatch(context(), input),
|
||||
releaseUnansweredDispatches: (
|
||||
input: Parameters<typeof releaseStructuredAgentSessionUnansweredDispatches>[1]
|
||||
) => releaseStructuredAgentSessionUnansweredDispatches(context(), input)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ import {
|
||||
structuredAgentSessionMutationDelegates,
|
||||
type StructuredAgentSessionMutationContext
|
||||
} from './structured-agent-session-host-mutations'
|
||||
import { settleStructuredAgentSessionLateDispatch } from './structured-agent-session-late-dispatch'
|
||||
import { releaseStructuredAgentSessionUnansweredDispatches } from './structured-agent-session-unanswered-dispatch-release'
|
||||
import { flushStructuredAgentSessionHost } from './structured-agent-session-host-teardown'
|
||||
import type {
|
||||
StructuredAgentSessionCaller,
|
||||
@@ -341,12 +339,8 @@ export class StructuredAgentSessionHost {
|
||||
|
||||
subscribe = (input: AgentSessionSubscribeInput) => this.backgroundTasks.subscribe(input)
|
||||
|
||||
settleLateDispatch = (input: Parameters<typeof settleStructuredAgentSessionLateDispatch>[1]) =>
|
||||
settleStructuredAgentSessionLateDispatch(this.mutationContext(), input)
|
||||
|
||||
releaseUnansweredDispatches = (
|
||||
input: Parameters<typeof releaseStructuredAgentSessionUnansweredDispatches>[1]
|
||||
) => releaseStructuredAgentSessionUnansweredDispatches(this.mutationContext(), input)
|
||||
settleLateDispatch = this.mutations.settleLateDispatch
|
||||
releaseUnansweredDispatches = this.mutations.releaseUnansweredDispatches
|
||||
|
||||
publishChildWorkEvidence = this.clientDelivery.publishChildWork
|
||||
unsubscribe = (sessionId: string, id: string): void => this.subscribers.close(sessionId, id)
|
||||
|
||||
Reference in New Issue
Block a user