You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: pass mentioned files to prompt_guard callback
The prompt_guard callback now receives the list of mentioned files from the
opencode context as a parameter. This allows users to make decisions based on
which files are included in the context.
Changes:
- Updated prompt_guard type signature from `fun(): boolean` to `fun(mentioned_files: string[]): boolean`
- Modified util.check_prompt_allowed to accept and pass mentioned_files parameter
- Updated prompt_guard_indicator to retrieve mentioned files from context
- Updated core.lua toggle and send_message to pass mentioned files to guard callback
This enables use cases like denying prompts when certain sensitive files are
mentioned, or allowing prompts only when specific files are included.
---@fieldinputTaskToolInput|BashToolInput|FileToolInput|TodoToolInput|GlobToolInput|GrepToolInput|WebFetchToolInput|ListToolInput Input data for the tool
0 commit comments