Skip to content

Commit cc5dd53

Browse files
authored
Merge branch 'main' into merogge/kb
2 parents 8e5d9da + 8494a40 commit cc5dd53

File tree

7 files changed

+58
-33
lines changed

7 files changed

+58
-33
lines changed

src/vs/workbench/browser/parts/paneCompositeBar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ export class PaneCompositeBar extends Disposable {
490490
name: cachedViewContainer.name,
491491
order: cachedViewContainer.order,
492492
pinned: cachedViewContainer.pinned,
493-
visible: cachedViewContainer.visible,
493+
visible: cachedViewContainer.visible && !!this.getViewContainer(cachedViewContainer.id),
494494
});
495495
}
496496

src/vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ export class KeywordActivationContribution extends Disposable implements IWorkbe
796796
@IInstantiationService instantiationService: IInstantiationService,
797797
@ICodeEditorService private readonly codeEditorService: ICodeEditorService,
798798
@IEditorService private readonly editorService: IEditorService,
799-
@IHostService private readonly hostService: IHostService
799+
@IHostService private readonly hostService: IHostService,
800+
@IChatService private readonly chatService: IChatService
800801
) {
801802
super();
802803

@@ -811,6 +812,8 @@ export class KeywordActivationContribution extends Disposable implements IWorkbe
811812
this.handleKeywordActivation();
812813
}));
813814

815+
this._register(this.chatService.onDidRegisterProvider(() => this.updateConfiguration()));
816+
814817
this._register(this.speechService.onDidStartSpeechToTextSession(() => this.handleKeywordActivation()));
815818
this._register(this.speechService.onDidEndSpeechToTextSession(() => this.handleKeywordActivation()));
816819

@@ -826,8 +829,8 @@ export class KeywordActivationContribution extends Disposable implements IWorkbe
826829
}
827830

828831
private updateConfiguration(): void {
829-
if (!this.speechService.hasSpeechProvider) {
830-
return; // these settings require a speech provider
832+
if (!this.speechService.hasSpeechProvider || this.chatService.getProviderInfos().length === 0) {
833+
return; // these settings require a speech and chat provider
831834
}
832835

833836
const registry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);

src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export class BreakpointEditorContribution implements IBreakpointEditorContributi
457457
));
458458
actions.push(new Action(
459459
'addTriggeredBreakpoint',
460-
nls.localize('addTriggeredBreakpoint', "Add Triggered Breakpoint.."),
460+
nls.localize('addTriggeredBreakpoint', "Add Triggered Breakpoint..."),
461461
undefined,
462462
true,
463463
() => Promise.resolve(this.showBreakpointWidget(lineNumber, column, BreakpointWidgetContext.TRIGGER_POINT))

src/vs/workbench/contrib/debug/browser/breakpointWidget.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
8484
private inputContainer!: HTMLElement;
8585
private selectBreakpointContainer!: HTMLElement;
8686
private input!: IActiveCodeEditor;
87+
private selectBreakpointBox!: SelectBox;
8788
private toDispose: lifecycle.IDisposable[];
8889
private conditionInput = '';
8990
private hitCountInput = '';
@@ -205,7 +206,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
205206
{ text: nls.localize('expression', "Expression") },
206207
{ text: nls.localize('hitCount', "Hit Count") },
207208
{ text: nls.localize('logMessage', "Log Message") },
208-
{ text: nls.localize('triggeredBy', "Wait For Breakpoint") },
209+
{ text: nls.localize('triggeredBy', "Wait for Breakpoint") },
209210
], this.context, this.contextViewService, defaultSelectBoxStyles, { ariaLabel: nls.localize('breakpointType', 'Breakpoint Type') });
210211
this.selectContainer = $('.breakpoint-select-container');
211212
selectBox.render(dom.append(container, this.selectContainer));
@@ -228,7 +229,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
228229

229230
this.updateContextInput();
230231
// Due to an electron bug we have to do the timeout, otherwise we do not get focus
231-
setTimeout(() => this.input.focus(), 150);
232+
setTimeout(() => this.focusInput(), 150);
232233
}
233234

234235
private createTriggerBreakpointInput(container: HTMLElement) {
@@ -256,7 +257,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
256257
], select);
257258
});
258259

259-
const selectBreakpointBox = new SelectBox([{ text: nls.localize('triggerByLoading', 'Loading...'), isDisabled: true }], 0, this.contextViewService, defaultSelectBoxStyles, { ariaLabel: nls.localize('selectBreakpoint', 'Select breakpoint') });
260+
const selectBreakpointBox = this.selectBreakpointBox = new SelectBox([{ text: nls.localize('triggerByLoading', 'Loading...'), isDisabled: true }], 0, this.contextViewService, defaultSelectBoxStyles, { ariaLabel: nls.localize('selectBreakpoint', 'Select breakpoint') });
260261
selectBreakpointBox.onDidSelect(e => {
261262
if (e.index === 0) {
262263
this.triggeredByBreakpointInput = undefined;
@@ -295,7 +296,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
295296
this.setInputMode();
296297
const value = this.getInputValue(this.breakpoint);
297298
this.input.getModel().setValue(value);
298-
this.input.focus();
299+
this.focusInput();
299300
}
300301
}
301302

@@ -455,6 +456,14 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
455456
this.dispose();
456457
}
457458

459+
private focusInput() {
460+
if (this.context === Context.TRIGGER_POINT) {
461+
this.selectBreakpointBox.focus();
462+
} else {
463+
this.input.focus();
464+
}
465+
}
466+
458467
override dispose(): void {
459468
super.dispose();
460469
this.input.dispose();

src/vs/workbench/contrib/debug/browser/media/debug.contribution.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
margin-top: -1px;
3232
}
3333

34+
35+
.codicon-debug-breakpoint-conditional.codicon-debug-stackframe-focused::after,
36+
.codicon-debug-breakpoint-conditional.codicon-debug-stackframe::after,
3437
.codicon-debug-breakpoint.codicon-debug-stackframe-focused::after,
3538
.codicon-debug-breakpoint.codicon-debug-stackframe::after {
3639
content: '\eb8a';

src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ import { IDiffEditorOptions } from 'vs/editor/common/config/editorOptions';
2121
import { IResolvedTextEditorModel, ITextModelService } from 'vs/editor/common/services/resolverService';
2222
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration';
2323
import { localize } from 'vs/nls';
24+
import { ConfirmResult } from 'vs/platform/dialogs/common/dialogs';
2425
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
2526
import { IEditorConfiguration } from 'vs/workbench/browser/parts/editor/textEditor';
2627
import { DEFAULT_EDITOR_ASSOCIATION, EditorInputCapabilities, EditorInputWithOptions, IEditorSerializer, IResourceMultiDiffEditorInput, ISaveOptions, IUntypedEditorInput } from 'vs/workbench/common/editor';
27-
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
28+
import { EditorInput, IEditorCloseHandler } from 'vs/workbench/common/editor/editorInput';
2829
import { MultiDiffEditorIcon } from 'vs/workbench/contrib/multiDiffEditor/browser/icons.contribution';
2930
import { ConstResolvedMultiDiffSource, IMultiDiffSourceResolverService, IResolvedMultiDiffSource, MultiDiffEditorItem } from 'vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService';
3031
import { ObservableLazyStatefulPromise } from 'vs/workbench/contrib/multiDiffEditor/browser/utils';
@@ -255,6 +256,15 @@ export class MultiDiffEditorInput extends EditorInput implements ILanguageSuppor
255256
}
256257
return undefined;
257258
}
259+
260+
override readonly closeHandler: IEditorCloseHandler = {
261+
async confirm() {
262+
return ConfirmResult.DONT_SAVE;
263+
},
264+
showConfirm() {
265+
return false;
266+
}
267+
};
258268
}
259269

260270
function isUriDirty(textFileService: ITextFileService, uri: URI) {

src/vscode-dts/vscode.d.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13286,6 +13286,29 @@ declare module 'vscode' {
1328613286
*/
1328713287
export function findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken): Thenable<Uri[]>;
1328813288

13289+
/**
13290+
* Saves the editor identified by the given resource and returns the resulting resource or `undefined`
13291+
* if save was not successful or no editor with the given resource was found.
13292+
*
13293+
* **Note** that an editor with the provided resource must be opened in order to be saved.
13294+
*
13295+
* @param uri the associated uri for the opened editor to save.
13296+
* @returns A thenable that resolves when the save operation has finished.
13297+
*/
13298+
export function save(uri: Uri): Thenable<Uri | undefined>;
13299+
13300+
/**
13301+
* Saves the editor identified by the given resource to a new file name as provided by the user and
13302+
* returns the resulting resource or `undefined` if save was not successful or cancelled or no editor
13303+
* with the given resource was found.
13304+
*
13305+
* **Note** that an editor with the provided resource must be opened in order to be saved as.
13306+
*
13307+
* @param uri the associated uri for the opened editor to save as.
13308+
* @returns A thenable that resolves when the save-as operation has finished.
13309+
*/
13310+
export function saveAs(uri: Uri): Thenable<Uri | undefined>;
13311+
1328913312
/**
1329013313
* Save all dirty files.
1329113314
*
@@ -13649,29 +13672,6 @@ declare module 'vscode' {
1364913672
* Event that fires when the current workspace has been trusted.
1365013673
*/
1365113674
export const onDidGrantWorkspaceTrust: Event<void>;
13652-
13653-
/**
13654-
* Saves the editor identified by the given resource and returns the resulting resource or `undefined`
13655-
* if save was not successful or no editor with the given resource was found.
13656-
*
13657-
* **Note** that an editor with the provided resource must be opened in order to be saved.
13658-
*
13659-
* @param uri the associated uri for the opened editor to save.
13660-
* @returns A thenable that resolves when the save operation has finished.
13661-
*/
13662-
export function save(uri: Uri): Thenable<Uri | undefined>;
13663-
13664-
/**
13665-
* Saves the editor identified by the given resource to a new file name as provided by the user and
13666-
* returns the resulting resource or `undefined` if save was not successful or cancelled or no editor
13667-
* with the given resource was found.
13668-
*
13669-
* **Note** that an editor with the provided resource must be opened in order to be saved as.
13670-
*
13671-
* @param uri the associated uri for the opened editor to save as.
13672-
* @returns A thenable that resolves when the save-as operation has finished.
13673-
*/
13674-
export function saveAs(uri: Uri): Thenable<Uri | undefined>;
1367513675
}
1367613676

1367713677
/**

0 commit comments

Comments
 (0)