feat(cli): default session store to global ~/.dsh/sessions
This commit is contained in:
@@ -84,6 +84,10 @@
|
|||||||
- id: llm-retry
|
- id: llm-retry
|
||||||
name: '@deepseek-ai/dsh-llm-retry'
|
name: '@deepseek-ai/dsh-llm-retry'
|
||||||
|
|
||||||
|
# Session store root. AppCLIEntry resolves the engineering default to a
|
||||||
|
# global dir under the Harness home ($DSH_HOME, else ~/.dsh): sessions live
|
||||||
|
# in one place across every cwd, not a project-local ./.sessions. The
|
||||||
|
# persistenceRoot profile key (user config) still overrides this per field.
|
||||||
- id: session-persistence-jsonl
|
- id: session-persistence-jsonl
|
||||||
name: '@deepseek-ai/dsh-session-persistence-jsonl'
|
name: '@deepseek-ai/dsh-session-persistence-jsonl'
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -117,10 +117,11 @@ export class AppCLIEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compose the patch set from the three non-yml config sources: profile
|
* Compose the patch set from the non-yml config sources: computed
|
||||||
* json (user config), CLI flags, and the resolved frontend dist. Patches
|
* engineering defaults (the global session root), profile json (user
|
||||||
* replace a row's config wholesale, so each patched row's yml static
|
* config, overriding those defaults), CLI flags, and the resolved frontend
|
||||||
* values are re-read here (bypass parse) and merged under the overrides.
|
* dist. Patches replace a row's config wholesale, so each patched row's yml
|
||||||
|
* static values are re-read here (bypass parse) and merged under the overrides.
|
||||||
*/
|
*/
|
||||||
private composePatches(): void {
|
private composePatches(): void {
|
||||||
const rows = this.parseYmlRows()
|
const rows = this.parseYmlRows()
|
||||||
@@ -131,6 +132,12 @@ export class AppCLIEntry {
|
|||||||
overrides.set(entryId, bag)
|
overrides.set(entryId, bag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Source 0: computed engineering defaults. The session store defaults to
|
||||||
|
// a global dir under the Harness home ($DSH_HOME, else ~/.dsh) so history
|
||||||
|
// is shared across every cwd, not a project-local ./.sessions. The profile
|
||||||
|
// (Source 1) overwrites this same field via last-write-wins in put().
|
||||||
|
put('session-persistence-jsonl', 'root', join(resolveDshHome(), 'sessions'))
|
||||||
|
|
||||||
// Source 1: profile json (missing file = empty; unmapped key = loud).
|
// Source 1: profile json (missing file = empty; unmapped key = loud).
|
||||||
for (const [key, value] of Object.entries(this.readProfile())) {
|
for (const [key, value] of Object.entries(this.readProfile())) {
|
||||||
const mapping = PROFILE_MAPPINGS.find(m => m.jsonPath === key)
|
const mapping = PROFILE_MAPPINGS.find(m => m.jsonPath === key)
|
||||||
|
|||||||
Reference in New Issue
Block a user