Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
greywen committed Dec 27, 2024
1 parent da310a6 commit 35f24c5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/FE/pages/home/_components/Chatbar/Chatbar.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Dispatch, createContext } from 'react';

import { ActionType } from '@/hooks/useCreateReducer';

import { IChat } from '@/types/chat';
import { ChatResult } from '@/types/clientApis';

export interface ChatbarContextProps {
Expand All @@ -11,7 +12,7 @@ export interface ChatbarContextProps {
}
export interface ChatbarInitialState {
searchTerm: string;
filteredChats: ChatResult[];
filteredChats: IChat[];
}

export const initialState: ChatbarInitialState = {
Expand Down
9 changes: 1 addition & 8 deletions src/FE/pages/home/_components/Chatbar/Chatbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,9 @@ const Chatbar = () => {
});

const {
state: {
chats,
selectModel,
showChatBar,
messageIsStreaming,
isChatsLoading,
},
state: { chats, showChatBar, messageIsStreaming, isChatsLoading },
settingDispatch,
handleDeleteChat: homeHandleDeleteChat,
handleSelectChat,
handleNewChat,
hasModel,
getChats,
Expand Down
4 changes: 2 additions & 2 deletions src/FE/pages/home/_components/Chatbar/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import toast from 'react-hot-toast';

import useTranslation from '@/hooks/useTranslation';

import { ChatResult } from '@/types/clientApis';
import { IChat } from '@/types/chat';

import SidebarActionButton from '@/components/Button/SidebarActionButton';
import ChatIcon from '@/components/ChatIcon/ChatIcon';
Expand All @@ -36,7 +36,7 @@ import { deleteChats, putChats } from '@/apis/clientApis';
import { cn } from '@/lib/utils';

interface Props {
chat: ChatResult;
chat: IChat;
}

const ConversationComponent = ({ chat }: Props) => {
Expand Down
4 changes: 2 additions & 2 deletions src/FE/pages/home/_components/Chatbar/Conversations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { useContext, useEffect, useState } from 'react';

import useTranslation from '@/hooks/useTranslation';

import { ChatResult } from '@/types/clientApis';
import { IChat } from '@/types/chat';

import { Button } from '@/components/ui/button';

import HomeContext from '../../_contexts/home.context';
import ConversationComponent from './Conversation';

interface Props {
chats: ChatResult[];
chats: IChat[];
}

const Conversations = ({ chats }: Props) => {
Expand Down
2 changes: 1 addition & 1 deletion src/FE/utils/message.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChatRole, ChatSpanStatus, Content, IChat } from '@/types/chat';
import {
IChatMessage,
ChatMessageNode,
IChatMessage,
ResponseMessageTempId,
UserMessageTempId,
} from '@/types/chatMessage';
Expand Down

0 comments on commit 35f24c5

Please sign in to comment.