(
ctx: ToolContext,
toolCtx: RunContext,
rawMessages: WithParts[],
entries: NotificationEntry[],
batchTopic: string | undefined,
)
| 79 | } |
| 80 | |
| 81 | export async function finalizeSession( |
| 82 | ctx: ToolContext, |
| 83 | toolCtx: RunContext, |
| 84 | rawMessages: WithParts[], |
| 85 | entries: NotificationEntry[], |
| 86 | batchTopic: string | undefined, |
| 87 | ): Promise<void> { |
| 88 | ctx.state.manualMode = ctx.state.manualMode ? "active" : false |
| 89 | applyPendingCompressionDurations(ctx.state) |
| 90 | await saveSessionState(ctx.state, ctx.logger) |
| 91 | |
| 92 | const params = getCurrentParams(ctx.state, rawMessages, ctx.logger) |
| 93 | const sessionMessageIds = rawMessages |
| 94 | .filter((msg) => !isIgnoredUserMessage(msg)) |
| 95 | .map((msg) => msg.info.id) |
| 96 | |
| 97 | await sendCompressNotification( |
| 98 | ctx.client, |
| 99 | ctx.logger, |
| 100 | ctx.config, |
| 101 | ctx.state, |
| 102 | toolCtx.sessionID, |
| 103 | entries, |
| 104 | batchTopic, |
| 105 | sessionMessageIds, |
| 106 | params, |
| 107 | ) |
| 108 | } |
no test coverage detected