MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / setCurrent

Method setCurrent

deepwiki/deepwiki.ts:300–309  ·  view source on GitHub ↗
(chatKey: string, tag: string)

Source from the content-addressed store, hash-verified

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();

Callers 1

DeepWikiPluginClass · 0.80

Calls 6

ensureReadyMethod · 0.95
ensureMainChatMethod · 0.95
gkMethod · 0.95
writeMethod · 0.80
requireUserFunction · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected