* 添加用户消息
(content: string, metadata?: Record<string, any>)
| 210 | * 添加用户消息 |
| 211 | */ |
| 212 | public async addUserMessage(content: string, metadata?: Record<string, any>): Promise<void> { |
| 213 | this.ensureReady(); |
| 214 | await this.contextManager!.addMessage('user', content, metadata); |
| 215 | this.log(`添加用户消息: ${content.substring(0, 50)}...`); |
| 216 | } |
| 217 | |
| 218 | /** |
| 219 | * 添加助手消息 |
no test coverage detected