Bläddra i källkod

Updates feature usage type to avoid duplication

Fixes worktrees and workspaces view usage key
main
Eric Amodio 1 år sedan
förälder
incheckning
167aec2804
3 ändrade filer med 6 tillägg och 27 borttagningar
  1. +4
    -25
      src/telemetry/usageTracker.ts
  2. +1
    -1
      src/views/workspacesView.ts
  3. +1
    -1
      src/views/worktreesView.ts

+ 4
- 25
src/telemetry/usageTracker.ts Visa fil

@ -1,5 +1,6 @@
import type { Disposable, Event } from 'vscode';
import { EventEmitter } from 'vscode';
import type { CustomEditorTypes, TreeViewTypes, WebviewTypes, WebviewViewTypes } from '../constants';
import type { Container } from '../container';
import { updateRecordValue } from '../system/object';
import type { Storage } from '../system/storage';
@ -11,31 +12,9 @@ export interface TrackedUsage {
}
export type TrackedUsageFeatures =
| 'accountView'
| 'branchesView'
| 'commitDetailsView'
| 'commitsView'
| 'contributorsView'
| 'draftsView'
| 'fileHistoryView'
| 'focusWebview'
| 'graphDetailsView'
| 'graphView'
| 'graphWebview'
| 'homeView'
| 'lineHistoryView'
| 'patchDetailsView'
| 'rebaseEditor'
| 'remotesView'
| 'repositoriesView'
| 'stashesView'
| 'settingsWebview'
| 'searchAndCompareView'
| 'tagsView'
| 'timelineWebview'
| 'timelineView'
| 'welcomeWebview'
| 'workspaceView';
| `${WebviewTypes}Webview`
| `${TreeViewTypes | WebviewViewTypes}View`
| `${CustomEditorTypes}Editor`;
export type TrackedUsageKeys = `${TrackedUsageFeatures}:shown`;
export type UsageChangeEvent = {

+ 1
- 1
src/views/workspacesView.ts Visa fil

@ -83,7 +83,7 @@ export class WorkspacesView extends ViewBase<'workspaces', WorkspacesViewNode, W
private _disposable: Disposable | undefined;
constructor(container: Container) {
super(container, 'workspaces', 'Workspaces', 'workspaceView');
super(container, 'workspaces', 'Workspaces', 'workspacesView');
this.description = `PREVIEW\u00a0\u00a0☁️`;
this.disposables.push(container.workspaces.onDidResetWorkspaces(() => void this.refresh(true)));

+ 1
- 1
src/views/worktreesView.ts Visa fil

@ -97,7 +97,7 @@ export class WorktreesView extends ViewBase<'worktrees', WorktreesViewNode, Work
protected readonly configKey = 'worktrees';
constructor(container: Container) {
super(container, 'worktrees', 'Worktrees', 'workspaceView');
super(container, 'worktrees', 'Worktrees', 'worktreesView');
this.disposables.push(
window.registerFileDecorationProvider({

Laddar…
Avbryt
Spara