Skip to content

An AI-powered search engine with a generative UI

feat: remove fetch type display from fetch preview

Yoshiki Miura7bd82d3834d6
diff --git a/components/fetch-preview.tsx b/components/fetch-preview.tsx
index 6ac46e08..71d1ab27 100644
--- a/components/fetch-preview.tsx
+++ b/components/fetch-preview.tsx
@@ -6,7 +6,6 @@ interface FetchPreviewProps {
contentLength?: number
status: 'fetching' | 'success' | 'error'
error?: string
- fetchType?: string
}
export function FetchPreview({
@@ -14,8 +13,7 @@ export function FetchPreview({
title,
contentLength,
status,
- error,
- fetchType = 'Retrieve'
+ error
}: FetchPreviewProps) {
const getPageTitle = () => {
if (title) return title
@@ -50,7 +48,7 @@ export function FetchPreview({
</span>
</div>
<span className="text-xs text-muted-foreground animate-pulse whitespace-nowrap">
- {fetchType}...
+ Retrieving...
</span>
</div>
</div>
@@ -111,9 +109,6 @@ export function FetchPreview({
: `${contentLength} chars`}
</span>
)}
- <span className="text-xs text-muted-foreground whitespace-nowrap">
- {fetchType}
- </span>
<ExternalLink className="w-4 h-4 text-muted-foreground shrink-0" />
</div>
</div>
diff --git a/components/fetch-section.tsx b/components/fetch-section.tsx
index 45bb7b06..701b583e 100644
--- a/components/fetch-section.tsx
+++ b/components/fetch-section.tsx
@@ -17,10 +17,6 @@ interface FetchSectionProps {
export function FetchSection({ tool }: FetchSectionProps) {
const url = tool.input?.url
- // Determine the fetch type based on the tool input
- const fetchType =
- tool.input?.type === 'api' ? 'API Retrieve' : 'Regular Fetch'
-
// Determine the status based on tool output availability
let displayStatus: 'fetching' | 'success' | 'error' = 'fetching'
let error: string | undefined
@@ -56,7 +52,6 @@ export function FetchSection({ tool }: FetchSectionProps) {
contentLength={contentLength}
status={displayStatus}
error={error}
- fetchType={fetchType}
/>
</div>
)