refactor(shared): unify MESSAGE_STORAGE/PART_STORAGE constants into single source

- Add src/shared/opencode-storage-paths.ts with consolidated constants

- Update imports in hook-message-injector and session-manager

- Add src/shared/opencode-storage-detection.ts with isSqliteBackend()

- Add OPENCODE_SQLITE_VERSION constant

- Export all from shared/index.ts
This commit is contained in:
YeonGyu-Kim
2026-02-14 18:05:11 +09:00
parent c9c02e0525
commit 5eebef953b
7 changed files with 134 additions and 11 deletions
+6
View File
@@ -15,6 +15,12 @@ export const MINIMUM_OPENCODE_VERSION = "1.1.1"
*/
export const OPENCODE_NATIVE_AGENTS_INJECTION_VERSION = "1.1.37"
/**
* OpenCode version that introduced SQLite backend for storage.
* When this version is detected AND opencode.db exists, SQLite backend is used.
*/
export const OPENCODE_SQLITE_VERSION = "1.1.53"
const NOT_CACHED = Symbol("NOT_CACHED")
let cachedVersion: string | null | typeof NOT_CACHED = NOT_CACHED