zidane-ui/ palette/ headless
import { … } from 'zidane-ui/palette/headless'ui/src/palette/headless/index.ts
Functions#
actionsSourceFunction#
The app's key actions as palette entries: whatever the app has a handler for right now, titled for reading (the catalog's labels are footer hints), grouped, and carrying the live chord.
commandsSourceFunction#
/ commands (built-in and extension) for the session's folder, from the
host that runs them. Running one hands the composer a prompt (/name), or
an insert (/name ) when the command completes arguments.
conversationItemFunction#
A content hit as a palette item: the session's title, the excerpt as its description.
conversationItemIdFunction#
The palette item id of a content match.
conversationsSourceFunction#
What running a content match does.
conversationTargetOfFunction#
The target a content-match id names; null for any other id.
createPaletteStoreFunction#
Creates a palette store.
createStorageRecentsFunction#
Recents kept in a Storage under key, as { version: 1, recents }.
Unreadable or foreign data reads as no recents.
extensionsSourceFunction#
Extension providers' items. Each arrives with source set to its
provider's id; this source remembers that per item id and lists
everything under EXTENSIONS_SOURCE_ID, so run comes back here
and goes on to (provider, itemId). Nested results are re-stamped the
same way.
filesSourceFunction#
Project files. Two ways in: type a name in the root list (every file is a
searchOnly item, so it never floods the empty listing), or "Go to file…"
for a nested picker over the whole tree. One listing per palette open,
shared by both for a few seconds so files the agent just wrote show up on
the next open.
gatherPaletteItemsFunction#
Asks every source for its items for ctx. Sources that answer at once are
in ready when this returns, so the palette can paint them in its first
frame; the others call onLanded as they answer. A failing source
contributes nothing rather than breaking the list.
orderPaletteSessionsFunction#
Most relevant first: rank, then last update. shown are the ones listed
on an empty query (the active session never is: you are in it).
paletteRecentIdOfFunction#
The id Recent remembers for a run item: a content match is a way to its session.
panelsSourceFunction#
Side panel tabs: open a tab, toggle the panel.
prefsSourceFunction#
The app's per-device preferences as toggles with live state; anything deeper opens the Settings page that owns
it. The chat settings are settingsSource's.
repoSourceFunction#
"Import repository": clone a URL and start a draft in it. Runs after the palette closed.
sessionItemIdFunction#
The palette item id of a session row.
sessionKeyOfItemFunction#
The session a palette item id names: the key sessionItemId put after the prefix.
sessionsSourceFunction#
Switch between sessions by title.
settingsSourceFunction#
The chat settings as palette rows with live state: the conversation preset (a picker of the three presets), the compact transcript and the sidebar's run details as toggles.
setupSourceFunction#
"Run setup": the setup wizard again, with the current values. Runs after the palette closed.
spacesSourceFunction#
"Switch to space" entries while Spaces is on: one per space but the shown one, the TUI palette's entries.
Constants#
ACTIONS_SOURCE_IDConstant#
The key actions source's id.
COMMANDS_SOURCE_IDConstant#
The commands source's id.
CONVERSATION_ITEM_PREFIXConstant#
What a content match's item id starts with.
CONVERSATIONS_SOURCE_IDConstant#
The conversations source's id.
DEFAULT_PALETTE_LABELSConstant#
The default English strings of the palette area.
EXTENSIONS_SOURCE_IDConstant#
The extensions source's id: every extension item is re-stamped under it.
FILES_SOURCE_IDConstant#
The files source's id.
GO_TO_FILE_IDConstant#
The "Go to file…" row's item id.
PALETTE_SESSIONS_SHOWNConstant#
Listed without typing.
PANELS_SOURCE_IDConstant#
The side panel source's id.
PREFS_SOURCE_IDConstant#
The per-device preferences source's id.
REPO_SOURCE_IDConstant#
The import-repository source's id.
SESSION_ITEM_PREFIXConstant#
What a session row's item id starts with.
SESSIONS_SOURCE_IDConstant#
The sessions source's id.
SETTINGS_SOURCE_IDConstant#
The chat settings source's id.
SETUP_SOURCE_IDConstant#
The setup source's id.
SPACES_SOURCE_IDConstant#
The spaces source's id.
Interfaces#
CommandsSourceOptionsInterface#
Options of commandsSource.
ConversationTargetInterface#
What a content-match row names: the session and the query it matched.
FilesSourceOptionsInterface#
Options of filesSource.
PaletteCommandInterface#
A / command the host runs, as the palette lists it.
PaletteCommandQueryInterface#
What PaletteHost.listCommands lists commands for.
PaletteConversationHitInterface#
A conversation whose content matched a query.
PaletteConversationQueryInterface#
What PaletteHost.searchConversations searches.
PaletteExtensionsInterface#
The palette items extensions contribute, and running them.
PaletteFileEntryInterface#
One entry of a project listing.
PaletteFileQueryInterface#
What PaletteHost.listFiles lists.
PaletteGatherInterface#
What gatherPaletteItems has at once, and how to drop what is still coming.
PaletteHostInterface#
The data the palette's built-in sources read. Leave a member out and what needs it lists nothing.
PalettePanelsInterface#
The side panel, read when the palette lists its rows.
PalettePanelTabInterface#
A side panel tab as the palette lists it.
PalettePrefInterface#
A preference the palette reads and writes.
PalettePrefsInterface#
The per-device preferences prefsSource lists. Leave one out and its rows are not listed.
PaletteRankResponseInterface#
The ranking worker's answer to a rank request.
PaletteRecentsInterface#
Where the palette keeps its recently run item ids (most recent first).
PaletteSessionInterface#
A session as the palette's session sources read it.
PaletteSettingsAccessInterface#
What settingsSource reads and writes: the host's settings members, or an app's own settings state.
PaletteStateInterface#
What the palette shows from: one immutable snapshot per change.
PaletteStoreInterface#
The palette's state and what changes it. Every method is stable.
PaletteStoreOptionsInterface#
Options of createPaletteStore.
Types#
PaletteBindingsType#
The live chord of each action, in the app's binding grammar (an empty string: unbound).
PaletteExtensionRunType#
What running an extension item answered.
PaletteHostErrorType#
Why a host call failed, for the palette to word through its labels.
PaletteLabelsType#
The shape of the palette label dictionary: every key of DEFAULT_PALETTE_LABELS.
PaletteRankRequestType#
A message to the ranking worker: a new catalog, or a query on the current one.
PaletteRecentsStorageType#
The Storage calls createStorageRecents makes (localStorage, sessionStorage or a double).
SessionRankType#
0 = needs you (approval, question), 1 = running, 2 = everything else.