DocsAPI referenceHeadlessassistant-message-part

assistant-message-part headless API

The core connector and vanilla mount are always visible. Use the framework choice to inspect native composition, props, outputs, context and hooks for the selected adapter.

@grassroot/ui-headless-core/assistant-message-part

Core connector and vanilla API

9 exports
View source packages/ui-headless/core/src/assistant-message-part/index.ts
DeclarationView source
assistantMessagePartAnatomyts
export declare const assistantMessagePartAnatomy: {
readonly scope: "assistant-message-part";
readonly parts: readonly ["root", "text", "image", "in-progress"];
};
Name
Kind
Type
Requirement
parts
property
readonly ["root", "text", "image", "in-progress"]
required
scope
property
"assistant-message-part"
required
Name
parts
Kind
property
Type
readonly ["root", "text", "image", "in-progress"]
Requirement
required
Name
scope
Kind
property
Type
"assistant-message-part"
Requirement
required
DeclarationView source
AssistantMessagePartApits
interface AssistantMessagePartApi {
rootProps(): PartProps;
textProps(): PartProps;
imageProps(): PartProps;
inProgressProps(): PartProps;
readonly status: string | undefined;
}
Name
Kind
Type
Requirement
imageProps
method
() => PartProps
required
inProgressProps
method
() => PartProps
required
rootProps
method
() => PartProps
required
status
property
string | undefined
required
textProps
method
() => PartProps
required
Name
imageProps
Kind
method
Type
() => PartProps
Requirement
required
Name
inProgressProps
Kind
method
Type
() => PartProps
Requirement
required
Name
rootProps
Kind
method
Type
() => PartProps
Requirement
required
Name
status
Kind
property
Type
string | undefined
Requirement
required
Name
textProps
Kind
method
Type
() => PartProps
Requirement
required
DeclarationView source
AssistantMessagePartConnectOptionsts
interface AssistantMessagePartConnectOptions {
readonly index: number;
readonly part: AssistantMessagePartValue;
}
Name
Kind
Type
Requirement
index
property
number
required
part
property
AssistantMessagePartValue
required
Name
index
Kind
property
Type
number
Requirement
required
Name
part
Kind
property
Type
AssistantMessagePartValue
Requirement
required
DeclarationView source
AssistantMessagePartPartts
type AssistantMessagePartPart = (typeof assistantMessagePartAnatomy.parts)[number];
DeclarationView source
AssistantMessagePartValuets
type AssistantMessagePartValue = {
readonly type: string;
readonly status?: {
readonly type: string;
};
readonly [key: string]: unknown;
};
Name
Kind
Type
Requirement
status
property
{ readonly type: string; }
optional
type
property
string
required
Name
status
Kind
property
Type
{ readonly type: string; }
Requirement
optional
Name
type
Kind
property
Type
string
Requirement
required
DeclarationView source
connectAssistantMessagePartts
declare function connectAssistantMessagePart(scope: PartScope, options: AssistantMessagePartConnectOptions): AssistantMessagePartApi;
Name
Kind
Type
Requirement
scope
parameter
PartScope
required
options
parameter
AssistantMessagePartConnectOptions
required
return
return value
AssistantMessagePartApi
n/a
Name
scope
Kind
parameter
Type
PartScope
Requirement
required
Name
options
Kind
parameter
Type
AssistantMessagePartConnectOptions
Requirement
required
Name
return
Kind
return value
Type
AssistantMessagePartApi
Requirement
n/a

createSmoothText

function
DeclarationView source
createSmoothTextts
declare function createSmoothText(scheduler: SmoothTextScheduler, options?: SmoothTextOptions): {
push(value: string): void;
flush(): void;
getText(): string;
destroy(): void;
};
Name
Kind
Type
Requirement
scheduler
parameter
SmoothTextScheduler
required
options
parameter
SmoothTextOptions
optional
return
return value
{ push(value: string): void; flush(): void; getText(): string; destroy(): void; }
n/a
Name
scheduler
Kind
parameter
Type
SmoothTextScheduler
Requirement
required
Name
options
Kind
parameter
Type
SmoothTextOptions
Requirement
optional
Name
return
Kind
return value
Type
{ push(value: string): void; flush(): void; getText(): string; destroy(): void; }
Requirement
n/a
DeclarationView source
SmoothTextOptionsts
type SmoothTextOptions = {
readonly drainMs?: number;
readonly maxCharsPerFrame?: number;
};
Name
Kind
Type
Requirement
drainMs
property
number
optional
maxCharsPerFrame
property
number
optional
Name
drainMs
Kind
property
Type
number
Requirement
optional
Name
maxCharsPerFrame
Kind
property
Type
number
Requirement
optional
DeclarationView source
SmoothTextSchedulerts
type SmoothTextScheduler = {
request(callback: () => void, delayMs: number): unknown;
cancel(handle: unknown): void;
};
Name
Kind
Type
Requirement
cancel
method
(handle: unknown) => void
required
request
method
(callback: () => void, delayMs: number) => unknown
required
Name
cancel
Kind
method
Type
(handle: unknown) => void
Requirement
required
Name
request
Kind
method
Type
(callback: () => void, delayMs: number) => unknown
Requirement
required

Framework adapters

Each panel keeps its adapter's public vocabulary. React compound exports, Vue composables, standalone Angular declarations, Svelte components, and Solid hooks stay native to their framework.

This entry is core-only. No framework adapter package ships for assistant-message-part yet — mount it through the vanilla API above.