(chatKey: string, entry: RepoEntry, makeCurrent: boolean = true)
| 264 | } |
| 265 | |
| 266 | async setRepo(chatKey: string, entry: RepoEntry, makeCurrent: boolean = true): Promise<void> { |
| 267 | this.ensureReady(); |
| 268 | const state = await this.ensureMainChat(chatKey); |
| 269 | state.repos ||= {}; |
| 270 | state.repos[entry.tag] = entry; |
| 271 | if (makeCurrent) state.currentTag = entry.tag; |
| 272 | |
| 273 | const key = this.gk(chatKey); |
| 274 | this.dbMain.data!.chats[key] = state; |
| 275 | await this.dbMain.write(); |
| 276 | } |
| 277 | |
| 278 | async deleteRepo(chatKey: string, tag: string): Promise<boolean> { |
| 279 | this.ensureReady(); |
no test coverage detected