mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-20 21:30:28 +08:00
fix: 修复 AI 会话链路与前端 type-check 错误
This commit is contained in:
@@ -419,7 +419,7 @@ export const aiApi = {
|
||||
/**
|
||||
* 创建 AI 对话
|
||||
*/
|
||||
createConversation: (sessionId: string, title?: string, assistantId: string): Promise<AIConversation> => {
|
||||
createConversation: (sessionId: string, title: string | undefined, assistantId: string): Promise<AIConversation> => {
|
||||
return ipcRenderer.invoke('ai:createConversation', sessionId, title, assistantId)
|
||||
},
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -358,7 +358,7 @@ interface AiApi {
|
||||
senderId?: number,
|
||||
keywords?: string[]
|
||||
) => Promise<{ messages: SearchMessageResult[]; hasMore: boolean }>
|
||||
createConversation: (sessionId: string, title?: string, assistantId: string) => Promise<AIConversation>
|
||||
createConversation: (sessionId: string, title: string | undefined, assistantId: string) => Promise<AIConversation>
|
||||
getConversations: (sessionId: string) => Promise<AIConversation[]>
|
||||
getConversation: (conversationId: string) => Promise<AIConversation | null>
|
||||
updateConversationTitle: (conversationId: string, title: string) => Promise<boolean>
|
||||
|
||||
@@ -11,6 +11,9 @@ import { chatApi, mergeApi } from './apis/chat'
|
||||
import { aiApi, llmApi, agentApi, embeddingApi, assistantApi, skillApi } from './apis/ai'
|
||||
import { nlpApi, networkApi, cacheApi, sessionApi } from './apis/utils'
|
||||
|
||||
// 为渲染进程提供统一的类型入口,避免 type-only import 指向无导出的运行时代码。
|
||||
export type { PreprocessConfig, EmbeddingServiceConfig, EmbeddingServiceConfigDisplay } from './apis/ai'
|
||||
|
||||
// Use `contextBridge` APIs to expose Electron APIs to
|
||||
// renderer only if context isolation is enabled, otherwise
|
||||
// just add to the DOM global.
|
||||
|
||||
Reference in New Issue
Block a user