Documentation
¶
Overview ¶
Package asknotify raises a driven agent's ask: it records the ask in the inbox and tells the user through the configured notifier.
Index ¶
- func AskFromRun(ctx context.Context, r *state.Run, cwd string) (asks.Ask, bool)
- func AskLink(links *render.TaskLinks, a asks.Ask) string
- func Notify(ctx context.Context, a asks.Ask) error
- func NotifyArgv(notify string, a asks.Ask, goos string, look func(string) (string, error)) ([]string, []string)
- func PaneAnswered(ctx context.Context, cwd, prompt string) []asks.Ask
- func RaiseAsk(ctx context.Context, w io.Writer, dir string, a asks.Ask, now time.Time, ...) asks.Ask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskFromRun ¶
AskFromRun is the ask a driven agent's run records, placed by its cwd.
func AskLink ¶
AskLink is askName with the task linked; the url the ask carries is the lead's, so a bundle links its members from the ledger instead.
func Notify ¶
Notify tells the user of a new ask by the command ~/.f10/inbox.md names, else the desktop's own notification.
func NotifyArgv ¶
func NotifyArgv(notify string, a asks.Ask, goos string, look func(string) (string, error)) ([]string, []string)
NotifyArgv is the command run for a, and its environment. A placeholder becomes a shell variable, never the agent's text, so a question holding `$(...)` or a backtick is printed, not run, however the template quotes it.
func PaneAnswered ¶
PaneAnswered claims the open ask of the checkout at cwd for a prompt typed in its pane, a reply that picks options stored as the options it names. It starts the resume of its drive apart from this hook, which has seconds to live. It returns the asks it closed.
func RaiseAsk ¶
func RaiseAsk( ctx context.Context, w io.Writer, dir string, a asks.Ask, now time.Time, notify func(context.Context, asks.Ask) error, ) asks.Ask
RaiseAsk puts a in the inbox and, the first time, runs the notify command. It returns the ask as the inbox holds it, else a. Neither failing changes the run that asked, and a line says so.
Types ¶
This section is empty.