diff --git a/app/(chat)/chat/[id]/page.tsx b/app/(chat)/chat/[id]/page.tsx
index 5d5b06208..acf5da3d1 100644
--- a/app/(chat)/chat/[id]/page.tsx
+++ b/app/(chat)/chat/[id]/page.tsx
@@ -1,4 +1,3 @@
-
import { cookies } from 'next/headers';
import { notFound } from 'next/navigation';
diff --git a/components/document.tsx b/components/document.tsx
index bb415d98e..4c7eb2eb7 100644
--- a/components/document.tsx
+++ b/components/document.tsx
@@ -3,14 +3,19 @@ import type { SetStateAction } from 'react';
import type { UIBlock } from './block';
import { FileIcon, LoaderIcon, MessageIcon, PencilEditIcon } from './icons';
-const getActionText = (type: 'create' | 'update' | 'request-suggestions') => {
+const getActionText = (
+ type: 'create' | 'update' | 'request-suggestions',
+ tense: 'present' | 'past',
+) => {
switch (type) {
case 'create':
- return 'Creating';
+ return tense === 'present' ? 'Creating' : 'Created';
case 'update':
- return 'Updating';
+ return tense === 'present' ? 'Updating' : 'Updated';
case 'request-suggestions':
- return 'Adding suggestions';
+ return tense === 'present'
+ ? 'Adding suggestions'
+ : 'Added suggestions to';
default:
return null;
}
@@ -26,7 +31,6 @@ interface DocumentToolResultProps {
export function DocumentToolResult({
type,
result,
- block,
setBlock,
}: DocumentToolResultProps) {
return (
@@ -62,8 +66,8 @@ export function DocumentToolResult({