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

Method set

outdated/gpt/gpt.ts:87–99  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

85 }
86
87 static set(key: string, value: string): void {
88 this.init();
89
90 try {
91 const stmt = this.db.prepare(`
92 INSERT OR REPLACE INTO config (key, value, updated_at)
93 VALUES (?, ?, CURRENT_TIMESTAMP)
94 `);
95 stmt.run(key, value);
96 } catch (error) {
97 console.error("保存配置失败:", error);
98 }
99 }
100
101 // 获取所有配置
102 static getAll(): { [key: string]: string } {

Callers 1

handleGptRequestFunction · 0.45

Calls 3

initMethod · 0.95
runMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected