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
4 changes: 4 additions & 0 deletions build/lib/i18n.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@
{
"name": "vs/sessions/contrib/welcome",
"project": "vscode-sessions"
},
{
"name": "vs/sessions/contrib/chatDebug",
"project": "vscode-sessions"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -1217,9 +1217,9 @@ export default class TypeScriptServiceClient extends Disposable implements IType
/* __GDPR__
"typingsInstalled" : {
"owner": "mjbvz",
"installedPackages" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"installSuccess": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"typingsInstallerVersion": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"installedPackages": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"installSuccess": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"typingsInstallerVersion": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${TypeScriptCommonProperties}"
]
Expand Down
1 change: 1 addition & 0 deletions src/vs/base/browser/ui/button/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
border: 1px solid var(--vscode-button-border, transparent);
border-left-width: 0 !important;
border-radius: 0 4px 4px 0;
padding: 0 4px;
display: flex;
align-items: center;
}
Expand Down
17 changes: 12 additions & 5 deletions src/vs/platform/actionWidget/browser/actionList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ export class ActionListWidget<T> extends Disposable {
private readonly _submenuContainer: HTMLElement;
private _submenuHideTimeout: ReturnType<typeof setTimeout> | undefined;
private _currentSubmenuWidget: ActionListWidget<IAction> | undefined;
private _currentSubmenuElement: IActionListItem<T> | undefined;

private readonly _collapsedSections = new Set<string>();
private _filterText = '';
Expand Down Expand Up @@ -1142,6 +1143,9 @@ export class ActionListWidget<T> extends Disposable {
}

private _showHoverForElement(element: IActionListItem<T>, index: number): void {
if (this._currentSubmenuElement === element) {
return;
}
this._submenuDisposables.clear();

const rowElement = this._getRowElement(index);
Expand Down Expand Up @@ -1186,6 +1190,7 @@ export class ActionListWidget<T> extends Disposable {
private _showSubmenuForElement(element: IActionListItem<T>, indicator: HTMLElement): void {
this._submenuDisposables.clear();
this._hover.clear();
this._currentSubmenuElement = element;
dom.clearNode(this._submenuContainer);

// Convert submenu actions into ActionListWidget items
Expand Down Expand Up @@ -1292,6 +1297,7 @@ export class ActionListWidget<T> extends Disposable {
this._cancelSubmenuHide();
this._submenuDisposables.clear();
this._currentSubmenuWidget = undefined;
this._currentSubmenuElement = undefined;
dom.clearNode(this._submenuContainer);
this._submenuContainer.style.display = 'none';
}
Expand Down Expand Up @@ -1331,9 +1337,13 @@ export class ActionListWidget<T> extends Disposable {

// Set focus immediately for responsive hover feedback
this._list.setFocus(typeof e.index === 'number' ? [e.index] : []);
this._hideSubmenu();
if (this._currentSubmenuElement === element) {
this._cancelSubmenuHide();
} else {
this._hideSubmenu();
}

if (this._delegate.onHover && !element.disabled && element.kind === ActionListItemKind.Action) {
if (this._delegate.onHover && !element.disabled && element.kind === ActionListItemKind.Action && this._currentSubmenuElement !== element) {
const result = await this._delegate.onHover(element.item, this.cts.token);
const canPreview = result ? result.canPreview : undefined;
if (canPreview !== element.canPreview) {
Expand Down Expand Up @@ -1535,6 +1545,3 @@ export class ActionList<T> extends Disposable {
function stripNewlines(str: string): string {
return str.replace(/\r\n|\r|\n/g, ' ');
}



5 changes: 5 additions & 0 deletions src/vs/platform/editor/common/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ export interface IModalEditorPartOptions {
*/
readonly maximized?: boolean;

/**
* Minimum width of the modal editor part in pixels.
*/
readonly minWidth?: number;

/**
* Size of the modal editor part unless it is maximized.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/vs/platform/extensions/common/extensionsApiProposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ const _allApiProposals = {
tokenInformation: {
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tokenInformation.d.ts',
},
toolInvocationApproveCombination: {
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.toolInvocationApproveCombination.d.ts',
},
toolProgress: {
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.toolProgress.d.ts',
},
Expand Down
2 changes: 1 addition & 1 deletion src/vs/sessions/LAYOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ The Agent Sessions workbench uses specialized part implementations that extend t
| Configuration listening | Many settings | Minimal |
| Context menu actions | Full set | Simplified |
| Title bar | Full support | Sidebar: `hasTitle: true` (with footer); ChatBar: `hasTitle: false`; Auxiliary Bar & Panel: `hasTitle: true` |
| Visual margins | None | Auxiliary Bar: 8px top/bottom/right (card appearance); Panel: 8px bottom/left/right (card appearance); Sidebar: 0 (flush) |
| Visual margins | None | Auxiliary Bar: 16px top/right, 18px bottom (card appearance); Panel: 18px bottom, 16px left/right (card appearance); Sidebar: 0 (flush) |

### 9.3 Part Creation

Expand Down
60 changes: 51 additions & 9 deletions src/vs/sessions/browser/media/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*
* Margin values (must match the constants in the Part classes):
* Sidebar: no card (flush, spans full height)
* Auxiliary bar: top=8, bottom=8, right=8
* Panel: bottom=8, left=8, right=8
* Auxiliary bar: top=16, bottom=18, right=16
* Panel: bottom=18, left=16, right=16
*/

.agent-sessions-workbench .part.sidebar {
Expand All @@ -25,14 +25,14 @@
}

.agent-sessions-workbench .part.auxiliarybar {
margin: 8px 8px 8px 0;
margin: 16px 16px 18px 0;
background: var(--part-background);
border: 1px solid var(--part-border-color, transparent);
border-radius: 8px;
}

.agent-sessions-workbench .part.panel {
margin: 0 8px 8px 8px;
margin: 0 16px 18px 16px;
background: var(--part-background);
border: 1px solid var(--part-border-color, transparent);
border-radius: 8px;
Expand All @@ -54,16 +54,16 @@
.agent-sessions-workbench .interactive-session .interactive-item-container {
max-width: 950px;
margin: 0 auto;
padding-left: 8px;
padding-right: 8px;
padding-left: 16px;
padding-right: 16px;
box-sizing: border-box;
}

.agent-sessions-workbench .interactive-session > .chat-suggest-next-widget {
max-width: 950px;
margin: 0 auto;
padding-left: 8px;
padding-right: 8px;
padding-left: 16px;
padding-right: 16px;
box-sizing: border-box;
}

Expand All @@ -79,7 +79,7 @@
margin: 0 auto !important;
display: inherit !important;
/* Align with panel (terminal) card margin */
padding: 4px 8px 6px 8px !important;
padding: 4px 16px 16px 16px !important;
box-sizing: border-box;
}

Expand All @@ -88,3 +88,45 @@
.agent-sessions-workbench .agent-session-title {
color: var(--vscode-list-activeSelectionForeground);
}

/* ---- Modal Editor Block ---- */

.agent-sessions-workbench .monaco-modal-editor-block {
background: rgba(0, 0, 0, 0.5);
}

/* Hide the file icon in modal editor titles */
.agent-sessions-workbench .modal-editor-title .monaco-icon-label::before,
.agent-sessions-workbench .modal-editor-title .monaco-icon-label > .monaco-icon-label-iconpath {
display: none;
}

/* ---- Customization Empty State ---- */

/* Icon + title side by side in a row, description underneath */
.agent-sessions-workbench .ai-customization-list-widget .list-empty-state .empty-state-header {
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
}

.agent-sessions-workbench .ai-customization-list-widget .list-empty-state .empty-state-header > .empty-state-icon {
font-size: 16px;
margin-bottom: 0;
flex-shrink: 0;
}

/* MCP / Plugin empty state: icon + title side by side */
.agent-sessions-workbench .mcp-empty-state .empty-state-header {
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
}

.agent-sessions-workbench .mcp-empty-state .empty-state-header > .empty-icon {
font-size: 16px;
margin-bottom: 0;
flex-shrink: 0;
}
7 changes: 4 additions & 3 deletions src/vs/sessions/browser/parts/auxiliaryBarPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import '../../../workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css';
import './media/auxiliaryBarPart.css';
import { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';
import { IContextMenuService } from '../../../platform/contextview/browser/contextView.js';
import { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';
Expand Down Expand Up @@ -47,9 +48,9 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
static readonly viewContainersWorkspaceStateKey = 'workbench.agentsession.auxiliarybar.viewContainersWorkspaceState';

/** Visual margin values for the card-like appearance */
static readonly MARGIN_TOP = 8;
static readonly MARGIN_BOTTOM = 8;
static readonly MARGIN_RIGHT = 8;
static readonly MARGIN_TOP = 16;
static readonly MARGIN_BOTTOM = 18;
static readonly MARGIN_RIGHT = 16;

// Action ID for run script - defined here to avoid layering issues
private static readonly RUN_SCRIPT_ACTION_ID = 'workbench.action.agentSessions.runScript';
Expand Down
42 changes: 42 additions & 0 deletions src/vs/sessions/browser/parts/media/auxiliaryBarPart.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

/* ===== Modern action label styling for sessions auxiliary bar ===== */

/* Base label: lowercase text + heavier weight + pill padding */
.agent-sessions-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item:not(.icon) .action-label {
text-transform: capitalize;
font-weight: 500;
border-radius: 4px;
padding: 0px 8px;
font-size: 12px;
line-height: 22px;
}

.agent-sessions-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item {
padding-left: 0;
padding-right: 0;
}

.agent-sessions-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .badge {
margin-left: -4px;
padding-right: 6px;
}

.agent-sessions-workbench .part.auxiliarybar > .title {
padding-left: 4px;
padding-right: 2px;
}

/* Hide the underline indicator entirely */
.agent-sessions-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item .active-item-indicator:before {
display: none !important;
}

/* Active/checked state: background container instead of underline */
.agent-sessions-workbench .part.auxiliarybar > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked {
background-color: var(--vscode-activityBarTop-activeBackground, color-mix(in srgb, var(--vscode-sideBarTitle-foreground) 5%, transparent)) !important;
border-radius: 4px;
}
23 changes: 23 additions & 0 deletions src/vs/sessions/browser/parts/media/panelPart.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,26 @@
.monaco-workbench .part.panel.bottom .composite.title {
border-top-width: 0;
}

/* ===== Modern action label styling for sessions panel ===== */

/* Hide the underline indicator entirely */
.agent-sessions-workbench .part.panel > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item .active-item-indicator:before {
display: none !important;
}

/* Make icon action items 24px tall */
.agent-sessions-workbench .part.panel > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.icon {
height: 24px;
}

.agent-sessions-workbench .part.panel > .title {
padding-left: 6px;
padding-right: 6px;
}

/* Active/checked state: background container instead of underline */
.agent-sessions-workbench .part.panel > .title > .composite-bar-container > .composite-bar > .monaco-action-bar .action-item.checked {
background-color: var(--vscode-activityBarTop-activeBackground, color-mix(in srgb, var(--vscode-sideBarTitle-foreground) 5%, transparent)) !important;
border-radius: 4px;
}
5 changes: 5 additions & 0 deletions src/vs/sessions/browser/parts/media/titlebarpart.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@
display: none !important;
}

/* Remove the titlebar shadow in agent sessions */
.agent-sessions-workbench.monaco-workbench .part.titlebar {
box-shadow: none;
}

/* macOS native: the spacer uses window-controls-container but should not block dragging */
.agent-sessions-workbench.mac .part.titlebar .window-controls-container {
-webkit-app-region: drag;
Expand Down
6 changes: 3 additions & 3 deletions src/vs/sessions/browser/parts/panelPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export class PanelPart extends AbstractPaneCompositePart {
static readonly activePanelSettingsKey = 'workbench.agentsession.panelpart.activepanelid';

/** Visual margin values for the card-like appearance */
static readonly MARGIN_BOTTOM = 8;
static readonly MARGIN_LEFT = 8;
static readonly MARGIN_RIGHT = 8;
static readonly MARGIN_BOTTOM = 18;
static readonly MARGIN_LEFT = 16;
static readonly MARGIN_RIGHT = 16;

constructor(
@INotificationService notificationService: INotificationService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
font-weight: 500;
}

.account-widget-account .account-widget-account-button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class AgentFeedbackAttachmentContribution extends Disposable {
range: f.range,
codeSelection: f.codeSelection,
diffHunks: f.diffHunks,
sourcePRReviewCommentId: f.sourcePRReviewCommentId,
})),
value,
};
Expand All @@ -91,6 +92,9 @@ export class AgentFeedbackAttachmentContribution extends Disposable {
: `${item.range.startLineNumber}-${item.range.endLineNumber}`;

let part = `[${fileName}:${lineRef}]`;
if (item.sourcePRReviewCommentId) {
part += `\n(PR review comment, thread ID: ${item.sourcePRReviewCommentId} — resolve this thread when addressed)`;
}
if (item.codeSelection) {
part += `\nSelection:\n\`\`\`\n${item.codeSelection}\n\`\`\``;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,24 @@ export class AgentFeedbackEditorWidget extends Disposable implements IOverlayWid
return;
}

const sourcePRReviewCommentId = comment.source === SessionEditorCommentSource.PRReview
? comment.sourceId
: undefined;

const feedback = this._agentFeedbackService.addFeedback(
this._sessionResource,
comment.resourceUri,
comment.range,
comment.text,
comment.suggestion,
createAgentFeedbackContext(this._editor, this._codeEditorService, comment.resourceUri, comment.range),
sourcePRReviewCommentId,
);
this._agentFeedbackService.setNavigationAnchor(this._sessionResource, toSessionEditorCommentId(SessionEditorCommentSource.AgentFeedback, feedback.id));
if (comment.source === SessionEditorCommentSource.CodeReview) {
this._codeReviewService.removeComment(this._sessionResource, comment.sourceId);
} else if (comment.source === SessionEditorCommentSource.PRReview) {
this._codeReviewService.markPRReviewCommentConverted(this._sessionResource, comment.sourceId);
}
}

Expand Down
Loading
Loading