Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pear version in about #52

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/vs/base/common/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ export type ExtensionVirtualWorkspaceSupport = {
};

export interface IProductConfiguration {
readonly version: string;
readonly pearAIVersion?: string;
readonly version: string; // vscode version
readonly date?: string;
readonly quality?: string;
readonly commit?: string;
readonly commit?: string; // pearAI commit, generated when building and packaging
readonly VSCodeCommit?: string;

readonly nameShort: string;
readonly nameLong: string;
Expand Down Expand Up @@ -200,7 +202,6 @@ export interface IProductConfiguration {
readonly gitHubEntitlement?: IGitHubEntitlement;
readonly chatWelcomeView?: IChatWelcomeView;
readonly chatParticipantRegistry?: string;
readonly pearAIVersion?: string;
}

export interface ITunnelApplicationConfig {
Expand Down
3 changes: 1 addition & 2 deletions src/vs/nls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ function _format(message: string, args: (string | number | boolean | undefined |
if (args.length === 0) {
result = message;
} else {
result = message.replace(/\{(\d+)\}/g, (match, rest) => {
const index = rest[0];
result = message.replace(/\{(\d+)\}/g, (match, index) => {
const arg = args[index];
let result = match;
if (typeof arg === 'string') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,23 @@ export class NativeDialogHandler extends AbstractDialogHandler {
}

async about(): Promise<void> {
let version = this.productService.version;
let vscodeVersion = this.productService.version;
if (this.productService.target) {
version = `${version} (${this.productService.target} setup)`;
vscodeVersion = `${vscodeVersion} (${this.productService.target} setup)`;
} else if (this.productService.darwinUniversalAssetId) {
version = `${version} (Universal)`;
vscodeVersion = `${vscodeVersion} (Universal)`;
}

const osProps = await this.nativeHostService.getOSProperties();

const detailString = (useAgo: boolean): string => {
return localize({ key: 'aboutDetail', comment: ['Electron, Chromium, Node.js and V8 are product names that need no translation'] },
"Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nElectronBuildId: {4}\nChromium: {5}\nNode.js: {6}\nV8: {7}\nOS: {8}",
version,
"Version: {0}\nCommit: {1}\nDate: {2}\n\nVSCode Version: {3}\nVSCode Commit: {4}\nElectron: {5}\nElectronBuildId: {6}\nChromium: {7}\nNode.js: {8}\nV8: {9}\nOS: {10}",
this.productService.pearAIVersion || 'Unknown',
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
vscodeVersion,
this.productService.VSCodeCommit || 'Unknown',
process.versions['electron'],
process.versions['microsoft-build'],
process.versions['chrome'],
Expand Down