(message: Partial<ChatMessage>, index: number)
| 296 | |
| 297 | // Edit chat message in history without resending. |
| 298 | async updateMessage(message: Partial<ChatMessage>, index: number) { |
| 299 | const target = this.history[index]; |
| 300 | if (!target) |
| 301 | throw new Error(`Invalid index ${index}.`); |
| 302 | deepAssign(target, message); |
| 303 | this.onUpdateMessage.emit(target, index); |
| 304 | } |
| 305 | |
| 306 | // Clear chat history. |
| 307 | clear() { |
nothing calls this directly
no test coverage detected