Documentation
¶
Overview ¶
Package shell is the main window's frame: the header band, the feature rail, the sidebar column and the right panel beside the page, each column opening, closing and resizing with the reference's motion, and the window's shortcuts, search, activity centre and knowledge viewer.
Index ¶
- Constants
- Variables
- func Accelerator(mods ui.Modifiers, key ui.Key) string
- func ClampNav(w float32) float32
- func ClampPanel(width, w, nav float32) float32
- func HeaderInsets(bar ui.TitleBar) float32
- func MoveFeature(order []string, source, target string, after bool) []string
- func NoticeAge(d time.Duration) (key string, count int)
- func NoticeHeading(n *viewmodel.Notice, language string) string
- func PanelFits(w, nav, panel float32) bool
- func SavePrefs(dir string, p Prefs) error
- func SortNotices(list []*preview.Notice) []*preview.Notice
- type App
- func (a *App) AllPanelTabs() []panel.Tab
- func (a *App) ApplyData(d *viewmodel.Data)
- func (a *App) CloseKnowledge()
- func (a *App) ClosePage() bool
- func (a *App) Closing() bool
- func (a *App) Composer(id string) *composer.State
- func (a *App) ConfirmClose(r CloseRequest)
- func (a *App) ConversationActiveTab(id string) panel.Tab
- func (a *App) ConversationTabs(id string) []panel.Tab
- func (a *App) Demo() bool
- func (a *App) DemoConversation(id string) *viewmodel.Conversation
- func (a *App) DemoOn() bool
- func (a *App) DemoReveal(id string, index int)
- func (a *App) DemoUsage() *preview.Usage
- func (a *App) Do(id string)
- func (a *App) DropComposer(id string) *composer.State
- func (a *App) DropPanel(id string)
- func (a *App) DropPanelTab(t panel.Tab)
- func (a *App) DropWorkspaceTerminal(id string)
- func (a *App) FeaturePreferences() ([]string, map[string]bool)
- func (a *App) FocusedConversation() string
- func (a *App) HasNavigation() bool
- func (a *App) HasPanelTab(t panel.Tab) bool
- func (a *App) HasWorkspaceTerminal(id string) bool
- func (a *App) Menu(lang string, send func(id string)) []*mygo.MenuItem
- func (a *App) MountPanel()
- func (a *App) MovePanelTab(t panel.Tab, id string)
- func (a *App) NavShown() bool
- func (a *App) Navigate(p Page)
- func (a *App) OpenHost(id string)
- func (a *App) OpenKnowledge(c *ui.Context, session, link string)
- func (a *App) OpenProject(project *viewmodel.Project, actions ProjectActions)
- func (a *App) OpenWorkspaceTerminal(id, title string)
- func (a *App) PanelConversations() []string
- func (a *App) PluginFeature() string
- func (a *App) Prefs() Prefs
- func (a *App) ProjectOwner() (node, project string, shown bool)
- func (a *App) Reading() *Reading
- func (a *App) ReplaceConversationID(before, after string)
- func (a *App) ResourceProject() *viewmodel.Project
- func (a *App) ResourceTarget() ResourceTarget
- func (a *App) RevealDetails()
- func (a *App) SetFeaturePreferences(order []string, pins map[string]bool)
- func (a *App) SetHostPorts(id string, ports []host.Port)
- func (a *App) SetHosts(hosts map[string]*host.Host)
- func (a *App) SetInstallations(queue *transfers.Queue)
- func (a *App) SetLocalHost(h *host.Host)
- func (a *App) SetPluginFeatures(features []Feature)
- func (a *App) SetPluginWorkspace(key string, minNavigation, minDetails, defaultDetails float32)
- func (a *App) SetPrefs(p Prefs)
- func (a *App) SetResourceTarget(target ResourceTarget)
- func (a *App) SetWelcome(seen bool)
- func (a *App) ShowKnowledge(r *Reading)
- func (a *App) ShowSelection(text string)
- func (a *App) SystemShortcuts() map[string]string
- func (a *App) ToggleSettings()
- func (a *App) Usage() Usage
- func (a *App) View(c *ui.Context)
- func (a *App) WorkspaceTerminalIDs() []string
- type Choice
- type CloseRequest
- type ConversationActions
- type ConversationPanel
- type Feature
- type Group
- type Hooks
- type Page
- type PluginWorkspacePrefs
- type Prefs
- type ProjectActions
- type ProjectRepository
- type Reading
- type ResourceTarget
- type Shortcut
- type Source
- type Usage
- type WorkspaceTerminal
Constants ¶
const ( Website = "https://sailry.dev" Feedback = "https://github.com/sailry/sailry-harness/issues" )
Website and Feedback are the Help menu's pages.
const ( HeaderHeight = 48 RailWidth = 56 MainMin = 320 // the conversation's least width PanelWidth = 560 PanelMin = 360 )
Layout metrics.
const ( HeaderButton = 28 RailButton = 36 ButtonGap = 8 )
The header's and the rail's icon buttons are Kit's IconButton at one size each, 8 DIPs apart. Header contributions (Hooks.PluginHeader) use HeaderButton too.
const PrefsFile = "ui-state.json"
PrefsFile is the preferences' file name in the app's user data folder, beside MyGo's window-state.json, which keeps the window's bounds.
Variables ¶
var CloseFocused = Shortcut{ID: "close", Label: "menu_close_tab", Mods: ui.Cmd, Key: ui.KeyW}
CloseFocused is ⌘W. The reference binds it on the panes that close, not on the window: the right panel and an independent page take it while the focus is inside them (App.pane), a split's pane leaves its split, a conversation standing alone and a Files or Git page close their shown tab first, and anywhere else it does nothing.
var Features = []Feature{ {ID: "page:conversation", Icon: icons.Chat, Label: "shell_sessions", Fixed: true}, {ID: "page:activity", Icon: icons.Grid, Label: "activity"}, {ID: "page:files", Icon: icons.Folder, Label: "files"}, {ID: "page:git", Icon: icons.Network, Label: "git"}, {ID: "page:settings_plugins", Icon: icons.Puzzle, Label: "market_title", Last: true}, }
Features are the rail's features in their default order: Conversation, Activity, Files, Git, Market.
var Motion = ui.Animation{Duration: 180 * time.Millisecond, Ease: ui.CubicBezier(0.2, 0, 0, 1)}
Motion is the columns' open and close: Kit's duration_normal along easing_move. MyGo makes it instant with Reduce Motion.
var Shortcuts = append(window(settings.Registry), Shortcut{ID: "app.settings", Label: "settings", Mods: ui.Cmd, Key: ui.KeyComma}, Shortcut{ID: "conversation.find", Label: "chat_search", Mods: ui.Cmd, Key: ui.KeyF}, Shortcut{ID: "conversation.stop", Label: "chat_stop", Mods: ui.Cmd, Key: ui.KeyPeriod}, Shortcut{ID: "composer.focus", Label: "chat_message_placeholder", Mods: ui.Cmd, Key: ui.KeyL}, Shortcut{ID: "composer.models", Label: "composer_model_settings", Mods: ui.Cmd | ui.Shift, Key: ui.KeyM}, )
Shortcuts are the reference's window keys, ⌘ standing for Ctrl off macOS: the Shortcuts settings' registry, which the user may rebind (App.binding), then Settings, Find and the conversation's own keys, which are fixed: Stop, Focus the composer and the model controls act on the conversation page only, and the reference lists them in neither the Shortcuts settings nor the menu. The system's shortcuts are not the window's. The panel's resource keys follow (panel.Resources).
Functions ¶
func Accelerator ¶
Accelerator writes a shortcut as MyGo's menus take it: CmdOrCtrl+Alt+N for ⌥⌘N, ui.Cmd being Command on macOS and Ctrl elsewhere.
func ClampPanel ¶
ClampPanel keeps the panel's width in 360 and what leaves the conversation 320.
func HeaderInsets ¶
HeaderInsets is the room the header keeps clear at the window's right edge: 12, past the window buttons MyGo reports there (Windows and Linux; none on macOS, whose lights are on the left).
func MoveFeature ¶
MoveFeature moves source before or after target in the rail's order: the fixed Conversation and the last Market do not move, and nothing goes after Market.
func NoticeAge ¶
NoticeAge is a notice's age as the activity centre writes it: an i18n key and its count.
func NoticeHeading ¶
NoticeHeading is the heading a package gave its notice, in a language, "" when it gave none: a reminder says Reminder above its own title. System notices keep the application's headings.
func PanelFits ¶
PanelFits reports whether the right panel shows beside the main column in a window w wide: the rail, the sidebar and 320 for the conversation leave it its width. A narrow window hides it without closing it.
Types ¶
type App ¶
type App struct {
Data *viewmodel.Data
Preview bool
Hooks Hooks
// Theme is the selected theme package's ID; empty is the built-in one.
Theme string
Mode theme.Mode
Effects bool // the theme's animated effects
// Surfaces are the window materials' opacities (Appearance).
Surfaces theme.Surfaces
Page Page
// NavOpen and NavWidth are the side column's saved choice, shared by the
// pages that have one (HasNavigation); a page without one hides the
// column and leaves the choice as it is.
// OverviewHidden is the header button's saved choice. A narrow pane
// uses a popover without changing the wide pane's choice.
OverviewHidden bool
// package page. The Shell owns its position, width and fold toggle.
PluginNavigation func(*ui.Context)
// PanelOpen is whether the user wants the right panel; a narrow window
// hides it without changing this.
PanelOpen bool
// PluginDetails draws the details a package page's Workspace supplies
// to the right column, nil while the page shown offers none. They show
// until the toggle folds them; the conversation's PanelOpen is its own.
PluginDetails func(*ui.Context)
// PluginDetailsHeader draws what those details give the column's
// header segment: their title, then their own actions.
PluginDetailsHeader func(*ui.Context)
PluginDetailsLabel string
PanelWidth float32
// DiffSplit is the window's diff layout, side by side when set: the
// button at the end of a diff's footer writes it (kit.DiffSplit), and
// it is saved with the window's other choices (prefs.go).
DiffSplit bool
// where a conversation panel is too narrow for both side by side
// (panel.BindListShare); 0 is the first share. The divider between them
// writes it, and it is saved as DiffSplit is.
ListShare float32
// OnMode, when set, gets the theme mode as it changes, so the window's
// native material follows the app's appearance.
OnMode func(theme.Mode)
Sidebar *sidebar.State
Settings *settings.State
Messages *conversation.State
Panel *panel.State
// Projects keeps each project's Files and Git state, shared by their
// pages and the panel's tabs.
Projects *panel.Projects
// Host is the device whose monitor HostPage shows;
// hosts are the host pages' data, made from the dataset as first
// shown, and their UI state. Metrics is whether the host page's right
// column shows the metrics summary (layout.panel_open of Page::Host):
// closed until the user opens it, as the reference's, since the page
// itself is the monitor.
Host string
Metrics bool
// Welcome is the welcome guide, opened at the first launch
// (SetPrefs) and from the Help menu in the preview.
Welcome onboarding.Guide
// contains filtered or unexported fields
}
App is the window's state.
func (*App) AllPanelTabs ¶
AllPanelTabs are the panel tabs of every conversation, the shown one's first.
func (*App) ApplyData ¶
ApplyData replaces a Client projection on the UI thread, retaining local drafts.
func (*App) CloseKnowledge ¶
func (a *App) CloseKnowledge()
CloseKnowledge releases a restricted projection, including text held by a callback that still refers to the old page.
func (*App) ClosePage ¶
ClosePage closes the independent page shown, back to the conversation. It reports whether there was one to close.
func (*App) ConfirmClose ¶
func (a *App) ConfirmClose(r CloseRequest)
ConfirmClose opens the close prompt. A prompt already showing stays as it is, so repeated close requests ask once.
func (*App) ConversationActiveTab ¶
ConversationActiveTab is the tab a conversation's panel shows, on screen or not.
func (*App) ConversationTabs ¶
ConversationTabs are a conversation's panel tabs, shown or not.
func (*App) DemoConversation ¶
func (a *App) DemoConversation(id string) *viewmodel.Conversation
DemoConversation is the demo's conversation of that ID, nil without the demo. Unlike Demo it also answers while the window's own stage is back on the fields: the controller's frame hooks keep what it mounted over a demo conversation (Hooks.DemoConversation) for as long as the demo has it.
func (*App) DemoOn ¶
DemoOn reports whether the demo is on. Unlike Demo it also answers while the window's own stage is back on the fields, as in the controller's frame hooks: what the user does then is still done in the demo.
func (*App) DemoReveal ¶
DemoReveal scrolls the demo's transcript of that conversation to the turn at index; nothing without the demo. Like DemoConversation it also answers while the window's own stage is back on the fields, where a package mounted over a demo conversation asks for it.
func (*App) DemoUsage ¶
DemoUsage is the usage the demo counts, which the Usage page reads while the demo shows; nil without the demo. Unlike Demo it also answers while the window's own stage is back on the fields.
func (*App) Do ¶
Do sends a command of the native menu, a Shortcut's ID or another of the menu's (menu.go), to run in the next frame. Call it on the main thread, where menu items' Click runs, then redraw the window.
func (*App) DropComposer ¶
DropComposer forgets the input state of a draft that is gone and returns it, nil when there was none.
func (*App) DropPanel ¶
DropPanel forgets a conversation's panel, as when the conversation is deleted or archived. The owner of what its tabs show closes that first.
func (*App) DropPanelTab ¶
DropPanelTab takes t out of the panel that has it, shown or not, without closing what the tab shows.
func (*App) DropWorkspaceTerminal ¶
DropWorkspaceTerminal closes only a main terminal's surface. Its running process remains in the Node's inventory and can be opened from terminal activity.
func (*App) FeaturePreferences ¶
FeaturePreferences returns controller-owned rail order and pin choices.
func (*App) FocusedConversation ¶
FocusedConversation is the conversation receiving main-workspace actions, empty while a terminal or another page is focused.
func (*App) HasNavigation ¶
HasNavigation reports whether the page shown has a side column beside the rail, as the reference's feature_navigation: the sessions on the conversation and on the host and project pages opened from it, the sections on Settings. Activity, Files, Git, Market, the notification center have none. A package page can supply its own resource navigation.
func (*App) HasPanelTab ¶
HasPanelTab reports whether any conversation's panel has t.
func (*App) HasWorkspaceTerminal ¶
HasWorkspaceTerminal reports whether the main workspace owns id's surface.
func (*App) Menu ¶
Menu is the native app menu in lang: App, File, Edit, View, Window and Help, with the reference's items on the keys they have now (syncMenuKeys follows a rebound one), then the rail's features in View. The app's items send their command's ID through send, which cmd/sailry-desktop passes to Do: the menu takes their keys before the window does. The system's items are MyGo's roles under the reference's labels and keys: the menu binds Close Window, Hide, Hide Others, Minimize and Full Screen on cmd (ui.Super), the rest on secondary (ui.Cmd). Save follows the focused live editor. Logs stays disabled without a log folder (Hooks.OpenLogs). Help's last items open the welcome guide and the selected text dialog, which the preview reaches no other way.
func (*App) MountPanel ¶
func (a *App) MountPanel()
MountPanel gives the panel to the selected conversation: the tabs of the one left are kept for its return, and the selected one's come back, or the closed panel of a conversation that never opened it. The first conversation takes what the window opened before it. A terminal has one tab in the window: the one in the shown panel.
func (*App) MovePanelTab ¶
MovePanelTab gives t to conversation id's panel, behind its shown tab: a tab opened for a conversation that is not on screen, as the page its agent opened.
func (*App) NavShown ¶
NavShown reports whether the side column shows: the page has one and the user keeps it open.
func (*App) OpenKnowledge ¶
OpenKnowledge opens a knowledge link of a conversation on its Node.
func (*App) OpenProject ¶
func (a *App) OpenProject(project *viewmodel.Project, actions ProjectActions)
func (*App) OpenWorkspaceTerminal ¶
OpenWorkspaceTerminal opens or focuses an independent main terminal. It does not add a conversation's right-panel tab or start a terminal process.
func (*App) PanelConversations ¶
PanelConversations are the conversations that have a panel: the shown one first, then the others in order.
func (*App) PluginFeature ¶
func (*App) Prefs ¶
Prefs returns the app's preferences as they are now. They are the window's own: the demo's panels and panes are never saved.
func (*App) ProjectOwner ¶
func (*App) ReplaceConversationID ¶
ReplaceConversationID retains local input state when a draft is created on Node.
func (*App) ResourceProject ¶
ResourceProject is the project named in the Files or Git breadcrumb.
func (*App) ResourceTarget ¶
func (a *App) ResourceTarget() ResourceTarget
ResourceTarget returns the explicit selection when Files or Git is shown. The zero value follows the current conversation.
func (*App) RevealDetails ¶
func (a *App) RevealDetails()
RevealDetails shows the right column again after its toggle folded it.
func (*App) SetFeaturePreferences ¶
func (*App) SetInstallations ¶
func (*App) SetLocalHost ¶
SetLocalHost supplies current local overview data without preview metrics.
func (*App) SetPluginFeatures ¶
func (*App) SetPluginWorkspace ¶
SetPluginWorkspace projects the mounted Workspace's constraints. A default width initializes a Workspace once; subsequent projections preserve drags.
func (*App) SetResourceTarget ¶
func (a *App) SetResourceTarget(target ResourceTarget)
SetResourceTarget selects the workspace shared by Files and Git.
func (*App) SetWelcome ¶
SetWelcome uses the profile preference, independently of window UI state.
func (*App) ShowKnowledge ¶
ShowKnowledge opens the viewer on a page read from a Node.
func (*App) ShowSelection ¶
ShowSelection presents text captured by the controller's native integration.
func (*App) SystemShortcuts ¶
SystemShortcuts are the system-wide shortcuts on the keys they have now, by accelerator: their commands go to Do. cmd/sailry-desktop registers them with the system as the app starts.
func (*App) ToggleSettings ¶
func (a *App) ToggleSettings()
ToggleSettings opens Settings, or from Settings goes back to the page it opened over: the rail's button opens and closes it (user decision 2026-11-12).
func (*App) WorkspaceTerminalIDs ¶
WorkspaceTerminalIDs lists the open main terminal surfaces in opening order.
type Choice ¶
type Choice struct {
ID string
Label string
Icon *ui.SVG
Keywords []string
Folder string // the folder it opens, "" for an action
Selected bool // what the window shows: a check
// contains filtered or unexported fields
}
Choice is a row of the search: a label with keywords that match too, a folder it opens, or an action.
type CloseRequest ¶
type CloseRequest struct {
// Documents are the unsaved documents now, read again after a save.
Documents func() []string
// Save starts saving every unsaved document; Saving reports whether a
// save is still under way. A failed save tells its own toast.
Save func()
Saving func() bool
Proceed func()
}
CloseRequest is a window close or an application quit that would lose something. With unsaved Documents the prompt names them and offers Save all, Discard changes and Cancel; without any it confirms the quit that stops local work. Proceed closes the window or quits; the owner (cmd/sailry-desktop) lets that close pass.
type ConversationActions ¶
type ConversationActions interface {
composer.Actions
conversation.Actions
}
type ConversationPanel ¶
type ConversationPanel struct {
Tabs []panel.Tab `json:"tabs,omitempty"`
Active panel.Tab `json:"active"`
Open bool `json:"open,omitempty"`
// Width is the column's width when the conversation was left, 0 for the
// window's.
Width float32 `json:"width,omitempty"`
// contains filtered or unexported fields
}
ConversationPanel is a conversation's panel while another conversation is shown, and in the saved window state.
type Feature ¶
type Feature struct {
ID string
Icon *ui.SVG
Label string // i18n key
Fixed bool // always on the rail, never moved (Conversation)
Last bool // always last (Market)
DefaultPinned bool
}
Feature is a rail entry.
type Hooks ¶
type Hooks struct {
HostActions func(string) host.Actions
EditHost func(string)
WorkspaceProject func() *panel.Project
ResourceWorkspace func(ResourceTarget) *panel.Project
DownloadDialog func(*ui.Context)
PackageDialogs func(*ui.Context)
// FilePreview draws the preview dialog of a file outside a
// conversation.
FilePreview func(*ui.Context)
BeforeFrame func(*ui.Context)
AfterFrame func()
// DemoChanged runs when Demo mode went on, off or into another
// language, before the frame's other hooks.
DemoChanged func()
Refresh func()
ReadNotice func(string)
ReadNotices func([]string)
DismissRead func([]string)
DismissNotices func([]string)
OpenKnowledge func(c *ui.Context, node string, source Source)
CaptureSelection func()
OpenLogs func()
Conversation func(*ui.Context, *viewmodel.Conversation, *composer.State) (*composer.Context, ConversationActions)
// DemoConversation lets the controller show over a demo conversation
// what reads nothing but the conversation itself: the statistics
// package's figures in the composer's context bar. It runs after the
// demo's composer is prepared and sends the Node nothing of the demo.
DemoConversation func(*ui.Context, *viewmodel.Conversation, *composer.State)
RenderChild func(*ui.Context, string)
ReadSelection func(string, string)
ReaderActive func(string) bool
SelectPlugin func(string) bool
PluginPage func(*ui.Context, string)
PluginHeader func(*ui.Context)
PluginTitle func(*ui.Context) bool
PluginOverlays func(*ui.Context)
// Overview is a conversation's session overview for the header's button.
Overview func(*ui.Context, *viewmodel.Conversation) *composer.Overview
}
Hooks keeps I/O and thread scheduling in the live controller.
type Page ¶
type Page int
Page is what the main panel shows: the conversation, settings, or a rail feature's independent page (pages.go).
type PluginWorkspacePrefs ¶
type PluginWorkspacePrefs struct {
Width float32 `json:"width"`
Folded bool `json:"folded,omitempty"`
}
PluginWorkspacePrefs belong to one workspace, including the core Files and Git pages. Conversation panels and other workspaces keep their own widths and fold choices.
type Prefs ¶
type Prefs struct {
// OverviewHidden hides the activity card in a wide conversation pane.
OverviewHidden bool `json:"overviewHidden,omitempty"`
PanelWidth float32 `json:"panelWidth"`
PanelOpen bool `json:"panelOpen"`
PanelTabs []panel.Tab `json:"panelTabs,omitempty"`
PanelTab panel.Tab `json:"panelTab"`
// PanelOf is the conversation PanelTabs, PanelTab and PanelOpen belong
// to, the one shown last; empty in a file from before the panel belonged
// to conversations, whose tabs the first conversation shown takes.
PanelOf string `json:"panelOf,omitempty"`
// Panels are the other conversations' panels (panels.go).
Panels map[string]ConversationPanel `json:"panels,omitempty"`
PluginWorkspaces map[string]PluginWorkspacePrefs `json:"pluginWorkspaces,omitempty"`
Collapsed []string `json:"collapsed,omitempty"`
// SessionOrder is the preview's sidebar order, a session_order value; a
// profile keeps its own in its preferences.
SessionOrder string `json:"sessionOrder,omitempty"`
Features []string `json:"features,omitempty"` // the rail's order
Unpinned []string `json:"unpinned,omitempty"` // features off the rail
// WelcomeSeen is whether the welcome guide was dismissed; nil in a file from
// before it counts as seen, and no file at all as a first launch.
WelcomeSeen *bool `json:"welcomeSeen,omitempty"`
// Panes are the split workspace's groups, each a layout tree.
Panes []*panes.Node `json:"panes,omitempty"`
// Tabs are the sessions and terminals kept as tabs beside the groups.
Tabs []panes.Target `json:"tabs,omitempty"`
// TabOrder is the header tabs' opening order, each by its first target.
TabOrder []panes.Target `json:"tabOrder,omitempty"`
// WorkspaceTerminals are independent main terminal surfaces. They hold no
// process state or conversation ownership.
WorkspaceTerminals []WorkspaceTerminal `json:"workspaceTerminals,omitempty"`
// DiffSplit is the window's diff layout: side by side when set, else
// unified, as before the choice.
DiffSplit bool `json:"diffSplit,omitempty"`
// absent, as in a file from before, is the first share.
ListShare float32 `json:"listShare,omitempty"`
}
Prefs are the window's UI preferences that come back after a relaunch: the columns' widths and openness, the panel's tabs, the projects closed in the sidebar, and the preview's rail. They are UI state, not user data; the preview's conversations are never written.
The file is one for the preview and every profile. A profile keeps its rail's order and pins in its own preferences (FeaturePreferences), so a live window neither reads Features and Unpinned nor changes them: it writes back the ones it loaded.
type ProjectActions ¶
type ProjectActions struct {
NewSession func(*viewmodel.Project)
VisibleSession func(*viewmodel.Conversation) bool
OpenSession func(*viewmodel.Conversation, func(bool))
Repository func() ProjectRepository
Initialize func(func(bool))
// NewTerminal opens an independent terminal in the project's worktree.
NewTerminal func(*viewmodel.Project)
// Controls draws the controls packages add to the page, after its own.
Controls func(*ui.Context)
}
type ProjectRepository ¶
type Reading ¶
type Reading struct {
Node, Collection string
Title, Host, Path, Position, Text string
First, Last, Pending bool
Turn func(forward bool)
}
Reading is one page of a citation read from its Node. The controller owns it: it replaces the page and the ends as Previous and Next load.
type ResourceTarget ¶
type ResourceTarget struct {
Node, Project, Worktree string
}
ResourceTarget identifies the independent Files and Git workspace. An empty Worktree selects the project's main worktree.
type Shortcut ¶
Shortcut is a key of the window: its id, label and default key, as the Shortcuts settings list them.
type Source ¶
type Source struct {
Collection, Chunk, Revision, Node string
}
Source is a knowledge citation's identity (sailry-knowledge://<collection>/<chunk>?revision=<rev>).
func ParseSource ¶
ParseSource reads a knowledge link, rejecting what the reference rejects: another scheme, a user, password or port, a fragment, more path segments, and query fields other than revision and an optional storage Node.
type Usage ¶
type Usage struct {
Page Page
// PluginPage is the rail feature of the package page shown, "" on any
// other page.
PluginPage string
// Search is whether the search palette is open.
Search bool
// ModelPicker is whether a composer's model controls are open.
ModelPicker bool
// Splits is how many panes were split off since the window opened.
Splits int
}
Usage is the part of the window's state the anonymous feature counters compare from one frame to the next. It names no session, project or host.
type WorkspaceTerminal ¶
type WorkspaceTerminal struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
// contains filtered or unexported fields
}
WorkspaceTerminal is an independent terminal surface in the main workspace. The Node owns its process; this record only keeps its presentation open.
Source Files
¶
- activity.go
- closing.go
- demo.go
- file_save.go
- header.go
- hosts.go
- installations.go
- knowledge.go
- live.go
- menu.go
- notifications.go
- overview.go
- pages.go
- panels.go
- panes.go
- plugin_workspace.go
- prefs.go
- project.go
- rail.go
- search.go
- selection.go
- shell.go
- shortcuts.go
- transfers.go
- usage.go
- welcome.go
- workspace_groups.go
- workspace_terminals.go