docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ChatTodoList

    A collapsible checklist an agent maintains while it works through a multi-step task.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    ChatTodoList
    Implements
    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder
    Inherited Members
    BaseVisualElement.contextPrefix
    BaseVisualElement.densityOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.SetActivePseudoState(bool)
    VisualElement.SetCheckedPseudoState(bool)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.IsMarkedForRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.SetBinding(BindingId, Binding)
    VisualElement.GetBinding(BindingId)
    VisualElement.TryGetBinding(BindingId, out Binding)
    VisualElement.GetBindingInfos()
    VisualElement.GetBindingInfos(List<BindingInfo>)
    VisualElement.HasBinding(BindingId)
    VisualElement.ClearBinding(BindingId)
    VisualElement.ClearBindings()
    VisualElement.GetHierarchicalDataSourceContext()
    VisualElement.GetDataSourceContext(BindingId)
    VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
    VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
    VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.disablePlayModeTint
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.scaledPixelsPerPoint
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.hasActivePseudoState
    VisualElement.hasInactivePseudoState
    VisualElement.hasHoverPseudoState
    VisualElement.hasCheckedPseudoState
    VisualElement.hasEnabledPseudoState
    VisualElement.hasDisabledPseudoState
    VisualElement.hasFocusPseudoState
    VisualElement.hasRootPseudoState
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.languageDirection
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.dataSource
    VisualElement.dataSourcePath
    VisualElement.dataSourceType
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.contentContainer
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.resolvedStyle
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
    CallbackEventHandler.UnregisterAllRemovableCallbacks()
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    CallbackEventHandler.HandleEventBubbleUp(EventBase)
    CallbackEventHandler.HandleEventTrickleDown(EventBase)
    CallbackEventHandler.ExecuteDefaultAction(EventBase)
    CallbackEventHandler.NotifyPropertyChanged(in BindingId)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    [UxmlElement]
    public class ChatTodoList : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
    Remarks

    The list is read-only: the caller owns the items and their status, and re-assigns items whenever the agent updates the plan. Only the open/closed state belongs to the element.

    The header shows the title, how many items are Completed out of the total, and a caret. Clicking anywhere on it toggles open. An empty list hides itself entirely rather than showing an empty box, matching the web implementation.

    The in-progress glyph is a static ring with a filled centre rather than a spinner. A checklist shows several rows at once, and a spinning one pulls the eye away from the text, which is the part that actually changes.

    The body is a ScrollView. When a new list arrives, or the list opens, and the in-progress item is out of view, the body scrolls by the least amount that brings it in, and only the body: no scrollable ancestor moves. The registry caps the body at a fixed height; no sizing token matches that cap, so the body grows with its items until a host sets a max-height on it.

    Examples

    A checklist mid-run.

    var todo = new ChatTodoList
    {
        items = new[]
        {
            new ChatTodoItem("Read the player controller", ChatTodoStatus.Completed),
            new ChatTodoItem("Raise the jump force", ChatTodoStatus.InProgress),
            new ChatTodoItem("Re-run the tests"),
        }
    };
    parentElement.Add(todo);

    Starting collapsed, under a different heading.

    <appui:ChatTodoList title="Plan" open="false" />

    Constructors

    ChatTodoList()

    Default constructor.

    Declaration
    public ChatTodoList()

    Fields

    caretUssClassName

    The styling class of the header's caret.

    Declaration
    public const string caretUssClassName = "appui-chat-todo-list__caret"
    Field Value
    Type Description
    string

    closeUssClassName

    The styling class of the close action.

    Declaration
    public const string closeUssClassName = "appui-chat-todo-list__close"
    Field Value
    Type Description
    string

    completedToneUssClassName

    The styling class prefix carrying the completed check's tone.

    Declaration
    public const string completedToneUssClassName = "appui-chat-todo-list--completed-tone-"
    Field Value
    Type Description
    string

    defaultTitle

    The default header label.

    Declaration
    public const string defaultTitle = "Tasks"
    Field Value
    Type Description
    string

    headerIconUssClassName

    The styling class of the header's leading glyph.

    Declaration
    public const string headerIconUssClassName = "appui-chat-todo-list__header-icon"
    Field Value
    Type Description
    string

    headerUssClassName

    The styling class of the header.

    Declaration
    public const string headerUssClassName = "appui-chat-todo-list__header"
    Field Value
    Type Description
    string

    inProgressGlyphUssClassName

    The styling class of the in-progress glyph: a static ring with a filled centre.

    Declaration
    public const string inProgressGlyphUssClassName = "appui-chat-todo-list__in-progress-glyph"
    Field Value
    Type Description
    string

    itemStatusUssClassName

    The styling class of an item row's status glyph slot.

    Declaration
    public const string itemStatusUssClassName = "appui-chat-todo-list__item-status"
    Field Value
    Type Description
    string

    itemStatusVariantUssClassName

    The styling class carrying an item row's status.

    Declaration
    public const string itemStatusVariantUssClassName = "appui-chat-todo-list__item--status-"
    Field Value
    Type Description
    string

    itemTextUssClassName

    The styling class of an item row's text.

    Declaration
    public const string itemTextUssClassName = "appui-chat-todo-list__item-text"
    Field Value
    Type Description
    string

    itemUssClassName

    The styling class of one item row.

    Declaration
    public const string itemUssClassName = "appui-chat-todo-list__item"
    Field Value
    Type Description
    string

    itemsUssClassName

    The styling class of the item container.

    Declaration
    public const string itemsUssClassName = "appui-chat-todo-list__items"
    Field Value
    Type Description
    string

    maximizeUssClassName

    The styling class of the maximize action.

    Declaration
    public const string maximizeUssClassName = "appui-chat-todo-list__maximize"
    Field Value
    Type Description
    string

    pendingGlyphUssClassName

    The styling class of the empty outline circle a pending item is drawn with.

    Declaration
    public const string pendingGlyphUssClassName = "appui-chat-todo-list__pending-glyph"
    Field Value
    Type Description
    string

    sizeUssClassName

    The styling class prefix carrying the size variant.

    Declaration
    public const string sizeUssClassName = "appui-chat-todo-list--size-"
    Field Value
    Type Description
    string

    tallyUssClassName

    The styling class of the "done out of total" tally.

    Declaration
    public const string tallyUssClassName = "appui-chat-todo-list__tally"
    Field Value
    Type Description
    string

    titleUssClassName

    The styling class of the header's title.

    Declaration
    public const string titleUssClassName = "appui-chat-todo-list__title"
    Field Value
    Type Description
    string

    ussClassName

    The ChatTodoList main styling class.

    Declaration
    public const string ussClassName = "appui-chat-todo-list"
    Field Value
    Type Description
    string

    Properties

    clickable

    The header's press handler. Toggles open.

    Declaration
    public Pressable clickable { get; }
    Property Value
    Type Description
    Pressable

    collapsible

    Whether the header collapses the list. True by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool collapsible { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Off, the body stays open, the caret goes away and the header no longer responds to a press, so open is ignored while it is off. For a list that owns its surface and has nothing to collapse into.

    completedCount

    How many items are Completed.

    Declaration
    public int completedCount { get; }
    Property Value
    Type Description
    int

    completedTone

    The colour of a completed item's check. Positive by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public ChatTodoCompletedTone completedTone { get; set; }
    Property Value
    Type Description
    ChatTodoCompletedTone
    Remarks

    The registry's completedTone, which it puts on ChatTodoItems, the bare list inside the card. UI Toolkit has no separate bare list, so it lives here.

    itemCount

    How many items the list holds.

    Declaration
    public int itemCount { get; }
    Property Value
    Type Description
    int

    items

    The checklist itself. Assigning re-renders every row.

    Declaration
    public IEnumerable<ChatTodoItem> items { get; set; }
    Property Value
    Type Description
    IEnumerable<ChatTodoItem>
    Remarks

    The setter copies the incoming sequence, so a caller mutating its own list afterwards does not silently desynchronise what is on screen. Null clears the list.

    open

    Whether the item list is expanded. True by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool open { get; set; }
    Property Value
    Type Description
    bool

    showClose

    Whether the header offers a close action. False by default. See showMaximize.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool showClose { get; set; }
    Property Value
    Type Description
    bool

    showMaximize

    Whether the header offers a maximize action. False by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool showMaximize { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The registry shows the button whenever an onMaximize handler is passed. C# has no way to omit a prop, so the control is an explicit flag and maximizeRequested carries the intent.

    size

    How much room the list takes. Md by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public ChatTodoListSize size { get; set; }
    Property Value
    Type Description
    ChatTodoListSize

    title

    The header label. "Tasks" by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string title { get; set; }
    Property Value
    Type Description
    string

    Methods

    GetCompletedToneUssClassName(ChatTodoCompletedTone)

    Declaration
    public static string GetCompletedToneUssClassName(ChatTodoCompletedTone enumValue)
    Parameters
    Type Name Description
    ChatTodoCompletedTone enumValue
    Returns
    Type Description
    string

    GetSizeUssClassName(ChatTodoListSize)

    Declaration
    public static string GetSizeUssClassName(ChatTodoListSize enumValue)
    Parameters
    Type Name Description
    ChatTodoListSize enumValue
    Returns
    Type Description
    string

    GetStatusUssClassName(ChatTodoStatus)

    Declaration
    public static string GetStatusUssClassName(ChatTodoStatus enumValue)
    Parameters
    Type Name Description
    ChatTodoStatus enumValue
    Returns
    Type Description
    string

    Events

    closeRequested

    Raised when the close action is activated. Shown by showClose.

    Declaration
    public event Action closeRequested
    Event Type
    Type Description
    Action

    maximizeRequested

    Raised when the maximize action is activated. Shown by showMaximize.

    Declaration
    public event Action maximizeRequested
    Event Type
    Type Description
    Action

    Implements

    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    RegisterUpdateCallbackExtensions.RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    RegisterUpdateCallbackExtensions.UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    VisualElementExtensions.EnableDynamicTransform(VisualElement, bool)
    VisualElementExtensions.EnablePicking(VisualElement, bool)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement, string)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement, string)
    VisualElementExtensions.GetExclusiveRootElement(VisualElement)
    VisualElementExtensions.GetLastAncestorOfType<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement, string)
    VisualElementExtensions.GetTooltipContent(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.HasAncestorOfType<T>(VisualElement, bool)
    VisualElementExtensions.HasAncestorsOfType<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement, string)
    VisualElementExtensions.IsInvisible(VisualElement)
    VisualElementExtensions.IsOnScreen(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, string, T)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipContent(VisualElement, VisualElementExtensions.TooltipContentCallback)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)