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

Method set

aitc/aitc.ts:92–103  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

90 if (fallback !== undefined) return fallback;
91 return DEFAULT_CONFIG[key] ?? "";
92 }
93
94 static set(key: string, value: string): void {
95 this.ensureInit();
96 try {
97 const stmt = this.db!.prepare(
98 "INSERT OR REPLACE INTO config (key, value, updated_at) VALUES (?, ?, CURRENT_TIMESTAMP)",
99 );
100 stmt.run(key, value);
101 } catch (error) {
102 console.error("aitc plugin failed to write config", error);
103 throw error;
104 }
105 }
106

Callers 6

setPromptMethod · 0.95
applyAuthConfigFunction · 0.45
buildGeminiVideoApiUrlFunction · 0.45
buildGeminiOperationUrlFunction · 0.45
registerMethod · 0.45
handleAitcCommandFunction · 0.45

Calls 3

ensureInitMethod · 0.95
runMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected