Documentation
¶
Overview ¶
Package paneauto opens in the right pane what the agent of a conversation works on, without being asked: a design of the machine's library whose files it writes, a document it publishes or a board it draws on the workspace's portal. It reads the conversation's finished tool calls and keeps a pane intent for the thing (the same intents `open` keeps), once per conversation: the next edit of a design changes nothing (its board updates by itself), the next publication of a document asks a tab that shows it to reload. Conservative on purpose: only the pane's own apps, only what a successful call names.
What opens the pane by itself (docs/pane-opening.md); the intents this package keeps are Auto, and the page places an Auto intent behind, with a dot, without bringing the pane out:
trigger intent the page the agent's `open` (layoutapi cliPanel) open in front, the pane comes out (not on a phone) the same `open` within RepeatWindow none (Repeated) nothing a design file the agent writes open, auto behind, the pane stays as it is a document or board it publishes open, auto behind, the pane stays as it is the same document published again open, auto, reload the tab that shows it reloads its browser tool (chrome_*) open, auto behind, the pane stays as it is a file it hands over (OpenOnce) open, auto behind, the pane stays as it is an address in its answer none a chip in the text; opens on its click
Index ¶
- Constants
- func AskedFile(intents *paneintents.Store, tabID, path string) bool
- func IsBrowserTool(tool string, servers ...string) bool
- func OpenOnce(intents *paneintents.Store, tabID, tab, target string) bool
- func Repeated(intents *paneintents.Store, tabID string, c panel.Command, now time.Time) string
- type Env
- type Found
- type Watcher
Constants ¶
const ( // Fresh: a call older than this is history read again (a restart, a transcript found late), not work going on. Fresh = 10 * time.Minute // ReloadEvery: a document published again within this of the last reload asks no other. ReloadEvery = 15 * time.Second )
const RepeatWindow = 10 * time.Minute
RepeatWindow: the agent's `open` of the very thing it asked for within this is not asked again. Each address opens once: an agent that names the same document in every reply, or runs `open` for it twice, does not throw the pane at the person again. After it, an `open` acts again: the person may have asked to see it once more.
Variables ¶
This section is empty.
Functions ¶
func AskedFile ¶
func AskedFile(intents *paneintents.Store, tabID, path string) bool
AskedFile: the conversation's pane was asked to show the file at this absolute path, as a file (`open files`, a hand-over, file_show) or as the design it is a board of. Only what the agent itself pointed at counts: a file it showed opens to read although it lies outside the chat's folder.
func IsBrowserTool ¶ added in v0.16.154
IsBrowserTool recognizes runtime browser tools in Claude MCP names and Codex's normalized code-mode names. Optional server names follow RUNTIME_MCP_SERVER.
func OpenOnce ¶ added in v0.16.5
func OpenOnce(intents *paneintents.Store, tabID, tab, target string) bool
OpenOnce asks the conversation's pane to open a tab on a target, unless the conversation was asked for the very thing already (within the intents' lifetime): the way a handed-over file opens, once, as `open` does. It returns whether it kept an intent, which the caller tells the pages of.
Types ¶
type Env ¶
type Env struct {
// Browser enables the managed browser pane; BrowserServer names the runtime MCP server.
Browser bool
BrowserServer string
// Targets classifies the links a call names, by the rules of `open`.
Targets panel.Targets
// ObjectLink recognizes a published address declared by an installed pane view.
ObjectLink func(address string) bool
// DesignOf is the design of the library an absolute path lies in, "" for none; nil: the machine has no library.
DesignOf func(path string) string
// Intents keeps what the pane is asked; TabOf is the layout tab of a conversation, whose pane it is ("" for none).
Intents *paneintents.Store
TabOf func(conv string) string
// Changed is told of a tab whose intents changed (the sync socket's "pane-intents").
Changed func(tabID string)
Now func() time.Time
}
Env is what the watcher reads and writes.
type Found ¶
type Found struct {
Tab, Target string
// Reloadable: a later call on it reloads the tab that shows it (a document published again).
Reloadable bool
}
Found is a thing of the pane a call worked on.