Refactor drizzle and db folder
This commit is contained in:
parent
e96dfb2d74
commit
c493ac342b
31 changed files with 22 additions and 23 deletions
|
|
@ -17,7 +17,7 @@ import {
|
|||
useWindowSize,
|
||||
} from 'usehooks-ts';
|
||||
|
||||
import { Document, Suggestion, Vote } from '@/db/schema';
|
||||
import { Document, Suggestion, Vote } from '@/lib/db/schema';
|
||||
import { fetcher } from '@/lib/utils';
|
||||
|
||||
import { DiffView } from './diffview';
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { useWindowSize } from 'usehooks-ts';
|
|||
import { ChatHeader } from '@/components/custom/chat-header';
|
||||
import { PreviewMessage, ThinkingMessage } from '@/components/custom/message';
|
||||
import { useScrollToBottom } from '@/components/custom/use-scroll-to-bottom';
|
||||
import { Vote } from '@/db/schema';
|
||||
import { Vote } from '@/lib/db/schema';
|
||||
import { fetcher } from '@/lib/utils';
|
||||
|
||||
import { Block, UIBlock } from './block';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { EditorState } from 'prosemirror-state';
|
|||
import { EditorView } from 'prosemirror-view';
|
||||
import React, { memo, useEffect, useRef } from 'react';
|
||||
|
||||
import { Suggestion } from '@/db/schema';
|
||||
import { Suggestion } from '@/lib/db/schema';
|
||||
import {
|
||||
documentSchema,
|
||||
handleTransaction,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { toast } from 'sonner';
|
|||
import { useSWRConfig } from 'swr';
|
||||
import { useCopyToClipboard } from 'usehooks-ts';
|
||||
|
||||
import { Vote } from '@/db/schema';
|
||||
import { Vote } from '@/lib/db/schema';
|
||||
import { getMessageIdFromAnnotations } from '@/lib/utils';
|
||||
|
||||
import { CopyIcon, ThumbDownIcon, ThumbUpIcon } from './icons';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import cx from 'classnames';
|
|||
import { motion } from 'framer-motion';
|
||||
import { Dispatch, SetStateAction } from 'react';
|
||||
|
||||
import { Vote } from '@/db/schema';
|
||||
import { Vote } from '@/lib/db/schema';
|
||||
|
||||
import { UIBlock } from './block';
|
||||
import { DocumentToolCall, DocumentToolResult } from './document';
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import {
|
|||
SidebarMenuItem,
|
||||
useSidebar,
|
||||
} from '@/components/ui/sidebar';
|
||||
import { Chat } from '@/db/schema';
|
||||
import { Chat } from '@/lib/db/schema';
|
||||
import { fetcher } from '@/lib/utils';
|
||||
|
||||
type GroupedChats = {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { JSONValue } from 'ai';
|
|||
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
|
||||
import { useSWRConfig } from 'swr';
|
||||
|
||||
import { Suggestion } from '@/db/schema';
|
||||
import { Suggestion } from '@/lib/db/schema';
|
||||
|
||||
import { UIBlock } from './block';
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useState } from 'react';
|
|||
import { useSWRConfig } from 'swr';
|
||||
import { useWindowSize } from 'usehooks-ts';
|
||||
|
||||
import { Document } from '@/db/schema';
|
||||
import { Document } from '@/lib/db/schema';
|
||||
import { getDocumentTimestampByIndex } from '@/lib/utils';
|
||||
|
||||
import { UIBlock } from './block';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue