Skip to content

Commit

Permalink
perf: optimize image layout (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayangweb committed Mar 29, 2023
1 parent 6595f30 commit 0984df9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/Function/components/TokenUsage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const { isMemory } = storeToRefs(useSettingsStore())
const tokenUsage = ref(0)
const tokenExceed = computed(() => tokenUsage.value > 3800)
const tokenExceed = computed(
() => !!textAreaValue.value && tokenUsage.value > 3800
)
watch([textAreaValue, isMemory], async () => {
// 角色描述字符数
Expand Down
2 changes: 1 addition & 1 deletion src/components/Session/components/SessionContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const position = computed(() => (props.data.is_ask ? 'left' : 'right'))
<a-row class="-m-1" v-else>
<a-col
class="p-1"
:span="data.message.content.length > 2 ? 8 : 12"
:span="data.message.content.length === 3 ? 8 : 12"
v-for="(img, index) in data.message.content"
:key="index"
>
Expand Down

0 comments on commit 0984df9

Please sign in to comment.