# AiComponentStateAction class

Namespace: [Grasshopper2.Components.Descriptive](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.components.descriptive.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
[IoId("00000000-a1c0-4c2b-9724-56cfe1c58611")]
[UiName("AI Interaction")]
public sealed class AiComponentStateAction : ObjectAction<AiComponent>
```

Stores the [AiComponent.UserPrompt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponent/userprompt.md), [AiComponent.SourceCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponent/sourcecode.md), [AiComponent.LastInteractionMessage](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponent/lastinteractionmessage.md), and the info field of the component nomen as an undo record. Parameters are not stored -- they are derived from SourceCode via [AiComponent.PreProcess(Solution)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponent/preprocess.md) and lazily rebuilt on the next solve after undo/redo.

## Constructors

- [AiComponentStateAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponentstateaction/ctor.md): (2 overloads)

## Methods

- [PerformRedoInternalT](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponentstateaction/performredointernalt.md)
- [PerformUndoInternalT](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponentstateaction/performundointernalt.md)
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.aicomponentstateaction/store.md)

## Inherited Members

- From [ObjectAction<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction-1.md): [PerformRedoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction-1/performredointernal.md), [PerformUndoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction-1/performundointernal.md), [PrepareRedoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction-1/prepareredointernal.md), [PrepareRedoInternalT](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction-1/prepareredointernalt.md), [PrepareUndoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction-1/prepareundointernal.md), [PrepareUndoInternalT](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction-1/prepareundointernalt.md)
- From [ObjectAction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction.md): [Id](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction/id.md), [PerformRedoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction/performredointernal.md), [PerformUndoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction/performundointernal.md), [PrepareRedoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction/prepareredointernal.md), [PrepareUndoInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.actions.objectaction/prepareundointernal.md)
- From [Action](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action.md): [Response](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/response.md), [State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/state.md), [Extends](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/extends.md), [PerformRedo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performredo.md), [PerformUndo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/performundo.md), [PrepareRedo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareredo.md), [PrepareUndo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.undo.action/prepareundo.md)
