diff --git a/ui/src/conversation-panel/components/header/chat/index.vue b/ui/src/conversation-panel/components/header/chat/index.vue index 3490d1b6c1a..d9b1d3f4a4f 100644 --- a/ui/src/conversation-panel/components/header/chat/index.vue +++ b/ui/src/conversation-panel/components/header/chat/index.vue @@ -9,10 +9,8 @@ const props = defineProps<{ /** 显示分享入口;仅对话端传入 */ shareable?: boolean }>() - -const emit = defineEmits<{ share: [] }>() - const list = useConversationListStore() + const msgs = useMessageListStore() // 回答生成中或没有消息时不可分享 const canShare = computed(() => msgs.messages.value.length > 0 && !msgs.streamLoading.value) @@ -43,7 +41,7 @@ const handleNewConversation = () => (props.newConversation ? props.newConversati - + diff --git a/ui/src/conversation-panel/components/message-list/index.vue b/ui/src/conversation-panel/components/message-list/index.vue index 93396a3f8e0..2bf0ecf3159 100644 --- a/ui/src/conversation-panel/components/message-list/index.vue +++ b/ui/src/conversation-panel/components/message-list/index.vue @@ -6,10 +6,15 @@ import PrologueContent from '../prologue-content/index.vue' import { formatPrologue } from '../prologue-content/index' import ReverseInfiniteScroll from '../../core/reverse-infinite-scroll/index.vue' import { useMessageListStore } from './index' - +import { useConversationListStore } from '../../left-sidebar/conversation-list/index' defineProps<{ appName?: string }>() const { appInfo, messages, loading, streamLoading, hasMore, loadMore, onStreamProgress } = useMessageListStore() +const { + // 是否分享 + isShared, + // 切换分享 + switchShared } = useConversationListStore() const scrollRef = ref>() // 开场白随智能体信息变化(debug 保存后为最新草稿) @@ -25,14 +30,8 @@ const showUserAvatar = computed(() => appInfo.value?.show_user_avatar)