Hooks: persist session memory on /reset

This commit is contained in:
Vignesh Natarajan
2026-02-20 20:19:29 -08:00
parent 544c213d42
commit d583399c92
8 changed files with 39 additions and 19 deletions

View File

@@ -86,13 +86,13 @@ describe("onboard-hooks", () => {
createMockHook(
{
name: "session-memory",
description: "Save session context to memory when /new command is issued",
description: "Save session context to memory when /new or /reset command is issued",
filePath: "/mock/workspace/hooks/session-memory/HOOK.md",
baseDir: "/mock/workspace/hooks/session-memory",
handlerPath: "/mock/workspace/hooks/session-memory/handler.js",
hookKey: "session-memory",
emoji: "💾",
events: ["command:new"],
events: ["command:new", "command:reset"],
},
eligible,
),
@@ -147,7 +147,7 @@ describe("onboard-hooks", () => {
{
value: "session-memory",
label: "💾 session-memory",
hint: "Save session context to memory when /new command is issued",
hint: "Save session context to memory when /new or /reset command is issued",
},
{
value: "command-logger",

View File

@@ -13,7 +13,7 @@ export async function setupInternalHooks(
await prompter.note(
[
"Hooks let you automate actions when agent commands are issued.",
"Example: Save session context to memory when you issue /new.",
"Example: Save session context to memory when you issue /new or /reset.",
"",
"Learn more: https://docs.openclaw.ai/automation/hooks",
].join("\n"),