Skip to content

Built-in widgets

Use them in layouts, views.mount and cards by reference. Declare a widget with a built-in’s name (chat for omfp:chat) to replace it in the workspace. Built-ins keep no stored state.

Every window has them. Their sources are at omfp://widgets/builtin: copy one as a starting point (:widget copy <reference>).

Reference What it shows Props
omfp:header The thread’s title, state, model and cost.
omfp:chat Transcript, interactions, queue and composer together.
omfp:transcript, omfp:interactions, omfp:composer The chat’s parts, alone.
omfp:file A file: viewed, edited with vim bindings, diffed against HEAD; media play, PDFs and images show, Markdown renders, CSV/TSV as a table, JSON/YAML as a tree. path, line?, diff?

@omfp/flavor’s widgets part (omfp://docs/flavor) declares these in every workspace when the user’s init file loads it, and daemon-wide too: a window with no workspace yet (no thread selected) or whose workspace still loads finds them in the user’s own declarations (the index topic’s widgets). Without the flavor (or with widgets: { exclude: [...] }) a reference to one is unknown. :widget copy omfp:<name> copies one’s folder into the workspace.

Reference What it shows Props
omfp:canvas The flavor’s default view’s empty side panel, saying what an agent can put there.
omfp:workspace The workspace’s top-level folders.
omfp:changes Changed files and diffs of the workspace’s git working trees (the folder’s and its top-level folders’). repo?: one top-level folder only
omfp:background The selected thread’s background commands: state, duration, last line; stop one.
omfp:todos The selected thread’s todo list and goal.
omfp:debug The thread’s debug session from its debug tool results (read-only).
omfp:tree The thread’s session tree: go to an entry, fork from it, label it.
omfp:activity What agents did through omfp (activity.list). threadId?
omfp:mcp The MCP servers of the thread or the workspace: state, tools, errors; test (start, list tools, stop), reconnect, reauthorize.
omfp:jobs The workspace’s declared jobs and their runs; Run, Stop, Enable, Disable.
omfp:web A web page filling its slot, with no browser chrome. url, title?
omfp:terminal An interactive CLI on a daemon-owned PTY. command?, shell?, cwd?, cols?, rows?, key?
omfp:rail The chat’s transcriptRail slot: a dial of your messages at the middle of the chat’s right edge: while you scroll, a dot (pinned on touch screens); point at it to open the dial on the one you are reading and the ones around, drag on it, tap a label or use the wheel over it to jump between them.

omfp:web ({ url, title? }) takes any absolute http:// or https:// URL, localhost included, except omfp’s own address; title labels the tab. Place and point it:

views.mount { id: "preview", widget: "omfp:web", props: { url: "http://localhost:5173/" } }
views.mount_update { id: "preview", props: { url: "http://localhost:5173/docs" } }

The page cannot navigate the window; its new windows open in the browser. In the desktop app it is a native web view and every site shows. Elsewhere it is a sandboxed frame, and sites that refuse framing (X-Frame-Options, CSP frame-ancestors: GitHub, Linear, Google) stay blank. A browser with an address bar and back/forward is a widget of your own around the kit’s WebView (omfp://docs/kit).

Runs sh -c <command> in the workspace folder or the workspace-relative cwd. Without props it starts the daemon’s $SHELL (sh when unset); shell picks another one, its arguments split on spaces ("zsh", "bash -l"); command runs any other command line ("lazygit") and wins over shell. Its session survives remounts while the daemon runs.

views.mount { id: "shell", widget: "omfp:terminal", props: { shell: "zsh" } }

While a thread’s summary carries interruptedAt (its last turn was cut by a daemon restart or a crash), the transcript ends with a notice whose Resume calls thread.resume { threadId }; any message to the thread clears the mark too.