Skip to content

Commit 209b6d2

Browse files
committed
minor fix
Signed-off-by: Yongbozzz <yongbo.zhu@intel.com>
1 parent f865750 commit 209b6d2

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

EdgeCraftRAG/ui/vue/src/views/chatbot/components/Chatbot/MessageItem.vue

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<div v-html="renderedMarkdown"></div>
5858
<div v-if="!inResponse" class="footer-btn">
5959
<a-tooltip placement="top" :title="$t('common.copy')">
60-
<span class="icon-style" @click="handleCopy()">
60+
<span class="icon-style" @click="handleCopyResponses()">
6161
<CopyOutlined /></span
6262
></a-tooltip>
6363
<a-tooltip
@@ -111,7 +111,12 @@
111111
<a-button shape="round" @click="handleCancel">
112112
{{ $t("common.cancel") }}
113113
</a-button>
114-
<a-button type="primary" shape="round" @click="handleSend">
114+
<a-button
115+
type="primary"
116+
shape="round"
117+
@click="handleSend"
118+
:disabled="!queryInput"
119+
>
115120
{{ $t("common.send") }}
116121
</a-button>
117122
</div>
@@ -142,7 +147,7 @@
142147
{{ message.content }}
143148
<div class="footer-btn">
144149
<a-tooltip placement="top" :title="$t('common.copy')">
145-
<span class="icon-style" @click="handleCopy()">
150+
<span class="icon-style" @click="handleCopyQuery()">
146151
<CopyOutlined /></span
147152
></a-tooltip>
148153
<a-tooltip
@@ -292,16 +297,21 @@ const handleRegenerate = () => {
292297
if (!query) return;
293298
emit("regenerate", query);
294299
};
295-
const handleCopy = async () => {
300+
const handleCopyQuery = async () => {
301+
await copy(queryInput.value);
302+
};
303+
const handleCopyResponses = async () => {
296304
await copy(readResponse.value);
297305
};
298306
const handleEdit = () => {
307+
queryInput.value = props.message.content;
299308
editState.value = true;
300309
};
301310
const handleCancel = () => {
302311
editState.value = false;
303312
};
304313
const handleSend = () => {
314+
if (!queryInput.value) return;
305315
emit("resend", { index: props.messageIndex, query: queryInput.value });
306316
handleCancel();
307317
};
@@ -422,7 +432,7 @@ watch(
422432
z-index: 20;
423433
opacity: 0;
424434
visibility: hidden;
425-
transition: opacity 0.3s ease, visibility 0s linear 2s; /* 关键:延迟 visibility 变化 */
435+
transition: opacity 0.3s ease, visibility 0s linear 2s;
426436
gap: 8px;
427437
.anticon {
428438
cursor: pointer;

EdgeCraftRAG/ui/vue/src/views/chatbot/components/KnowledgeBase/KnowledgeDetail.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
v-model:value="uploadedCount"
3535
:min="0"
3636
:max="totalFiles"
37+
disabled
3738
/><span
3839
>{{ uploadedCount }}/{{ totalFiles }}
3940
<span class="pl-8">
@@ -315,10 +316,12 @@ onMounted(() => {
315316
.intel-slider-track {
316317
height: 8px;
317318
border-radius: 4px;
318-
background-color: var(--color-primary-tip);
319+
background-color: var(--color-primary-tip) !important;
319320
}
320321
.intel-slider-handle::after {
321322
top: 1px;
323+
background-color: var(--color-primary-tip) !important;
324+
box-shadow: 0 0 0 2px var(--color-primary-second) !important;
322325
}
323326
}
324327
}

0 commit comments

Comments
 (0)