Files
archie/internal/tools/builtin/bridge.go
T
sam 9c04b74e6f docs: fix Vale prose findings across comments, docs and prompts
Run Vale over every tracked Go, Markdown and template file and fix the remaining findings: long sentences, repetition, UI verbs, identifiers that should be backticked, and migration narration in comments.

AGENTS.md and CLAUDE.md keep their absolute rules; the prompt heuristic against repeated absolutes is disabled for rule files.
2026-11-24 03:26:16 +11:00

44 lines
1.3 KiB
Go

package builtin
import (
"context"
"errors"
)
var (
ErrInteractiveUnsupported = errors.New("interactive prompts are not supported in this mode")
ErrInteractiveCanceled = errors.New("interactive prompt was canceled")
)
// UIBridge allows tools to interact with the user through the TUI. The
// extension/ui bridge implementation satisfies it.
type UIBridge interface {
Confirm(ctx context.Context, title, description string) (bool, error)
Select(ctx context.Context, title string, options []string) (string, error)
Input(ctx context.Context, title, placeholder string) (string, error)
Notify(title, level string)
Log(chunk string)
// SessionID returns the current tool call's session, or "".
SessionID() string
}
type NonInteractiveBridge struct{}
func (NonInteractiveBridge) SessionID() string { return "" }
func (NonInteractiveBridge) Confirm(context.Context, string, string) (bool, error) {
return false, ErrInteractiveUnsupported
}
func (NonInteractiveBridge) Select(context.Context, string, []string) (string, error) {
return "", ErrInteractiveUnsupported
}
func (NonInteractiveBridge) Input(context.Context, string, string) (string, error) {
return "", ErrInteractiveUnsupported
}
func (NonInteractiveBridge) Notify(string, string) {}
func (NonInteractiveBridge) Log(string) {}