(chatKey: string, tag: string)
| 298 | } |
| 299 | |
| 300 | async setCurrent(chatKey: string, tag: string): Promise<void> { |
| 301 | this.ensureReady(); |
| 302 | const state = await this.ensureMainChat(chatKey); |
| 303 | requireUser(!!state.repos?.[tag], `项目不存在:<code>${escapeHtml(tag)}</code>`); |
| 304 | state.currentTag = tag; |
| 305 | |
| 306 | const key = this.gk(chatKey); |
| 307 | this.dbMain.data!.chats[key] = state; |
| 308 | await this.dbMain.write(); |
| 309 | } |
| 310 | |
| 311 | async setContextEnabled(chatKey: string, enabled: boolean): Promise<void> { |
| 312 | this.ensureReady(); |
no test coverage detected