Skip to content

Commit 6dd50ef

Browse files
authored
Merge pull request #28 from pattern-tech/chore/repo-cleanup
Chore: repo cleanup
2 parents 570f433 + 71aec3f commit 6dd50ef

15 files changed

Lines changed: 24 additions & 634 deletions

app/(chat)/opengraph-image.png

-50.8 KB
Binary file not shown.

app/(chat)/twitter-image.png

-50.8 KB
Binary file not shown.

app/config/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,22 +95,22 @@ export const siweConfig = createSIWEConfig({
9595
},
9696
verifyMessage: async ({ message, signature }: SIWEVerifyMessageArgs) => {
9797
try {
98-
const success = await signIn('credentials', {
98+
await signIn('credentials', {
9999
message,
100-
redirect: false,
100+
redirectTo: '/',
101101
signature,
102-
callbackUrl: '/protected',
103102
});
104103

105-
return Boolean(success?.ok);
104+
return true;
106105
} catch (error) {
107106
return false;
108107
}
109108
},
110109
signOut: async () => {
111110
try {
112111
await signOut({
113-
redirect: false,
112+
redirect: true,
113+
redirectTo: '/',
114114
});
115115

116116
return true;

app/layout.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
import type { Metadata } from "next";
2-
import { headers } from "next/headers";
3-
import { Toaster } from "sonner";
4-
import { cookieToInitialState } from "wagmi";
1+
import type { Metadata } from 'next';
2+
import { headers } from 'next/headers';
3+
import { Toaster } from 'sonner';
4+
import { cookieToInitialState } from 'wagmi';
55

6-
import { ThemeProvider } from "@/components/theme-provider";
6+
import { ThemeProvider } from '@/components/theme-provider';
77

8-
import { wagmiAdapter } from "./config";
9-
import ContextProvider from "./context";
10-
11-
import "./globals.css";
8+
import { wagmiAdapter } from './config';
9+
import ContextProvider from './context';
10+
import './globals.css';
1211

1312
export const metadata: Metadata = {
14-
metadataBase: new URL("https://chat.vercel.ai"),
15-
title: "Pattern",
16-
description: "Pattern is a decentralized agentic RAG network",
13+
title: 'Pattern',
14+
description: 'Pattern is a decentralized agentic RAG network',
1715
};
1816

1917
export const viewport = {
2018
maximumScale: 1,
2119
};
2220

23-
const LIGHT_THEME_COLOR = "hsl(0 0% 100%)";
24-
const DARK_THEME_COLOR = "hsl(240deg 10% 3.92%)";
21+
const LIGHT_THEME_COLOR = 'hsl(0 0% 100%)';
22+
const DARK_THEME_COLOR = 'hsl(240deg 10% 3.92%)';
2523
const THEME_COLOR_SCRIPT = `\
2624
(function() {
2725
var html = document.documentElement;
@@ -46,7 +44,7 @@ export default async function RootLayout({
4644
children: React.ReactNode;
4745
}>) {
4846
const headersObj = await headers();
49-
const cookies = headersObj.get("cookie");
47+
const cookies = headersObj.get('cookie');
5048
const initialState = cookieToInitialState(wagmiAdapter.wagmiConfig, cookies);
5149

5250
return (

components/chat.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ import type { Attachment, Message } from 'ai';
44
import { useChat } from 'ai/react';
55
import { useState } from 'react';
66
import { toast } from 'sonner';
7-
import useSWR, { useSWRConfig } from 'swr';
7+
import { useSWRConfig } from 'swr';
88

99
import { ChatHeader } from '@/components/chat-header';
1010
import { useArtifactSelector } from '@/hooks/use-artifact';
11-
import type { Vote } from '@/lib/db/schema';
12-
import { fetcher, generateUUID } from '@/lib/utils';
11+
import { generateUUID } from '@/lib/utils';
1312

1413
import { Artifact } from './artifact';
1514
import { Messages } from './messages';
@@ -53,11 +52,6 @@ export function Chat({
5352
},
5453
});
5554

56-
const { data: votes } = useSWR<Array<Vote>>(
57-
`/api/vote?chatId=${id}`,
58-
fetcher,
59-
);
60-
6155
const [attachments, setAttachments] = useState<Array<Attachment>>([]);
6256
const isArtifactVisible = useArtifactSelector((state) => state.isVisible);
6357

@@ -69,7 +63,7 @@ export function Chat({
6963
<Messages
7064
chatId={id}
7165
isLoading={isLoading}
72-
votes={votes}
66+
votes={[]}
7367
messages={messages}
7468
setMessages={setMessages}
7569
reload={reload}
@@ -109,7 +103,7 @@ export function Chat({
109103
messages={messages}
110104
setMessages={setMessages}
111105
reload={reload}
112-
votes={votes}
106+
votes={[]}
113107
isReadonly={isReadonly}
114108
/>
115109
</>

docs/01-quick-start.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/02-update-models.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)