Skip to content

Commit 401ca0f

Browse files
committed
fix mock
1 parent d6a5d2e commit 401ca0f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/www/src/registry/components/editor/use-chat.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ const fakeStreamText = ({
221221

222222
if (sample === 'comment') {
223223
const commentChunks = createCommentChunks(editor);
224+
console.log('🚀 ~ fakeStreamText ~ commentChunks:', commentChunks);
224225
return commentChunks;
225226
}
226227

@@ -1502,7 +1503,7 @@ const createCommentChunks = (editor: PlateEditor) => {
15021503
return [
15031504
{
15041505
delay: faker.number.int({ max: 500, min: 200 }),
1505-
texts: `{"id":"${nanoid()}","data":{"blockId":"${block.id}","comment":"${faker.lorem.sentence()}","content":"${content}"},"type":"data-comment"}`,
1506+
texts: `{"id":"${nanoid()}","data":{"comment":{"blockId":"${block.id}","comment":"${faker.lorem.sentence()}","content":"${content}"},"status":"${index === indexes.length - 1 ? 'finished' : 'streaming'}"},"type":"data-comment"}`,
15061507
},
15071508
];
15081509
})

0 commit comments

Comments
 (0)