Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(assistant-ui): handle tool call rendering when toolkit is missing

Steven Enamakelbf55c2115571
diff --git a/app/src/features/conversations/aui/toolkit.test.tsx b/app/src/features/conversations/aui/toolkit.test.tsx
index 239a30b479..72fb655f00 100644
--- a/app/src/features/conversations/aui/toolkit.test.tsx
+++ b/app/src/features/conversations/aui/toolkit.test.tsx
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest';
-import { buildOpenHumanToolkit, openHumanToolEntries } from './toolkit';
import { SubagentCall } from '../components/ChatToolParts';
+import { buildOpenHumanToolkit, openHumanToolEntries } from './toolkit';
describe('buildOpenHumanToolkit', () => {
it('registers the task tool against the shared delegation card', () => {
diff --git a/app/src/features/conversations/aui/toolkit.tsx b/app/src/features/conversations/aui/toolkit.tsx
index 3be516fedd..9fd345290a 100644
--- a/app/src/features/conversations/aui/toolkit.tsx
+++ b/app/src/features/conversations/aui/toolkit.tsx
@@ -1,4 +1,8 @@
-import { defineToolkit, type Toolkit, type ToolCallMessagePartComponent } from '@assistant-ui/react';
+import {
+ defineToolkit,
+ type ToolCallMessagePartComponent,
+ type Toolkit,
+} from '@assistant-ui/react';
import { useMemo } from 'react';
import { SubagentCall } from '../components/ChatToolParts';
@@ -46,11 +50,7 @@ export const openHumanToolEntries: Record<string, OpenHumanToolEntry> = {
* old `ChatToolFallback`'s `toolName === 'task'` branch did before this
* registry replaced the manual switch.
*/
- task: {
- type: 'backend',
- display: 'inline',
- render: SubagentCall,
- },
+ task: { type: 'backend', display: 'inline', render: SubagentCall },
};
/**
diff --git a/app/src/features/conversations/components/AssistantUiToolCall.tsx b/app/src/features/conversations/components/AssistantUiToolCall.tsx
index f02cfbb836..728e644099 100644
--- a/app/src/features/conversations/components/AssistantUiToolCall.tsx
+++ b/app/src/features/conversations/components/AssistantUiToolCall.tsx
@@ -12,11 +12,11 @@ import type {
ToolTimelineEntryStatus,
} from '../../../store/chatRuntimeSlice';
import { openUrl } from '../../../utils/openUrl';
+import { ToolFailureCard } from '../aui/ToolFailureCard';
import { FetchBody, FileBody, ShellBody, WebSearchBody } from '../tools/ToolBodies';
import { hasDisplayValue, parsedValue, ToolDataView } from '../tools/ToolDataView';
import { ToolIcon } from '../tools/ToolIcon';
import { describeToolCall, parseToolArgs, toolLabel } from '../tools/toolPresentation';
-import { ToolFailureCard } from '../aui/ToolFailureCard';
/** `1234` → "1.2s", `850` → "850ms", `75000` → "1m 15s". */
export function formatElapsed(ms: number): string {
@@ -192,7 +192,11 @@ export function AssistantUiToolCallCard({
<>
{failed && failure ? (
<div className="ps-5.5 pt-1 pb-2">
- <ToolFailureCard toolName={toolName} target={detail ?? displayName} failure={failure} />
+ <ToolFailureCard
+ toolName={toolName}
+ target={detail ?? displayName}
+ failure={failure}
+ />
</div>
) : null}
{footer ? <div className="ps-5.5">{footer}</div> : null}
diff --git a/app/src/providers/AssistantUiRuntimeProvider.tsx b/app/src/providers/AssistantUiRuntimeProvider.tsx
index 90e7372b24..0a9892b76f 100644
--- a/app/src/providers/AssistantUiRuntimeProvider.tsx
+++ b/app/src/providers/AssistantUiRuntimeProvider.tsx
@@ -1,4 +1,9 @@
-import { AssistantRuntimeProvider, AuiConfig, Tools, useExternalStoreRuntime } from '@assistant-ui/react';
+import {
+ AssistantRuntimeProvider,
+ AuiConfig,
+ Tools,
+ useExternalStoreRuntime,
+} from '@assistant-ui/react';
import debugFactory from 'debug';
import { createContext, type ReactNode, useContext, useMemo } from 'react';