|
|
@ -1,5 +1,6 @@ |
|
|
|
import type { ExtensionContext } from 'vscode'; |
|
|
|
import { version as codeVersion, env, extensions, window, workspace } from 'vscode'; |
|
|
|
import { hrtime } from '@env/hrtime'; |
|
|
|
import { isWeb } from '@env/platform'; |
|
|
|
import { Api } from './api/api'; |
|
|
|
import type { CreatePullRequestActionContext, GitLensApi, OpenPullRequestActionContext } from './api/gitlens'; |
|
|
@ -188,35 +189,36 @@ export async function activate(context: ExtensionContext): Promise |
|
|
|
upgradedFrom: previousVersion != null && gitlensVersion !== previousVersion ? previousVersion : undefined, |
|
|
|
}); |
|
|
|
|
|
|
|
const api = new Api(container); |
|
|
|
const mode = container.mode; |
|
|
|
|
|
|
|
const startTime = sw.startTime; |
|
|
|
const endTime = hrtime(); |
|
|
|
const elapsed = sw.elapsed(); |
|
|
|
|
|
|
|
queueMicrotask(() => { |
|
|
|
sw.stop({ |
|
|
|
message: ` activated${exitMessage != null ? `, ${exitMessage}` : ''}${ |
|
|
|
mode != null ? `, mode: ${mode.name}` : '' |
|
|
|
}`,
|
|
|
|
}); |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
// TODO@eamodio do we want to capture any vscode settings that are relevant to GitLens?
|
|
|
|
const config = flatten(configuration.getAll(true), { prefix: 'config', stringify: 'all' }); |
|
|
|
container.telemetry.sendEvent( |
|
|
|
'activate', |
|
|
|
{ |
|
|
|
'activation.elapsed': elapsed, |
|
|
|
'activation.mode': mode?.name, |
|
|
|
...config, |
|
|
|
}, |
|
|
|
sw.startTime, |
|
|
|
startTime, |
|
|
|
endTime, |
|
|
|
); |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
const data = flatten(configuration.getAll(true), { prefix: 'config', stringify: 'all' }); |
|
|
|
// TODO@eamodio do we want to capture any vscode settings that are relevant to GitLens?
|
|
|
|
container.telemetry.sendEvent('config', data); |
|
|
|
}, 5000); |
|
|
|
}); |
|
|
|
setTimeout(() => uninstallDeprecatedAuthentication(), 25000); |
|
|
|
}, 5000); |
|
|
|
|
|
|
|
sw.stop({ |
|
|
|
message: ` activated${exitMessage != null ? `, ${exitMessage}` : ''}${ |
|
|
|
mode != null ? `, mode: ${mode.name}` : '' |
|
|
|
}`,
|
|
|
|
}); |
|
|
|
|
|
|
|
setTimeout(() => uninstallDeprecatedAuthentication(), 30000); |
|
|
|
|
|
|
|
const api = new Api(container); |
|
|
|
return Promise.resolve(api); |
|
|
|
} |
|
|
|
|
|
|
|