Add history tree item command to open task

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-11-18 20:16:25 -05:00
parent fbd1371d70
commit 8d7c9e1fbf
2 changed files with 17 additions and 2 deletions

View File

@@ -37,11 +37,18 @@ export default class HistoryTreeItem extends TreeItem implements GithubLocalActi
this.iconPath = new ThemeIcon('circle-slash', new ThemeColor('GitHubLocalActions.yellow'));
break;
}
this.tooltip = `Name: ${history.name}\n` +
this.tooltip = `Name: ${history.name} #${history.count}\n` +
`Path: ${history.commandArgs.fsPath}\n` +
`${history.commandArgs.extraHeader.map(header => `${header.key}: ${header.value}`).join('\n')}\n` +
`Status: ${history.status}\n` +
`Started: ${Utils.getDateString(history.date.start)}\n` +
`Ended: ${endTime ? Utils.getDateString(endTime) : 'N/A'}\n` +
`Total Duration: ${totalDuration ? totalDuration : 'N/A'}`;
this.command = {
title: 'Focus Task',
command: 'githubLocalActions.focusTask',
arguments: [this]
};
}
async getChildren(): Promise<GithubLocalActionsTreeItem[]> {