Skip to content

Commit 89f1a2d

Browse files
committed
fix(comment): show reply button correctly.
1 parent 2ed73ee commit 89f1a2d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104
{
105105
"command": "codingPlugin.diff.createComment",
106106
"group": "inline",
107-
"when": "commentController == mrDiffComment && commentThreadIsEmpty"
107+
"when": "commentThreadIsEmpty"
108108
},
109109
{
110110
"command": "codingPlugin.diff.replyComment",
111111
"group": "inline",
112-
"when": "commentController == mrDiffComment && !commentThreadIsEmpty"
112+
"when": "!commentThreadIsEmpty"
113113
}
114114
],
115115
"comments/comment/title": [

src/extension.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ import {
1515
} from 'src/typings/commonTypes';
1616
import { GitService } from 'src/common/gitService';
1717
import { MRUriScheme } from 'src/common/contants';
18-
import { IDiffComment, IMRData, IFileDiffParam, IDiffFile } from 'src/typings/respResult';
18+
import { IDiffComment, IMRData, IDiffFile } from 'src/typings/respResult';
1919
import { replyNote, ReviewComment, makeCommentRangeProvider } from 'src/reviewCommentController';
20-
import { getDiffLineNumber, isHunkLine } from 'src/common/utils';
2120

2221
export async function activate(context: vscode.ExtensionContext) {
2322
await GitService.init();
@@ -226,7 +225,6 @@ export async function activate(context: vscode.ExtensionContext) {
226225
);
227226

228227
const cacheId = `${mr.iid}/${file.path}`;
229-
// cachedCommentControllers[cacheId]?.dispose();
230228
cachedCommentThreads[cacheId]?.forEach((c) => {
231229
c?.dispose();
232230
});

src/reviewCommentController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as vscode from 'vscode';
22

3-
import { ISessionData, IDiffFileData, ICachedCommentThreads } from 'src/typings/commonTypes';
3+
import { ISessionData, IDiffFileData } from 'src/typings/commonTypes';
44
import { EmptyUserAvatar, MRUriScheme } from 'src/common/contants';
55
import { CodingServer } from 'src/codingServer';
6-
import { IDiffComment, IMRData, IFileDiffParam, IDiffFile } from 'src/typings/respResult';
6+
import { IFileDiffParam } from 'src/typings/respResult';
77
import { getDiffLineNumber, isHunkLine } from 'src/common/utils';
88

99
let commentIdx = 0;

0 commit comments

Comments
 (0)