We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76ef79f commit 52111acCopy full SHA for 52111ac
1 file changed
packages/ai-native/src/browser/widget/inline-stream-diff/live-preview.decoration.tsx
@@ -326,11 +326,15 @@ export class LivePreviewDiffDecorationModel extends Disposable {
326
let modifyContent: string;
327
const removeContent = removedWidget?.getRemovedTextLines().join('\n') || '';
328
const range = addedDec?.getRange();
329
- if (range) {
330
- modifyContent = model.getValueInRange({
331
- ...range,
332
- endColumn: model.getLineMaxColumn(range.endLineNumber),
333
- });
+ try {
+ if (range) {
+ modifyContent = model.getValueInRange({
+ ...range,
+ endColumn: model.getLineMaxColumn(range.endLineNumber),
334
+ });
335
+ }
336
+ } catch (error) {
337
+ modifyContent = '';
338
}
339
const discard = (decorationModel: LivePreviewDiffDecorationModel) => {
340
// 只有点击行丢弃时才会上报
0 commit comments