(text: string)
| 1067 | } |
| 1068 | |
| 1069 | sendNormalUserInput(text: string): void { |
| 1070 | if (this.btwPanelController.sendUserInput(text)) return; |
| 1071 | if (this.state.appState.model.trim().length === 0) { |
| 1072 | this.showError(LLM_NOT_SET_MESSAGE); |
| 1073 | return; |
| 1074 | } |
| 1075 | const extraction = extractMediaAttachments(text, this.imageStore); |
| 1076 | if (!this.validateMediaCapabilities(extraction)) return; |
| 1077 | const session = this.session; |
| 1078 | if (session === undefined) { |
| 1079 | this.showError(LLM_NOT_SET_MESSAGE); |
| 1080 | return; |
| 1081 | } |
| 1082 | if (extraction.hasMedia) { |
| 1083 | this.sendMessage(session, text, { |
| 1084 | hasMedia: true, |
| 1085 | parts: extraction.parts, |
| 1086 | imageAttachmentIds: extraction.imageAttachmentIds, |
| 1087 | }); |
| 1088 | } else { |
| 1089 | this.sendMessage(session, text); |
| 1090 | } |
| 1091 | this.updateQueueDisplay(); |
| 1092 | this.state.ui.requestRender(); |
| 1093 | } |
| 1094 | |
| 1095 | private validateMediaCapabilities( |
| 1096 | extraction: ReturnType<typeof extractMediaAttachments>, |
nothing calls this directly
no test coverage detected