Skip to content

Commit

Permalink
add pear version in about
Browse files Browse the repository at this point in the history
  • Loading branch information
Himanshu-Singh-Chauhan committed Oct 9, 2024
1 parent 1e2cbc5 commit ae1fc1e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
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
12 changes: 7 additions & 5 deletions src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
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

0 comments on commit ae1fc1e

Please sign in to comment.