mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-12 12:26:57 -07:00
feat(core): implement additionalContext for BeforeModel hooks and aggregate context from multiple hooks
This commit is contained in:
@@ -197,6 +197,10 @@ request format.
|
||||
outgoing request (e.g., changing models or temperature).
|
||||
- `hookSpecificOutput.llm_response`: A **Synthetic Response** object. If
|
||||
provided, the CLI skips the LLM call entirely and uses this as the response.
|
||||
- `hookSpecificOutput.additionalContext`: (`string`) Text that is **appended**
|
||||
to the end of the user message (wrapped in `<hook_context>` tags). If
|
||||
`llm_request` also modifies contents, it will be appended to the modified
|
||||
contents.
|
||||
- `decision`: Set to `"deny"` to block the request and abort the turn.
|
||||
- **Exit Code 2 (Block Turn)**: Aborts the turn and skips the LLM call. Uses
|
||||
`stderr` as the error message.
|
||||
|
||||
Reference in New Issue
Block a user