Skip to content

An AI-powered search engine with a generative UI

Fix typos, update settings, and rename file

Nick Sullivan0ec894bc22b2
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 89d1965f..d292e786 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,4 +1,8 @@
{
"editor.formatOnSave": true,
- "editor.defaultFormatter": "esbenp.prettier-vscode"
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "cSpell.words": [
+ "openai",
+ "Tavily"
+ ]
}
\ No newline at end of file
diff --git a/app/actions.tsx b/app/actions.tsx
index 781033cd..748724ae 100644
--- a/app/actions.tsx
+++ b/app/actions.tsx
@@ -24,7 +24,6 @@ import { VideoSearchSection } from '@/components/video-search-section'
import { transformToolMessages } from '@/lib/utils'
import { AnswerSection } from '@/components/answer-section'
import { ErrorCard } from '@/components/error-card'
-import { use } from 'react'
async function submit(
formData?: FormData,
@@ -53,8 +52,8 @@ async function submit(
return { role, content } as CoreMessage
})
- // goupeiId is used to group the messages for collapse
- const groupeId = generateId()
+ // groupId is used to group the messages for collapse
+ const groupId = generateId()
const useSpecificAPI = process.env.USE_SPECIFIC_API_FOR_WRITER === 'true'
const useOllamaProvider = !!(
@@ -173,7 +172,7 @@ async function submit(
messages: [
...aiState.get().messages,
{
- id: groupeId,
+ id: groupId,
role: 'tool',
content: JSON.stringify(output.result),
name: output.toolName,
@@ -219,7 +218,7 @@ async function submit(
messages: [
...aiState.get().messages,
{
- id: groupeId,
+ id: groupId,
role: 'assistant',
content: answer,
type: 'answer'
@@ -241,13 +240,13 @@ async function submit(
messages: [
...aiState.get().messages,
{
- id: groupeId,
+ id: groupId,
role: 'assistant',
content: JSON.stringify(relatedQueries),
type: 'related'
},
{
- id: groupeId,
+ id: groupId,
role: 'assistant',
content: 'followup',
type: 'followup'
diff --git a/components/history-skelton.tsx b/components/history-skeleton.tsx
similarity index 100%
rename from components/history-skelton.tsx
rename to components/history-skeleton.tsx
diff --git a/components/history.tsx b/components/history.tsx
index a1e92a37..63206e79 100644
--- a/components/history.tsx
+++ b/components/history.tsx
@@ -14,7 +14,7 @@ import { ChevronLeft, Menu } from 'lucide-react'
import { cn } from '@/lib/utils'
import { History as HistoryIcon } from 'lucide-react'
import { Suspense } from 'react'
-import { HistorySkeleton } from './history-skelton'
+import { HistorySkeleton } from './history-skeleton'
import { useAppState } from '@/lib/utils/app-state'
type HistoryProps = {
diff --git a/lib/agents/researcher.tsx b/lib/agents/researcher.tsx
index f6fedbf7..f4698357 100644
--- a/lib/agents/researcher.tsx
+++ b/lib/agents/researcher.tsx
@@ -25,8 +25,8 @@ export async function researcher(
const includeToolResponses = messages.some(message => message.role === 'tool')
const useSubModel = useOllamaProvider && includeToolResponses
- const streambleAnswer = createStreamableValue<string>('')
- const answerSection = <AnswerSection result={streambleAnswer.value} />
+ const streamableAnswer = createStreamableValue<string>('')
+ const answerSection = <AnswerSection result={streamableAnswer.value} />
const currentDate = new Date().toLocaleString()
const result = await streamText({
@@ -51,7 +51,7 @@ export async function researcher(
onFinish: async event => {
finishReason = event.finishReason
fullResponse = event.text
- streambleAnswer.done()
+ streamableAnswer.done()
}
}).catch(err => {
hasError = true
@@ -80,7 +80,7 @@ export async function researcher(
if (useAnthropicProvider && !hasToolResult) {
streamableText.update(fullResponse)
} else {
- streambleAnswer.update(fullResponse)
+ streamableAnswer.update(fullResponse)
}
}
break
diff --git a/package.json b/package.json
index a35983ee..9c7b8b64 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "mophic",
+ "name": "morphic",
"version": "0.1.0",
"private": true,
"license": "Apache-2.0",
@@ -60,4 +60,4 @@
"eslint": "^8",
"eslint-config-next": "^14.2.3"
}
-}
\ No newline at end of file
+}