Skip to content

Commit

Permalink
Cleanup chat file api (#472)
Browse files Browse the repository at this point in the history
* update

* update
  • Loading branch information
swuecho authored Jun 9, 2024
1 parent 53c6c72 commit edf1f58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion web/src/api/chat_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const baseURL = import.meta.env.VITE_GLOB_API_URL

export async function getChatFilesList(uuid: string) {
try {
if (!uuid) return []
const response = await request.get(`/chat_file/${uuid}/list`)
return response.data.map((item: any) => {
return {
Expand Down
11 changes: 6 additions & 5 deletions web/src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed, onMounted, onUnmounted, ref } from 'vue'
import { v4 as uuidv4 } from 'uuid'
import { useRoute } from 'vue-router'
import { NAutoComplete, NButton, NInput, NModal, useDialog, useMessage} from 'naive-ui'
import { NAutoComplete, NButton, NInput, NModal, useDialog, useMessage } from 'naive-ui'
import { storeToRefs } from 'pinia'
import html2canvas from 'html2canvas'
import { type OnSelect } from 'naive-ui/es/auto-complete/src/interface'
Expand Down Expand Up @@ -530,18 +530,19 @@ function getDataFromResponseText(responseText: string): string {
<template>
<div class="flex flex-col w-full h-full">
<div>

<UploadModal :sessionUuid="sessionUuid" :showUploadModal="showUploadModal" @update:showUploadModal="showUploadModal = $event" />
<UploadModal :sessionUuid="sessionUuid" :showUploadModal="showUploadModal"
@update:showUploadModal="showUploadModal = $event" />
</div>
<HeaderComponent v-if="isMobile" @export="handleExport" @snapshot="handleSnapshot" @toggle="showModal = true" />
<main class="flex-1 overflow-hidden">
<NModal ref="sessionConfigModal" v-model:show="showModal" :title="$t('chat.sessionConfig')" preset="dialog">
<SessionConfig id="session-config" ref="sessionConfig" :uuid="sessionUuid" />
</NModal>
<div class="flex items-center justify-center mt-4 ">
{{ chatSession?.model}}
{{ chatSession?.model }}
</div>
<UploaderReadOnly v-if="!!sessionUuid" class="px-40" :sessionUuid="sessionUuid" :showUploaderButton="false"></UploaderReadOnly>
<UploaderReadOnly v-if="!!sessionUuid" class="px-40" :sessionUuid="sessionUuid" :showUploaderButton="false">
</UploaderReadOnly>
<div id="scrollRef" ref="scrollRef" class="h-full overflow-hidden overflow-y-auto">
<div id="image-wrapper" class="w-full max-w-screen-xl m-auto dark:bg-[#101014]"
:class="[isMobile ? 'p-2' : 'p-4']">
Expand Down

0 comments on commit edf1f58

Please sign in to comment.