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

Function runSessionBootstrap

static/js/payment.js:267–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

265}
266
267async function runSessionBootstrap() {
268 const accountId = Number(document.getElementById("account-select")?.value || 0);
269 if (!accountId) {
270 toast.warning("请先选择账号");
271 return;
272 }
273 setButtonLoading("session-bootstrap-btn", "补全中...", true);
274 showSessionDiagnosticPanel("正在执行会话补全,请稍候(可能需要等待邮箱验证码)...");
275 try {
276 const data = await api.post(`/payment/accounts/${accountId}/session-bootstrap`, {});
277 if (data?.success) {
278 toast.success(`会话补全成功(len=${data?.session_token_len || 0})`);
279 } else {
280 toast.warning(data?.message || "会话补全未命中");
281 }
282 await runSessionDiagnostic();
283 } catch (error) {
284 const message = formatErrorMessage(error);
285 showSessionDiagnosticPanel(`会话补全失败: ${message}`);
286 toast.error(`会话补全失败: ${message}`);
287 } finally {
288 setButtonLoading("session-bootstrap-btn", "补全中...", false);
289 }
290}
291
292async function saveManualSessionToken() {
293 const accountId = Number(document.getElementById("account-select")?.value || 0);

Callers

nothing calls this directly

Calls 8

setButtonLoadingFunction · 0.85
runSessionDiagnosticFunction · 0.85
formatErrorMessageFunction · 0.85
warningMethod · 0.80
successMethod · 0.80
errorMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected