mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-16 00:51:25 -07:00
fix(hooks): support 'ask' decision for BeforeTool hooks
This commit is contained in:
@@ -668,6 +668,15 @@ export const ToolConfirmationMessage: React.FC<
|
||||
paddingTop={0}
|
||||
paddingBottom={handlesOwnUI ? 0 : 1}
|
||||
>
|
||||
{/* System message from hook */}
|
||||
{confirmationDetails.systemMessage && (
|
||||
<Box marginBottom={1}>
|
||||
<Text color={theme.status.warning}>
|
||||
{confirmationDetails.systemMessage}
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{handlesOwnUI ? (
|
||||
bodyContent
|
||||
) : (
|
||||
|
||||
@@ -1574,7 +1574,7 @@ export const useGeminiStream = (
|
||||
) {
|
||||
let awaitingApprovalCalls = toolCalls.filter(
|
||||
(call): call is TrackedWaitingToolCall =>
|
||||
call.status === 'awaiting_approval',
|
||||
call.status === 'awaiting_approval' && !call.request.forcedAsk,
|
||||
);
|
||||
|
||||
// For AUTO_EDIT mode, only approve edit tools (replace, write_file)
|
||||
|
||||
Reference in New Issue
Block a user