MCPcopy
hub / github.com/coder/mux / buildAutoCompactionFollowUp

Method buildAutoCompactionFollowUp

src/node/services/agentSession.ts:3194–3222  ·  view source on GitHub ↗
(params: {
    messageText: string;
    options: SendMessageOptions;
    modelForStream: string;
    fileParts?: FilePart[];
    goalKind?: GoalSyntheticMessageKind;
    muxMetadata?: MuxMessageMetadata;
  })

Source from the content-addressed store, hash-verified

3192 }
3193
3194 private buildAutoCompactionFollowUp(params: {
3195 messageText: string;
3196 options: SendMessageOptions;
3197 modelForStream: string;
3198 fileParts?: FilePart[];
3199 goalKind?: GoalSyntheticMessageKind;
3200 muxMetadata?: MuxMessageMetadata;
3201 }): CompactionFollowUpRequest {
3202 const followUp: CompactionFollowUpRequest = {
3203 text: params.messageText,
3204 model: params.modelForStream,
3205 agentId: params.options.agentId,
3206 ...pickPreservedSendOptions(params.options),
3207 };
3208
3209 if (params.goalKind != null) {
3210 followUp.goalKind = params.goalKind;
3211 }
3212
3213 if (params.fileParts && params.fileParts.length > 0) {
3214 followUp.fileParts = params.fileParts;
3215 }
3216
3217 if (params.muxMetadata) {
3218 followUp.muxMetadata = params.muxMetadata;
3219 }
3220
3221 return followUp;
3222 }
3223
3224 private getPreferredCompactionModel(): string | null {
3225 try {

Callers 3

sendMessageMethod · 0.95

Calls 1

pickPreservedSendOptionsFunction · 0.90

Tested by

no test coverage detected