(session: Session, input: string, options?: SendMessageOptions)
| 1217 | } |
| 1218 | |
| 1219 | private sendMessageInternal(session: Session, input: string, options?: SendMessageOptions): void { |
| 1220 | const imageAttachmentIds = |
| 1221 | options?.imageAttachmentIds !== undefined && options.imageAttachmentIds.length > 0 |
| 1222 | ? options.imageAttachmentIds |
| 1223 | : undefined; |
| 1224 | this.appendTranscriptEntry({ |
| 1225 | id: nextTranscriptId(), |
| 1226 | kind: 'user', |
| 1227 | turnId: undefined, |
| 1228 | renderMode: 'plain', |
| 1229 | content: input, |
| 1230 | imageAttachmentIds, |
| 1231 | }); |
| 1232 | |
| 1233 | this.beginSessionRequest(); |
| 1234 | |
| 1235 | const sdkInput = options?.parts ?? input; |
| 1236 | void session.prompt(sdkInput).catch((error: unknown) => { |
| 1237 | const message = formatErrorMessage(error); |
| 1238 | this.failSessionRequest(`Failed to send: ${message}`); |
| 1239 | }); |
| 1240 | } |
| 1241 | |
| 1242 | sendSkillActivation(session: Session, skillName: string, skillArgs: string): void { |
| 1243 | this.beginSessionRequest(); |
no test coverage detected