@@ -63,7 +63,7 @@ import {
6363 stripInlineDirectiveTagsForDisplay ,
6464 sanitizeReplyDirectiveId ,
6565} from "../../utils/directive-tags.js" ;
66- import { INTERNAL_MESSAGE_CHANNEL , isOperatorUiClient } from "../../utils/message-channel.js" ;
66+ import { isOperatorUiClient } from "../../utils/message-channel.js" ;
6767import { listGatewayAgentsBasic } from "../agent-list.js" ;
6868import {
6969 boundInFlightRunSnapshotForChatHistory ,
@@ -1246,13 +1246,14 @@ export const chatHandlers: GatewayRequestHandlers = {
12461246 } ) ;
12471247
12481248 let agentRunStarted = false ;
1249- const { deliveredReplies, dispatcher, onModelSelected } = createChatSendReplyDispatch ( {
1250- accountId,
1251- isAgentRunStarted : ( ) => agentRunStarted ,
1252- logGateway : context . logGateway ,
1253- session : preparedSession . value ,
1254- userTurnRecorder,
1255- } ) ;
1249+ const { deliveredReplies, dispatcher, hasAppendedWebchatAgentMedia, onModelSelected } =
1250+ createChatSendReplyDispatch ( {
1251+ accountId,
1252+ isAgentRunStarted : ( ) => agentRunStarted ,
1253+ logGateway : context . logGateway ,
1254+ session : preparedSession . value ,
1255+ userTurnRecorder,
1256+ } ) ;
12561257 let queuedFollowupEnqueued = false ;
12571258 let pendingDispatchLifecycleError :
12581259 | {
@@ -1789,7 +1790,7 @@ export const chatHandlers: GatewayRequestHandlers = {
17891790 : finalPayloadEntries ;
17901791 // Non-agent command paths can enqueue only block replies. If no visible final
17911792 // supersedes them, fold those blocks into the final WebChat message.
1792- const rawFinalPayloads = appendedWebchatAgentMedia
1793+ const rawFinalPayloads = hasAppendedWebchatAgentMedia ( )
17931794 ? [ ]
17941795 : [
17951796 ...commandBlockPayloadEntriesForDelivery ,
0 commit comments