agent: logout confirm dialog accurate about --continue session loss (#576 argus nit)
argus #583 review caught: the prior dialog wording said 'prior --continue context is not affected (only the OAuth creds)', but that's false — paths::claude_dir() is /root/.claude and remove_dir_all wipes the projects/<hash>/*.jsonl session history along with the OAuth creds. Updated both the overflow-menu confirm and the /logout slash command confirm to explicitly say the projects/*.jsonl session history (--continue context) goes too, plus a 'no undo' tail so the operator can't read past the consequence list. SLASH_COMMANDS desc + overflow-item title also corrected so /help + tooltips match.
This commit is contained in:
parent
259b236ad1
commit
9d58ec391b
1 changed files with 12 additions and 8 deletions
|
|
@ -229,16 +229,18 @@ window.marked = marked;
|
||||||
class: 'overflow-item overflow-item-logout',
|
class: 'overflow-item overflow-item-logout',
|
||||||
role: 'menuitem',
|
role: 'menuitem',
|
||||||
id: 'logout-btn',
|
id: 'logout-btn',
|
||||||
title: 'wipe ~/.claude/ credentials + park in needs-login until a fresh `claude auth login` runs',
|
title: 'wipe ~/.claude/ entirely (OAuth creds + projects/*.jsonl --continue history) + park in needs-login until a fresh `claude auth login` runs',
|
||||||
},
|
},
|
||||||
el('span', { class: 'overflow-item-icon', 'aria-hidden': 'true' }, '🔓'),
|
el('span', { class: 'overflow-item-icon', 'aria-hidden': 'true' }, '🔓'),
|
||||||
'logout',
|
'logout',
|
||||||
);
|
);
|
||||||
logoutBtn.addEventListener('click', () => {
|
logoutBtn.addEventListener('click', () => {
|
||||||
if (!window.confirm(
|
if (!window.confirm(
|
||||||
`log ${label} out? this SIGINTs any running claude turn, wipes the credentials directory, ` +
|
`log ${label} out? this SIGINTs any running claude turn, then WIPES the entire ` +
|
||||||
`and parks the agent in 'needs login' until you paste a fresh OAuth code from the login screen. ` +
|
`~/.claude/ directory — that includes OAuth credentials AND the projects/*.jsonl ` +
|
||||||
`prior --continue context is not affected (only the OAuth creds).`
|
`session history (--continue context). the agent then parks in 'needs login' until ` +
|
||||||
|
`you paste a fresh OAuth code from the login screen. all prior conversation state ` +
|
||||||
|
`for this agent is lost. no undo.`
|
||||||
)) return;
|
)) return;
|
||||||
logoutBtn.disabled = true;
|
logoutBtn.disabled = true;
|
||||||
closeOverflowMenu();
|
closeOverflowMenu();
|
||||||
|
|
@ -391,7 +393,7 @@ window.marked = marked;
|
||||||
{ name: '/compact', desc: 'compact the persistent claude session' },
|
{ name: '/compact', desc: 'compact the persistent claude session' },
|
||||||
{ name: '/model', desc: '/model <name> — switch claude model for future turns' },
|
{ name: '/model', desc: '/model <name> — switch claude model for future turns' },
|
||||||
{ name: '/new-session', desc: 'next turn runs without --continue (fresh claude session)' },
|
{ name: '/new-session', desc: 'next turn runs without --continue (fresh claude session)' },
|
||||||
{ name: '/logout', desc: 'wipe ~/.claude/ credentials + park in needs-login' },
|
{ name: '/logout', desc: 'wipe ~/.claude/ (creds + --continue history) + park in needs-login' },
|
||||||
];
|
];
|
||||||
|
|
||||||
async function postModel(name) {
|
async function postModel(name) {
|
||||||
|
|
@ -462,9 +464,11 @@ window.marked = marked;
|
||||||
return true;
|
return true;
|
||||||
case '/logout':
|
case '/logout':
|
||||||
if (window.confirm(
|
if (window.confirm(
|
||||||
`log out? this SIGINTs any running claude turn, wipes the credentials directory, ` +
|
`log out? this SIGINTs any running claude turn, then WIPES the entire ` +
|
||||||
`and parks the agent in 'needs login' until you paste a fresh OAuth code from the login screen. ` +
|
`~/.claude/ directory — that includes OAuth credentials AND the projects/*.jsonl ` +
|
||||||
`prior --continue context is not affected (only the OAuth creds).`
|
`session history (--continue context). the agent then parks in 'needs login' until ` +
|
||||||
|
`you paste a fresh OAuth code from the login screen. all prior conversation state ` +
|
||||||
|
`for this agent is lost. no undo.`
|
||||||
)) {
|
)) {
|
||||||
postLogout();
|
postLogout();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue