Skip to content

The Open Standard for Generative UI

fix: add custom tool timeline override to AgentInterface (#1170)

AB6060bf58e62c
diff --git a/.changeset/wise-tools-appear.md b/.changeset/wise-tools-appear.md
new file mode 100644
index 000000000..7990b3ad4
--- /dev/null
+++ b/.changeset/wise-tools-appear.md
@@ -0,0 +1,6 @@
+---
+"@openuidev/react-ui": patch
+---
+
+Add an `AgentInterface` turn-level tool timeline override, allowing applications
+to replace the default live tool-activity UI without rebuilding the thread.
diff --git a/docs/content/docs/agent/customize/message-rendering.mdx b/docs/content/docs/agent/customize/message-rendering.mdx
index 2bdb409ca..16f8ee419 100644
--- a/docs/content/docs/agent/customize/message-rendering.mdx
+++ b/docs/content/docs/agent/customize/message-rendering.mdx
@@ -5,7 +5,7 @@ description: Replace how user and assistant messages render with your own React
By default, `AgentInterface` renders each message for you: markdown for assistant text, the user's text as sent, tool calls inline. [Generative UI](/docs/agent/core-concepts/generative-ui) goes further, letting the model emit rich components inside an assistant message. In both, `AgentInterface` owns the rendering.
-The `components` prop is the escape hatch past both. Hand `AgentInterface` your own `AssistantMessage` and `UserMessage` and they render every assistant and user message: markdown, layout, avatars, all of it.
+The `components` prop is the escape hatch past both. Hand `AgentInterface` your own `AssistantMessage`, `ToolCallTimeline` and `UserMessage` and they render every assistant, its tool calls and user message: markdown, layout, avatars, all of it.
```tsx
import { AgentInterface } from "@openuidev/react-ui";
@@ -16,11 +16,11 @@ import { AgentInterface } from "@openuidev/react-ui";
/>;
```
-Both keys are optional and independent. Override just one and the other keeps its default rendering.
+All three keys are optional. Each omitted key keeps its default rendering. Matched tool and artifact previews are configured through `artifactRenderers` and remain separate from the timeline.
## What a component receives
-A message component renders once per message it handles and receives that message as a `message` prop. An `AssistantMessage` also gets an `isStreaming` boolean, `true` while it is the in-flight reply. Assistant `content` is empty until the first token arrives, so guard it.
+`AssistantMessage` receives the turn's answer as `message`, plus an `isStreaming` boolean. It mounts when the turn exposes an answer; it does not mount during the tool-only phase. Its `message.toolCalls` is an empty array because the timeline owns tool rendering. Guard `message.content` because an answer can be empty.
```tsx
import type { AssistantMessage } from "@openuidev/react-ui";
@@ -36,7 +36,7 @@ function MyAssistantMessage({
}
```
-The component re-renders as the reply streams in, with `content` growing token by token. A `UserMessage` works the same way without `isStreaming`. Its `content` may be a string or, for multimodal input, an array.
+Once mounted, the component re-renders as the answer grows token by token. `UserMessage` receives each user message without `isStreaming`. Its `content` may be a string or, for multimodal input, an array.
## A custom AssistantMessage
@@ -67,12 +67,77 @@ The markdown library is your choice; nothing is imposed once you have taken over
className="w-full rounded-lg border"
/>
+## A custom tool timeline
+
+`ToolCallTimeline` mounts as soon as the first tool activity appears, before the answer. It receives live updates for the whole turn and replaces the built-in timeline. It remains available after the turn finishes.
+
+The exported `ToolCallTimelineComponent` type defines its props:
+
+| Prop | Type | Meaning |
+| ------------------ | ---------------- | ------------------------------------------------------------------------------------------------------ |
+| `activities` | `ToolActivity[]` | The turn's tool calls paired with their available results and current statuses. |
+| `steps` | `TimelineStep[]` | Ordered rows: `{ type: "text", id, text }` or `{ type: "activity", activity }`. |
+| `isLast` | `boolean` | Whether this turn is currently live. It is `false` for completed turns, including the most recent one. |
+| `awaitingResponse` | `boolean` | Whether the turn is live and its answer has not started, includes the delay after tool results arrive. |
+
+This example starts collapsed and updates its tool count as activities arrive:
+
+```tsx
+import {
+ AgentInterface,
+ MarkDownRenderer,
+ TimelineEntry,
+ type ToolCallTimelineComponent,
+} from "@openuidev/react-ui";
+
+const ResearchSteps: ToolCallTimelineComponent = ({ activities, steps, isLast }) => (
+ <details>
+ <summary>
+ Show research steps · {activities.length} {activities.length === 1 ? "tool" : "tools"}
+ </summary>
+ {steps.map((step) =>
+ step.type === "text" ? (
+ <MarkDownRenderer key={`text-${step.id}`} textMarkdown={step.text} />
+ ) : (
+ <TimelineEntry
+ key={step.activity.id}
+ activity={step.activity}
+ isLast={isLast}
+ forceDefault
+ />
+ ),
+ )}
+ </details>
+);
+
+<AgentInterface
+ llm={llm}
+ components={{
+ AssistantMessage: CustomAssistantMessage,
+ ToolCallTimeline: ResearchSteps,
+ }}
+/>;
+```
+
+`forceDefault` makes each `TimelineEntry` show the raw tool card. `AgentInterface` renders matched artifact previews outside the timeline, so allowing these entries to render those previews too would duplicate them. Use `forceDefault` as well if your override wraps the exported `ToolCallTimeline` component.
+
+When composing a custom thread region, pass the same component directly to `AgentInterface.Messages`:
+
+```tsx
+<AgentInterface.Messages
+ assistantMessage={CustomAssistantMessage}
+ toolCallTimeline={ResearchSteps}
+/>
+```
+
+An override that returns `null` hides the timeline while leaving the answer and matched previews visible. Omit the override to keep the built-in timeline.
+
## Precedence
-When a message renders, `AgentInterface` picks the first matching renderer:
+For assistant answers and user messages, `AgentInterface` picks the first matching renderer:
1. **`components`:** your explicit override, when set for that message.
2. **`componentLibrary` (GenUI):** rich rendering so the model can emit components inline.
-3. **Built-in default:** markdown for assistant, plain text for user, tool calls inline.
+3. **Built-in default:** markdown for assistant answers, plain text for user messages.
-The props compose. Set `components.AssistantMessage` and your component wins for assistant messages, while user messages still flow through GenUI or the default.
+The timeline uses `components.ToolCallTimeline` when supplied and the built-in timeline otherwise. `componentLibrary` does not select the timeline renderer. Matched previews continue to use `artifactRenderers`.
diff --git a/docs/content/docs/agent/reference/agentinterface-props.mdx b/docs/content/docs/agent/reference/agentinterface-props.mdx
index cc02af2d0..a347a21f7 100644
--- a/docs/content/docs/agent/reference/agentinterface-props.mdx
+++ b/docs/content/docs/agent/reference/agentinterface-props.mdx
@@ -16,7 +16,7 @@ The only required prop is `llm`. Everything else is optional and falls back to a
| `artifactRenderers` | `ReadonlyArray<ArtifactRendererConfig<any>>` | No | none |
| `artifactCategories` | `ArtifactCategory[]` | No | none (single "Artifacts" item) |
| `componentLibrary` | `Library` | No | none (markdown rendering) |
-| `components` | `{ AssistantMessage?; UserMessage? }` | No | none |
+| `components` | `AgentInterfaceComponents` | No | none |
| `theme` | `ThemeProps` | No | built-in theme |
| `disableThemeProvider` | `boolean` | No | `false` |
| `logoUrl` | `string` | No | none |
@@ -52,12 +52,12 @@ These two props connect `AgentInterface` to your backend. They are independent c
These props control how the assistant's output is rendered — both durable artifacts such as dashboards and apps, and the inline message body.
-| Prop | Type | Required | Default | Description |
-| -------------------- | -------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------- |
-| `artifactRenderers` | `ReadonlyArray<ArtifactRendererConfig<any>>` | No | none | Renderers that display artifacts (from a tool call or from stored content). |
-| `artifactCategories` | `ArtifactCategory[]` | No | none | User-defined groupings for the artifact browser and workspace rail. |
-| `componentLibrary` | `Library` | No | none | Turns on Generative UI — rich interactive components rendered inline in chat. |
-| `components` | `{ AssistantMessage?; UserMessage? }` | No | none | Replace the assistant/user message components entirely. |
+| Prop | Type | Required | Default | Description |
+| -------------------- | -------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------- |
+| `artifactRenderers` | `ReadonlyArray<ArtifactRendererConfig<any>>` | No | none | Renderers that display artifacts (from a tool call or from stored content). |
+| `artifactCategories` | `ArtifactCategory[]` | No | none | User-defined groupings for the artifact browser and workspace rail. |
+| `componentLibrary` | `Library` | No | none | Turns on Generative UI — rich interactive components rendered inline in chat. |
+| `components` | `AgentInterfaceComponents` | No | none | Replace assistant answers, user messages, and the turn's tool timeline independently. |
### `artifactRenderers`
@@ -105,7 +105,7 @@ import { openuiLibrary } from "@openuidev/react-ui/genui-lib";
### `components`
-Override the message components directly: `{ AssistantMessage?, UserMessage? }`. Message rendering precedence is **`components` > `componentLibrary` > built-in default** — an explicit `components` entry always wins. See [Message rendering](/docs/agent/customize/message-rendering).
+Override the message components directly: `{ AssistantMessage?, ToolCallTimeline?, UserMessage? }`. Message rendering precedence is **`components` > `componentLibrary` > built-in default** — an explicit `components` entry always wins. See [Message rendering](/docs/agent/customize/message-rendering).
## Theme
diff --git a/docs/content/docs/agent/reference/components.mdx b/docs/content/docs/agent/reference/components.mdx
index 898530870..9168eeced 100644
--- a/docs/content/docs/agent/reference/components.mdx
+++ b/docs/content/docs/agent/reference/components.mdx
@@ -296,12 +296,13 @@ Renders the list of the user's threads from `storage.thread` (one row per thread
Renders the active thread's messages, including the in-flight streaming message and the loading indicator. Used inside a custom thread region (typically wrapped in `ScrollArea`).
-| Prop | Type | Notes |
-| ------------------ | ----------- | ------------------------------------------------------------------------------------------------------- |
-| `loader` | `ReactNode` | Custom loading indicator shown while a response is pending. Defaults to `MessageLoading`. |
-| `assistantMessage` | component | Override for rendering assistant messages. Mirrors `components.AssistantMessage` on `<AgentInterface>`. |
-| `userMessage` | component | Override for rendering user messages. Mirrors `components.UserMessage`. |
-| `className` | `string` | |
+| Prop | Type | Notes |
+| ------------------ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `loader` | `ReactNode` | Custom loading indicator shown while a response is pending. Defaults to `MessageLoading`. |
+| `assistantMessage` | component | Override for rendering the turn's assistant answer. Mirrors `components.AssistantMessage` on `<AgentInterface>`. |
+| `userMessage` | component | Override for rendering user messages. Mirrors `components.UserMessage`. |
+| `toolCallTimeline` | component | Override for the turn's tool timeline from the first activity onward. Mirrors `components.ToolCallTimeline` |
+| `className` | `string` | |
```tsx
<AgentInterface.ScrollArea>
@@ -309,7 +310,13 @@ Renders the active thread's messages, including the in-flight streaming message
</AgentInterface.ScrollArea>
```
-For full control over per-message rendering, see [Message rendering](/docs/agent/customize/message-rendering).
+Pass overrides directly when composing `Messages`. For example:
+
+```tsx
+<AgentInterface.Messages assistantMessage={MyAssistantMessage} toolCallTimeline={MyResearchSteps} />
+```
+
+Omitting `toolCallTimeline` preserves the built-in timeline. Matched artifact previews remain separate and continue to use `artifactRenderers`. For prop definitions and a complete example, see [Message rendering](/docs/agent/customize/message-rendering#a-custom-tool-timeline).
### `AgentInterface.MessageLoading`
diff --git a/packages/react-ui/src/components/AgentInterface/AgentInterface.tsx b/packages/react-ui/src/components/AgentInterface/AgentInterface.tsx
index 07101e968..d76ffe9e4 100644
--- a/packages/react-ui/src/components/AgentInterface/AgentInterface.tsx
+++ b/packages/react-ui/src/components/AgentInterface/AgentInterface.tsx
@@ -39,7 +39,11 @@ import {
import { NavProvider, useNav } from "./_shared/navContext";
import { StartersProvider } from "./_shared/startersContext";
import { useAgentInterfaceStore } from "./_shared/store";
-import type { AssistantMessageComponent, UserMessageComponent } from "./_shared/types";
+import type {
+ AssistantMessageComponent,
+ ToolCallTimelineComponent,
+ UserMessageComponent,
+} from "./_shared/types";
import { ArtifactBrowserPage } from "./ArtifactBrowserPage";
import { ArtifactNav } from "./ArtifactNav";
import { ArtifactViewPage } from "./ArtifactViewPage";
@@ -61,6 +65,8 @@ import { Workspace } from "./Workspace";
export interface AgentInterfaceComponents {
AssistantMessage?: AssistantMessageComponent;
UserMessage?: UserMessageComponent;
+ /** Replaces the built-in turn-level tool activity timeline. */
+ ToolCallTimeline?: ToolCallTimelineComponent;
}
export interface AgentInterfaceProps extends Omit<ChatProviderProps, "children"> {
@@ -252,6 +258,7 @@ export const AgentInterface: AgentInterfaceComponent = ((props: AgentInterfacePr
agentName={agentName ?? ""}
resolvedAssistantMessage={resolvedAssistantMessage}
resolvedUserMessage={resolvedUserMessage}
+ toolCallTimeline={components?.ToolCallTimeline}
scrollVariant={scrollVariant}
scrollOnLoad={scrollOnLoad}
/>
@@ -269,6 +276,7 @@ interface AgentInterfaceBodyProps {
agentName: string;
resolvedAssistantMessage: AssistantMessageComponent | undefined;
resolvedUserMessage: UserMessageComponent | undefined;
+ toolCallTimeline?: ToolCallTimelineComponent;
scrollVariant?: ScrollVariant;
scrollOnLoad?: boolean;
}
@@ -374,6 +382,7 @@ const AgentInterfaceBody = ({
agentName,
resolvedAssistantMessage,
resolvedUserMessage,
+ toolCallTimeline,
scrollVariant,
scrollOnLoad,
}: AgentInterfaceBodyProps) => {
@@ -448,6 +457,7 @@ const AgentInterfaceBody = ({
loader={<MessageLoading />}
assistantMessage={resolvedAssistantMessage}
userMessage={resolvedUserMessage}
+ toolCallTimeline={toolCallTimeline}
/>
</ScrollArea>
{slots.composer ?? <Composer />}
diff --git a/packages/react-ui/src/components/AgentInterface/README.md b/packages/react-ui/src/components/AgentInterface/README.md
index 2bad376c9..3bd258e1c 100644
--- a/packages/react-ui/src/components/AgentInterface/README.md
+++ b/packages/react-ui/src/components/AgentInterface/README.md
@@ -168,20 +168,20 @@ Defined as `AgentInterfaceProps` in `AgentInterface.tsx`. It `extends Omit<ChatP
**AgentInterface-specific:**
-| Prop | Type | Default | Notes |
-| ---------------------- | ------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------- |
-| `componentLibrary` | `Library` (react-lang) | — | Auto-derive assistant (and user) message rendering via GenUI when `components.AssistantMessage` is absent |
-| `components` | `{ AssistantMessage?; UserMessage? }` | — | Explicit render overrides; take precedence over `componentLibrary` |
-| `theme` | `ThemeProps` | — | Passed to `<ThemeProvider>` |
-| `disableThemeProvider` | `boolean` | `false` | Skip the internal `<ThemeProvider>` wrapper |
-| `logoUrl` | `string` | `""` | Brand logo (default `SidebarHeader` + `MobileHeader`) |
-| `agentName` | `string` | `""` | Agent display name |
-| `starters` | `ConversationStarterProps[]` | — | Global starters inherited by Welcome (if active) or the Composer |
-| `starterVariant` | `"short" \| "long"` | — | Layout variant for inherited starters |
-| `path` | `string` | — | **Controlled** current path (pair with `onNavigate`); `undefined` = thread view |
-| `defaultPath` | `string` | — | **Uncontrolled** initial path (ignored when `onNavigate` is set) |
-| `onNavigate` | `(next: string \| undefined) => void` | — | Presence selects controlled mode |
-| `children` | `ReactNode` | — | Slots (see above) |
+| Prop | Type | Default | Notes |
+| ---------------------- | -------------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------- |
+| `componentLibrary` | `Library` (react-lang) | — | Auto-derive assistant (and user) message rendering via GenUI when `components.AssistantMessage` is absent |
+| `components` | `{ AssistantMessage?; UserMessage?; ToolCallTimeline? }` | — | Explicit render overrides; `ToolCallTimeline` replaces the turn-level tool activity UI |
+| `theme` | `ThemeProps` | — | Passed to `<ThemeProvider>` |
+| `disableThemeProvider` | `boolean` | `false` | Skip the internal `<ThemeProvider>` wrapper |
+| `logoUrl` | `string` | `""` | Brand logo (default `SidebarHeader` + `MobileHeader`) |
+| `agentName` | `string` | `""` | Agent display name |
+| `starters` | `ConversationStarterProps[]` | — | Global starters inherited by Welcome (if active) or the Composer |
+| `starterVariant` | `"short" \| "long"` | — | Layout variant for inherited starters |
+| `path` | `string` | — | **Controlled** current path (pair with `onNavigate`); `undefined` = thread view |
+| `defaultPath` | `string` | — | **Uncontrolled** initial path (ignored when `onNavigate` is set) |
+| `onNavigate` | `(next: string \| undefined) => void` | — | Presence selects controlled mode |
+| `children` | `ReactNode` | — | Slots (see above) |
### Custom message components
@@ -191,6 +191,12 @@ type AssistantMessageComponent = React.ComponentType<{
isStreaming: boolean;
}>;
type UserMessageComponent = React.ComponentType<{ message: UserMessage }>;
+type ToolCallTimelineComponent = React.ComponentType<{
+ activities: ToolActivity[];
+ steps: TimelineStep[];
+ isLast: boolean;
+ awaitingResponse: boolean;
+}>;
```
Provided via `components`, these **fully replace** the default rendering (including the container
@@ -199,16 +205,16 @@ and avatar). Resolution order, per message kind:
### Named exports (from `index.ts`)
-| Export | Kind | Purpose |
-| ------------------------------------------------- | ---------------- | ------------------------------------------ |
-| `AgentInterface` | component | The compound root |
-| `AgentInterfaceProps`, `AgentInterfaceComponents` | types | Root props / override map |
-| `SidebarItem`, `SidebarItemProps` | component + type | Standalone nav row |
-| `ArtifactNav`, `ArtifactNavProps` | component + type | Artifact-category nav |
-| `useNav`, `NavContextValue` | hook + type | Read/drive navigation from inside the tree |
-| `RouteProps` | type | `<AgentInterface.Route>` props |
-| `WorkspaceProps` | type | `<AgentInterface.Workspace>` props |
-| `artifactListPath`, `artifactViewPath` | functions | Build reserved `artifacts/…` paths |
+| Export | Kind | Purpose |
+| ------------------------------------------------------------------------------ | ---------------- | ------------------------------------------ |
+| `AgentInterface` | component | The compound root |
+| `AgentInterfaceProps`, `AgentInterfaceComponents`, `ToolCallTimelineComponent` | types | Root props / override map |
+| `SidebarItem`, `SidebarItemProps` | component + type | Standalone nav row |
+| `ArtifactNav`, `ArtifactNavProps` | component + type | Artifact-category nav |
+| `useNav`, `NavContextValue` | hook + type | Read/drive navigation from inside the tree |
+| `RouteProps` | type | `<AgentInterface.Route>` props |
+| `WorkspaceProps` | type | `<AgentInterface.Workspace>` props |
+| `artifactListPath`, `artifactViewPath` | functions | Build reserved `artifacts/…` paths |
---
diff --git a/packages/react-ui/src/components/AgentInterface/Thread.tsx b/packages/react-ui/src/components/AgentInterface/Thread.tsx
index f6bb2ea04..943e5f5be 100644
--- a/packages/react-ui/src/components/AgentInterface/Thread.tsx
+++ b/packages/react-ui/src/components/AgentInterface/Thread.tsx
@@ -22,7 +22,11 @@ import {
import { useAgentInterfaceLabels } from "./_shared/labelsContext";
import { useAgentInterfaceStore } from "./_shared/store";
import { TimelineEntry } from "./_shared/tool-renderer";
-import type { AssistantMessageComponent, UserMessageComponent } from "./_shared/types";
+import type {
+ AssistantMessageComponent,
+ ToolCallTimelineComponent,
+ UserMessageComponent,
+} from "./_shared/types";
import { Callout } from "../Callout";
import { DotMatrixLoader } from "../DotMatrixLoader";
@@ -356,6 +360,7 @@ const InterleavedTurn = ({
segments,
allMessages,
assistantMessage: CustomAssistantMessage,
+ toolCallTimeline: CustomToolCallTimeline,
className,
isRunning,
lastAssistantId,
@@ -363,6 +368,7 @@ const InterleavedTurn = ({
segments: AssistantMessage[];
allMessages: Message[];
assistantMessage?: AssistantMessageComponent;
+ toolCallTimeline?: ToolCallTimelineComponent;
className?: string;
isRunning: boolean;
lastAssistantId: string | null;
@@ -433,15 +439,23 @@ const InterleavedTurn = ({
return (
<>
- {turnActivities.length > 0 && (
- <ToolCallTimeline
- activities={turnActivities}
- steps={steps}
- isLast={turnLive}
- forceDefault
- awaitingResponse={turnLive && !answerStarted}
- />
- )}
+ {turnActivities.length > 0 &&
+ (CustomToolCallTimeline ? (
+ <CustomToolCallTimeline
+ activities={turnActivities}
+ steps={steps}
+ isLast={turnLive}
+ awaitingResponse={turnLive && !answerStarted}
+ />
+ ) : (
+ <ToolCallTimeline
+ activities={turnActivities}
+ steps={steps}
+ isLast={turnLive}
+ forceDefault
+ awaitingResponse={turnLive && !answerStarted}
+ />
+ ))}
{matched.map((activity) => (
<TimelineEntry
key={activity.id}
@@ -477,6 +491,7 @@ const RenderGroup = ({
group,
allMessages,
assistantMessage: CustomAssistantMessage,
+ toolCallTimeline,
userMessage,
className,
isRunning,
@@ -485,6 +500,7 @@ const RenderGroup = ({
group: Message[];
allMessages: Message[];
assistantMessage?: AssistantMessageComponent;
+ toolCallTimeline?: ToolCallTimelineComponent;
userMessage?: UserMessageComponent;
className?: string;
isRunning: boolean;
@@ -502,6 +518,7 @@ const RenderGroup = ({
segments={assistants}
allMessages={allMessages}
assistantMessage={CustomAssistantMessage}
+ toolCallTimeline={toolCallTimeline}
className={className}
isRunning={isRunning}
lastAssistantId={lastAssistantId}
@@ -526,11 +543,13 @@ export const Messages = ({
loader,
assistantMessage,
userMessage,
+ toolCallTimeline,
}: {
className?: string;
loader?: React.ReactNode;
assistantMessage?: AssistantMessageComponent;
userMessage?: UserMessageComponent;
+ toolCallTimeline?: ToolCallTimelineComponent;
}) => {
const messages = useThread((s) => s.messages);
const isRunning = useThread((s) => s.isRunning);
@@ -553,6 +572,7 @@ export const Messages = ({
allMessages={messages}
assistantMessage={assistantMessage}
userMessage={userMessage}
+ toolCallTimeline={toolCallTimeline}
className={className}
isRunning={isRunning}
lastAssistantId={lastAssistantId}
diff --git a/packages/react-ui/src/components/AgentInterface/_shared/types/index.ts b/packages/react-ui/src/components/AgentInterface/_shared/types/index.ts
index 869f4ea5f..b2353192b 100644
--- a/packages/react-ui/src/components/AgentInterface/_shared/types/index.ts
+++ b/packages/react-ui/src/components/AgentInterface/_shared/types/index.ts
@@ -1,4 +1,5 @@
-import type { AssistantMessage, UserMessage } from "@openuidev/react-headless";
+import type { AssistantMessage, ToolActivity, UserMessage } from "@openuidev/react-headless";
+import type { TimelineStep } from "../../../ToolCall";
/**
* Custom component for rendering assistant messages.
@@ -32,3 +33,15 @@ export type AssistantMessageComponent = React.ComponentType<{
export type UserMessageComponent = React.ComponentType<{
message: UserMessage;
}>;
+
+/**
+ * Custom component for rendering the tool activity timeline for one assistant turn.
+ * When provided, replaces the default timeline while tools are running and after
+ * the assistant answer arrives.
+ */
+export type ToolCallTimelineComponent = React.ComponentType<{
+ activities: ToolActivity[];
+ steps: TimelineStep[];
+ isLast: boolean;
+ awaitingResponse: boolean;
+}>;
diff --git a/packages/react-ui/src/components/AgentInterface/index.ts b/packages/react-ui/src/components/AgentInterface/index.ts
index 73eab332a..c749db8bd 100644
--- a/packages/react-ui/src/components/AgentInterface/index.ts
+++ b/packages/react-ui/src/components/AgentInterface/index.ts
@@ -2,6 +2,7 @@ export { artifactListPath, artifactViewPath } from "./_shared/artifactPaths";
export type { AgentInterfaceLabels, WorkspaceTabLabels } from "./_shared/labelsContext";
export { useNav } from "./_shared/navContext";
export type { NavContextValue } from "./_shared/navContext";
+export type { ToolCallTimelineComponent } from "./_shared/types";
export { AgentInterface } from "./AgentInterface";
export type { AgentInterfaceComponents, AgentInterfaceProps } from "./AgentInterface";
export { ArtifactNav } from "./ArtifactNav";