Skip to content

Commit 760844f

Browse files
authored
Merge pull request #315222 from microsoft/benibenj/envious-gibbon
Improve new session hover functionality
2 parents 373cd0d + ca7f363 commit 760844f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/vs/sessions/contrib/sessions/browser/views/sessionsView.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { AICustomizationShortcutsWidget } from '../aiCustomizationShortcutsWidge
2929
import { AgentHostShortcutsWidget } from '../agentHostShortcutsWidget.js';
3030
import { Action2, MenuId, registerAction2 } from '../../../../../platform/actions/common/actions.js';
3131
import { Button } from '../../../../../base/browser/ui/button/button.js';
32+
import { HoverPosition } from '../../../../../base/browser/ui/hover/hoverWidget.js';
3233
import { defaultButtonStyles } from '../../../../../platform/theme/browser/defaultStyles.js';
3334
import { asCssVariable } from '../../../../../platform/theme/common/colorRegistry.js';
3435
import { agentsNewSessionButtonBackground, agentsNewSessionButtonBorder, agentsNewSessionButtonForeground, agentsNewSessionButtonHoverBackground } from '../../../../common/theme.js';
@@ -332,12 +333,14 @@ export class SessionsView extends ViewPane {
332333
return primaryKeybinding ?? resolvedKeybindings[0];
333334
};
334335

335-
this._register(this.hoverService.setupDelayedHoverAtMouse(newSessionButton.element, () => {
336+
this._register(this.hoverService.setupDelayedHover(newSessionButton.element, () => {
336337
const keybindingLabel = getNewSessionKeybinding()?.getLabel() ?? undefined;
337338
return {
338339
content: keybindingLabel
339340
? localize('newSessionButtonTitle', "New Session ({0})", keybindingLabel)
340341
: localize('newSessionButtonTitleWithoutKeybinding', "New Session"),
342+
appearance: { compact: true },
343+
position: { hoverPosition: HoverPosition.BELOW },
341344
};
342345
}));
343346

0 commit comments

Comments
 (0)