Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Inline input rendering error with a single stream chunk. #4348

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,14 @@ export class InlineInputController extends BaseAIMonacoEditorController {
}),
]);

chatResponse.listen();

const diffPreviewer = this.inlineDiffController.showPreviewerByStream(monacoEditor, {
crossSelection: decorationSelection,
chatResponse,
});

diffPreviewer.mount(inlineInputWidget);

chatResponse.listen();
Comment on lines +526 to +527
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

修复了单个数据流块的渲染问题

通过在挂载 diff previewer 后立即调用 chatResponse.listen(),确保了聊天响应流的正确初始化和监听,从而解决了单个数据流块的渲染异常问题。

}
} else {
decorationsCollection.clear();
Expand Down
Loading