Skip to content

Commit 34b56ae

Browse files
committed
Run updater
1 parent e675500 commit 34b56ae

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

apps/website/app/api/chat/route.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ User question: ${userQuestion}`,
8888
stopWhen: stepCountIs(10),
8989
tools: createTools(writer),
9090
system: createSystemPrompt(currentRoute),
91-
toolChoice: { type: "tool", toolName: "search_docs" },
91+
prepareStep: ({ stepNumber }) => {
92+
if (stepNumber === 0) {
93+
return { toolChoice: { type: "tool", toolName: "search_docs" } };
94+
}
95+
},
9296
});
9397

9498
writer.merge(result.toUIMessageStream());

apps/website/components/geistdocs/feedback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const Feedback = () => {
122122
))}
123123
</div>
124124
<Button
125-
disabled={isPending}
125+
disabled={isPending || !emotion || !message}
126126
size="sm"
127127
type="submit"
128128
variant="default"

apps/website/components/geistdocs/mdx-components.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ export const getMDXComponents = (
2828

2929
a: ({ href, ...props }) =>
3030
href.startsWith("/") ? (
31-
<DynamicLink className="font-normal text-primary no-underline" href={`/[lang]${href}`} {...props} />
31+
<DynamicLink
32+
className="font-normal text-primary no-underline"
33+
href={`/[lang]${href}`}
34+
{...props}
35+
/>
3236
) : (
3337
<a
3438
href={href}

apps/website/components/geistdocs/mobile-menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const MobileMenu = () => {
99

1010
return (
1111
<Button
12-
className="xl:hidden"
12+
className="md:hidden"
1313
onClick={() => setIsOpen(!isOpen)}
1414
size="icon-sm"
1515
variant="ghost"

apps/website/lib/geistdocs/db.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { UIMessage } from "@ai-sdk/react";
22
import Dexie, { type EntityTable } from "dexie";
3+
import { title } from "@/geistdocs";
34

45
interface StoredMessage extends UIMessage {
56
timestamp: number;
@@ -10,7 +11,7 @@ class ChatDatabase extends Dexie {
1011
messages!: EntityTable<StoredMessage, "id">;
1112

1213
constructor() {
13-
super("ChatMessagesDB");
14+
super(title.replace(" ", "").toLocaleLowerCase());
1415
this.version(1).stores({
1516
messages: "id, timestamp, sequence",
1617
});

0 commit comments

Comments
 (0)