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

Function parseTimeLimit

uai/uai.ts:97–105  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

95 if (unit === "h") return val * 3600;
96 if (unit === "m") return val * 60;
97 return null;
98}
99
100// ========== 数据库 ==========
101async function getDB() {
102 const db = await JSONFilePreset<UAIConfig>(DB_PATH, DEFAULT_CONFIG);
103 // 确保所有字段都存在
104 if (!db.data.providers) db.data.providers = {};
105 if (!db.data.prompts) db.data.prompts = {};
106 if (!db.data.timeout) db.data.timeout = DEFAULT_TIMEOUT;
107 if (typeof db.data.collapse !== "boolean") db.data.collapse = false;
108 return db;

Callers 1

UAIPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected