Skip to content
Merged
Show file tree
Hide file tree
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 @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import './agentFeedbackEditorInputContribution.js';
import { AGENTS_WINDOW_PR_COMMENTS_SETTING } from './agentFeedbackEditorInputContribution.js';
import './agentFeedbackEditorWidgetContribution.js';
import './agentFeedbackOverviewRulerContribution.js';
import { Event } from '../../../../base/common/event.js';
Expand All @@ -29,6 +29,8 @@ import { IChatAttachmentWidgetRegistry } from '../../../../workbench/contrib/cha
import { IAgentFeedbackVariableEntry } from '../../../../workbench/contrib/chat/common/attachments/chatVariableEntries.js';
import { Codicon } from '../../../../base/common/codicons.js';
import { ISessionsService } from '../../../services/sessions/browser/sessionsService.js';
import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
/**
* Sets the `hasActiveSessionAgentFeedback` context key to true when the
* currently active session has pending agent feedback items.
Expand Down Expand Up @@ -90,6 +92,20 @@ registerAgentFeedbackReviewCommands();

registerSingleton(IAgentFeedbackService, AgentFeedbackService, InstantiationType.Delayed);

Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
id: 'chat',
properties: {
[AGENTS_WINDOW_PR_COMMENTS_SETTING]: {
type: 'boolean',
default: false,
scope: ConfigurationScope.APPLICATION,
tags: ['experimental'],
experiment: { mode: 'auto' },
description: localize('chat.experimental.agentsWindowPRComments', "Enables the PR Comment option when adding feedback in the Agents Window."),
},
},
});

// Register the custom attachment widget for agentFeedback attachments
class AgentFeedbackAttachmentWidgetContribution {
static readonly ID = 'workbench.contrib.agentFeedbackAttachmentWidgetFactory';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { IEditorService } from '../../../../workbench/services/editor/common/edi
import { GroupsOrder, IEditorGroupsService } from '../../../../workbench/services/editor/common/editorGroupsService.js';
import { ChatContextKeys } from '../../../../workbench/contrib/chat/common/actions/chatContextKeys.js';
import { CHAT_CATEGORY } from '../../../../workbench/contrib/chat/browser/actions/chatActions.js';
import { AgentFeedbackState, IAgentFeedbackService } from './agentFeedbackService.js';
import { AgentFeedbackState, IAgentFeedbackService, shouldIncludeRawPRReviewComments } from './agentFeedbackService.js';
import { getActiveResourceCandidates, getFeedbackSessionCandidates } from './agentFeedbackEditorUtils.js';
import { Menus } from '../../../browser/menus.js';
import { ICodeReviewService } from '../../codeReview/browser/codeReviewService.js';
Expand Down Expand Up @@ -62,6 +62,7 @@ abstract class AgentFeedbackEditorAction extends Action2 {
agentFeedbackService.getFeedback(sessionResource),
codeReviewService.getPRReviewState(sessionResource).get(),
agentFeedbackService.getVisibleResolvedFeedbackIds(sessionResource),
shouldIncludeRawPRReviewComments(agentFeedbackService, sessionResource),
);
if (comments.length > 0) {
return this.runWithSession(accessor, sessionResource, resource);
Expand Down Expand Up @@ -133,6 +134,7 @@ class NavigateFeedbackAction extends AgentFeedbackEditorAction {
agentFeedbackService.getFeedback(sessionResource),
codeReviewService.getPRReviewState(sessionResource).get(),
agentFeedbackService.getVisibleResolvedFeedbackIds(sessionResource),
shouldIncludeRawPRReviewComments(agentFeedbackService, sessionResource),
);

const comment = agentFeedbackService.getNextNavigableItem(sessionResource, comments, this._next);
Expand Down
Loading