Skip to content

Commit

Permalink
Remove unused useCopyCode hook from Conversation.vue and add it to …
Browse files Browse the repository at this point in the history
…MessageList.vue
  • Loading branch information
swuecho committed Sep 16, 2024
1 parent ed427d0 commit 1e64815
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions web/src/views/chat/components/Conversation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import html2canvas from 'html2canvas'
import { type OnSelect } from 'naive-ui/es/auto-complete/src/interface'
import { useScroll } from '@/views/chat/hooks/useScroll'
import { useChat } from '@/views/chat/hooks/useChat'
import { useCopyCode } from '@/views/chat/hooks/useCopyCode'
import HeaderComponent from '@/views/chat/components/Header/index.vue'
import SessionConfig from '@/views/chat/components/Session/SessionConfig.vue'
import { createChatBot, createChatSnapshot, fetchChatStream } from '@/api'
Expand Down Expand Up @@ -38,7 +37,7 @@ const { sessionUuid } = defineProps({
},
});
useCopyCode()
const { isMobile } = useBasicLayout()
const { addChat, updateChat, updateChatPartial } = useChat()
Expand Down
4 changes: 4 additions & 0 deletions web/src/views/chat/components/MessageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ import { useChatStore } from '@/store';
import { useChat } from '@/views/chat/hooks/useChat'
import { updateChatData } from '@/api'
import { useDialog } from 'naive-ui'
import { useCopyCode } from '@/views/chat/hooks/useCopyCode'
import { t } from '@/locales'
const dialog = useDialog()
const { updateChatText, updateChat } = useChat()
useCopyCode()
const props = defineProps({
sessionUuid: {
type: String,
Expand Down

0 comments on commit 1e64815

Please sign in to comment.