docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ChatPlan

    The Plan tool's review card: what the agent intends to do, and the two answers to it.

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

    The card is three bands. The header carries the plan title, the optional source path and the optional edit and expand controls. The body scrolls the plan itself, which the caller supplies as children — typically a rendered markdown view. The footer pairs a status line with Discard and Run plan.

    Editing is deliberately not owned here. editable only offers the control and isEditing only reflects which mode is showing; the caller swaps the body for an editor, because only it knows what the plan is made of.

    Every control is a package component: IconButton for the header affordances and Button for the footer pair, so the card inherits their sizing and focus behaviour rather than restating it.

    Examples

    A plan with an expand control and both footer actions wired.

    var plan = new ChatPlan
    {
        title = "Megaman clone",
        filePath = "Assets/Plans/megaman-clone.md",
        expandable = true
    };
    plan.Add(new MarkdownView { content = planMarkdown });
    plan.runRequested += RunPlan;
    plan.discardRequested += DiscardPlan;
    parentElement.Add(plan);

    In UXML. Children land in the scrolling body.

    <appui:ChatPlan title="Megaman clone" file-path="Assets/Plans/megaman-clone.md" editable="true">
        <appui:Text text="1. Add a player controller" />
    </appui:ChatPlan>

    Constructors

    ChatPlan()

    Default constructor.

    Declaration
    public ChatPlan()

    Fields

    actionsUssClassName

    The styling class of the footer's action group.

    Declaration
    public const string actionsUssClassName = "appui-chat-plan__actions"
    Field Value
    Type Description
    string

    bodyUssClassName

    The styling class of the scrolling body.

    Declaration
    public const string bodyUssClassName = "appui-chat-plan__body"
    Field Value
    Type Description
    string

    defaultStatus

    The default footer status line.

    Declaration
    public const string defaultStatus = "Plan ready to execute"
    Field Value
    Type Description
    string

    discardButtonUssClassName

    The styling class of the Discard button.

    Declaration
    public const string discardButtonUssClassName = "appui-chat-plan__discard-button"
    Field Value
    Type Description
    string

    editButtonUssClassName

    The styling class of the edit control.

    Declaration
    public const string editButtonUssClassName = "appui-chat-plan__edit-button"
    Field Value
    Type Description
    string

    editingUssClassName

    The styling class applied while the body is showing an editor.

    Declaration
    public const string editingUssClassName = "appui-chat-plan--editing"
    Field Value
    Type Description
    string

    expandButtonUssClassName

    The styling class of the expand control.

    Declaration
    public const string expandButtonUssClassName = "appui-chat-plan__expand-button"
    Field Value
    Type Description
    string

    filePathUssClassName

    The styling class of the source path.

    Declaration
    public const string filePathUssClassName = "appui-chat-plan__file-path"
    Field Value
    Type Description
    string

    footerUssClassName

    The styling class of the footer band.

    Declaration
    public const string footerUssClassName = "appui-chat-plan__footer"
    Field Value
    Type Description
    string

    headerIconUssClassName

    The styling class of the header's leading glyph.

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

    headerUssClassName

    The styling class of the header band.

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

    runButtonUssClassName

    The styling class of the Run plan button.

    Declaration
    public const string runButtonUssClassName = "appui-chat-plan__run-button"
    Field Value
    Type Description
    string

    statusIconUssClassName

    The styling class of the status glyph.

    Declaration
    public const string statusIconUssClassName = "appui-chat-plan__status-icon"
    Field Value
    Type Description
    string

    statusLabelUssClassName

    The styling class of the status text.

    Declaration
    public const string statusLabelUssClassName = "appui-chat-plan__status-label"
    Field Value
    Type Description
    string

    statusUssClassName

    The styling class of the footer status group.

    Declaration
    public const string statusUssClassName = "appui-chat-plan__status"
    Field Value
    Type Description
    string

    titleUssClassName

    The styling class of the plan title.

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

    ussClassName

    The ChatPlan main styling class.

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

    Properties

    contentContainer

    The plan body. This is what Add reaches.

    Declaration
    public override VisualElement contentContainer { get; }
    Property Value
    Type Description
    VisualElement
    Overrides
    VisualElement.contentContainer

    discardButton

    The footer's Discard button.

    Declaration
    public Button discardButton { get; }
    Property Value
    Type Description
    Button

    editButton

    The header's edit control.

    Declaration
    public IconButton editButton { get; }
    Property Value
    Type Description
    IconButton

    editable

    Whether the edit control is offered. False by default, which makes the plan read-only.

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

    expandButton

    The header's expand control.

    Declaration
    public IconButton expandButton { get; }
    Property Value
    Type Description
    IconButton

    expandable

    Whether the expand control is offered. False by default.

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

    filePath

    Where the plan lives, for instance "Assets/Plans/megaman-clone.md". Null or empty hides the element entirely rather than leaving a gap in the header.

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

    isEditing

    Whether the body is currently showing an editor rather than the rendered plan. Purely reflective: setting it does not change the body, it only marks the card and flips the edit control to its pressed state.

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

    runButton

    The footer's Run plan button.

    Declaration
    public Button runButton { get; }
    Property Value
    Type Description
    Button

    status

    The footer status line. "Plan ready to execute" by default.

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

    title

    The plan title shown in the header.

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

    Events

    discardRequested

    Raised when the user discards the plan.

    Declaration
    public event Action discardRequested
    Event Type
    Type Description
    Action

    editRequested

    Raised when the user toggles editing. The caller owns the resulting mode change.

    Declaration
    public event Action editRequested
    Event Type
    Type Description
    Action

    expandRequested

    Raised when the user asks to open the plan full screen.

    Declaration
    public event Action expandRequested
    Event Type
    Type Description
    Action

    runRequested

    Raised when the user runs the plan.

    Declaration
    public event Action runRequested
    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)