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

Function editSessionToken

static/js/accounts.js:1655–1668  ·  view source on GitHub ↗
(id, currentToken = '')

Source from the content-addressed store, hash-verified

1653}
1654
1655async function editSessionToken(id, currentToken = '') {
1656 const current = String(currentToken || '');
1657 const nextToken = window.prompt('请输入新的 Session Token(留空将清空)', current);
1658 if (nextToken === null) return;
1659 try {
1660 await api.patch(`/accounts/${id}`, { session_token: String(nextToken).trim() });
1661 toast.success('Session Token 已更新');
1662 } catch (error) {
1663 toast.error('更新 Session Token 失败: ' + error.message);
1664 } finally {
1665 await viewAccount(id);
1666 loadAccounts();
1667 }
1668}
1669
1670// 复制邮箱
1671function copyEmail(email) {

Callers

nothing calls this directly

Calls 5

viewAccountFunction · 0.85
successMethod · 0.80
errorMethod · 0.80
loadAccountsFunction · 0.70
patchMethod · 0.45

Tested by

no test coverage detected