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

Add URI debug logging of continue on comments #194792

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/vs/workbench/contrib/comments/browser/commentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { COMMENTS_SECTION, ICommentsConfiguration } from 'vs/workbench/contrib/c
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { CommentContextKeys } from 'vs/workbench/contrib/comments/common/commentContextKeys';
import { ILogService } from 'vs/platform/log/common/log';

export const ICommentService = createDecorator<ICommentService>('commentService');

Expand Down Expand Up @@ -164,7 +165,8 @@ export class CommentService extends Disposable implements ICommentService {
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
@IConfigurationService private readonly configurationService: IConfigurationService,
@IContextKeyService contextKeyService: IContextKeyService,
@IStorageService private readonly storageService: IStorageService
@IStorageService private readonly storageService: IStorageService,
@ILogService private readonly logService: ILogService
) {
super();
this._handleConfiguration();
Expand All @@ -183,6 +185,7 @@ export class CommentService extends Disposable implements ICommentService {
if (!commentsToRestore) {
return;
}
this.logService.debug(`Comments: URIs of continue on comments from storage ${commentsToRestore.map(thread => thread.uri.toString()).join(', ')}.`);
const changedOwners = this._addContinueOnComments(commentsToRestore);
for (const owner of changedOwners) {
const evt: ICommentThreadChangedEvent = {
Expand Down Expand Up @@ -417,6 +420,7 @@ export class CommentService extends Disposable implements ICommentService {
for (const pendingComments of this._continueOnComments.values()) {
commentsToSave.push(...pendingComments);
}
this.logService.debug(`Comments: URIs of continue on comments to add to storage ${commentsToSave.map(thread => thread.uri.toString()).join(', ')}.`);
this.storageService.store(CONTINUE_ON_COMMENTS, commentsToSave, StorageScope.WORKSPACE, StorageTarget.USER);
}

Expand Down