Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/commands/init-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ────────────────────────────────────────────

Expand Down Expand Up @@ -171,7 +171,7 @@ export function buildHooksConfig(): Record<string, unknown> {
hooks: [{ type: 'command', command: 'git-mem hook session-start' }],
},
],
SessionStop: [
Stop: [
{
matcher: '',
hooks: [{ type: 'command', command: 'git-mem hook session-stop' }],
Expand Down Expand Up @@ -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:');
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/commands/init-hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
Loading