mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): update chat session after session created or reused (#9613)
For an existing AI chat session, the prompt will not be updated when the front-end calls the `createChatSession` gql interface. Thus update it manually here. In the future, the architecture needs to be adjusted to support multiple LLM model calls in one chat session.
This commit is contained in:
@@ -80,6 +80,12 @@ export function setupAIProvider(
|
||||
workspaceId,
|
||||
docId,
|
||||
promptName,
|
||||
}).then(sessionId => {
|
||||
return updateChatSession({
|
||||
sessionId,
|
||||
client,
|
||||
promptName,
|
||||
});
|
||||
}),
|
||||
promptName,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user