fix(miniapp): add missing uuid and message-display utils

Commit the utility modules required by api.js, messages.js, and chat page
so WeChat DevTools can resolve require('./uuid') at runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-11 13:01:05 +08:00
parent 04ef1c9105
commit c842119929
16 changed files with 829 additions and 72 deletions
+22 -3
View File
@@ -1,7 +1,26 @@
module.exports = {
API_BASE_URL: 'https://m.tkmind.cn',
// Production default for miniapp release / 提审.
// Local Portal debug: set LOCAL_DEV = true, or copy config.local.example.js → config.local.js
const LOCAL_DEV = false;
const defaults = {
API_BASE_URL: LOCAL_DEV ? 'http://127.0.0.1:8081' : 'https://m.tkmind.cn',
MINIAPP_LOGIN_PATH: '/auth/wechat-miniapp/login',
SELECTED_SESSION_KEY: 'tkmind_selected_session_id',
AGENT_RUN_POLL_MS: 1200,
AGENT_RUN_MAX_POLLS: 120
AGENT_RUN_MAX_POLLS: 120,
};
let localOverrides = {};
try {
localOverrides = require('./config.local.js');
} catch {
// Optional gitignored overrides in utils/config.local.js
}
module.exports = {
...defaults,
...localOverrides,
...(localOverrides.API_BASE_URL
? { API_BASE_URL: String(localOverrides.API_BASE_URL).replace(/\/$/, '') }
: {}),
};