mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-06-14 02:40:45 +08:00
test: inject resolveOperationalChatId stub into mobile-status VM context
This commit is contained in:
@@ -54,6 +54,18 @@ function createBaseStatusContext() {
|
||||
lastRecallStatus: { text: "待命", meta: "", level: "idle" },
|
||||
lastStatusToastAt: {},
|
||||
STATUS_TOAST_THROTTLE_MS: 1500,
|
||||
getContext() {
|
||||
return {};
|
||||
},
|
||||
resolveOperationalChatId(context, graph, explicitChatId = "") {
|
||||
// VM snippet calls this as a free function (no `this`); derive only from
|
||||
// arguments so it never depends on per-test getCurrentChatId closures.
|
||||
return (
|
||||
String(explicitChatId || "").trim() ||
|
||||
String(graph?.historyState?.chatId || "").trim() ||
|
||||
"chat-mobile"
|
||||
);
|
||||
},
|
||||
_panelModule: {
|
||||
updateFloatingBallStatus() {},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user