diff --git a/src/commands/init-hooks.ts b/src/commands/init-hooks.ts index 9996012a..07acb788 100644 --- a/src/commands/init-hooks.ts +++ b/src/commands/init-hooks.ts @@ -21,7 +21,7 @@ interface IInitHooksOptions { } // ── Git-mem event types managed by init-hooks ──────────────────────── -const GIT_MEM_EVENT_TYPES = ['SessionStart', 'SessionStop', 'UserPromptSubmit'] as const; +const GIT_MEM_EVENT_TYPES = ['SessionStart', 'Stop', 'UserPromptSubmit'] as const; // ── Fingerprint detection ──────────────────────────────────────────── @@ -171,7 +171,7 @@ export function buildHooksConfig(): Record { hooks: [{ type: 'command', command: 'git-mem hook session-start' }], }, ], - SessionStop: [ + Stop: [ { matcher: '', hooks: [{ type: 'command', command: 'git-mem hook session-stop' }], @@ -274,7 +274,7 @@ export async function initHooksCommand(options: IInitHooksOptions, logger?: ILog console.log('\nHooks configured:'); console.log(' SessionStart — Load memories into Claude context on startup'); - console.log(' SessionStop — Capture memories from session commits on exit'); + console.log(' Stop — Capture memories from session commits on exit'); console.log(' UserPromptSubmit — Surface relevant memories per prompt (disabled by default)'); console.log('\nNext steps:'); diff --git a/tests/unit/commands/init-hooks.test.ts b/tests/unit/commands/init-hooks.test.ts index 673617bd..138ce9f5 100644 --- a/tests/unit/commands/init-hooks.test.ts +++ b/tests/unit/commands/init-hooks.test.ts @@ -175,14 +175,14 @@ describe('removeGitMemHooks', () => { it('should remove git-mem entries from all three event types', () => { const hooks = { SessionStart: [gitMemMatcher('session-start')], - SessionStop: [gitMemMatcher('session-stop')], + Stop: [gitMemMatcher('session-stop')], UserPromptSubmit: [gitMemMatcher('prompt-submit')], }; const result = removeGitMemHooks(hooks); assert.equal(result.SessionStart, undefined); - assert.equal(result.SessionStop, undefined); + assert.equal(result.Stop, undefined); assert.equal(result.UserPromptSubmit, undefined); });