fix: default elevated level to 'off' when not allowed
When elevatedAllowed is false (e.g., for heartbeat surface which isn't in any allowFrom list), the elevated level was incorrectly defaulting to 'on', causing bash commands to fail with 'elevated is not available'. Now defaults to 'off' when elevated isn't allowed, so bash works normally without trying to use elevated mode. Fixes: https://github.com/clawdbot/clawdbot/issues/181
This commit is contained in:
committed by
Peter Steinberger
parent
a2d7632cf3
commit
64e656af82
@@ -305,7 +305,7 @@ export async function getReplyFromConfig(
|
||||
(sessionEntry?.elevatedLevel as ElevatedLevel | undefined) ??
|
||||
(agentCfg?.elevatedDefault as ElevatedLevel | undefined) ??
|
||||
"on")
|
||||
: "on";
|
||||
: "off";
|
||||
const resolvedBlockStreaming =
|
||||
agentCfg?.blockStreamingDefault === "off" ? "off" : "on";
|
||||
const resolvedBlockStreamingBreak: "text_end" | "message_end" =
|
||||
|
||||
Reference in New Issue
Block a user