docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ChatActivityTimeline

    The collapsed record of what an agent did before it answered.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    ChatActivityTimeline
    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 ChatActivityTimeline : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
    Remarks

    Closed, the timeline is a single line: the label, an ellipsis while the turn is still streaming, and the total measured time. Opened, it lists every ChatActivityPart as a row with its own glyph, joined by a vertical connector. The connector is inset and drawn behind the rows rather than masked by an opaque icon background, so the timeline sits correctly on any surface.

    Closed, a finished timeline reads as a tally of what it did -- "3 thoughts, 2 tools" -- rather than repeating the label. While it runs it shows the label and a live elapsed count, and the label sweeps as a Shimmer. It is finished once the turn ends or, earlier, once isFollowedByText says the answer's own prose has begun.

    Pending tool calls reuse CircularProgress for their spinner rather than reimplementing one.

    Examples

    A finished turn with one thought and one tool call.

    var timeline = new ChatActivityTimeline
    {
        parts = new[]
        {
            new ChatActivityPart(ChatActivityPartKind.Thinking, "The jump force lives on the controller.", elapsedMs: 800),
            new ChatActivityPart(ChatActivityPartKind.Tool, "Read PlayerController.cs", elapsedMs: 4200),
        },
        open = true
    };
    parentElement.Add(timeline);

    In UXML.

    <appui:ChatActivityTimeline label="Running tool" is-streaming="true" />

    Constructors

    ChatActivityTimeline()

    Default constructor.

    Declaration
    public ChatActivityTimeline()

    Fields

    caretUssClassName

    The styling class of the summary caret.

    Declaration
    public const string caretUssClassName = "appui-chat-activity-timeline__caret"
    Field Value
    Type Description
    string

    connectorUssClassName

    The styling class of the vertical connector between rows.

    Declaration
    public const string connectorUssClassName = "appui-chat-activity-timeline__connector"
    Field Value
    Type Description
    string

    defaultLabel

    The default summary label.

    Declaration
    public const string defaultLabel = "Thinking"
    Field Value
    Type Description
    string

    entriesUssClassName

    The styling class of a timeline whose rows are laid out as one-line entries.

    Declaration
    public const string entriesUssClassName = "appui-chat-activity-timeline--entries"
    Field Value
    Type Description
    string

    headerBottomUssClassName

    The styling class of a timeline whose header sits at its foot.

    Declaration
    public const string headerBottomUssClassName = "appui-chat-activity-timeline--header-bottom"
    Field Value
    Type Description
    string

    lastRowUssClassName

    The styling class marking the last row, which draws no connector.

    Declaration
    public const string lastRowUssClassName = "appui-chat-activity-timeline__row--last"
    Field Value
    Type Description
    string

    maxPinnedEntries

    Past this many rows a pinned list would be most of the view, so the entries stand down and scroll with their rows.

    Declaration
    public const int maxPinnedEntries = 6
    Field Value
    Type Description
    int

    rowElapsedUssClassName

    The styling class of a row's elapsed badge.

    Declaration
    public const string rowElapsedUssClassName = "appui-chat-activity-timeline__row-elapsed"
    Field Value
    Type Description
    string

    rowGlyphUssClassName

    The styling class of a row's glyph slot.

    Declaration
    public const string rowGlyphUssClassName = "appui-chat-activity-timeline__row-glyph"
    Field Value
    Type Description
    string

    rowPagerLabelUssClassName

    The styling class of the pager's "2 of 3" label.

    Declaration
    public const string rowPagerLabelUssClassName = "appui-chat-activity-timeline__row-pager-label"
    Field Value
    Type Description
    string

    rowPagerUssClassName

    The styling class of the pager a folded row uses to step through its parts.

    Declaration
    public const string rowPagerUssClassName = "appui-chat-activity-timeline__row-pager"
    Field Value
    Type Description
    string

    rowPinnedFootUssClassName

    The styling class of an entry that pins at the foot of the scroll area.

    Declaration
    public const string rowPinnedFootUssClassName = "appui-chat-activity-timeline__row--pinned-foot"
    Field Value
    Type Description
    string

    rowPinnedHeadUssClassName

    The styling class of an entry that pins at the head of the scroll area.

    Declaration
    public const string rowPinnedHeadUssClassName = "appui-chat-activity-timeline__row--pinned-head"
    Field Value
    Type Description
    string

    rowTextUssClassName

    The styling class of a row's text.

    Declaration
    public const string rowTextUssClassName = "appui-chat-activity-timeline__row-text"
    Field Value
    Type Description
    string

    rowUssClassName

    The styling class of one row.

    Declaration
    public const string rowUssClassName = "appui-chat-activity-timeline__row"
    Field Value
    Type Description
    string

    rowsUssClassName

    The styling class of the row container.

    Declaration
    public const string rowsUssClassName = "appui-chat-activity-timeline__rows"
    Field Value
    Type Description
    string

    summaryElapsedUssClassName

    The styling class of the total elapsed time in the summary.

    Declaration
    public const string summaryElapsedUssClassName = "appui-chat-activity-timeline__summary-elapsed"
    Field Value
    Type Description
    string

    summaryLabelUssClassName

    The styling class of the summary label.

    Declaration
    public const string summaryLabelUssClassName = "appui-chat-activity-timeline__summary-label"
    Field Value
    Type Description
    string

    summaryStatsUssClassName

    The styling class of the live figures in the summary.

    Declaration
    public const string summaryStatsUssClassName = "appui-chat-activity-timeline__summary-stats"
    Field Value
    Type Description
    string

    summaryUssClassName

    The styling class of the summary line.

    Declaration
    public const string summaryUssClassName = "appui-chat-activity-timeline__summary"
    Field Value
    Type Description
    string

    ussClassName

    The ChatActivityTimeline main styling class.

    Declaration
    public const string ussClassName = "appui-chat-activity-timeline"
    Field Value
    Type Description
    string

    Properties

    activeToolNames

    The names of the tool calls still in flight, newest first. Empty once the activity is over.

    Declaration
    public IReadOnlyList<string> activeToolNames { get; }
    Property Value
    Type Description
    IReadOnlyList<string>

    clickable

    The summary line's press handler. Toggles open.

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

    foldRowsByKind

    Folds every part of one kind into a single row: one row for the thinking and one per named tool, each showing its newest part with a pager back through the rest. The rows then sit in the order they last saw activity. False by default: one row per part, in order. A tool part with no toolName is never folded.

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

    headerPlacement

    Where the header sits. Top by default: a line above the rows. Bottom draws it as a chip at the foot of the group with the rows opening upward above it, its caret pointing up while closed.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public ChatActivityHeaderPlacement headerPlacement { get; set; }
    Property Value
    Type Description
    ChatActivityHeaderPlacement

    isFinalized

    Whether the activity is over: the turn ended, or its prose has already begun.

    Declaration
    public bool isFinalized { get; }
    Property Value
    Type Description
    bool

    isFollowedByText

    Whether the answer's own text has already started, while the turn is still streaming.

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

    Once the model is writing prose, the activity above it is finished even though the turn is not. Without this the timeline keeps counting while the reader is already reading the answer.

    isStreaming

    Whether the turn is still running. False by default, which appends the terminal "Done" row.

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

    label

    The summary label. "Thinking" by default; pass something like "Running tool" when the turn is dominated by tool calls.

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

    maxPinnedShare

    The share of the enclosing ScrollView the pinned entries may take at each end, from 0 to 1. Past it, the entries nearest the middle stop pinning. 1 by default, which leaves maxPinnedEntries as the only limit.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public float maxPinnedShare { get; set; }
    Property Value
    Type Description
    float

    open

    Whether the rows are expanded. False by default: the timeline is a footnote, not the answer.

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

    parts

    The entries the timeline lists. Assigning re-renders every row.

    Declaration
    public IEnumerable<ChatActivityPart> parts { get; set; }
    Property Value
    Type Description
    IEnumerable<ChatActivityPart>
    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 timeline.

    pinEntries

    Lays the rows out as one-line entries and marks the ones that pin at the head and foot of the scroll area. None by default. A group of more than maxPinnedEntries rows pins nothing.

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

    UI Toolkit has no sticky positioning, so the pinned entries are marked with rowPinnedHeadUssClassName and rowPinnedFootUssClassName but still scroll with the content.

    rowCount

    How many rows the opened timeline shows, including the terminal "Done" row.

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

    startTime

    When the activity started, so the running total survives the element being rebuilt.

    Declaration
    [CreateProperty]
    public DateTime? startTime { get; set; }
    Property Value
    Type Description
    DateTime?
    Remarks

    Unset, the timeline can only add up the parts it was given, which is right for history. Set, it counts live from the stamp while the activity runs. Same reasoning, and the same wall-clock currency, as startTime.

    stats

    Live figures, for instance a token count, shown on the header. Null or empty shows nothing.

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

    thoughtCount

    How many Thinking parts the timeline holds.

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

    toolCount

    How many tool parts the timeline holds.

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

    totalElapsedMs

    The sum of every measured elapsedMs, in milliseconds. Unmeasured parts contribute nothing.

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

    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)