Skip to content

Commit

Permalink
reorg_text (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
swuecho authored Apr 26, 2023
1 parent 52ebeae commit 9209a11
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 82 deletions.
2 changes: 1 addition & 1 deletion web/src/views/chat/components/Message/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang='ts'>
import { computed, ref } from 'vue'
import { NDropdown } from 'naive-ui'
import TextComponent from './Text.vue'
import TextComponent from '@/views/components/Message/Text.vue'
import AvatarComponent from '@/views/components/Avatar/MessageAvatar.vue'
import { SvgIcon } from '@/components/common'
import { copyText } from '@/utils/format'
Expand Down
File renamed without changes.
File renamed without changes.
78 changes: 0 additions & 78 deletions web/src/views/snapshot/components/Message/Text.vue

This file was deleted.

10 changes: 7 additions & 3 deletions web/src/views/snapshot/components/Message/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang='ts'>
import { ref } from 'vue'
import { computed, ref } from 'vue'
import { NDropdown } from 'naive-ui'
import TextComponent from './Text.vue'
import TextComponent from '@/views//components/Message/Text.vue'
import AvatarComponent from '@/views/components/Avatar/MessageAvatar.vue'
import { SvgIcon } from '@/components/common'
import { copyText } from '@/utils/format'
Expand Down Expand Up @@ -40,6 +40,10 @@ function handleSelect(key: 'copyText') {
copyText({ text: props.text ?? '' })
}
}
const code = computed(() => {
return props?.model?.includes('davinci') ?? false
})
</script>

<template>
Expand All @@ -61,7 +65,7 @@ function handleSelect(key: 'copyText') {
</p>
<div class="flex items-end gap-1 mt-2" :class="[inversion ? 'flex-row-reverse' : 'flex-row']">
<TextComponent
ref="textRef" class="message-text" :inversion="inversion" :error="error" :text="text"
ref="textRef" class="message-text" :inversion="inversion" :error="error" :text="text" :code="code"
:loading="loading" :idex="index"
/>
<div class="flex flex-col">
Expand Down

0 comments on commit 9209a11

Please sign in to comment.