refactor(shared): unify MESSAGE_STORAGE/PART_STORAGE constants into single source
- Create src/shared/opencode-storage-paths.ts with all 4 constants - Update 4 previous declaration sites to import from shared file - Update additional OPENCODE_STORAGE usages for consistency - Re-export from src/shared/index.ts - No duplicate constant declarations remain
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import { existsSync, readdirSync } from "node:fs"
|
||||
import { join } from "node:path"
|
||||
import { getOpenCodeStorageDir } from "./data-path"
|
||||
import { MESSAGE_STORAGE } from "./opencode-storage-paths"
|
||||
import { isSqliteBackend } from "./opencode-storage-detection"
|
||||
import { log } from "./logger"
|
||||
|
||||
const MESSAGE_STORAGE = join(getOpenCodeStorageDir(), "message")
|
||||
|
||||
export function getMessageDir(sessionID: string): string | null {
|
||||
if (!sessionID.startsWith("ses_")) return null
|
||||
if (isSqliteBackend()) return null
|
||||
|
||||
Reference in New Issue
Block a user