|
@@ -160,7 +160,7 @@ let userId = unref(userStore.getUserInfo).id;
|
|
|
type MessageItem = {
|
|
|
id: string; // 唯一标识时间戳
|
|
|
type: 'user' | 'system';
|
|
|
- content: string;
|
|
|
+ content?: string;
|
|
|
content1?: string;
|
|
|
Origintype?: string;
|
|
|
Origintype1?: string;
|
|
@@ -465,15 +465,33 @@ async function sessionsHistory(id: string) {
|
|
|
content: item.content,
|
|
|
timestamp: Date.now(),
|
|
|
});
|
|
|
- } else {
|
|
|
+ } else if (item.role === 'assistant') {
|
|
|
// role== assistant 机器回答
|
|
|
- messageList.value.push({
|
|
|
- id: `system_${Date.now()}`,
|
|
|
- type: 'system',
|
|
|
- content: item.content,
|
|
|
- content1: item.thinking_content,
|
|
|
- timestamp: Date.now(),
|
|
|
- });
|
|
|
+ if (item.thinking_enabled) {
|
|
|
+ messageList.value.push({
|
|
|
+ id: `system_${Date.now()}_thinking`,
|
|
|
+ type: 'system',
|
|
|
+ content: item.thinking_content,
|
|
|
+ Origintype: 'thinking',
|
|
|
+ timestamp: Date.now(),
|
|
|
+ });
|
|
|
+ messageList.value.push({
|
|
|
+ id: `system_${Date.now()}_text`,
|
|
|
+ type: 'system',
|
|
|
+ content1: item.content,
|
|
|
+ Origintype1: 'text',
|
|
|
+ timestamp: Date.now(),
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ messageList.value.push({
|
|
|
+ id: `system_${Date.now()}`,
|
|
|
+ type: 'system',
|
|
|
+ content: item.content,
|
|
|
+ timestamp: Date.now(),
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(item.content);
|
|
|
}
|
|
|
});
|
|
|
}
|