(chatKey: string, enabled: boolean)
| 309 | } |
| 310 | |
| 311 | async setContextEnabled(chatKey: string, enabled: boolean): Promise<void> { |
| 312 | this.ensureReady(); |
| 313 | const ctx = await this.ensureCtxChat(chatKey); |
| 314 | ctx.contextEnabled = !!enabled; |
| 315 | |
| 316 | const key = this.gk(chatKey); |
| 317 | this.dbCtx.data!.chats[key] = ctx; |
| 318 | await this.dbCtx.write(); |
| 319 | } |
| 320 | |
| 321 | async clearContext(chatKey: string, tag?: string): Promise<void> { |
| 322 | this.ensureReady(); |
no test coverage detected