Backup before continuing from Codex 5.2 session - User storage, compaction suggestions, streaming improvements
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import fs from "fs"
|
||||
import { promises as fsp } from "fs"
|
||||
import os from "os"
|
||||
import path from "path"
|
||||
import type { InstanceData } from "../api-types"
|
||||
import { getUserInstancesDir } from "../user-data"
|
||||
|
||||
const DEFAULT_INSTANCE_DATA: InstanceData = {
|
||||
messageHistory: [],
|
||||
@@ -13,7 +13,7 @@ const DEFAULT_INSTANCE_DATA: InstanceData = {
|
||||
export class InstanceStore {
|
||||
private readonly instancesDir: string
|
||||
|
||||
constructor(baseDir = path.join(os.homedir(), ".config", "codenomad", "instances")) {
|
||||
constructor(baseDir = getUserInstancesDir()) {
|
||||
this.instancesDir = baseDir
|
||||
fs.mkdirSync(this.instancesDir, { recursive: true })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user