@codingame/monaco-vscode-walkthrough-service-override 26.2.2 → 28.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcome.d.ts +5 -7
  3. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcome.js +83 -98
  4. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/media/agentSessionsWelcome.css +7 -7
  6. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.js +22 -19
  7. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.js +40 -41
  8. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedAccessibleView.js +2 -2
  9. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors.js +7 -7
  10. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +37 -37
  11. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.js +1 -1
  14. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService._contribution.js +3 -3
  15. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +5 -5
  16. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/startupPage.js +2 -2
  17. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +151 -151
  18. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile.js +3 -3
  19. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker.js +5 -5
  20. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker_small.js +4 -4
  21. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough.js +3 -3
  22. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution.js +2 -2
  23. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.js +4 -4
  24. package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-walkthrough-service-override",
3
- "version": "26.2.2",
3
+ "version": "28.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - walkthrough service-override",
6
6
  "keywords": [],
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "26.2.2",
19
- "@codingame/monaco-vscode-katex-common": "26.2.2",
18
+ "@codingame/monaco-vscode-api": "28.0.0",
19
+ "@codingame/monaco-vscode-katex-common": "28.0.0",
20
20
  "marked": "14.0.0"
21
21
  },
22
22
  "main": "index.js",
@@ -55,22 +55,22 @@ export declare class AgentSessionsWelcomePage extends EditorPane {
55
55
  private chatModelRef;
56
56
  private sessionsControl;
57
57
  private sessionsControlContainer;
58
- private sessionsLoadingContainer;
59
58
  private readonly sessionsControlDisposables;
60
59
  private readonly contentDisposables;
61
60
  private contextService;
62
61
  private walkthroughs;
63
62
  private _selectedSessionProvider;
64
63
  private _selectedWorkspace;
65
- private _recentWorkspaces;
64
+ private _recentTrustedWorkspaces;
66
65
  private _isEmptyWorkspace;
67
66
  private _workspaceKind;
68
- private _storedInput;
69
67
  private _openedAt;
70
- private _closedBy;
68
+ private _closedBy?;
69
+ private _storedInput;
71
70
  constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, storageService: IStorageService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, layoutService: IWorkbenchLayoutService, commandService: ICommandService, editorService: IEditorService, agentSessionsService: IAgentSessionsService, configurationService: IConfigurationService, productService: IProductService, walkthroughsService: IWalkthroughsService, chatService: IChatService, chatEntitlementService: IChatEntitlementService, markdownRendererService: IMarkdownRendererService, workspaceContextService: IWorkspaceContextService, workspacesService: IWorkspacesService, hostService: IHostService, workspaceTrustManagementService: IWorkspaceTrustManagementService, viewDescriptorService: IViewDescriptorService, chatWidgetService: IChatWidgetService, logService: ILogService);
72
71
  protected createEditor(parent: HTMLElement): void;
73
72
  setInput(input: AgentSessionsWelcomeInput, options: AgentSessionsWelcomeEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void>;
73
+ clearInput(): void;
74
74
  private buildContent;
75
75
  private buildStartEntries;
76
76
  private buildChatWidget;
@@ -83,8 +83,6 @@ export declare class AgentSessionsWelcomePage extends EditorPane {
83
83
  */
84
84
  private applyPrefillData;
85
85
  private buildSessionsOrPrompts;
86
- private buildLoadingSkeleton;
87
- private hideLoadingSkeleton;
88
86
  private buildSessionsGrid;
89
87
  private buildWalkthroughs;
90
88
  private static readonly PRIVACY_NOTICE_DISMISSED_KEY;
@@ -98,7 +96,7 @@ export declare class AgentSessionsWelcomePage extends EditorPane {
98
96
  private revealMaximizedChat;
99
97
  private openSessionInChat;
100
98
  private closeEditorAndMaximizeAuxiliaryBar;
101
- dispose(): void;
99
+ private getRecentlyOpenedWorkspaces;
102
100
  }
103
101
  export declare class AgentSessionsWelcomeInputSerializer implements IEditorSerializer {
104
102
  canSerialize(editorInput: AgentSessionsWelcomeInput): boolean;
@@ -46,11 +46,13 @@ import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/wo
46
46
  import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
47
47
  import './agentSessionsWelcomeInput.js';
48
48
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
49
- import { ChatViewPaneTarget, ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
49
+ import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
50
50
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
51
51
  import { getResourceForNewChatSession, ChatSessionPosition } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution';
52
52
  import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
53
53
  import { AgentSessionsControl } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl';
54
+ import { AgentSessionsFilter } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter';
55
+ import { AgentSessionsListDelegate } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer';
54
56
  import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
55
57
  import { IWalkthroughsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.service';
56
58
  import { GettingStartedInput } from '../../welcomeGettingStarted/browser/gettingStartedInput.js';
@@ -58,7 +60,7 @@ import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs
58
60
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
59
61
  import { WorkbenchState } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
60
62
  import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
61
- import { isRecentWorkspace, isRecentFolder } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces';
63
+ import { isRecentFolder, isRecentWorkspace } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces';
62
64
  import { IWorkspacesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspaces/common/workspaces.service';
63
65
  import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
64
66
  import { IWorkspaceTrustManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service';
@@ -138,15 +140,14 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
138
140
  this.contentDisposables = this._register(( new DisposableStore()));
139
141
  this.walkthroughs = [];
140
142
  this._selectedSessionProvider = AgentSessionProviders.Local;
141
- this._recentWorkspaces = [];
143
+ this._recentTrustedWorkspaces = [];
142
144
  this._isEmptyWorkspace = false;
143
145
  this._workspaceKind = "empty";
144
146
  this._openedAt = 0;
145
- this._closedBy = "unknown";
146
147
  this.container = $(".agentSessionsWelcome", {
147
148
  role: "document",
148
149
  tabindex: 0,
149
- "aria-label": ( localize(13718, "Overview of agent sessions and how to get started."))
150
+ "aria-label": ( localize(14842, "Overview of agent sessions and how to get started."))
150
151
  });
151
152
  this.contextService = this._register(contextKeyService.createScoped(this.container));
152
153
  ChatContextKeys.inAgentSessionsWelcome.bindTo(this.contextService).set(true);
@@ -169,10 +170,23 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
169
170
  }
170
171
  async setInput(input, options, context, token) {
171
172
  this._storedInput = input;
173
+ this._openedAt = Date.now();
172
174
  await super.setInput(input, options, context, token);
173
175
  this._workspaceKind = input.workspaceKind ?? "empty";
174
176
  await this.buildContent();
175
177
  }
178
+ clearInput() {
179
+ if (this._openedAt > 0) {
180
+ const visibleDurationMs = Date.now() - this._openedAt;
181
+ this.telemetryService.publicLog2("agentSessionsWelcome.closed", {
182
+ visibleDurationMs,
183
+ closedBy: this._closedBy ?? "disposed"
184
+ });
185
+ this._openedAt = 0;
186
+ this._closedBy = undefined;
187
+ }
188
+ super.clearInput();
189
+ }
176
190
  async buildContent() {
177
191
  this.contentDisposables.clear();
178
192
  this.sessionsControlDisposables.clear();
@@ -180,24 +194,14 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
180
194
  clearNode(this.contentContainer);
181
195
  this._isEmptyWorkspace = this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY;
182
196
  if (this._isEmptyWorkspace) {
183
- const recentlyOpened = await this.workspacesService.getRecentlyOpened();
184
- const trustInfoPromises = ( recentlyOpened.workspaces.map(async ws => {
185
- const uri = isRecentWorkspace(ws) ? ws.workspace.configPath : ws.folderUri;
186
- const trustInfo = await this.workspaceTrustManagementService.getUriTrustInfo(uri);
187
- return {
188
- workspace: ws,
189
- trusted: trustInfo.trusted
190
- };
191
- }));
192
- const trustInfoResults = await Promise.all(trustInfoPromises);
193
- const filteredWorkspaces = ( trustInfoResults.filter(result => result.trusted).map(result => result.workspace));
194
- this._recentWorkspaces = filteredWorkspaces.slice(0, MAX_REPO_PICKS);
197
+ const recentlyOpened = await this.getRecentlyOpenedWorkspaces(true);
198
+ this._recentTrustedWorkspaces = recentlyOpened.slice(0, MAX_REPO_PICKS);
195
199
  }
196
200
  this.walkthroughs = this.walkthroughsService.getWalkthroughs();
197
201
  const header = append(this.contentContainer, $(".agentSessionsWelcome-header"));
198
202
  append(header, $("h1.product-name", {}, this.productService.nameLong));
199
203
  const startEntries = append(header, $(".agentSessionsWelcome-startEntries"));
200
- this.buildStartEntries(startEntries);
204
+ await this.buildStartEntries(startEntries);
201
205
  const chatSection = append(this.contentContainer, $(".agentSessionsWelcome-chatSection"));
202
206
  this.buildChatWidget(chatSection);
203
207
  const sessionsSection = append(this.contentContainer, $(".agentSessionsWelcome-sessionsSection"));
@@ -216,18 +220,24 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
216
220
  }));
217
221
  this.scrollableElement?.scanDomNode();
218
222
  }
219
- buildStartEntries(container) {
220
- const entries = [{
223
+ async buildStartEntries(container) {
224
+ const workspaces = await this.getRecentlyOpenedWorkspaces(false);
225
+ const openEntry = workspaces.length > 0 ? {
221
226
  icon: Codicon.folderOpened,
222
- label: ( localize(13719, "Open Recent...")),
227
+ label: ( localize(14843, "Open Recent...")),
223
228
  command: "workbench.action.openRecent"
224
- }, {
229
+ } : {
230
+ icon: Codicon.folderOpened,
231
+ label: ( localize(14844, "Open Folder...")),
232
+ command: "workbench.action.files.openFolder"
233
+ };
234
+ const entries = [openEntry, {
225
235
  icon: Codicon.newFile,
226
- label: ( localize(13720, "New file...")),
227
- command: "workbench.action.files.newUntitledFile"
236
+ label: ( localize(14845, "New file...")),
237
+ command: "welcome.showNewFileEntries"
228
238
  }, {
229
239
  icon: Codicon.repoClone,
230
- label: ( localize(13721, "Clone Git Repository...")),
240
+ label: ( localize(14846, "Clone Git Repository...")),
231
241
  command: "git.clone"
232
242
  }];
233
243
  for (const entry of entries) {
@@ -235,7 +245,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
235
245
  button.appendChild(renderIcon(entry.icon));
236
246
  button.appendChild(document.createTextNode(entry.label));
237
247
  button.onclick = () => {
238
- this.telemetryService.publicLog2("gettingStarted.ActionExecuted", {
248
+ this.telemetryService.publicLog2("agentSessionsWelcome.ActionExecuted", {
239
249
  welcomeKind: "agentSessionsWelcomePage",
240
250
  action: "executeCommand",
241
251
  actionId: entry.command
@@ -258,8 +268,8 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
258
268
  const newResource = getResourceForNewChatSession({
259
269
  type: provider,
260
270
  position: ChatSessionPosition.Sidebar});
261
- const ref = await this.chatService.loadSessionForResource(newResource, ChatAgentLocation.Chat, CancellationToken.None);
262
- this.chatModelRef = ref ?? this.chatService.startSession(ChatAgentLocation.Chat);
271
+ const ref = await this.chatService.acquireOrLoadSession(newResource, ChatAgentLocation.Chat, CancellationToken.None);
272
+ this.chatModelRef = ref ?? this.chatService.startNewLocalSession(ChatAgentLocation.Chat);
263
273
  this.contentDisposables.add(this.chatModelRef);
264
274
  if (this.chatModelRef.object) {
265
275
  this.chatWidget.setModel(this.chatModelRef.object);
@@ -280,7 +290,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
280
290
  const onDidChangeSelectedWorkspace = this.contentDisposables.add(( new Emitter()));
281
291
  const onDidChangeWorkspaces = this.contentDisposables.add(( new Emitter()));
282
292
  const workspacePickerDelegate = this._isEmptyWorkspace ? {
283
- getWorkspaces: () => ( this._recentWorkspaces.map(w => ({
293
+ getWorkspaces: () => ( this._recentTrustedWorkspaces.map(w => ({
284
294
  uri: this.getWorkspaceUri(w),
285
295
  label: this.getWorkspaceLabel(w),
286
296
  isFolder: isRecentFolder(w)
@@ -329,7 +339,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
329
339
  this.contentDisposables.add(scheduleAtNextAnimationFrame(getWindow(chatWidgetContainer), () => {
330
340
  this.layoutChatWidget();
331
341
  }));
332
- this.chatModelRef = this.chatService.startSession(ChatAgentLocation.Chat);
342
+ this.chatModelRef = this.chatService.startNewLocalSession(ChatAgentLocation.Chat);
333
343
  this.contentDisposables.add(this.chatModelRef);
334
344
  if (this.chatModelRef.object) {
335
345
  this.chatWidget.setModel(this.chatModelRef.object);
@@ -390,7 +400,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
390
400
  StorageScope.APPLICATION,
391
401
  StorageTarget.MACHINE
392
402
  );
393
- const workspace = this._recentWorkspaces.find(w => ( this.getWorkspaceUri(w).toString()) === this._selectedWorkspace?.uri.toString());
403
+ const workspace = this._recentTrustedWorkspaces.find(w => ( this.getWorkspaceUri(w).toString()) === this._selectedWorkspace?.uri.toString());
394
404
  if (workspace) {
395
405
  try {
396
406
  if (isRecentFolder(workspace)) {
@@ -434,7 +444,6 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
434
444
  buildSessionsOrPrompts(container) {
435
445
  this.sessionsControlDisposables.clear();
436
446
  this.sessionsControl = undefined;
437
- this.sessionsLoadingContainer = undefined;
438
447
  const sessions = this.agentSessionsService.model.sessions.filter(s => !s.isArchived());
439
448
  if (sessions.length > 0) {
440
449
  this.buildSessionsGrid(container, sessions);
@@ -442,60 +451,23 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
442
451
  this.buildWalkthroughs(container);
443
452
  }
444
453
  }
445
- buildLoadingSkeleton(container) {
446
- const loadingContainer = append(container, $(".agentSessionsWelcome-sessionsLoading", {
447
- "role": "status",
448
- "aria-busy": "true",
449
- "aria-label": ( localize(13722, "Loading sessions..."))
450
- }));
451
- for (let i = 0; i < MAX_SESSIONS; i++) {
452
- const skeleton = append(loadingContainer, $(".agentSessionsWelcome-sessionSkeleton", {
453
- "aria-hidden": "true"
454
- }));
455
- append(skeleton, $(".agentSessionsWelcome-sessionSkeleton-icon"));
456
- const content = append(skeleton, $(".agentSessionsWelcome-sessionSkeleton-content"));
457
- append(content, $(".agentSessionsWelcome-sessionSkeleton-title"));
458
- append(content, $(".agentSessionsWelcome-sessionSkeleton-description"));
459
- }
460
- return loadingContainer;
461
- }
462
- hideLoadingSkeleton() {
463
- if (this.sessionsLoadingContainer) {
464
- this.sessionsLoadingContainer.style.display = "none";
465
- }
466
- if (this.sessionsControlContainer) {
467
- this.sessionsControlContainer.style.display = "";
468
- this.layoutSessionsControl();
469
- }
470
- }
471
454
  buildSessionsGrid(container, _sessions) {
472
- this.sessionsLoadingContainer = this.buildLoadingSkeleton(container);
473
455
  this.sessionsControlContainer = append(container, $(".agentSessionsWelcome-sessionsGrid"));
474
- this.sessionsControlContainer.style.display = "none";
475
- const onDidChangeEmitter = this.sessionsControlDisposables.add(( new Emitter()));
476
- const filter = {
477
- onDidChange: onDidChangeEmitter.event,
478
- limitResults: () => MAX_SESSIONS,
479
- exclude: session => session.isArchived(),
480
- getExcludes: () => ({
481
- providers: [],
482
- states: [],
483
- archived: true,
484
- read: false
485
- })
486
- };
487
456
  const options = {
488
457
  overrideStyles: getListStyles({
489
458
  listBackground: editorBackground
490
459
  }),
491
- filter,
460
+ filter: this.sessionsControlDisposables.add(this.instantiationService.createInstance(AgentSessionsFilter, {
461
+ limitResults: () => MAX_SESSIONS,
462
+ overrideExclude: session => session.isArchived() ? true : undefined
463
+ })),
492
464
  getHoverPosition: () => HoverPosition.BELOW,
493
465
  trackActiveEditorSession: () => false,
494
466
  source: "welcomeView",
495
467
  notifySessionOpened: () => {
496
- this._closedBy = "sessionClicked";
497
468
  const isProjectionEnabled = this.configurationService.getValue(ChatConfiguration.AgentSessionProjectionEnabled);
498
469
  if (!isProjectionEnabled) {
470
+ this._closedBy = "sessionClicked";
499
471
  this.revealMaximizedChat();
500
472
  }
501
473
  }
@@ -504,10 +476,10 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
504
476
  this.instantiationService.createInstance(AgentSessionsControl, this.sessionsControlContainer, options)
505
477
  );
506
478
  this.sessionsControlDisposables.add(this.agentSessionsService.model.onDidResolve(() => {
507
- this.hideLoadingSkeleton();
479
+ this.layoutSessionsControl();
508
480
  }));
509
481
  if (this.agentSessionsService.model.resolved) {
510
- this.hideLoadingSkeleton();
482
+ this.layoutSessionsControl();
511
483
  }
512
484
  this.sessionsControlDisposables.add(
513
485
  scheduleAtNextAnimationFrame(getWindow(this.sessionsControlContainer), () => {
@@ -515,7 +487,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
515
487
  })
516
488
  );
517
489
  const openButton = append(container, $("button.agentSessionsWelcome-openSessionsButton"));
518
- openButton.textContent = ( localize(13723, "View All Sessions"));
490
+ openButton.textContent = ( localize(14847, "View All Sessions"));
519
491
  openButton.onclick = () => {
520
492
  this._closedBy = "viewAllSessions";
521
493
  this.revealMaximizedChat();
@@ -535,10 +507,10 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
535
507
  const navContainer = append(card, $(".agentSessionsWelcome-walkthroughCard-nav"));
536
508
  const prevButton = append(navContainer, $("button.nav-button"));
537
509
  prevButton.appendChild(renderIcon(Codicon.chevronLeft));
538
- prevButton.title = ( localize(13724, "Previous"));
510
+ prevButton.title = ( localize(14848, "Previous"));
539
511
  const nextButton = append(navContainer, $("button.nav-button"));
540
512
  nextButton.appendChild(renderIcon(Codicon.chevronRight));
541
- nextButton.title = ( localize(13725, "Next"));
513
+ nextButton.title = ( localize(14849, "Next"));
542
514
  const updateContent = () => {
543
515
  const walkthrough = activeWalkthroughs[currentIndex];
544
516
  clearNode(iconContainer);
@@ -553,7 +525,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
553
525
  updateContent();
554
526
  card.onclick = () => {
555
527
  const walkthrough = activeWalkthroughs[currentIndex];
556
- this.telemetryService.publicLog2("gettingStarted.ActionExecuted", {
528
+ this.telemetryService.publicLog2("agentSessionsWelcome.ActionExecuted", {
557
529
  welcomeKind: "agentSessionsWelcomePage",
558
530
  action: "openWalkthrough",
559
531
  actionId: walkthrough.id
@@ -618,10 +590,10 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
618
590
  iconContainer.appendChild(renderIcon(Codicon.chatSparkle));
619
591
  const content = append(tosCard, $(".agentSessionsWelcome-walkthroughCard-content"));
620
592
  const title = append(content, $(".agentSessionsWelcome-walkthroughCard-title"));
621
- title.textContent = ( localize(13726, "Your GitHub Copilot trial is active"));
593
+ title.textContent = ( localize(14850, "Try GitHub Copilot for free, no sign-in required!"));
622
594
  const desc = append(content, $(".agentSessionsWelcome-walkthroughCard-description"));
623
595
  const descriptionMarkdown = ( new MarkdownString(( localize(
624
- 13727,
596
+ 14851,
625
597
  "By continuing, you agree to {0}'s [Terms]({1}) and [Privacy Statement]({2}).",
626
598
  providers.default.name,
627
599
  this.productService.defaultChatAgent.termsStatementUrl,
@@ -633,7 +605,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
633
605
  desc.appendChild(renderedMarkdown.element);
634
606
  const dismissButton = append(tosCard, $("button.agentSessionsWelcome-tosCard-dismiss"));
635
607
  dismissButton.appendChild(renderIcon(Codicon.close));
636
- dismissButton.title = ( localize(13728, "Dismiss"));
608
+ dismissButton.title = ( localize(14852, "Dismiss"));
637
609
  dismissButton.onclick = e => {
638
610
  e.stopPropagation();
639
611
  dismissNotice();
@@ -646,7 +618,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
646
618
  icon: Codicon.check,
647
619
  actionClassName: "agentSessionsWelcome-checkbox",
648
620
  isChecked: this.configurationService.getValue(configurationKey) === "agentSessionsWelcomePage",
649
- title: ( localize(13729, "When checked, this page will be shown on startup.")),
621
+ title: ( localize(14853, "When checked, this page will be shown on startup.")),
650
622
  ...getToggleStyles({
651
623
  inputActiveOptionBackground: "var(--vscode-descriptionForeground)",
652
624
  inputActiveOptionForeground: "var(--vscode-editor-background)",
@@ -656,7 +628,7 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
656
628
  showOnStartupCheckbox.domNode.id = "showOnStartup";
657
629
  const showOnStartupLabel = $("label.caption", {
658
630
  for: "showOnStartup"
659
- }, ( localize(13730, "Show welcome page on startup")));
631
+ }, ( localize(14854, "Show welcome page on startup")));
660
632
  const onShowOnStartupChanged = () => {
661
633
  if (showOnStartupCheckbox.checked) {
662
634
  this.configurationService.updateValue(configurationKey, "agentSessionsWelcomePage");
@@ -697,9 +669,9 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
697
669
  this.agentSessionsService.model.sessions.filter(s => !s.isArchived()).length,
698
670
  MAX_SESSIONS
699
671
  );
700
- const sessionsHeight = visibleSessions * 52;
672
+ const sessionsHeight = visibleSessions * AgentSessionsListDelegate.ITEM_HEIGHT;
701
673
  this.sessionsControl.layout(sessionsHeight, sessionsWidth);
702
- const marginOffset = Math.floor(visibleSessions / 2) * 52;
674
+ const marginOffset = Math.floor(visibleSessions / 2) * AgentSessionsListDelegate.ITEM_HEIGHT;
703
675
  this.sessionsControl.element.style.marginBottom = `-${marginOffset}px`;
704
676
  }
705
677
  focus() {
@@ -721,9 +693,18 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
721
693
  }
722
694
  }
723
695
  async closeEditorAndMaximizeAuxiliaryBar(sessionResource) {
724
- await this.commandService.executeCommand("workbench.action.closeActiveEditor");
696
+ const editorToClose = this.input || this._storedInput;
697
+ if (editorToClose && this.group.contains(editorToClose)) {
698
+ await ( new Promise(resolve => {
699
+ const disposable = this.group.onDidActiveEditorChange(e => {
700
+ disposable.dispose();
701
+ resolve();
702
+ });
703
+ this.group.closeEditor(editorToClose);
704
+ }));
705
+ }
725
706
  if (sessionResource) {
726
- await this.chatWidgetService.openSession(sessionResource, ChatViewPaneTarget);
707
+ await this.chatWidgetService.openSession(sessionResource);
727
708
  } else {
728
709
  await this.commandService.executeCommand("workbench.action.chat.open");
729
710
  }
@@ -732,15 +713,19 @@ let AgentSessionsWelcomePage = class AgentSessionsWelcomePage extends EditorPane
732
713
  this.layoutService.setAuxiliaryBarMaximized(true);
733
714
  }
734
715
  }
735
- dispose() {
736
- if (this._openedAt > 0) {
737
- const visibleDurationMs = Date.now() - this._openedAt;
738
- this.telemetryService.publicLog2("agentSessionsWelcome.closed", {
739
- visibleDurationMs,
740
- closedBy: this._closedBy
741
- });
742
- }
743
- super.dispose();
716
+ async getRecentlyOpenedWorkspaces(onlyTrusted = false) {
717
+ const workspaces = await this.workspacesService.getRecentlyOpened();
718
+ const trustInfoPromises = ( workspaces.workspaces.map(async ws => {
719
+ const uri = isRecentWorkspace(ws) ? ws.workspace.configPath : ws.folderUri;
720
+ const trustInfo = await this.workspaceTrustManagementService.getUriTrustInfo(uri);
721
+ return {
722
+ workspace: ws,
723
+ trusted: trustInfo.trusted
724
+ };
725
+ }));
726
+ const trustInfoResults = await Promise.all(trustInfoPromises);
727
+ const filteredWorkspaces = ( trustInfoResults.filter(result => onlyTrusted ? result.trusted : true).map(result => result.workspace));
728
+ return filteredWorkspaces;
744
729
  }
745
730
  };
746
731
  AgentSessionsWelcomePage = AgentSessionsWelcomePage_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IThemeService)), ( __param(3, IStorageService)), ( __param(4, IInstantiationService)), ( __param(5, IContextKeyService)), ( __param(6, IWorkbenchLayoutService)), ( __param(7, ICommandService)), ( __param(8, IEditorService)), ( __param(9, IAgentSessionsService)), ( __param(10, IConfigurationService)), ( __param(11, IProductService)), ( __param(12, IWalkthroughsService)), ( __param(13, IChatService)), ( __param(14, IChatEntitlementService)), ( __param(15, IMarkdownRendererService)), ( __param(16, IWorkspaceContextService)), ( __param(17, IWorkspacesService)), ( __param(18, IHostService)), ( __param(19, IWorkspaceTrustManagementService)), ( __param(20, IViewDescriptorService)), ( __param(21, IChatWidgetService)), ( __param(22, ILogService))], AgentSessionsWelcomePage));
@@ -46,7 +46,7 @@ class AgentSessionsWelcomeInput extends EditorInput {
46
46
  this._workspaceKind = options.workspaceKind;
47
47
  }
48
48
  getName() {
49
- return localize(13731, "Welcome");
49
+ return localize(14855, "Welcome");
50
50
  }
51
51
  get showTelemetryNotice() {
52
52
  return this._showTelemetryNotice;
@@ -168,31 +168,31 @@
168
168
  * Each pair forms a visual row.
169
169
  * Left column items need to move up by floor((index-1)/2) rows
170
170
  * Right column items need to move right and up by (index/2) rows
171
- * Row height is 52px.
171
+ * Row height is 54px (must match AgentSessionsListDelegate.ITEM_HEIGHT).
172
172
  */
173
173
 
174
174
  /* Left column items (odd positions): move up to form 2-column layout */
175
175
  /* Item 3: move up 1 row */
176
176
  .agentSessionsWelcome-sessionsGrid .monaco-list-row:nth-child(3) {
177
- transform: translateY(-52px);
177
+ transform: translateY(-54px);
178
178
  }
179
179
  /* Item 5: move up 2 rows */
180
180
  .agentSessionsWelcome-sessionsGrid .monaco-list-row:nth-child(5) {
181
- transform: translateY(-104px);
181
+ transform: translateY(-108px);
182
182
  }
183
183
 
184
184
  /* Right column items (even positions): move right and up */
185
185
  /* Item 2: move right, up 1 row */
186
186
  .agentSessionsWelcome-sessionsGrid .monaco-list-row:nth-child(2) {
187
- transform: translateX(100%) translateY(-52px);
187
+ transform: translateX(100%) translateY(-54px);
188
188
  }
189
189
  /* Item 4: move right, up 2 rows */
190
190
  .agentSessionsWelcome-sessionsGrid .monaco-list-row:nth-child(4) {
191
- transform: translateX(100%) translateY(-104px);
191
+ transform: translateX(100%) translateY(-108px);
192
192
  }
193
193
  /* Item 6: move right, up 3 rows */
194
194
  .agentSessionsWelcome-sessionsGrid .monaco-list-row:nth-child(6) {
195
- transform: translateX(100%) translateY(-156px);
195
+ transform: translateX(100%) translateY(-162px);
196
196
  }
197
197
 
198
198
  /* Style individual session items in the welcome page */
@@ -482,7 +482,7 @@
482
482
  gap: 12px;
483
483
  padding: 8px 12px 8px 8px;
484
484
  border-radius: 4px;
485
- height: 52px;
485
+ height: 44px;
486
486
  box-sizing: border-box;
487
487
  }
488
488
 
@@ -40,7 +40,7 @@ registerAction2(class extends Action2 {
40
40
  constructor() {
41
41
  super({
42
42
  id: "workbench.action.openWalkthrough",
43
- title: ( localize2(13732, "Welcome")),
43
+ title: ( localize2(14856, "Welcome")),
44
44
  category: Categories.Help,
45
45
  f1: true,
46
46
  menu: {
@@ -49,7 +49,7 @@ registerAction2(class extends Action2 {
49
49
  order: 1
50
50
  },
51
51
  metadata: {
52
- description: ( localize2(13733, "Opens a Walkthrough to help you get started in VS Code."))
52
+ description: ( localize2(14857, "Opens a Walkthrough to help you get started in VS Code."))
53
53
  }
54
54
  });
55
55
  }
@@ -114,15 +114,15 @@ registerAction2(class extends Action2 {
114
114
  });
115
115
  ( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(GettingStartedInput.ID, GettingStartedInputSerializer);
116
116
  ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
117
- EditorPaneDescriptor.create(GettingStartedPage, GettingStartedPage.ID, ( localize(13734, "Welcome"))),
117
+ EditorPaneDescriptor.create(GettingStartedPage, GettingStartedPage.ID, ( localize(14858, "Welcome"))),
118
118
  [( new SyncDescriptor(GettingStartedInput))]
119
119
  );
120
- const category = ( localize2(13734, "Welcome"));
120
+ const category = ( localize2(14858, "Welcome"));
121
121
  registerAction2(class extends Action2 {
122
122
  constructor() {
123
123
  super({
124
124
  id: "welcome.goBack",
125
- title: ( localize2(13735, "Go Back")),
125
+ title: ( localize2(14859, "Go Back")),
126
126
  category,
127
127
  keybinding: {
128
128
  weight: KeybindingWeight.EditorContrib,
@@ -157,7 +157,7 @@ registerAction2(class extends Action2 {
157
157
  constructor() {
158
158
  super({
159
159
  id: "welcome.markStepComplete",
160
- title: ( localize(13736, "Mark Step Complete")),
160
+ title: ( localize(14860, "Mark Step Complete")),
161
161
  category
162
162
  });
163
163
  }
@@ -173,7 +173,7 @@ registerAction2(class extends Action2 {
173
173
  constructor() {
174
174
  super({
175
175
  id: "welcome.markStepIncomplete",
176
- title: ( localize(13737, "Mark Step Incomplete")),
176
+ title: ( localize(14861, "Mark Step Incomplete")),
177
177
  category
178
178
  });
179
179
  }
@@ -189,7 +189,7 @@ registerAction2(class extends Action2 {
189
189
  constructor() {
190
190
  super({
191
191
  id: "welcome.showAllWalkthroughs",
192
- title: ( localize2(13738, "Open Walkthrough...")),
192
+ title: ( localize2(14862, "Open Walkthrough...")),
193
193
  category,
194
194
  f1: true,
195
195
  menu: {
@@ -219,7 +219,7 @@ registerAction2(class extends Action2 {
219
219
  quickPick.canSelectMany = false;
220
220
  quickPick.matchOnDescription = true;
221
221
  quickPick.matchOnDetail = true;
222
- quickPick.placeholder = ( localize(13739, "Select a walkthrough to open"));
222
+ quickPick.placeholder = ( localize(14863, "Select a walkthrough to open"));
223
223
  quickPick.items = await this.getQuickPickItems(contextService, gettingStartedService);
224
224
  quickPick.busy = true;
225
225
  disposables.add(quickPick.onDidAccept(() => {
@@ -250,7 +250,7 @@ CommandsRegistry.registerCommand({
250
250
  }
251
251
  });
252
252
  const WorkspacePlatform = ( new RawContextKey("workspacePlatform", undefined, ( localize(
253
- 13740,
253
+ 14864,
254
254
  "The platform of the current workspace, which in remote or serverless contexts may be different from the platform of the UI"
255
255
  ))));
256
256
  let WorkspacePlatformContribution = class WorkspacePlatformContribution {
@@ -292,7 +292,7 @@ configurationRegistry.registerConfiguration({
292
292
  type: "boolean",
293
293
  default: true,
294
294
  description: ( localize(
295
- 13741,
295
+ 14865,
296
296
  "When enabled, an extension's walkthrough will open upon install of the extension."
297
297
  ))
298
298
  },
@@ -308,19 +308,22 @@ configurationRegistry.registerConfiguration({
308
308
  "terminal",
309
309
  "agentSessionsWelcomePage"
310
310
  ],
311
- "enumDescriptions": [( localize(13742, "Start without an editor.")), ( localize(
312
- 13743,
311
+ "enumDescriptions": [( localize(14866, "Start without an editor.")), ( localize(
312
+ 14867,
313
313
  "Open the Welcome page, with content to aid in getting started with VS Code and extensions."
314
314
  )), ( localize(
315
- 13744,
315
+ 14868,
316
316
  "Open the README when opening a folder that contains one, fallback to 'welcomePage' otherwise. Note: This is only observed as a global configuration, it will be ignored if set in a workspace or folder configuration."
317
317
  )), ( localize(
318
- 13745,
318
+ 14869,
319
319
  "Open a new untitled text file (only applies when opening an empty window)."
320
- )), ( localize(13746, "Open the Welcome page when opening an empty workbench.")), ( localize(13747, "Open a new terminal in the editor area.")), ( localize(13748, "Open the Agent Sessions Welcome page."))],
320
+ )), ( localize(14870, "Open the Welcome page when opening an empty workbench.")), ( localize(14871, "Open a new terminal in the editor area.")), ( localize(
321
+ 14872,
322
+ "Open the Agent Sessions Welcome page. Will override the workbench secondary side bar visibility settings."
323
+ ))],
321
324
  "default": "welcomePage",
322
325
  "description": ( localize(
323
- 13749,
326
+ 14873,
324
327
  "Controls which editor is shown at startup, if none are restored from the previous session."
325
328
  )),
326
329
  "experiment": {
@@ -331,8 +334,8 @@ configurationRegistry.registerConfiguration({
331
334
  scope: ConfigurationScope.APPLICATION,
332
335
  type: "boolean",
333
336
  default: false,
334
- deprecationMessage: ( localize(13750, "Deprecated, use the global `workbench.reduceMotion`.")),
335
- description: ( localize(13751, "When enabled, reduce motion in welcome page."))
337
+ deprecationMessage: ( localize(14874, "Deprecated, use the global `workbench.reduceMotion`.")),
338
+ description: ( localize(14875, "When enabled, reduce motion in welcome page."))
336
339
  }
337
340
  }
338
341
  });