fix(core): in page mode, AI replace selection did not correctly replace the selected text (#9179)

Fix issue [BS-1980](https://linear.app/affine-design/issue/BS-1980).
This commit is contained in:
akumatus
2024-12-17 02:22:48 +00:00
parent b36b398957
commit 563da3b6f4

View File

@@ -105,6 +105,7 @@ export const replace = async (
);
if (textSelection) {
host.std.command.exec('deleteText', { textSelection });
const { snapshot, job } = await markdownToSnapshot(content, host);
await job.snapshotToSlice(
snapshot,