@@ -199,8 +206,18 @@ onMounted(() => {
-
-
+
+
+
+
+
+
+
+
+
+
+ 复制内容
+
@@ -241,7 +258,7 @@ onMounted(() => {
:positive-button-props="{ type: 'error' }"
positive-text="清除"
negative-text="取消"
- @positive-click="chatStore.clearHistoryMessages"
+ @positive-click="chatStore.clearHistoryMessages('chat')"
@negative-click="() => {}"
>
diff --git a/web/src/views/VoiceView.vue b/web/src/views/VoiceView.vue
index 3d3ee1d..2a880e4 100644
--- a/web/src/views/VoiceView.vue
+++ b/web/src/views/VoiceView.vue
@@ -23,6 +23,11 @@ const collapseActive = ref(
historyMessages.value.map((msg, idx) => String(msg.id ?? idx))
);
+// 过滤出type为voice的聊天消息
+const filteredMessages = computed(() =>
+ historyMessages.value.filter((msg) => msg.type === "voice")
+);
+
const getName = (msg: Message, idx: number) => String(msg.id ?? idx);
// TODO: bugfix: 未能正确展开
@@ -135,7 +140,7 @@ onMounted(() => {
@@ -217,7 +222,7 @@ onMounted(() => {
:positive-button-props="{ type: 'error' }"
positive-text="清除"
negative-text="取消"
- @positive-click="chatStore.clearHistoryMessages"
+ @positive-click="chatStore.clearHistoryMessages('voice')"
@negative-click="() => {}"
>