update conversation ui

This commit is contained in:
AceDataCloud committed 2023-12-12 00:47:32 +08:00
1 parent 297dd3ef2f
commit b98f8de879
8 files changed
+108 -29

No files matched your search

+4 -2
View File
@@ -122,7 +122,7 @@ export default defineComponent({
await this.onFetchAnswer();
},
async onFetchHistory(id?: string) {
const { data: data } = await chatOperator.conversation(id || this.conversationId);
const { data: data } = await chatOperator.getConversation(id || this.conversationId);
this.messages = data.messages || [];
},
async onFetchAnswer() {
@@ -141,7 +141,7 @@ export default defineComponent({
});
// request server to get answer
chatOperator
.ask(
.askQuestion(
{
question,
conversation_id: this.conversationId,
@@ -231,6 +231,8 @@ export default defineComponent({
.dialogue {
flex: 1;
overflow-y: scroll;
margin: 20px 0;
.messages {
padding-top: 30px;
.message {
+7
View File
@@ -27,6 +27,9 @@ import {
} from '@/operators/chat/constants';
interface IData {
model: string;
drawer: boolean;
question: string;
initializing: boolean;
applications: IApplication[];
}
@@ -108,6 +111,10 @@ export default defineComponent({
font-size: 14px;
margin-bottom: 15px;
}
.el-button {
border-radius: 20px;
}
}
}
}