diff options
| author | Russell Coleman <russell@anthropic.com> | 2026-03-27 13:45:56 -0700 |
|---|---|---|
| committer | Russell Coleman <russell@anthropic.com> | 2026-03-27 13:45:56 -0700 |
| commit | a1ffbcc771d406a0945669e644cc7b7bb17bb913 (patch) | |
| tree | 50320169b7768a4ba1ab7e376db2fab10b372e82 /external_plugins | |
| parent | 28f743438419dfc122180b4c0d723f1e94374d96 (diff) | |
feat(imessage): add IMESSAGE_DB_PATH env var for testingrussell/imessage-conversational-format
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.
Diffstat (limited to 'external_plugins')
| -rw-r--r-- | external_plugins/imessage/server.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/external_plugins/imessage/server.ts b/external_plugins/imessage/server.ts index 45e33b10..2fc7a5c3 100644 --- a/external_plugins/imessage/server.ts +++ b/external_plugins/imessage/server.ts @@ -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') |
