diff --git a/ui/src/conversation-panel/components/log-message-footer/feedback/FeedbackCard.vue b/ui/src/conversation-panel/components/log-message-footer/feedback/FeedbackCard.vue new file mode 100644 index 00000000000..94074bd68c1 --- /dev/null +++ b/ui/src/conversation-panel/components/log-message-footer/feedback/FeedbackCard.vue @@ -0,0 +1,40 @@ + + + diff --git a/ui/src/conversation-panel/components/log-message-footer/feedback/index.vue b/ui/src/conversation-panel/components/log-message-footer/feedback/index.vue new file mode 100644 index 00000000000..4b61d073e59 --- /dev/null +++ b/ui/src/conversation-panel/components/log-message-footer/feedback/index.vue @@ -0,0 +1,21 @@ + + + diff --git a/ui/src/conversation-panel/components/log-message-footer/index.vue b/ui/src/conversation-panel/components/log-message-footer/index.vue index a31c84380b7..af487caa5ea 100644 --- a/ui/src/conversation-panel/components/log-message-footer/index.vue +++ b/ui/src/conversation-panel/components/log-message-footer/index.vue @@ -1,6 +1,8 @@ + + diff --git a/ui/src/conversation-panel/components/message-footer/feedback/FeedbackCard.vue b/ui/src/conversation-panel/components/message-footer/feedback/FeedbackCard.vue new file mode 100644 index 00000000000..33092145c24 --- /dev/null +++ b/ui/src/conversation-panel/components/message-footer/feedback/FeedbackCard.vue @@ -0,0 +1,63 @@ + + + diff --git a/ui/src/conversation-panel/components/message-footer/feedback/index.vue b/ui/src/conversation-panel/components/message-footer/feedback/index.vue deleted file mode 100644 index 2d74a633662..00000000000 --- a/ui/src/conversation-panel/components/message-footer/feedback/index.vue +++ /dev/null @@ -1,118 +0,0 @@ - - - - - diff --git a/ui/src/conversation-panel/components/message-footer/index.vue b/ui/src/conversation-panel/components/message-footer/index.vue index 4ebbd017f44..c67ed3eff7e 100644 --- a/ui/src/conversation-panel/components/message-footer/index.vue +++ b/ui/src/conversation-panel/components/message-footer/index.vue @@ -1,7 +1,9 @@ diff --git a/ui/src/conversation-panel/components/message-list/index.vue b/ui/src/conversation-panel/components/message-list/index.vue index 3b9018dfd9a..9e85763b039 100644 --- a/ui/src/conversation-panel/components/message-list/index.vue +++ b/ui/src/conversation-panel/components/message-list/index.vue @@ -15,7 +15,10 @@ defineProps<{ appName?: string }>() const { appInfo, messages, loading, streamLoading, hasMore, loadMore, onStreamProgress, sendMessage } = useMessageListStore() const { isShared } = useConversationListStore() // 消息内容项(如表单)经此发起续跑;分享时收回发送能力,内容项只读 -provide(SEND_MESSAGE_KEY, computed(() => (isShared.value ? null : sendMessage))) +provide( + SEND_MESSAGE_KEY, + computed(() => (isShared.value ? null : sendMessage)), +) // 分享选择的记录 ID、勾选与提交由分享链接 Store 维护;未提供时(调试等)不进入分享选择。 const shareLink = useShareLinkStoreOptional() const scrollRef = ref>() @@ -66,7 +69,12 @@ const showUserAvatar = computed(() => appInfo.value?.show_user_avatar) - + diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index cfe33d6aa1b..a26038e4b18 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -1331,7 +1331,22 @@ font-size: 14px; } } - +.el-check-tag { + font-weight: 400; + color: var(--el-text-color-primary); + background-color: var(--mk-N900-transparent-10); + &--primary { + &.is-checked, + &.is-checked.is-disabled { + background-color: rgba(var(--mk-primary-rgb) / 20%) !important; + color: var(--el-color-primary-dark-2) !important; + } + &.is-disabled { + background-color: var(--mk-N900-transparent-10) !important; + color: var(--mk-N500) !important; + } + } +} /* textarea */ .el-textarea { --el-input-placeholder-color: var(--mk-N500); diff --git a/ui/src/views/VIEW_README.md b/ui/src/views/VIEW_README.md index d38aed9805d..85a642b2bad 100644 --- a/ui/src/views/VIEW_README.md +++ b/ui/src/views/VIEW_README.md @@ -508,7 +508,14 @@ View 负责路由、资源与模式、图加载、保存/发布/调试编排 ### 对话消息反馈 -`conversation-panel/components/message-footer/feedback/` 维护满意/不满意入口与内联原因面板。 +`conversation-panel/components/message-footer/feedback/` 内的 `ButtonFeedback.vue` 和 `FeedbackCard.vue` +分别维护满意/不满意按钮与内联原因面板,由消息 Footer 管理草稿、提交状态和保存请求, +将按钮组合到操作栏、面板组合到操作栏下方;时间保持在操作栏内。 正式单应用、门户对话通过可选的 `ConversationApiAdapter.feedback` 接入保存,调试端未装配时 不展示入口。反馈提交成功后更新消息记录,失败保留草稿;已评价按钮支持撤销,再评价需先撤销。 -日志消息继续使用独立日志 Footer。 +未评价时展示两个反馈入口,提交成功后仅展示对应的彩色撤销按钮,撤销成功后恢复两个入口。 +反馈面板高度变化时由 Footer 通知消息列表复用底部跟随;用户在底部附近时随展开动画滚动, +已上滑离开底部时保留阅读位置。 +日志消息继续使用独立日志 Footer,`log-message-footer/feedback/` 根据记录的反馈状态只读展示 +对应的彩色禁用按钮,并在操作栏下方通过本地 `FeedbackCard.vue` 展示已保存原因与补充内容。 +原因、输入框和操作按钮全部禁用;未评价时不展示反馈区域,不发起提交或撤销请求。