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:
akumatus
2025-01-09 10:56:24 +00:00
parent c0ed78dc66
commit c2d8c23f13

View File

@@ -80,6 +80,12 @@ export function setupAIProvider(
workspaceId,
docId,
promptName,
}).then(sessionId => {
return updateChatSession({
sessionId,
client,
promptName,
});
}),
promptName,
});