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

Method get

outdated/gemini/gemini.ts:75–88  ·  view source on GitHub ↗
(key: string, defaultValue?: string)

Source from the content-addressed store, hash-verified

73 }
74
75 static get(key: string, defaultValue?: string): string {
76 this.init();
77 try {
78 const stmt = this.db.prepare("SELECT value FROM config WHERE key = ?");
79 const row = stmt.get(key) as { value: string } | undefined;
80
81 if (row) {
82 return row.value;
83 }
84 } catch (error) {
85 console.error("读取配置失败:", error);
86 }
87 return defaultValue || DEFAULT_CONFIG[key] || "";
88 }
89
90 static set(key: string, value: string): void {
91 this.init();

Callers 7

getAccessTokenMethod · 0.45
getConfigFunction · 0.45
processAudioGenerationFunction · 0.45
handleQuestionWithAudioFunction · 0.45
handleContextShowFunction · 0.45
handleTelegraphFunction · 0.45
handlePromptFunction · 0.45

Calls 2

initMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected