mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-22 15:05:16 +00:00
fix(claude): support Windows Desktop sessions via APPDATA (#615)
* fix(claude): use APPDATA for Windows Desktop sessions * test(claude): harden withPlatform mock against cross-file leak The process.platform mock omitted configurable:true and never restored the value when the property had no own descriptor, leaving win32 mocked for later tests on the same Vitest worker. Add configurable + an else branch that deletes the override to expose the real inherited value. --------- Co-authored-by: AgentSeal <hello@agentseal.org>
This commit is contained in:
parent
4ef32c27cb
commit
e2d006be9d
2 changed files with 50 additions and 3 deletions
|
|
@ -105,7 +105,10 @@ export function getDesktopSessionsDir(): string {
|
|||
const override = process.env['CODEBURN_DESKTOP_SESSIONS_DIR']
|
||||
if (override) return override
|
||||
if (process.platform === 'darwin') return join(homedir(), 'Library', 'Application Support', 'Claude', 'local-agent-mode-sessions')
|
||||
if (process.platform === 'win32') return join(homedir(), 'AppData', 'Roaming', 'Claude', 'local-agent-mode-sessions')
|
||||
if (process.platform === 'win32') {
|
||||
const appData = process.env['APPDATA']?.trim()
|
||||
return join(appData || join(homedir(), 'AppData', 'Roaming'), 'Claude', 'local-agent-mode-sessions')
|
||||
}
|
||||
return join(homedir(), '.config', 'Claude', 'local-agent-mode-sessions')
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue