SurfSense/surfsense_web/components/tool-ui/index.ts
Anish Sarkar ebc04f590e refactor: improve write_todos tool and UI components
- Refactored the write_todos tool to enhance argument and result schemas using Zod for better validation and type safety.
- Updated the WriteTodosToolUI to streamline the rendering logic and improve loading states, ensuring a smoother user experience.
- Enhanced the Plan and TodoItem components to better handle streaming states and display progress, providing clearer feedback during task management.
- Cleaned up code formatting and structure for improved readability and maintainability.
2025-12-26 17:49:56 +05:30

86 lines
1.9 KiB
TypeScript

/**
* Tool UI Components
*
* This module exports custom UI components for assistant tools.
* These components are registered with assistant-ui to render
* rich UI when specific tools are called by the agent.
*/
export {
Article,
ArticleErrorBoundary,
ArticleLoading,
type ArticleProps,
ArticleSkeleton,
parseSerializableArticle,
type SerializableArticle,
} from "./article";
export { Audio } from "./audio";
export {
type DeepAgentThinkingArgs,
type DeepAgentThinkingResult,
DeepAgentThinkingToolUI,
InlineThinkingDisplay,
type ThinkingStep,
} from "./deepagent-thinking";
export {
DisplayImageArgsSchema,
DisplayImageResultSchema,
type DisplayImageArgs,
type DisplayImageResult,
DisplayImageToolUI,
} from "./display-image";
export { GeneratePodcastToolUI } from "./generate-podcast";
export {
Image,
ImageErrorBoundary,
ImageLoading,
type ImageProps,
ImageSkeleton,
parseSerializableImage,
type SerializableImage,
} from "./image";
export {
LinkPreviewArgsSchema,
LinkPreviewResultSchema,
type LinkPreviewArgs,
type LinkPreviewResult,
LinkPreviewToolUI,
MultiLinkPreviewArgsSchema,
MultiLinkPreviewResultSchema,
type MultiLinkPreviewArgs,
type MultiLinkPreviewResult,
MultiLinkPreviewToolUI,
} from "./link-preview";
export {
MediaCard,
MediaCardErrorBoundary,
MediaCardLoading,
type MediaCardProps,
MediaCardSkeleton,
parseSerializableMediaCard,
type SerializableMediaCard,
} from "./media-card";
export {
ScrapeWebpageArgsSchema,
ScrapeWebpageResultSchema,
type ScrapeWebpageArgs,
type ScrapeWebpageResult,
ScrapeWebpageToolUI,
} from "./scrape-webpage";
export {
Plan,
PlanErrorBoundary,
type PlanProps,
parseSerializablePlan,
type SerializablePlan,
type PlanTodo,
type TodoStatus,
} from "./plan";
export {
WriteTodosToolUI,
WriteTodosArgsSchema,
WriteTodosResultSchema,
type WriteTodosArgs,
type WriteTodosResult,
} from "./write-todos";