(
modelArg: string,
resolvedModel: string,
)
| 1220 | let activeUserSpecifiedModel = options.userSpecifiedModel |
| 1221 | |
| 1222 | function injectModelSwitchBreadcrumbs( |
| 1223 | modelArg: string, |
| 1224 | resolvedModel: string, |
| 1225 | ): void { |
| 1226 | const breadcrumbs = createModelSwitchBreadcrumbs( |
| 1227 | modelArg, |
| 1228 | modelDisplayString(resolvedModel), |
| 1229 | ) |
| 1230 | mutableMessages.push(...breadcrumbs) |
| 1231 | for (const crumb of breadcrumbs) { |
| 1232 | if ( |
| 1233 | typeof crumb.message.content === 'string' && |
| 1234 | crumb.message.content.includes(`<${LOCAL_COMMAND_STDOUT_TAG}>`) |
| 1235 | ) { |
| 1236 | output.enqueue({ |
| 1237 | type: 'user', |
| 1238 | message: crumb.message, |
| 1239 | session_id: getSessionId(), |
| 1240 | parent_tool_use_id: null, |
| 1241 | uuid: crumb.uuid, |
| 1242 | timestamp: crumb.timestamp, |
| 1243 | isReplay: true, |
| 1244 | } satisfies SDKUserMessageReplay) |
| 1245 | } |
| 1246 | } |
| 1247 | } |
| 1248 | |
| 1249 | // Cache SDK MCP clients to avoid reconnecting on each run |
| 1250 | let sdkClients: MCPServerConnection[] = [] |
no test coverage detected