AI
AiArtifactPartView
BitAiArtifactPartView is what a message shows where it introduced an artifact. The artifact belongs to the conversation rather than to the message, so the part only names it: the view looks it up in the conversation by its id and shows the shared BitAiArtifactView, opened at the version this turn produced - so a later revision never rewrites what an earlier turn appears to have said. An artifact the conversation does not hold (yet) is named by a placeholder tag rather than dropped, so the turn still says it produced one.
Notes
Usage
Every example is live. Open its code to see exactly what produced the component running underneath.
Basic
Meeting notes
Ship the AI components in the next release.
Owner: the UI team.
Versions per turn
Missing artifacts
Cascading parameters
Meeting notes
Ship the AI components in the next release.
Owner: the UI team.
Meeting notes
Ship the AI components in the next release.
Owner: the UI team.
Style & Class
Meeting notes
Ship the AI components in the next release.
Owner: the UI team.
Meeting notes
Ship the AI components in the next release.
Owner: the UI team.
RTL
صورت جلسه
انتشار اجزای هوش مصنوعی در نسخه بعدی.
مسئول: تیم رابط کاربری.
API
Every parameter, public member, sub-class and enum this component exposes.
BitAiArtifactPartView parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| Classes | BitAiArtifactPartViewClassStyles? | null | Custom CSS classes for different parts of the artifact part view. |
| Conversation | BitAiConversation? | null | The conversation that holds the artifact, which the view finds it in by the id of the part (BitAiConversation.FindArtifact). While it is null, or holds no artifact of that id, the part is shown as a placeholder tag. The artifact is looked up each time the view's parameters are set, so one that arrives later is shown once the parent renders the view again; the panel then follows the artifact itself as it streams and is revised. |
| Part | BitAiArtifactPart | The part of the message that references the artifact (required): its ArtifactId names it and its ArtifactVersion is the version the panel opens at, the latest when it is null. | |
| Styles | BitAiArtifactPartViewClassStyles? | null | Custom CSS styles for different parts of the artifact part view. |
BitComponentBase parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| AriaLabel | string? | null | Gets or sets the accessible label for the component, used by assistive technologies. |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the rendered element. |
| Dir | BitDir? | null | Gets or sets the text directionality for the component's content. |
| Disabled | bool | false | Gets or sets a value indicating whether the component is disabled and cannot respond to user interaction. |
| ForceAnimation | bool | false | Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested. |
| HtmlAttributes | Dictionary<string, object> | new Dictionary<string, object>() | Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters. An attribute written on the component wins over an entry of the same name. |
| Id | string? | null | Gets or sets the unique identifier for the component's root element. |
| Style | string? | null | Gets or sets the CSS style string to apply to the rendered element. |
| TabIndex | string? | null | Gets or sets the tab order index for the component when navigating with the keyboard. |
| Visibility | BitVisibility | BitVisibility.Visible | Gets or sets the visibility state (visible, hidden, or collapsed) of the component. |
BitComponentBase public members
| Name | Type | Default value | Description |
|---|---|---|---|
| UniqueId | Guid | Guid.NewGuid() | Gets the readonly unique identifier for the component's root element, assigned when the component instance is constructed. |
| RootElement | ElementReference | Gets the reference to the root HTML element associated with this component. |
BitAiArtifactPartViewClassStyles properties
| Name | Type | Default value | Description |
|---|---|---|---|
| Root | string? | null | Custom CSS classes/styles for the root element of the BitAiArtifactPartView. |
| ArtifactView | BitAiArtifactViewClassStyles? | null | Custom CSS classes/styles for the BitAiArtifactView the BitAiArtifactPartView shows the artifact in. |
| Placeholder | BitTagClassStyles? | null | Custom CSS classes/styles for the BitTag the BitAiArtifactPartView shows when the conversation does not hold the artifact. |
BitAiArtifactPart properties
The part of a message that says it introduced an artifact. It holds no content of its own - the artifact is the conversation's - only which artifact, and at which version. A session adds one to the message whose transport opened the artifact (a BitAiArtifactCreatedEvent). Its Kind is BitAiMessagePartKinds.Artifact ("artifact"); like every part it also has a PartId, a Version and a Changed event (see AiMessagePartView).
| Name | Type | Default value | Description |
|---|---|---|---|
| new(artifactId, partId?) | constructor | Creates a reference to the artifact of that id; a null partId generates one. | |
| ArtifactId | string | The id of the artifact in the conversation. | |
| ArtifactVersion | int? | null | The version of the artifact this turn introduced, which the panel opens at (the latest when it is null), so an older turn keeps showing what it produced. Settable: a session stamps it with the version the turn opened. Not to be confused with Version, which counts the changes of the part itself. |
BitVisibility enum
| Name | Value | Description |
|---|---|---|
| Visible | 0 | The content of the component is visible. |
| Hidden | 1 | The content of the component is hidden, but the space it takes on the page remains (visibility:hidden). |
| Collapsed | 2 | The component is hidden (display:none). |
BitDir enum
| Name | Value | Description |
|---|---|---|
| Ltr | 0 | Ltr (left to right) is to be used for languages that are written from the left to the right (like English). |
| Rtl | 1 | Rtl (right to left) is to be used for languages that are written from the right to the left (like Arabic). |
| Auto | 2 | Auto lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element. |
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.