MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / runSessionDiagnostic

Function runSessionDiagnostic

static/js/payment.js:245–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243}
244
245async function runSessionDiagnostic() {
246 const accountId = Number(document.getElementById("account-select")?.value || 0);
247 if (!accountId) {
248 toast.warning("请先选择账号");
249 return;
250 }
251 setButtonLoading("session-diagnostic-btn", "诊断中...", true);
252 showSessionDiagnosticPanel("正在诊断会话上下文,请稍候...");
253 try {
254 const data = await api.get(`/payment/accounts/${accountId}/session-diagnostic?probe=1`);
255 const diag = data?.diagnostic || {};
256 showSessionDiagnosticPanel(formatSessionDiagnosticPayload(diag));
257 toast.success("会话诊断完成");
258 } catch (error) {
259 const message = formatErrorMessage(error);
260 showSessionDiagnosticPanel(`会话诊断失败: ${message}`);
261 toast.error(`会话诊断失败: ${message}`);
262 } finally {
263 setButtonLoading("session-diagnostic-btn", "诊断中...", false);
264 }
265}
266
267async function runSessionBootstrap() {
268 const accountId = Number(document.getElementById("account-select")?.value || 0);

Callers 2

runSessionBootstrapFunction · 0.85
saveManualSessionTokenFunction · 0.85

Calls 8

setButtonLoadingFunction · 0.85
formatErrorMessageFunction · 0.85
warningMethod · 0.80
successMethod · 0.80
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected