@@ -15,7 +15,7 @@ import { RepositoriesManager } from './repositoriesManager';
1515import { IssueReference , SessionData , TaskManager } from './taskManager' ;
1616
1717// Dashboard state discriminated union
18- export type DashboardState = DashboardLoading | DashboardReady | GlobalDashboardLoading | GlobalDashboardReady ;
18+ export type DashboardState = DashboardLoading | DashboardReady ;
1919
2020export interface DashboardLoading {
2121 state : 'loading' ;
@@ -34,24 +34,6 @@ export interface DashboardReady {
3434 currentBranch ?: string ;
3535}
3636
37- export interface GlobalDashboardLoading {
38- state : 'loading' ;
39- isGlobal : true ;
40- }
41-
42- export interface GlobalDashboardReady {
43- state : 'ready' ;
44- isGlobal : true ;
45- activeSessions : SessionData [ ] ;
46- recentProjects : ProjectData [ ] ;
47- }
48-
49- export interface ProjectData {
50- name : string ;
51- path : string ;
52- lastOpened : string ;
53- }
54-
5537// Legacy interface for backward compatibility
5638export interface DashboardData {
5739 activeSessions : SessionData [ ] ;
@@ -85,7 +67,6 @@ export class DashboardWebviewProvider extends WebviewBase {
8567 private _issueQuery : string ;
8668 private _repos ?: string [ ] ;
8769 private _taskManager : TaskManager ;
88- private _isGlobal : boolean ;
8970
9071 constructor (
9172 private readonly _context : vscode . ExtensionContext ,
@@ -95,15 +76,13 @@ export class DashboardWebviewProvider extends WebviewBase {
9576 extensionUri : vscode . Uri ,
9677 panel : vscode . WebviewPanel ,
9778 issueQuery : string ,
98- repos : string [ ] | undefined ,
99- isGlobal : boolean = false
79+ repos : string [ ] | undefined
10080 ) {
10181 super ( ) ;
10282 this . _panel = panel ;
10383 this . _webview = panel . webview ;
10484 this . _issueQuery = issueQuery || 'is:open assignee:@me milestone:"September 2025"' ;
10585 this . _repos = repos ;
106- this . _isGlobal = isGlobal ;
10786 this . _taskManager = new TaskManager ( this . _repositoriesManager , this . _copilotRemoteAgentManager ) ;
10887 super . initialize ( ) ;
10988
@@ -147,29 +126,11 @@ export class DashboardWebviewProvider extends WebviewBase {
147126
148127 private async updateDashboard ( ) : Promise < void > {
149128 try {
150- if ( this . _isGlobal ) {
151- // For global dashboard, get data from all repositories
152- const globalData = await this . getGlobalDashboardData ( ) ;
153- const readyData : GlobalDashboardReady = {
154- state : 'ready' ,
155- isGlobal : true ,
156- activeSessions : globalData . activeSessions ,
157- recentProjects : globalData . recentProjects
158- } ;
159- this . _postMessage ( {
160- command : 'update-dashboard' ,
161- data : readyData
162- } ) ;
163- return ;
164- }
165-
166- // Regular dashboard logic
167129 // Wait for repositories to be loaded before fetching data
168130 await this . waitForRepositoriesReady ( ) ;
169131
170132 // Check if we actually have folder managers available before proceeding
171133 if ( ! this . _repositoriesManager . folderManagers || this . _repositoriesManager . folderManagers . length === 0 ) {
172-
173134 // Don't send ready state if we don't have folder managers yet
174135 return ;
175136 }
@@ -253,50 +214,6 @@ export class DashboardWebviewProvider extends WebviewBase {
253214 } ;
254215 }
255216
256- private async getGlobalDashboardData ( ) : Promise < { activeSessions : SessionData [ ] ; recentProjects : ProjectData [ ] } > {
257- // Get all sessions from all repositories
258- const allSessions = await this . _taskManager . getAllSessions ( ) ;
259-
260- // Get recent projects (this would be implemented to get from VS Code workspace history)
261- const recentProjects = await this . getRecentProjects ( ) ;
262-
263- return {
264- activeSessions : allSessions ,
265- recentProjects
266- } ;
267- }
268-
269- private async getRecentProjects ( ) : Promise < ProjectData [ ] > {
270- // For now, return mock data - in a real implementation, this would get from VS Code's recent workspaces
271- return [
272- {
273- name : 'chat-output-renderer-sample' ,
274- path : '~/projects/vscode-extension-samples/chat-output-renderer-sample' ,
275- lastOpened : new Date ( ) . toISOString ( )
276- } ,
277- {
278- name : 'vscode' ,
279- path : '~/projects' ,
280- lastOpened : new Date ( Date . now ( ) - 86400000 ) . toISOString ( ) // 1 day ago
281- } ,
282- {
283- name : 'vscode-docs' ,
284- path : '~/projects' ,
285- lastOpened : new Date ( Date . now ( ) - 172800000 ) . toISOString ( ) // 2 days ago
286- } ,
287- {
288- name : 'sandbox' ,
289- path : '~/projects' ,
290- lastOpened : new Date ( Date . now ( ) - 259200000 ) . toISOString ( ) // 3 days ago
291- } ,
292- {
293- name : 'typescript-go' ,
294- path : '~/projects' ,
295- lastOpened : new Date ( Date . now ( ) - 345600000 ) . toISOString ( ) // 4 days ago
296- }
297- ] ;
298- }
299-
300217 private async getActiveSessions ( ) : Promise < SessionData [ ] > {
301218 const targetRepos = this . getTargetRepositories ( ) ;
302219 return await this . _taskManager . getActiveSessions ( targetRepos ) ;
@@ -790,9 +707,10 @@ export class DashboardWebviewProvider extends WebviewBase {
790707 this . _onIsReady . fire ( ) ;
791708
792709 // Send immediate initialize message with loading state
793- const loadingData : DashboardLoading | GlobalDashboardLoading = this . _isGlobal
794- ? { state : 'loading' , isGlobal : true }
795- : { state : 'loading' , issueQuery : this . _issueQuery } ;
710+ const loadingData : DashboardLoading = {
711+ state : 'loading' ,
712+ issueQuery : this . _issueQuery
713+ } ;
796714
797715 this . _postMessage ( {
798716 command : 'initialize' ,
0 commit comments