-
-
+
@@ -9,7 +9,7 @@
class="content"
v-if="prologue"
:style="{
- 'padding-right': application.show_user_avatar ? 'var(--padding-left)' : '0'
+ 'padding-right': showUserAvatar ? 'var(--padding-left)' : '0'
}"
>
@@ -27,12 +27,23 @@ import { type chatType } from '@/api/type/application'
import { computed } from 'vue'
import MdRenderer from '@/components/markdown/MdRenderer.vue'
import { t } from '@/locales'
+import useStore from '@/stores'
const props = defineProps<{
application: any
available: boolean
type: 'log' | 'ai-chat' | 'debug-ai-chat'
sendMessage: (question: string, other_params_data?: any, chat?: chatType) => void
}>()
+
+const { user } = useStore()
+
+const showAvatar = computed(() => {
+ return user.isEnterprise() ? props.application.show_avatar : true
+})
+const showUserAvatar = computed(() => {
+ return user.isEnterprise() ? props.application.show_user_avatar : true
+})
+
const toQuickQuestion = (match: string, offset: number, input: string) => {
return `${match.replace('- ', '')} `
}
diff --git a/ui/src/components/ai-chat/component/question-content/index.vue b/ui/src/components/ai-chat/component/question-content/index.vue
index 20d518a18..9cb1dfdd3 100644
--- a/ui/src/components/ai-chat/component/question-content/index.vue
+++ b/ui/src/components/ai-chat/component/question-content/index.vue
@@ -63,7 +63,7 @@
{{ chatRecord.problem_text }}
+
()
+
+const { user } = useStore()
+
+const showAvatar = computed(() => {
+ return user.isEnterprise() ? props.application.show_user_avatar : true
+})
const document_list = computed(() => {
if (props.chatRecord?.upload_meta) {
return props.chatRecord.upload_meta?.document_list || []
diff --git a/ui/src/workflow/nodes/condition-node/index.vue b/ui/src/workflow/nodes/condition-node/index.vue
index 2108915a0..c76844bef 100644
--- a/ui/src/workflow/nodes/condition-node/index.vue
+++ b/ui/src/workflow/nodes/condition-node/index.vue
@@ -23,7 +23,9 @@
v-resize="(wh: any) => resizeCondition(wh, item, index)"
shadow="never"
class="drag-card card-never mb-8"
- :class="{ 'no-drag': index === form_data.branch.length - 1 }"
+ :class="{
+ 'no-drag': index === form_data.branch.length - 1 || form_data.branch.length === 2
+ }"
style="--el-card-padding: 12px"
>
@@ -245,7 +247,12 @@ function onEnd(event?: any) {
const { oldIndex, newIndex, clonedData } = event
if (oldIndex === undefined || newIndex === undefined) return
const list = cloneDeep(props.nodeModel.properties.node_data.branch)
-
+ if (oldIndex === list.length - 1 || newIndex === list.length - 1) {
+ list[newIndex] = list[oldIndex]
+ list[oldIndex] = clonedData
+ set(props.nodeModel.properties.node_data, 'branch', list)
+ return
+ }
list[newIndex].type = list[oldIndex].type
list[oldIndex].type = clonedData.type // 恢复原始 type
set(props.nodeModel.properties.node_data, 'branch', list)