diff --git a/backend/apps/chat/task/llm.py b/backend/apps/chat/task/llm.py index e4357989..e5ee344f 100644 --- a/backend/apps/chat/task/llm.py +++ b/backend/apps/chat/task/llm.py @@ -630,7 +630,8 @@ def run_task(llm_service: LLMService, in_chat: bool = True): brief = rename_chat(session=llm_service.session, rename_object=RenameChat(id=llm_service.get_record().chat_id, brief=llm_service.chat_question.question.strip()[:20])) - yield orjson.dumps({'type': 'brief', 'brief': brief}).decode() + '\n\n' + if in_chat: + yield orjson.dumps({'type': 'brief', 'brief': brief}).decode() + '\n\n' # select datasource if datasource is none if not llm_service.ds: diff --git a/frontend/src/assets/svg/icon_new_chat_outlined.svg b/frontend/src/assets/svg/icon_new_chat_outlined.svg new file mode 100644 index 00000000..c1ff4c6f --- /dev/null +++ b/frontend/src/assets/svg/icon_new_chat_outlined.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 3215fea2..8e3d6560 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -48,7 +48,7 @@ "chart_selected": "Selected {0}" }, "qa": { - "New Conversation": "New Conversation", + "new_chat": "New Chat", "title": "Smart Query", "placeholder": "Enter your question", "ask": "Ask", @@ -243,4 +243,4 @@ "back_community": "Restore to Community Edition", "confirm_tips": "Are you sure to restore to Community Edition?" } -} \ No newline at end of file +} diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index db07ccb3..56fb28da 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -51,7 +51,7 @@ "chart_selected": "已选{0}" }, "qa": { - "New Conversation": "开启新问数", + "new_chat": "新建对话", "title": "智能问数", "placeholder": "请输入您的问题", "ask": "提问", @@ -65,7 +65,12 @@ "view_more": "查看更多", "selected_datasource": "已选择数据源", "empty_datasource": "数据源为空,请新建后再开启智能问数!", - "datasource_not_exist": "数据源不存在" + "datasource_not_exist": "数据源不存在", + "guess_u_ask": "猜你想问:", + "continue_to_ask": "继续提问:", + "data_analysis": "数据预测", + "data_predict": "数据分析", + "chat_search": "搜索" }, "ds": { "title": "数据源", diff --git a/frontend/src/views/chat/ChatListContainer.vue b/frontend/src/views/chat/ChatListContainer.vue new file mode 100644 index 00000000..af3aca6f --- /dev/null +++ b/frontend/src/views/chat/ChatListContainer.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/frontend/src/views/chat/ChatRecordFirst.vue b/frontend/src/views/chat/ChatRecordFirst.vue index 84839537..db8dba60 100644 --- a/frontend/src/views/chat/ChatRecordFirst.vue +++ b/frontend/src/views/chat/ChatRecordFirst.vue @@ -1,10 +1,7 @@ diff --git a/frontend/src/views/chat/RecommendQuestion.vue b/frontend/src/views/chat/RecommendQuestion.vue index 9f3345cf..c8c19cfd 100644 --- a/frontend/src/views/chat/RecommendQuestion.vue +++ b/frontend/src/views/chat/RecommendQuestion.vue @@ -1,13 +1,16 @@ + + + + diff --git a/frontend/src/views/chat/index.vue b/frontend/src/views/chat/index.vue index 92706ceb..c363a12e 100644 --- a/frontend/src/views/chat/index.vue +++ b/frontend/src/views/chat/index.vue @@ -1,36 +1,51 @@