oclaw/interfaces/admin/static/js/chat/state.js
oliver f6f129931f Ship Cursor-only MCP admin and modular Admin/Chat UI.
Plugins/Skills install and edit via mcpServers JSON, with clearer row actions, soft reloads, and instant loading placeholders; also drop MCP market and harden related scheduler/logging/exec guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 19:38:26 +08:00

25 lines
738 B
JavaScript

const LANG_KEY = "ops_admin_lang";
const CHAT_REASONING_TOGGLE_KEY = "ops_chat_reasoning_toggle";
const ADMIN_CHAT_SHOW_TOOL_OUTPUT_DEFAULT = true;
let lang = "zh";
try {
lang = String(localStorage.getItem(LANG_KEY) || "zh").toLowerCase();
} catch (_) {}
if (lang !== "zh" && lang !== "en") lang = "zh";
let showTool = ADMIN_CHAT_SHOW_TOOL_OUTPUT_DEFAULT;
try {
const _rt = String(localStorage.getItem(CHAT_REASONING_TOGGLE_KEY) || "").trim().toLowerCase();
if (_rt) showTool = ["1", "true", "yes", "on"].includes(_rt);
} catch (_) {}
export const state = {
currentLang: lang,
authSession: null,
adminChatShowToolOutput: showTool,
meProfile: null,
statusReasonPairs: [],
jobsBadgeEl: null,
jobsBtnLabelEl: null,
};