diff --git a/src/api/ai/writer/index.ts b/src/api/ai/writer/index.ts index 01664b3d..57c23b4f 100644 --- a/src/api/ai/writer/index.ts +++ b/src/api/ai/writer/index.ts @@ -3,7 +3,9 @@ import { fetchEventSource } from '@microsoft/fetch-event-source' import { getAccessToken } from '@/utils/auth' import { config } from '@/config/axios/config' +// TODO @hhhero:可以改成 WriteVO 哈,主要是保持一致 export interface WriteParams { + // TODO @hhhero:注释。每个属性的后面哈。会更简洁一点 /** * 1:撰写 2:回复 */ @@ -33,6 +35,7 @@ export interface WriteParams { */ language: number } + export const writeStream = ({ data, onClose, @@ -46,7 +49,6 @@ export const writeStream = ({ onClose?: (...args: any[]) => void ctrl: AbortController }) => { - // return request.post({ url: '/ai/write/generate-stream', data }) const token = getAccessToken() return fetchEventSource(`${config.base_url}/ai/write/generate-stream`, { method: 'post', diff --git a/src/views/ai/chat/index/components/conversation/ConversationList.vue b/src/views/ai/chat/index/components/conversation/ConversationList.vue index 911f0fbb..6a7e32fa 100644 --- a/src/views/ai/chat/index/components/conversation/ConversationList.vue +++ b/src/views/ai/chat/index/components/conversation/ConversationList.vue @@ -226,7 +226,7 @@ const conversationTimeGroup = async (list: ChatConversationVO[]) => { const threeDays = 3 * oneDay const sevenDays = 7 * oneDay const thirtyDays = 30 * oneDay - for (const conversation: ChatConversationVO of list) { + for (const conversation of list) { // 置顶 if (conversation.pinned) { groupMap['置顶'].push(conversation) @@ -247,7 +247,6 @@ const conversationTimeGroup = async (list: ChatConversationVO[]) => { groupMap['三十天前'].push(conversation) } } - console.log('----groupMap', groupMap) return groupMap } diff --git a/src/views/ai/writer/components/Left.vue b/src/views/ai/writer/components/Left.vue index af808b15..0369d9df 100644 --- a/src/views/ai/writer/components/Left.vue +++ b/src/views/ai/writer/components/Left.vue @@ -1,5 +1,5 @@ diff --git a/src/views/ai/writer/components/Right.vue b/src/views/ai/writer/components/Right.vue index 30b74cdc..94140011 100644 --- a/src/views/ai/writer/components/Right.vue +++ b/src/views/ai/writer/components/Right.vue @@ -35,52 +35,52 @@ diff --git a/src/views/ai/writer/components/Tag.vue b/src/views/ai/writer/components/Tag.vue index 4a32e572..d496b517 100644 --- a/src/views/ai/writer/components/Tag.vue +++ b/src/views/ai/writer/components/Tag.vue @@ -13,20 +13,19 @@ - diff --git a/src/views/ai/writer/index.vue b/src/views/ai/writer/index.vue index 8875830f..27276431 100644 --- a/src/views/ai/writer/index.vue +++ b/src/views/ai/writer/index.vue @@ -1,61 +1,67 @@ +