mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat(core): support fork session without latestMessageId (#12587)
Close [AI-86](https://linear.app/affine-design/issue/AI-86) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved chat session forking to allow creating a fork without specifying the latest message, enabling more flexible session management. - **Bug Fixes** - Forking a chat session with an invalid latest message ID now correctly returns an error. - **Tests** - Added and updated test cases to cover session forking with missing or invalid latest message IDs, ensuring robust behavior in these scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -57,7 +57,7 @@ export async function forkCopilotSession(
|
||||
workspaceId: string,
|
||||
docId: string,
|
||||
sessionId: string,
|
||||
latestMessageId: string
|
||||
latestMessageId?: string
|
||||
): Promise<string> {
|
||||
const res = await app.gql(
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user