File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env bun
22
3+ import { tmpdir } from 'node:os'
4+ import * as path from 'node:path'
35import type {
46 NotificationPayload ,
57 PostToolUsePayload ,
@@ -12,10 +14,17 @@ import type {
1214 UserPromptSubmitPayload ,
1315 UserPromptSubmitResponse ,
1416} from './lib'
15-
1617import { runHook } from './lib'
1718import { saveSessionData } from './session'
1819
20+ // Check for --session-dir flag
21+ const args = process . argv . slice ( 2 )
22+ if ( args . includes ( '--session-dir' ) ) {
23+ const SESSIONS_DIR = path . join ( tmpdir ( ) , 'claude-hooks-sessions' )
24+ console . log ( SESSIONS_DIR )
25+ process . exit ( 0 )
26+ }
27+
1928// PreToolUse handler - called before Claude uses any tool
2029async function preToolUse ( payload : PreToolUsePayload ) : Promise < PreToolUseResponse > {
2130 // Save session data (optional - remove if not needed)
You can’t perform that action at this time.
0 commit comments