Skip to content

Commit

Permalink
update conv
Browse files Browse the repository at this point in the history
  • Loading branch information
Germey committed Dec 12, 2023
1 parent 66291b8 commit 4e19567
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/layouts/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

<script lang="ts">
import { defineComponent } from 'vue';
import { ElContainer, ElMain } from 'element-plus';
import Navigator from '@/components/common/Navigator.vue';
export default defineComponent({
Expand Down
8 changes: 3 additions & 5 deletions src/pages/chat/Conversation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<div class="dialogue">
<introduction v-if="messages && messages.length === 0" />
<div v-else class="messages">
<div v-for="(message, messageIndex) in messages" :key="messageIndex">
<message :message="message" class="message" />
</div>
<message v-for="(message, messageIndex) in messages" :key="messageIndex" :message="message" class="message" />
</div>
</div>
<div class="bottom">
Expand All @@ -20,6 +18,7 @@
</template>

<script lang="ts">
import axios from 'axios';
import { defineComponent } from 'vue';
import Message from '@/components/chat/Message.vue';
import {
Expand All @@ -41,7 +40,6 @@ import {
import InputBox from '@/components/chat/InputBox.vue';
import ModelSelector from '@/components/chat/ModelSelector.vue';
import { ERROR_CODE_CANCELED, ERROR_CODE_UNKNOWN } from '@/constants/errorCode';
import axios from 'axios';
import ApiStatus from '@/components/common/ApiStatus.vue';
import { ROUTE_CHAT_CONVERSATION, ROUTE_CHAT_CONVERSATION_NEW } from '@/router';
import Sidebar from '@/components/chat/Sidebar.vue';
Expand Down Expand Up @@ -129,7 +127,7 @@ export default defineComponent({
const token = this.application?.credential?.token;
const endpoint = this.application?.api?.endpoint;
const path = this.application?.api?.path;
const question = this.messages[this.messages.length - 1].content;
const question = this.messages[this.messages.length - 1].content?.trim();
if (!token || !endpoint || !question || !path) {
console.error('no token or endpoint or question');
return;
Expand Down

0 comments on commit 4e19567

Please sign in to comment.