mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-04-28 04:44:14 +00:00
feat(imessage): add IMESSAGE_DB_PATH env var for testing
Mirrors the existing IMESSAGE_STATE_DIR override. Lets a mock sqlite chat.db stand in for ~/Library/Messages/chat.db so chat_messages can be tested without macOS + Full Disk Access + real iMessage history.
This commit is contained in:
@@ -33,7 +33,8 @@ import { join, basename, sep } from 'path'
|
||||
const STATIC = process.env.IMESSAGE_ACCESS_MODE === 'static'
|
||||
const APPEND_SIGNATURE = process.env.IMESSAGE_APPEND_SIGNATURE !== 'false'
|
||||
const SIGNATURE = '\nSent by Claude'
|
||||
const CHAT_DB = join(homedir(), 'Library', 'Messages', 'chat.db')
|
||||
const CHAT_DB =
|
||||
process.env.IMESSAGE_DB_PATH ?? join(homedir(), 'Library', 'Messages', 'chat.db')
|
||||
|
||||
const STATE_DIR = process.env.IMESSAGE_STATE_DIR ?? join(homedir(), '.claude', 'channels', 'imessage')
|
||||
const ACCESS_FILE = join(STATE_DIR, 'access.json')
|
||||
|
||||
Reference in New Issue
Block a user