瀏覽代碼

Updates feature usage type to avoid duplication

Fixes worktrees and workspaces view usage key
main
Eric Amodio 1 年之前
父節點
當前提交
167aec2804
共有 3 個檔案被更改,包括 6 行新增27 行删除
  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 查看文件

@ -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 查看文件

@ -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 查看文件

@ -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({

Loading…
取消
儲存