OmniBox

Description

An omnibox search component

Omnibox provides a powerful input field for switching between a chat and a search interaction. For search, it also provides support for parsing and visual rendering of logical operators like AND, OR, NOT, parenthesis, and quotes.

Samples

Search (with FileDropArea)

Chat

Chat with locked model

Search & Chat

API reference

class

OmniBox

public class OmniBox : IComponent, IHasBackgroundColor, ITabIndex

A heavyweight omni-search / autocomplete component with inline filter chips, multiple search modes (search/chat) and async value providers.

Namespace
Tesserae
Implements
IComponent, IHasBackgroundColor, ITabIndex

Constructors

NameDescription
OmniBoxInitializes a new instance of this class.
Constructor
OmniBox
public OmniBox(Config config)

Initializes a new instance of this class.

Properties

NameDescription
InlineFilterChipsGets or sets the inline filter chips.
CurrentSearchQueryWhat the box says right now, parsed - the same SearchQuery pressing Enter would raise, chips included. For a host that answers as the query is typed rather than on Enter.
ContextToAddGets the cards currently shown in the context row, in the order they were added.
HasContextToAddReturns a value indicating whether the context row currently holds any card.
SelectedModelGets or sets the selected model.
ActiveModeWhich half of a SearchAndChat box is showing. Setting it switches the box and moves its own toggle with it, so a host that drives the mode from somewhere else - a control in a page header - and the box never disagree. On a box that is only search or only chat this is that mode and setting it does nothing.
ActiveModeObservableFollows ActiveMode - what a host with a mode control of its own, or a header that shows different things in each mode, listens to.
SelectedThinkingEffortGets or sets the selected thinking effort.
IsModelLockedReturns a value indicating whether the component is model locked.
IsGeneratingReturns a value indicating whether the component is generating.
AllowSendWhileGeneratingGets or sets whether a message typed while IsGenerating is set is sent instead of the trigger stopping the reply in flight — for a host that queues it for the turn in progress. The trigger still offers "stop" while the input is empty.
GeneratingTextGets or sets the label shown next to the spinner while generating (defaults to "Generating"). The elapsed time is appended after it, e.g. "Generating, 1m 25s". Setting it updates the footer immediately when a generation is in progress.
TabIndexSets the keyboard tab order of the component.
IsEnabledGets or sets a value indicating whether the component is interactive (enabled).
SearchTextGets or sets the search text.
ChatTextGets or sets the chat text.
SearchPlaceholderGets or sets the search placeholder.
ChatPlaceholderGets or sets the chat placeholder.
BackgroundGets or sets the CSS background of the component.
Property
OmniBox.InlineFilterChips
public ObservableList<InlineFilterChip> InlineFilterChips { get; }

Gets or sets the inline filter chips.

Property
OmniBox.CurrentSearchQuery
public SearchQuery CurrentSearchQuery

What the box says right now, parsed - the same SearchQuery pressing Enter would raise, chips included. For a host that answers as the query is typed rather than on Enter.

Property
OmniBox.ContextToAdd
public IReadOnlyList<ContextCard> ContextToAdd

Gets the cards currently shown in the context row, in the order they were added.

Property
OmniBox.HasContextToAdd
public bool HasContextToAdd

Returns a value indicating whether the context row currently holds any card.

Property
OmniBox.SelectedModel
public ModelOption SelectedModel

Gets or sets the selected model.

Property
OmniBox.ActiveMode
public Mode ActiveMode { get ; set ; }

Which half of a SearchAndChat box is showing. Setting it switches the box and moves its own toggle with it, so a host that drives the mode from somewhere else - a control in a page header - and the box never disagree. On a box that is only search or only chat this is that mode and setting it does nothing.

Property
OmniBox.ActiveModeObservable
public IObservable<Mode> ActiveModeObservable

Follows ActiveMode - what a host with a mode control of its own, or a header that shows different things in each mode, listens to.

Property
OmniBox.SelectedThinkingEffort
public ThinkingEffort SelectedThinkingEffort

Gets or sets the selected thinking effort.

Property
OmniBox.IsModelLocked
public bool IsModelLocked

Returns a value indicating whether the component is model locked.

Property
OmniBox.IsGenerating
public bool IsGenerating { get ; set ; }

Returns a value indicating whether the component is generating.

Property
OmniBox.AllowSendWhileGenerating
public bool AllowSendWhileGenerating { get ; set ; }

Gets or sets whether a message typed while IsGenerating is set is sent instead of the trigger stopping the reply in flight — for a host that queues it for the turn in progress. The trigger still offers "stop" while the input is empty.

Property
OmniBox.GeneratingText
public string GeneratingText { get ; set ; }

Gets or sets the label shown next to the spinner while generating (defaults to "Generating"). The elapsed time is appended after it, e.g. "Generating, 1m 25s". Setting it updates the footer immediately when a generation is in progress.

Property
OmniBox.TabIndex
public int TabIndex { set ; }

Sets the keyboard tab order of the component.

Property
OmniBox.IsEnabled
public bool IsEnabled { get ; set ; }

Gets or sets a value indicating whether the component is interactive (enabled).

Property
OmniBox.SearchText
public string SearchText { get ; set ; }

Gets or sets the search text.

Property
OmniBox.ChatText
public string ChatText { get ; set ; }

Gets or sets the chat text.

Property
OmniBox.SearchPlaceholder
public string SearchPlaceholder { get ; set ; }

Gets or sets the search placeholder.

Property
OmniBox.ChatPlaceholder
public string ChatPlaceholder { get ; set ; }

Gets or sets the chat placeholder.

Property
OmniBox.Background
public string Background { get ; set ; }

Gets or sets the CSS background of the component.

Methods

NameDescription
ParseQueryParses the query.
RegisterSnapRegisters a snap-handler that can convert recognized input into an inline filter chip.
RegisterSnapsRegisters multiple snap-handlers in one call.
RegisterFilterSnapRegisters a filter snap handler that creates an inline filter chip.
RegisterFilterSnapsRegisters multiple filter snap handlers in one call.
EnableChatMentionsEnables an "@mention" style inline picker in the chat input: typing Trigger (default @) at a word boundary shows a picker anchored at the text caret, live-filters as more is typed, and forwards Arrow Up/Down, Enter/Tab and Escape to the callbacks below. This is a thin, UI-agnostic hook — wire it up to any anchored picker (for example a ToolAgentSelector via its ShowInlineAt/Filter/ MoveHighlight/ActivateHighlighted methods).
WithContextToAddShows the given ContextCards as the context that will go with the next message, in a wrapping row inside the box just below the input and above the footer. Chat modes only. Each card's remove button is wired to this row, so the (x) takes the card out of the box (any handler the caller registered with OnRemove still runs, which is where the underlying context gets dropped). A card that should not be removable can call NoRemove after being handed over. The row is left alone when a message is sent - call ClearContext from the chat handler to empty it.
AddContextAdds one more card to the context row, keeping the cards already there.
RemoveContextTakes one card out of the context row. Does nothing if the card isn't in it.
ClearContextEmpties the context row. Call it from the chat handler once the context has been sent along with the message.
CaretClientXThe viewport-relative horizontal position of the text caret in whichever input is currently active (the search box or the chat box), clamped to that input's bounds. Returns double.NaN when there is no active input to measure — for example before the OmniBox has been rendered.
OnSearchRegisters a callback invoked when the search event fires.
OnChatRegisters a callback invoked when the chat event fires.
OnStopRegisters a callback invoked when the stop event fires.
OnModelChangedRegisters a callback invoked when the model changed event fires.
SetModelsSets the models of the component.
LockModelLocks the OmniBox to the given model option so users cannot pick another.
SetThinkingEffortSets the thinking effort of the component.
NoModeToggleTakes the Search/Chat toggle out of the box's own footer, for a host that puts one somewhere of its own. ActiveMode still switches the box, and still reports which half is showing.
OnInputRegisters a callback invoked when the input event fires.
OnKeyDownRegisters a callback invoked when the key down event fires.
OnKeyUpRegisters a callback invoked when the key up event fires.
OnKeyPressRegisters a callback invoked when the key press event fires.
OnFocusRegisters a callback invoked when the focus event fires.
OnBlurRegisters a callback invoked when the blur event fires.
WithHistoryReturns the component configured with the given history.
WithHelpEnables a help button next to the search input that opens a popup listing the registered filter snaps (and snaps), each with the trigger word and an example value (or the description as a fallback). When showSyntax is true, the popup also includes a "Query syntax" section describing the boolean operators (AND, OR, NOT), grouping with parentheses, and exact-phrase quoting, with a short example next to each. Recent searches are reached via the separate history button configured with WithHistory.
WithAskAIAdds a primary-styled action button at the end of the search input — the way out of a search that isn't finding it, over to whatever answers the question instead. The button follows the box's roundness, so a box made round with Rounded gets a pill. Search modes only: in SearchAndChat the button sits at the end of the footer and hides itself while the box is in chat mode. Calling this again updates the button that is already there; passing a null or empty text hides it.
RenderRenders the component's root HTML element.
SetKeyboardShortcutRegisters a global keyboard shortcut that focuses the OmniBox search input when pressed, and renders a visual chip showing the shortcut on the right side of the search box. In SearchAndChat mode, pressing the shortcut also switches the active mode to Search. Modifier names are case-insensitive ("Ctrl", "Cmd", "Meta", "Alt", "Shift"). Example: SetKeyboardShortcut("Ctrl", "K").
SetSearchRightTextSets the search right text of the component.
SetSearchTextSets the search text of the component.
SetSearchPlaceholderSets the search placeholder of the component.
SetChatTextSets the chat text of the component.
SetChatPlaceholderSets the chat placeholder of the component.
SetChatHeaderReplaces the component rendered inside the box above the chat input — the place for whatever the message is being written against, e.g. a compact ContextCards group of the attached documents. Passing null empties the slot, which then takes up no space.
RoundedRenders the box with rounded corners (defaults to a fully rounded "pill" shape). The radius carries over to everything that meets the box's outline — the search container, the buttons at its ends and the "Ask AI" button added with WithAskAI — and the pill shape also drops the vertical dividers between them, so the contents sit inside the curve.
DisabledDisables the component.
FocusMoves keyboard focus to the component.
HeightGets or sets the CSS height of the component.
HShortcut for setting the height in pixels.
Method
OmniBox.ParseQuery
public static SearchQuery ParseQuery(string input, bool tokenIgnoreCase = false)

Parses the query.

Method
OmniBox.RegisterSnap
public OmniBox RegisterSnap(SnapHandler snap)

Registers a snap-handler that can convert recognized input into an inline filter chip.

Method
OmniBox.RegisterSnaps
public OmniBox RegisterSnaps(params SnapHandler[] snaps)

Registers multiple snap-handlers in one call.

Method
OmniBox.RegisterFilterSnap
public OmniBox RegisterFilterSnap(FilterSnapHandler filter)

Registers a filter snap handler that creates an inline filter chip.

Method
OmniBox.RegisterFilterSnaps
public OmniBox RegisterFilterSnaps(params FilterSnapHandler[] filters)

Registers multiple filter snap handlers in one call.

Method
OmniBox.EnableChatMentions
public OmniBox EnableChatMentions(ChatMention mention)

Enables an "@mention" style inline picker in the chat input: typing Trigger (default @) at a word boundary shows a picker anchored at the text caret, live-filters as more is typed, and forwards Arrow Up/Down, Enter/Tab and Escape to the callbacks below. This is a thin, UI-agnostic hook — wire it up to any anchored picker (for example a ToolAgentSelector via its ShowInlineAt/Filter/ MoveHighlight/ActivateHighlighted methods).

Method
OmniBox.WithContextToAdd
Overload
WithContextToAdd(ContextCard[])Shows the given ContextCards as the context that will go with the next message, in a wrapping row inside the box just below the input and above the footer. Chat modes only. Each card's remove button is wired to this row, so the (x) takes the card out of the box (any handler the caller registered with OnRemove still runs, which is where the underlying context gets dropped). A card that should not be removable can call NoRemove after being handed over. The row is left alone when a message is sent - call ClearContext from the chat handler to empty it.
WithContextToAdd(IEnumerable<ContextCard>)Shows the given context cards as the context for the next message, replacing whatever the row held before.
WithContextToAdd(ContextCard[])
public OmniBox WithContextToAdd(params ContextCard[] context)

Shows the given ContextCards as the context that will go with the next message, in a wrapping row inside the box just below the input and above the footer. Chat modes only. Each card's remove button is wired to this row, so the (x) takes the card out of the box (any handler the caller registered with OnRemove still runs, which is where the underlying context gets dropped). A card that should not be removable can call NoRemove after being handed over. The row is left alone when a message is sent - call ClearContext from the chat handler to empty it.

Parameters

context ContextCard[]
WithContextToAdd(IEnumerable<ContextCard>)
public OmniBox WithContextToAdd(IEnumerable<ContextCard> context)

Shows the given context cards as the context for the next message, replacing whatever the row held before.

Parameters

context IEnumerable<ContextCard>
Method
OmniBox.AddContext
public OmniBox AddContext(ContextCard card)

Adds one more card to the context row, keeping the cards already there.

Method
OmniBox.RemoveContext
public OmniBox RemoveContext(ContextCard card)

Takes one card out of the context row. Does nothing if the card isn't in it.

Method
OmniBox.ClearContext
public OmniBox ClearContext()

Empties the context row. Call it from the chat handler once the context has been sent along with the message.

Method
OmniBox.CaretClientX
public double CaretClientX()

The viewport-relative horizontal position of the text caret in whichever input is currently active (the search box or the chat box), clamped to that input's bounds. Returns double.NaN when there is no active input to measure — for example before the OmniBox has been rendered.

Remarks

Used by companions that want to track where the user is typing, e.g. PixelAvatar attached with AttachTo.

Method
OmniBox.OnSearch
public OmniBox OnSearch(SearchEventHandler onSearch)

Registers a callback invoked when the search event fires.

Method
OmniBox.OnChat
public OmniBox OnChat(ChatEventHandler onChat)

Registers a callback invoked when the chat event fires.

Method
OmniBox.OnStop
public OmniBox OnStop(StopEventHandler onStop)

Registers a callback invoked when the stop event fires.

Method
OmniBox.OnModelChanged
public OmniBox OnModelChanged(ModelChangedEventHandler onModelChanged)

Registers a callback invoked when the model changed event fires.

Method
OmniBox.SetModels
Overload
SetModels(ModelOption[])Sets the models of the component.
SetModels(IEnumerable<ModelOption>)Sets the models of the component.
SetModels(ModelOption[])
public OmniBox SetModels(params ModelOption[] models)

Sets the models of the component.

Parameters

models ModelOption[]
SetModels(IEnumerable<ModelOption>)
public OmniBox SetModels(IEnumerable<ModelOption> models)

Sets the models of the component.

Parameters

models IEnumerable<ModelOption>
Method
OmniBox.LockModel
public OmniBox LockModel(ModelOption model)

Locks the OmniBox to the given model option so users cannot pick another.

Method
OmniBox.SetThinkingEffort
public OmniBox SetThinkingEffort(ThinkingEffort effort)

Sets the thinking effort of the component.

Method
OmniBox.NoModeToggle
public OmniBox NoModeToggle()

Takes the Search/Chat toggle out of the box's own footer, for a host that puts one somewhere of its own. ActiveMode still switches the box, and still reports which half is showing.

Method
OmniBox.OnInput
public OmniBox OnInput(ComponentEventHandler<OmniBox, Event> onInput)

Registers a callback invoked when the input event fires.

Method
OmniBox.OnKeyDown
public OmniBox OnKeyDown(ComponentEventHandler<OmniBox, KeyboardEvent> onKeyDown)

Registers a callback invoked when the key down event fires.

Method
OmniBox.OnKeyUp
public OmniBox OnKeyUp(ComponentEventHandler<OmniBox, KeyboardEvent> onKeyUp)

Registers a callback invoked when the key up event fires.

Method
OmniBox.OnKeyPress
public OmniBox OnKeyPress(ComponentEventHandler<OmniBox, KeyboardEvent> onKeyPress)

Registers a callback invoked when the key press event fires.

Method
OmniBox.OnFocus
public OmniBox OnFocus(ComponentEventHandler<OmniBox, Event> onFocus)

Registers a callback invoked when the focus event fires.

Method
OmniBox.OnBlur
public OmniBox OnBlur(ComponentEventHandler<OmniBox, Event> onBlur)

Registers a callback invoked when the blur event fires.

Method
OmniBox.WithHistory
public OmniBox WithHistory(Func<Task<SearchQuery[]>> historyFetcher)

Returns the component configured with the given history.

Method
OmniBox.WithHelp
public OmniBox WithHelp(bool showSyntax = false)

Enables a help button next to the search input that opens a popup listing the registered filter snaps (and snaps), each with the trigger word and an example value (or the description as a fallback). When showSyntax is true, the popup also includes a "Query syntax" section describing the boolean operators (AND, OR, NOT), grouping with parentheses, and exact-phrase quoting, with a short example next to each. Recent searches are reached via the separate history button configured with WithHistory.

Method
OmniBox.WithAskAI
public OmniBox WithAskAI(string text = "Ask AI", UIcons icon = UIcons.Beacon, Action<OmniBox> onClick = null)

Adds a primary-styled action button at the end of the search input — the way out of a search that isn't finding it, over to whatever answers the question instead. The button follows the box's roundness, so a box made round with Rounded gets a pill. Search modes only: in SearchAndChat the button sits at the end of the footer and hides itself while the box is in chat mode. Calling this again updates the button that is already there; passing a null or empty text hides it.

Parameters

text
The button label, e.g. "Ask AI".
icon
The icon shown before the label.
onClick
Called with this OmniBox when the button is clicked — read SearchText from it to know what was typed.
Method
OmniBox.Render
public HTMLElement Render()

Renders the component's root HTML element.

Method
OmniBox.SetKeyboardShortcut
public OmniBox SetKeyboardShortcut(params string[] keys)

Registers a global keyboard shortcut that focuses the OmniBox search input when pressed, and renders a visual chip showing the shortcut on the right side of the search box. In SearchAndChat mode, pressing the shortcut also switches the active mode to Search. Modifier names are case-insensitive ("Ctrl", "Cmd", "Meta", "Alt", "Shift"). Example: SetKeyboardShortcut("Ctrl", "K").

Method
OmniBox.SetSearchRightText
public OmniBox SetSearchRightText(string text)

Sets the search right text of the component.

Method
OmniBox.SetSearchText
public OmniBox SetSearchText(string text)

Sets the search text of the component.

Method
OmniBox.SetSearchPlaceholder
public OmniBox SetSearchPlaceholder(string text)

Sets the search placeholder of the component.

Method
OmniBox.SetChatText
public OmniBox SetChatText(string text)

Sets the chat text of the component.

Method
OmniBox.SetChatPlaceholder
public OmniBox SetChatPlaceholder(string text)

Sets the chat placeholder of the component.

Method
OmniBox.SetChatHeader
public OmniBox SetChatHeader(IComponent component)

Replaces the component rendered inside the box above the chat input — the place for whatever the message is being written against, e.g. a compact ContextCards group of the attached documents. Passing null empties the slot, which then takes up no space.

Method
OmniBox.Rounded
public OmniBox Rounded(BorderRadius radius = BorderRadius.Full)

Renders the box with rounded corners (defaults to a fully rounded "pill" shape). The radius carries over to everything that meets the box's outline — the search container, the buttons at its ends and the "Ask AI" button added with WithAskAI — and the pill shape also drops the vertical dividers between them, so the contents sit inside the curve.

Parameters

radius
The border radius to apply. Defaults to Full.
Method
OmniBox.Disabled
public OmniBox Disabled(bool value = true)

Disables the component.

Method
OmniBox.Focus
public OmniBox Focus()

Moves keyboard focus to the component.

Method
OmniBox.Height
public OmniBox Height(UnitSize unitSize)

Gets or sets the CSS height of the component.

Method
OmniBox.H
public OmniBox H(int unitSize)

Shortcut for setting the height in pixels.

Events

NameDescription
StoppedRaised when stopped occurs.
InputRaised when input occurs.
KeyDownRaised when key down occurs.
KeyUpRaised when key up occurs.
KeyPressRaised when key press occurs.
ReceivedFocusRaised when received focus occurs.
LostFocusRaised when lost focus occurs.
Event
OmniBox.Stopped
public event StopEventHandler Stopped

Raised when stopped occurs.

Event
OmniBox.Input
public event ComponentEventHandler<OmniBox, Event> Input

Raised when input occurs.

Event
OmniBox.KeyDown
public event ComponentEventHandler<OmniBox, KeyboardEvent> KeyDown

Raised when key down occurs.

Event
OmniBox.KeyUp
public event ComponentEventHandler<OmniBox, KeyboardEvent> KeyUp

Raised when key up occurs.

Event
OmniBox.KeyPress
public event ComponentEventHandler<OmniBox, KeyboardEvent> KeyPress

Raised when key press occurs.

Event
OmniBox.ReceivedFocus
public event ComponentEventHandler<OmniBox, Event> ReceivedFocus

Raised when received focus occurs.

Event
OmniBox.LostFocus
public event ComponentEventHandler<OmniBox, Event> LostFocus

Raised when lost focus occurs.

ToolAgentSelector

A trigger button with a searchable popup for enabling agents and tools, grouped under "Agents" and "Tools" sections, with a count badge on the trigger. It is meant for one of OmniBox.FooterItems's slots, and can also be driven inline (ShowInlineAt) to back an "@mention" style picker inside a chat input.

class

ToolAgentSelector

public sealed class ToolAgentSelector : Layer<ToolAgentSelector>

A trigger button with a searchable popup for enabling agents and tools, shown grouped under "Agents" and "Tools" sections. Selecting items updates a count badge on the trigger. Designed to be dropped into one of FooterItems's slots, and can also be driven inline (see ShowInlineAt) to back an "@mention" style picker inside a chat input.

Namespace
Tesserae
Inheritance
Layer<ToolAgentSelector> → ToolAgentSelector

Constructors

NameDescription
ToolAgentSelectorInitializes a new instance of this class.
Constructor
ToolAgentSelector
public ToolAgentSelector(string label = "Tools", UIcons icon = UIcons.Tools)

Initializes a new instance of this class.

Properties

NameDescription
SelectedItemsGets every currently selected item, agents first, then tools.
SelectedCountGets the number of currently selected items.
Property
ToolAgentSelector.SelectedItems
public Item[] SelectedItems

Gets every currently selected item, agents first, then tools.

Property
ToolAgentSelector.SelectedCount
public int SelectedCount

Gets the number of currently selected items.

Methods

NameDescription
RenderRenders the component's root HTML element.
AgentsSets the items shown under the "Agents" section (replaces any previously set).
ToolsSets the items shown under the "Tools" section (replaces any previously set).
CompactHides item descriptions, rendering a denser list of icon + title rows only.
OnChangeRegisters a callback invoked whenever the selection changes.
ShowShows the popup anchored below the trigger button.
ShowInlineAtShows the popup anchored at an explicit viewport position (for example, next to a text caret), without moving focus or toggling the trigger button's pressed state. Used to back an "@mention" style picker.
HideHides the popup.
FilterFilters the visible items by the given free-text query (matches title or description). Used both by the built-in search box and externally, to drive the popup from an inline "@" mention as the user types.
MoveHighlightMoves the keyboard-navigation highlight forward (positive) or backward (negative) among the currently visible items, wrapping around at either end.
ActivateHighlightedToggles the selection of the currently highlighted item (defaulting to the first visible item if none is highlighted yet). Returns true if an item was toggled.
Method
ToolAgentSelector.Render
public override HTMLElement Render()

Renders the component's root HTML element.

Method
ToolAgentSelector.Agents
public ToolAgentSelector Agents(params Item[] items)

Sets the items shown under the "Agents" section (replaces any previously set).

Method
ToolAgentSelector.Tools
public ToolAgentSelector Tools(params Item[] items)

Sets the items shown under the "Tools" section (replaces any previously set).

Method
ToolAgentSelector.Compact
public ToolAgentSelector Compact(bool value = true)

Hides item descriptions, rendering a denser list of icon + title rows only.

Method
ToolAgentSelector.OnChange
public ToolAgentSelector OnChange(Action<ToolAgentSelector> handler)

Registers a callback invoked whenever the selection changes.

Method
ToolAgentSelector.Show
public override ToolAgentSelector Show()

Shows the popup anchored below the trigger button.

Method
ToolAgentSelector.ShowInlineAt
public ToolAgentSelector ShowInlineAt(double clientX, double clientY)

Shows the popup anchored at an explicit viewport position (for example, next to a text caret), without moving focus or toggling the trigger button's pressed state. Used to back an "@mention" style picker.

Method
ToolAgentSelector.Hide
public override void Hide(Action onHidden = null)

Hides the popup.

Method
ToolAgentSelector.Filter
public ToolAgentSelector Filter(string text)

Filters the visible items by the given free-text query (matches title or description). Used both by the built-in search box and externally, to drive the popup from an inline "@" mention as the user types.

Method
ToolAgentSelector.MoveHighlight
public void MoveHighlight(int direction)

Moves the keyboard-navigation highlight forward (positive) or backward (negative) among the currently visible items, wrapping around at either end.

Method
ToolAgentSelector.ActivateHighlighted
public bool ActivateHighlighted()

Toggles the selection of the currently highlighted item (defaulting to the first visible item if none is highlighted yet). Returns true if an item was toggled.

Events

NameDescription
SelectionChangedRaised whenever an item's selected state changes.
Event
ToolAgentSelector.SelectionChanged
public event Action<ToolAgentSelector> SelectionChanged

Raised whenever an item's selected state changes.

See also

© 2026 Curiosity. All rights reserved.