mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 06:41:22 +00:00
Hooks: persist session memory on /reset
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user