mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
Find Hermes sessions in Windows local app data (#1617)
* Add Hermes Windows home regression tests * Resolve Hermes home from Windows local app data * Re-derive Hermes data from Windows home --------- Co-authored-by: Resham Joshi <65915470+iamtoruk@users.noreply.github.com>
This commit is contained in:
parent
1385d3ab6f
commit
fa12ebb971
6 changed files with 248 additions and 9 deletions
|
|
@ -252,7 +252,9 @@ import type { DateRange, ProjectSummary } from './types.js'
|
|||
// read path's equal-call rule keeps them; the bump re-derives surviving days.
|
||||
// Call counts are unchanged, so no PENDING_REDERIVE_PROVIDER_VERSIONS entry is
|
||||
// needed.
|
||||
export const DAILY_CACHE_VERSION = 49
|
||||
// v50: Hermes uses its native Windows LOCALAPPDATA root; finalized days can
|
||||
// miss sessions there and must be re-derived after the default path is fixed.
|
||||
export const DAILY_CACHE_VERSION = 50
|
||||
const MIN_SUPPORTED_VERSION = 28
|
||||
|
||||
/// Providers whose per-day CALL COUNT means something different at
|
||||
|
|
|
|||
|
|
@ -104,7 +104,17 @@ const toolNameMap: Record<string, string> = {
|
|||
}
|
||||
|
||||
function getHermesHome(override?: string): string {
|
||||
return override ?? process.env['HERMES_HOME'] ?? join(homedir(), '.hermes')
|
||||
if (override !== undefined) return override
|
||||
|
||||
const configuredHome = process.env['HERMES_HOME']?.trim()
|
||||
if (configuredHome) return configuredHome
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
const localAppData = process.env['LOCALAPPDATA']?.trim()
|
||||
return join(localAppData || join(homedir(), 'AppData', 'Local'), 'hermes')
|
||||
}
|
||||
|
||||
return join(homedir(), '.hermes')
|
||||
}
|
||||
|
||||
function displayProjectForProfile(profile: string): string {
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ export const PROVIDER_ENV_VARS: Record<string, string[]> = {
|
|||
codebuff: ['CODEBUFF_DATA_DIR'],
|
||||
codewhale: ['CODEWHALE_HOME'],
|
||||
codex: ['CODEX_HOME'],
|
||||
hermes: ['HERMES_HOME'],
|
||||
hermes: ['HERMES_HOME', 'LOCALAPPDATA'],
|
||||
'lingtai-tui': ['LINGTAI_HOME', 'LINGTAI_TUI_HOME', 'LINGTAI_TUI_GLOBAL_DIR'],
|
||||
droid: ['FACTORY_DIR'],
|
||||
dsh: ['DSH_HOME'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue