Skip to content

Commit f8cc508

Browse files
committed
feat: add description of context
1 parent 504f0c0 commit f8cc508

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/components/common/HoverButton/Button.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ function handleClick() {
1212

1313
<template>
1414
<button
15-
class="flex items-center justify-center w-10 h-10 transition rounded-full hover:bg-neutral-100 dark:hover:bg-[#414755]"
15+
class="flex items-center justify-center h-10 transition hover:bg-neutral-100 dark:hover:bg-[#414755]"
16+
style="flex-flow:row nowrap;min-width:2.5em;padding:.5em;border-radius:.5em;"
1617
@click="handleClick"
1718
>
1819
<slot />

src/views/chat/components/Header/index.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ function handleShowPrompt() {
7474
<IconPrompt class="w-[20px] m-auto" />
7575
</span>
7676
</HoverButton>
77-
<HoverButton @click="toggleUsingContext">
78-
<span class="text-xl" :class="{ 'text-[#4b9e5f]': usingContext, 'text-[#a8071a]': !usingContext }">
77+
<HoverButton :tooltip="usingContext ? '点击停止包含上下文' : '点击开启包含上下文'" :class="{ 'text-[#4b9e5f]': usingContext, 'text-[#a8071a]': !usingContext }" @click="toggleUsingContext">
78+
<span class="text-xl">
7979
<SvgIcon icon="ri:chat-history-line" />
8080
</span>
81+
<span style="margin-left:.25em">{{ usingContext ? '包含上下文' : '不含上下文' }}</span>
8182
</HoverButton>
8283
<HoverButton @click="handleExport">
8384
<span class="text-xl text-[#4f555e] dark:text-white">

src/views/chat/index.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,11 @@ onUnmounted(() => {
683683
<IconPrompt class="w-[20px] m-auto" />
684684
</span>
685685
</HoverButton>
686-
<HoverButton v-if="!isMobile" @click="handleToggleUsingContext">
687-
<span class="text-xl" :class="{ 'text-[#4b9e5f]': usingContext, 'text-[#a8071a]': !usingContext }">
686+
<HoverButton v-if="!isMobile" :tooltip="usingContext ? '点击停止包含上下文' : '点击开启包含上下文'" :class="{ 'text-[#4b9e5f]': usingContext, 'text-[#a8071a]': !usingContext }" @click="handleToggleUsingContext">
687+
<span class="text-xl">
688688
<SvgIcon icon="ri:chat-history-line" />
689689
</span>
690+
<span style="margin-left:.25em">{{ usingContext ? '包含上下文' : '不含上下文' }}</span>
690691
</HoverButton>
691692
<NSelect
692693
style="width: 250px"

0 commit comments

Comments
 (0)