Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ui/src/conversation-panel/components/content/items/question.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ImageUploadCard from '@/components/mk-drag-upload/ImageUploadCard.vue'
import { getFileExtension, resetUrl } from '@/utils/icon'
import { formatFileSize } from '@/utils/number'
import { downloadByURL } from '@/utils/common'
import { copyText } from '@/utils/clipboard'

defineOptions({ name: 'ConversationQuestionContent' })

Expand Down Expand Up @@ -44,7 +45,7 @@ function getAttachmentDescription(file: QuestionAttachment) {
</script>

<template>
<div class="mk-conversation-question-content space-y-3">
<div class="mk-conversation-question-content group/question space-y-3 cursor-pointer">
<!-- 查看已发送附件,超出当前宽度时自动换行。 -->
<div v-if="attachments.length" class="flex-wrap max-w-full justify-end gap-2">
<template v-for="file in attachments" :key="file.key">
Expand Down Expand Up @@ -81,5 +82,12 @@ function getAttachmentDescription(file: QuestionAttachment) {
</template>
</div>
<div v-if="content.content" class="mk-gray-card-lg max-w-full py-3! whitespace-pre-wrap wrap-anywhere">{{ content.content }}</div>
<!-- TODO 用户的操作 -->
<div class="h-8 -mt-3 flex items-center justify-end invisible group-hover/question:visible">
<!-- 复制提问 -->
<el-button text @click="copyText(content.content)">
<MkIcon name="icon_copy_outlined" />
</el-button>
</div>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const showUserAvatar = computed(() => appInfo.value?.show_user_avatar)
</el-avatar>
</div>
<ContentList :content-list="msg.content" />
<!-- TODO 这块写用户的操作 -->
</div>
<template v-else>
<ApplicationIcon v-if="showAvatar" :icon="avatar" :size="24" class="shrink-0" />
Expand Down
4 changes: 2 additions & 2 deletions ui/src/conversation-panel/main/share-panel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const handleShare = () => {
</div>
</header>
<ReverseInfiniteScroll
content-class="mk-conversation-content p-4"
content-class="mk-conversation-content p-4 space-y-2"
:loading="loading"
:has-more="hasMore"
:count="shareRounds.length"
Expand All @@ -78,7 +78,7 @@ const handleShare = () => {
<el-checkbox :model-value="share.isSelected(round.key)" class="pointer-events-none shrink-0" />
<!-- 分享模式下内容只读,不响应内部交互 -->
<div
class="px-4 py-3 rounder-xl pointer-events-none min-w-0 flex-1 select-none group-hover:bg-N900/8"
class="px-4 py-3 rounded-xl pointer-events-none min-w-0 flex-1 select-none group-hover:bg-N900/8"
:class="{ 'bg-N900/8': share.isSelected(round.key) }"
>
<ContentList v-for="message in round.messages" :key="message.id" :content-list="message.content" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ function handleApplyToAll() {
if (props.disabled || applying.value) return
applying.value = true
return MsgConfirm('应用到所有节点', '将把所有节点的模型来源统一改为「默认模型」,会覆盖它们当前的「自定义 / 引用变量」,请谨慎操作。', {
type: 'warning',
confirmButtonText: '应用',
confirmButtonType: 'primary',
})
Expand Down
Loading