Documentation
¶
Overview ¶
Package toolconfirmation provides tool approval and rejection dialogs.
Index ¶
Constants ¶
const ToolRejectionDialogID = "tool-rejection-reason"
ToolRejectionDialogID is the unique identifier for the tool rejection reason dialog.
Variables ¶
This section is empty.
Functions ¶
func NewToolConfirmationDialog ¶
func NewToolConfirmationDialog(ar *animation.Runtime, msg *runtime.ToolCallConfirmationEvent, sessionState ConfirmationSessionState, opts ...messages.Option) common.Dialog
NewToolConfirmationDialog creates a new tool confirmation dialog
func NewToolRejectionReasonDialog ¶
NewToolRejectionReasonDialog creates a multi-choice dialog for selecting the reason for rejecting a tool call.
Types ¶
type ConfirmationSessionState ¶
type ConfirmationSessionState interface {
messages.SessionState
SetYoloMode(yoloMode bool)
}
ConfirmationSessionState is the session-state surface the confirmation dialog needs: the message list's surface for rendering the tool call, plus the session-wide approval flip for the "all tools" decision.
type Response ¶
type Response struct {
Response string // "approve", "reject", or "approve-session"
}
Response represents the user's response to tool confirmation
type RuntimeResumeMsg ¶
type RuntimeResumeMsg struct {
Request runtime.ResumeRequest
}
func HandleToolRejectionResult ¶
func HandleToolRejectionResult(result common.MultiChoiceResult) *RuntimeResumeMsg
HandleToolRejectionResult processes the result from the tool rejection dialog and returns the appropriate RuntimeResumeMsg. Returns nil if the result was cancelled (user should stay in confirmation dialog).