mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:01:01 +00:00
fix(sessions): restore Control UI /new hooks
Fixes #76957.
Restores the Control UI /new hook lifecycle through an explicit sessions.create emitCommandHooks opt-in, preserving hook-free defaults for programmatic parent-session creates.
Validation:
- pnpm protocol:check
- pnpm test src/gateway/server.sessions.reset-hooks.test.ts ui/src/ui/app-render.helpers.node.test.ts
- pnpm exec oxlint on touched TS files
- pnpm exec oxfmt --check --threads=1 on touched files
- git diff --check
- OPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled env NODE_OPTIONS=--max-old-space-size=4096 pnpm check:changed
- GitHub PR checks green on 3a446ec78e
- ClawSweeper re-review completed with no blocking findings and security cleared
Duplicate triage:
- #77376, #77004, and #76967 were superseded closed attempts for #76957
- #77562 is a closed duplicate issue
- #77880 mentions #76957 but is not a duplicate of this hook fix
This commit is contained in:
@@ -1910,6 +1910,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
public let label: String?
|
||||
public let model: String?
|
||||
public let parentsessionkey: String?
|
||||
public let emitcommandhooks: Bool?
|
||||
public let task: String?
|
||||
public let message: String?
|
||||
|
||||
@@ -1919,6 +1920,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
label: String?,
|
||||
model: String?,
|
||||
parentsessionkey: String?,
|
||||
emitcommandhooks: Bool?,
|
||||
task: String?,
|
||||
message: String?)
|
||||
{
|
||||
@@ -1927,6 +1929,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
self.label = label
|
||||
self.model = model
|
||||
self.parentsessionkey = parentsessionkey
|
||||
self.emitcommandhooks = emitcommandhooks
|
||||
self.task = task
|
||||
self.message = message
|
||||
}
|
||||
@@ -1937,6 +1940,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
case label
|
||||
case model
|
||||
case parentsessionkey = "parentSessionKey"
|
||||
case emitcommandhooks = "emitCommandHooks"
|
||||
case task
|
||||
case message
|
||||
}
|
||||
|
||||
@@ -1910,6 +1910,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
public let label: String?
|
||||
public let model: String?
|
||||
public let parentsessionkey: String?
|
||||
public let emitcommandhooks: Bool?
|
||||
public let task: String?
|
||||
public let message: String?
|
||||
|
||||
@@ -1919,6 +1920,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
label: String?,
|
||||
model: String?,
|
||||
parentsessionkey: String?,
|
||||
emitcommandhooks: Bool?,
|
||||
task: String?,
|
||||
message: String?)
|
||||
{
|
||||
@@ -1927,6 +1929,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
self.label = label
|
||||
self.model = model
|
||||
self.parentsessionkey = parentsessionkey
|
||||
self.emitcommandhooks = emitcommandhooks
|
||||
self.task = task
|
||||
self.message = message
|
||||
}
|
||||
@@ -1937,6 +1940,7 @@ public struct SessionsCreateParams: Codable, Sendable {
|
||||
case label
|
||||
case model
|
||||
case parentsessionkey = "parentSessionKey"
|
||||
case emitcommandhooks = "emitCommandHooks"
|
||||
case task
|
||||
case message
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user