Skip to content

Commit 4b5b174

Browse files
committed
Merge remote-tracking branch 'origin/main' into tyriar/260573_3
2 parents e569089 + 7ca850c commit 4b5b174

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+287
-256
lines changed

extensions/git/src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3457,7 +3457,7 @@ export class CommandCenter {
34573457
return [createBranch, { label: '', kind: QuickPickItemKind.Separator }, ...branchItems];
34583458
};
34593459

3460-
const placeHolder = l10n.t('Select a branch to create the new worktree from');
3460+
const placeHolder = l10n.t('Select a branch or tag to create the new worktree from');
34613461
const choice = await this.pickRef(getBranchPicks(), placeHolder);
34623462

34633463
if (!choice) {

extensions/html-language-features/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/typings/base-common.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare global {
2020

2121
// --- timeout / interval (available in all contexts, but different signatures in node.js vs web)
2222

23-
interface TimeoutHandle {readonly _: never; /* this is a trick that seems needed to prevent direct number assignment */}
23+
interface TimeoutHandle { readonly _: never; /* this is a trick that seems needed to prevent direct number assignment */ }
2424
type Timeout = TimeoutHandle;
2525
function setTimeout(handler: string | Function, timeout?: number, ...arguments: any[]): Timeout;
2626
function clearTimeout(timeout: Timeout | undefined): void;

src/vs/base/common/oauth.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -736,14 +736,14 @@ export async function fetchDynamicRegistration(serverMetadata: IAuthorizationSer
736736
redirect_uris: [
737737
'https://insiders.vscode.dev/redirect',
738738
'https://vscode.dev/redirect',
739-
'http://localhost',
740-
'http://127.0.0.1',
739+
'http://localhost/',
740+
'http://127.0.0.1/',
741741
// Added these for any server that might do
742742
// only exact match on the redirect URI even
743743
// though the spec says it should not care
744744
// about the port.
745-
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}`,
746-
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}`
745+
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}/`,
746+
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}/`
747747
],
748748
scope: scopes?.join(AUTH_SCOPE_SEPARATOR),
749749
token_endpoint_auth_method: 'none',

src/vs/base/test/common/oauth.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,10 @@ suite('OAuth', () => {
358358
assert.deepStrictEqual(requestBody.redirect_uris, [
359359
'https://insiders.vscode.dev/redirect',
360360
'https://vscode.dev/redirect',
361-
'http://localhost',
362-
'http://127.0.0.1',
363-
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}`,
364-
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}`
361+
'http://localhost/',
362+
'http://127.0.0.1/',
363+
`http://localhost:${DEFAULT_AUTH_FLOW_PORT}/`,
364+
`http://127.0.0.1:${DEFAULT_AUTH_FLOW_PORT}/`
365365
]);
366366

367367
// Verify response is processed correctly

src/vs/platform/quickinput/browser/quickInputController.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,9 @@ export class QuickInputController extends Disposable {
546546
input.ignoreFocusOut = !!options.ignoreFocusLost;
547547
input.matchOnDescription = !!options.matchOnDescription;
548548
input.matchOnDetail = !!options.matchOnDetail;
549-
input.sortByLabel = !!options.sortByLabel;
549+
if (options.sortByLabel !== undefined) {
550+
input.sortByLabel = options.sortByLabel;
551+
}
550552
input.matchOnLabel = (options.matchOnLabel === undefined) || options.matchOnLabel; // default to true
551553
input.quickNavigate = options.quickNavigate;
552554
input.hideInput = !!options.hideInput;

src/vs/workbench/api/browser/mainThreadChatSessions.ts

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { raceCancellationError } from '../../../base/common/async.js';
77
import { CancellationToken } from '../../../base/common/cancellation.js';
88
import { Emitter, Event } from '../../../base/common/event.js';
9-
import { Disposable, DisposableMap } from '../../../base/common/lifecycle.js';
9+
import { Disposable, DisposableMap, DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';
1010
import { revive } from '../../../base/common/marshalling.js';
1111
import { URI, UriComponents } from '../../../base/common/uri.js';
1212
import { localize } from '../../../nls.js';
@@ -27,8 +27,11 @@ import { ExtHostChatSessionsShape, ExtHostContext, IChatProgressDto, MainContext
2727

2828
@extHostNamedCustomer(MainContext.MainThreadChatSessions)
2929
export class MainThreadChatSessions extends Disposable implements MainThreadChatSessionsShape {
30-
private readonly _itemProvidersRegistrations = this._register(new DisposableMap<number>());
31-
private readonly _contentProvidersRegisterations = this._register(new DisposableMap<number>());
30+
private readonly _itemProvidersRegistrations = this._register(new DisposableMap<number, IDisposable & {
31+
readonly provider: IChatSessionItemProvider;
32+
readonly onDidChangeItems: Emitter<void>;
33+
}>());
34+
private readonly _contentProvidersRegistrations = this._register(new DisposableMap<number>());
3235

3336
// Store progress emitters for active sessions: key is `${handle}_${sessionId}_${requestId}`
3437
private readonly _activeProgressEmitters = new Map<string, Emitter<IChatProgress[]>>();
@@ -56,17 +59,25 @@ export class MainThreadChatSessions extends Disposable implements MainThreadChat
5659

5760
$registerChatSessionItemProvider(handle: number, chatSessionType: string): void {
5861
// Register the provider handle - this tracks that a provider exists
62+
const disposables = new DisposableStore();
63+
const changeEmitter = disposables.add(new Emitter<void>());
64+
5965
const provider: IChatSessionItemProvider = {
6066
chatSessionType,
67+
onDidChangeChatSessionItems: changeEmitter.event,
6168
provideChatSessionItems: (token) => this._provideChatSessionItems(handle, token)
6269
};
70+
disposables.add(this._chatSessionsService.registerChatSessionItemProvider(provider));
6371

64-
this._itemProvidersRegistrations.set(handle, this._chatSessionsService.registerChatSessionItemProvider(provider));
72+
this._itemProvidersRegistrations.set(handle, {
73+
dispose: () => disposables.dispose(),
74+
provider,
75+
onDidChangeItems: changeEmitter,
76+
});
6577
}
6678

67-
$onDidChangeChatSessionItems(chatSessionType: string): void {
68-
// Notify the provider that its chat session items have changed
69-
this._chatSessionsService.notifySessionItemsChange(chatSessionType);
79+
$onDidChangeChatSessionItems(handle: number): void {
80+
this._itemProvidersRegistrations.get(handle)?.onDidChangeItems.fire();
7081
}
7182

7283
private async _provideChatSessionItems(handle: number, token: CancellationToken): Promise<IChatSessionItem[]> {
@@ -171,15 +182,14 @@ export class MainThreadChatSessions extends Disposable implements MainThreadChat
171182

172183
$registerChatSessionContentProvider(handle: number, chatSessionType: string): void {
173184
const provider: IChatSessionContentProvider = {
174-
chatSessionType,
175185
provideChatSessionContent: (id, token) => this._provideChatSessionContent(handle, id, token)
176186
};
177187

178-
this._contentProvidersRegisterations.set(handle, this._chatSessionsService.registerChatSessionContentProvider(provider));
188+
this._contentProvidersRegistrations.set(handle, this._chatSessionsService.registerChatSessionContentProvider(chatSessionType, provider));
179189
}
180190

181191
$unregisterChatSessionContentProvider(handle: number): void {
182-
this._contentProvidersRegisterations.deleteAndDispose(handle);
192+
this._contentProvidersRegistrations.deleteAndDispose(handle);
183193
}
184194

185195
async $handleProgressChunk(handle: number, sessionId: string, requestId: string, chunks: (IChatProgressDto | [IChatProgressDto, number])[]): Promise<void> {

src/vs/workbench/api/common/extHost.protocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,7 @@ export interface ChatSessionDto {
31373137
export interface MainThreadChatSessionsShape extends IDisposable {
31383138
$registerChatSessionItemProvider(handle: number, chatSessionType: string): void;
31393139
$unregisterChatSessionItemProvider(handle: number): void;
3140-
$onDidChangeChatSessionItems(chatSessionType: string): void;
3140+
$onDidChangeChatSessionItems(handle: number): void;
31413141

31423142
$registerChatSessionContentProvider(handle: number, chatSessionType: string): void;
31433143
$unregisterChatSessionContentProvider(handle: number): void;

src/vs/workbench/api/common/extHostChatSessions.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,22 @@ class ExtHostChatSession {
4646
}
4747

4848
export class ExtHostChatSessions extends Disposable implements ExtHostChatSessionsShape {
49+
private static _sessionHandlePool = 0;
4950

5051
private readonly _proxy: Proxied<MainThreadChatSessionsShape>;
51-
private readonly _chatSessionItemProviders = new Map<number, { provider: vscode.ChatSessionItemProvider; extension: IExtensionDescription; disposable: DisposableStore }>();
52-
private readonly _chatSessionContentProviders = new Map<number, { provider: vscode.ChatSessionContentProvider; extension: IExtensionDescription; disposable: DisposableStore }>();
52+
private readonly _chatSessionItemProviders = new Map<number, {
53+
readonly provider: vscode.ChatSessionItemProvider;
54+
readonly extension: IExtensionDescription;
55+
readonly disposable: DisposableStore;
56+
}>();
57+
private readonly _chatSessionContentProviders = new Map<number, {
58+
readonly provider: vscode.ChatSessionContentProvider;
59+
readonly extension: IExtensionDescription;
60+
readonly disposable: DisposableStore;
61+
}>();
5362
private _nextChatSessionItemProviderHandle = 0;
5463
private _nextChatSessionContentProviderHandle = 0;
55-
private _sessionMap: Map<string, vscode.ChatSessionItem> = new Map();
56-
private static _sessionHandlePool = 0;
64+
private readonly _sessionMap: Map<string, vscode.ChatSessionItem> = new Map();
5765

5866
constructor(
5967
private readonly commands: ExtHostCommands,
@@ -90,7 +98,7 @@ export class ExtHostChatSessions extends Disposable implements ExtHostChatSessio
9098
this._proxy.$registerChatSessionItemProvider(handle, chatSessionType);
9199
if (provider.onDidChangeChatSessionItems) {
92100
disposables.add(provider.onDidChangeChatSessionItems(() => {
93-
this._proxy.$onDidChangeChatSessionItems(chatSessionType);
101+
this._proxy.$onDidChangeChatSessionItems(handle);
94102
}));
95103
}
96104
return {

src/vs/workbench/api/common/extHostTypeConverters.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3336,7 +3336,9 @@ export namespace ChatAgentUserActionEvent {
33363336
outcome: outcomes.get(event.action.outcome) ?? types.ChatEditingSessionActionOutcome.Rejected,
33373337
uri: URI.revive(event.action.uri),
33383338
hasRemainingEdits: event.action.hasRemainingEdits,
3339-
lineCount: event.action.lineCount
3339+
lineCount: event.action.lineCount,
3340+
linesAdded: event.action.linesAdded,
3341+
linesRemoved: event.action.linesRemoved
33403342
}, result: ehResult
33413343
};
33423344
} else {

0 commit comments

Comments
 (0)