|
@@ -210,7 +210,18 @@ const displayPromptList = computed(() => {
|
|
|
})
|
|
|
const selectPromptId = ref<number | undefined>(undefined)
|
|
|
watch(selectPromptId, (newVal) => {
|
|
|
- inputMessage.value = displayPromptList.value.find((i) => i.id === newVal)?.placeholder ?? ''
|
|
|
+ const placeholder = displayPromptList.value.find((i) => i.id === newVal)?.placeholder
|
|
|
+ if (placeholder === undefined) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ messages.value.push({
|
|
|
+ id: messages.value.length,
|
|
|
+ render_content: placeholder,
|
|
|
+ timestamp: Date.now(),
|
|
|
+ role: 'assistant',
|
|
|
+ content: placeholder
|
|
|
+ })
|
|
|
+ // inputMessage.value = displayPromptList.value.find((i) => i.id === newVal)?.placeholder ?? ''
|
|
|
})
|
|
|
const promptLabel = computed(() => {
|
|
|
if (!loadingPromptList.value && selectPromptId.value === undefined) {
|
|
@@ -933,7 +944,7 @@ const formatFileSize = (bytes: number): string => {
|
|
|
<div
|
|
|
v-for="conv in displayConversations"
|
|
|
:key="conv.session_id"
|
|
|
- @click="editingConversationId !== conv.session_id ? selectConversation(conv.session_id) : () => {}"
|
|
|
+ @click="(editingConversationId !== conv.session_id && !multiDeleteConversationModel.visible) ? selectConversation(conv.session_id) : () => {}"
|
|
|
:class="['conversation-item', { active: activeConversationId === conv.session_id, editing: editingConversationId === conv.session_id }]"
|
|
|
>
|
|
|
<!-- 非编辑状态 -->
|
|
@@ -1210,6 +1221,10 @@ const formatFileSize = (bytes: number): string => {
|
|
|
<el-icon><Close /></el-icon>
|
|
|
</button>
|
|
|
</div>
|
|
|
+ <!-- 无附件时的提示信息 -->
|
|
|
+ <div v-if="selectedFiles.length === 0" class="attachment-hint">
|
|
|
+ <span>点击右侧+上传文件</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
<button class="control-btn add-attachment-btn" @click="open">
|
|
@@ -2075,6 +2090,18 @@ const formatFileSize = (bytes: number): string => {
|
|
|
margin: 5px;
|
|
|
}
|
|
|
|
|
|
+.attachment-hint {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 4px;
|
|
|
+ color: var(--el-text-color-placeholder);
|
|
|
+ font-size: 12px;
|
|
|
+ opacity: 0.8;
|
|
|
+ height: 21.5px;
|
|
|
+ line-height: 1;
|
|
|
+}
|
|
|
+
|
|
|
.remove-attachment-icon {
|
|
|
position: absolute;
|
|
|
top: -5px;
|