chore: request.js 导出 API_BASE_URL 和 getAuthHeader
This commit is contained in:
@@ -148,7 +148,9 @@ export const transformToFrontendFormat = (backendData) => {
|
||||
plotJson,
|
||||
isSelected,
|
||||
createTime,
|
||||
updateTime
|
||||
updateTime,
|
||||
conversationId,
|
||||
currentVersionMessageId
|
||||
} = backendData
|
||||
|
||||
let content = ''
|
||||
@@ -182,11 +184,12 @@ export const transformToFrontendFormat = (backendData) => {
|
||||
date: createTime ? String(createTime).slice(0, 10) : new Date().toLocaleDateString(),
|
||||
mode: plotJson?.mode || 'custom',
|
||||
prompt: plotJson?.prompt || '',
|
||||
conversationId: plotJson?.conversationId || '',
|
||||
conversationId: conversationId || plotJson?.conversationId || '',
|
||||
parentScriptId: plotJson?.parentScriptId || '',
|
||||
revisionIndex: plotJson?.currentRevisionIndex || plotJson?.revisionIndex || 0,
|
||||
revisionOf: plotJson?.revisionOf || '',
|
||||
wordCount: content ? content.length : 0
|
||||
wordCount: content ? content.length : 0,
|
||||
currentVersionMessageId: currentVersionMessageId || ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user