Documentation
¶
Overview ¶
Package ux hosts user-interaction tools: AskUserQuestion, PushNotification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Notify tools.Tool = tools.NewStub( tools.PUSH_NOTIFICATION, "Send a desktop notification to the user's terminal (and to their phone if Remote Control is connected). "+ "Pulls the user's attention away from whatever they're doing — use sparingly. "+ "Send only when there's a real chance the user has walked away AND something worth coming back for has happened: "+ "long task finished, build ready, blocker hit that needs their decision. "+ "Never send for routine progress or a task that completed seconds after they asked. "+ "Lead with the actionable detail (\"build failed: 2 auth tests\" beats \"task done\"). "+ "Under 200 chars, one line, no markdown. "+ "If the result says push wasn't sent, no action needed.", `{ "type":"object", "additionalProperties":false, "required":["message","status"], "properties":{ "message":{"type":"string","minLength":1,"description":"The notification body. Keep under 200 characters; mobile OSes truncate."}, "status":{"type":"string","constant":"proactive","description":"Always the literal string \"proactive\"."} } }`, ) )
Functions ¶
Types ¶
type AskQuestionTool ¶
type AskQuestionTool struct {
// contains filtered or unexported fields
}
AskQuestionTool implements the AskUserQuestion tool. It blocks the agent goroutine until the user answers all questions via the TUI overlay, then returns the answers as a JSON result.
func NewAskQuestion ¶
func NewAskQuestion(lookup brokerLookup) *AskQuestionTool
NewAskQuestion builds the tool with a late-bound broker lookup. The standard call site is: ux.NewAskQuestion(toolState.QuestionBroker).
func (*AskQuestionTool) Description ¶
func (t *AskQuestionTool) Description() string
func (*AskQuestionTool) Execute ¶
func (t *AskQuestionTool) Execute(ctx context.Context, logger *slog.Logger, input json.RawMessage) (tools.Result, error)
func (*AskQuestionTool) Name ¶
func (t *AskQuestionTool) Name() string
func (*AskQuestionTool) Schema ¶
func (t *AskQuestionTool) Schema() json.RawMessage
Click to show internal directories.
Click to hide internal directories.