imcp 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/installers/clients/ClientInstaller.d.ts +0 -1
- package/dist/core/installers/clients/ClientInstaller.js +1 -3
- package/dist/core/installers/clients/ClientInstallerFactory.d.ts +4 -3
- package/dist/core/installers/clients/ClientInstallerFactory.js +10 -14
- package/dist/web/public/js/flights/flights.js +2 -2
- package/dist/web/public/js/modal/installation.js +5 -5
- package/package.json +1 -1
- package/src/core/installers/clients/ClientInstaller.ts +1 -3
- package/src/core/installers/clients/ClientInstallerFactory.ts +11 -14
- package/src/web/public/js/flights/flights.js +2 -2
- package/src/web/public/js/modal/installation.js +5 -5
|
@@ -8,7 +8,6 @@ export declare class ClientInstaller {
|
|
|
8
8
|
private serverName;
|
|
9
9
|
private clients;
|
|
10
10
|
private configProvider;
|
|
11
|
-
private operationStatuses;
|
|
12
11
|
constructor(categoryName: string, serverName: string, clients: string[]);
|
|
13
12
|
/**
|
|
14
13
|
* Generate a unique operation ID for tracking installations
|
|
@@ -9,13 +9,11 @@ export class ClientInstaller {
|
|
|
9
9
|
serverName;
|
|
10
10
|
clients;
|
|
11
11
|
configProvider;
|
|
12
|
-
operationStatuses;
|
|
13
12
|
constructor(categoryName, serverName, clients) {
|
|
14
13
|
this.categoryName = categoryName;
|
|
15
14
|
this.serverName = serverName;
|
|
16
15
|
this.clients = clients;
|
|
17
16
|
this.configProvider = ConfigurationProvider.getInstance();
|
|
18
|
-
this.operationStatuses = new Map();
|
|
19
17
|
}
|
|
20
18
|
/**
|
|
21
19
|
* Generate a unique operation ID for tracking installations
|
|
@@ -100,7 +98,7 @@ export class ClientInstaller {
|
|
|
100
98
|
return;
|
|
101
99
|
}
|
|
102
100
|
// Create client-specific installer
|
|
103
|
-
const installer = ClientInstallerFactory.
|
|
101
|
+
const installer = ClientInstallerFactory.getInstaller(clientName);
|
|
104
102
|
if (!installer) {
|
|
105
103
|
throw new Error(`Failed to create installer for client: ${clientName}`);
|
|
106
104
|
}
|
|
@@ -4,12 +4,13 @@ import { BaseClientInstaller } from './BaseClientInstaller.js';
|
|
|
4
4
|
* Handles creation of appropriate installer based on client type
|
|
5
5
|
*/
|
|
6
6
|
export declare class ClientInstallerFactory {
|
|
7
|
+
private static readonly installerMap;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param clientName Name of the client to
|
|
9
|
+
* Get a client installer instance based on client type
|
|
10
|
+
* @param clientName Name of the client to get installer for
|
|
10
11
|
* @returns Client-specific installer instance or undefined if client not supported
|
|
11
12
|
*/
|
|
12
|
-
static
|
|
13
|
+
static getInstaller(clientName: string): BaseClientInstaller | undefined;
|
|
13
14
|
/**
|
|
14
15
|
* Check if a client is supported
|
|
15
16
|
* @param clientName Name of the client to check
|
|
@@ -7,27 +7,23 @@ import { SUPPORTED_CLIENTS } from '../../constants.js';
|
|
|
7
7
|
* Handles creation of appropriate installer based on client type
|
|
8
8
|
*/
|
|
9
9
|
export class ClientInstallerFactory {
|
|
10
|
+
static installerMap = {
|
|
11
|
+
[Object.keys(SUPPORTED_CLIENTS)[0]]: MSRooCodeInstaller,
|
|
12
|
+
[Object.keys(SUPPORTED_CLIENTS)[1]]: ClineInstaller,
|
|
13
|
+
[Object.keys(SUPPORTED_CLIENTS)[2]]: GithubCopilotInstaller
|
|
14
|
+
};
|
|
10
15
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param clientName Name of the client to
|
|
16
|
+
* Get a client installer instance based on client type
|
|
17
|
+
* @param clientName Name of the client to get installer for
|
|
13
18
|
* @returns Client-specific installer instance or undefined if client not supported
|
|
14
19
|
*/
|
|
15
|
-
static
|
|
20
|
+
static getInstaller(clientName) {
|
|
16
21
|
// Check if client is supported
|
|
17
22
|
if (!SUPPORTED_CLIENTS[clientName]) {
|
|
18
23
|
return undefined;
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
case 'MSRooCode':
|
|
23
|
-
return new MSRooCodeInstaller();
|
|
24
|
-
case 'Cline':
|
|
25
|
-
return new ClineInstaller();
|
|
26
|
-
case 'GithubCopilot':
|
|
27
|
-
return new GithubCopilotInstaller();
|
|
28
|
-
default:
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
25
|
+
const InstallerClass = this.installerMap[clientName];
|
|
26
|
+
return InstallerClass ? new InstallerClass() : undefined;
|
|
31
27
|
}
|
|
32
28
|
/**
|
|
33
29
|
* Check if a client is supported
|
|
@@ -4,7 +4,7 @@ const FLIGHT_STORAGE_KEY = 'activeFlightSettings';
|
|
|
4
4
|
|
|
5
5
|
// Default flight settings
|
|
6
6
|
const defaultFlights = {
|
|
7
|
-
enableOnboard:
|
|
7
|
+
enableOnboard: false, // Default: Onboarding is enabled. Set to false to disable.
|
|
8
8
|
// Add other default flights here, e.g., newFeatureX: false,
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -90,7 +90,7 @@ function _buildFlightParams() {
|
|
|
90
90
|
// Only add if it's a recognized flight from defaultFlights to avoid polluting URL
|
|
91
91
|
// with unrelated sessionStorage items if FLIGHT_STORAGE_KEY was somehow corrupted.
|
|
92
92
|
if (Object.hasOwnProperty.call(defaultFlights, flightName)) {
|
|
93
|
-
|
|
93
|
+
flightParams.set(flightName, String(effectiveFlightSettings[flightName]));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -129,11 +129,11 @@ async function pollInstallStatus(categoryName, serverName, targets, interval = 2
|
|
|
129
129
|
for (const req of requirements) {
|
|
130
130
|
const reqStatus = requirementsStatus[req.name] || {};
|
|
131
131
|
if (reqStatus.installed === true && !reqStatus.operationStatus) {
|
|
132
|
-
const msg = `Requirement [${req.name}] already installed.`;
|
|
133
|
-
if (msg && lastRequirementMessages[req.name] !== msg) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
132
|
+
// const msg = `Requirement [${req.name}] already installed.`;
|
|
133
|
+
// if (msg && lastRequirementMessages[req.name] !== msg) {
|
|
134
|
+
// delayedAppendInstallLoadingMessage(msg);
|
|
135
|
+
// lastRequirementMessages[req.name] = msg;
|
|
136
|
+
// }
|
|
137
137
|
continue;
|
|
138
138
|
}
|
|
139
139
|
const opStatus = reqStatus.operationStatus || {};
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ import { ClientInstallerFactory } from './ClientInstallerFactory.js';
|
|
|
16
16
|
*/
|
|
17
17
|
export class ClientInstaller {
|
|
18
18
|
private configProvider: ConfigurationProvider;
|
|
19
|
-
private operationStatuses: Map<string, OperationStatus>;
|
|
20
19
|
|
|
21
20
|
constructor(
|
|
22
21
|
private categoryName: string,
|
|
@@ -24,7 +23,6 @@ export class ClientInstaller {
|
|
|
24
23
|
private clients: string[]
|
|
25
24
|
) {
|
|
26
25
|
this.configProvider = ConfigurationProvider.getInstance();
|
|
27
|
-
this.operationStatuses = new Map();
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
/**
|
|
@@ -141,7 +139,7 @@ export class ClientInstaller {
|
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
// Create client-specific installer
|
|
144
|
-
const installer = ClientInstallerFactory.
|
|
142
|
+
const installer = ClientInstallerFactory.getInstaller(clientName);
|
|
145
143
|
|
|
146
144
|
if (!installer) {
|
|
147
145
|
throw new Error(`Failed to create installer for client: ${clientName}`);
|
|
@@ -9,12 +9,18 @@ import { SUPPORTED_CLIENTS } from '../../constants.js';
|
|
|
9
9
|
* Handles creation of appropriate installer based on client type
|
|
10
10
|
*/
|
|
11
11
|
export class ClientInstallerFactory {
|
|
12
|
+
private static readonly installerMap: Record<string, new () => BaseClientInstaller> = {
|
|
13
|
+
[Object.keys(SUPPORTED_CLIENTS)[0]]: MSRooCodeInstaller,
|
|
14
|
+
[Object.keys(SUPPORTED_CLIENTS)[1]]: ClineInstaller,
|
|
15
|
+
[Object.keys(SUPPORTED_CLIENTS)[2]]: GithubCopilotInstaller
|
|
16
|
+
};
|
|
17
|
+
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
14
|
-
* @param clientName Name of the client to
|
|
19
|
+
* Get a client installer instance based on client type
|
|
20
|
+
* @param clientName Name of the client to get installer for
|
|
15
21
|
* @returns Client-specific installer instance or undefined if client not supported
|
|
16
22
|
*/
|
|
17
|
-
static
|
|
23
|
+
static getInstaller(
|
|
18
24
|
clientName: string
|
|
19
25
|
): BaseClientInstaller | undefined {
|
|
20
26
|
// Check if client is supported
|
|
@@ -22,17 +28,8 @@ export class ClientInstallerFactory {
|
|
|
22
28
|
return undefined;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
case 'MSRooCode':
|
|
28
|
-
return new MSRooCodeInstaller();
|
|
29
|
-
case 'Cline':
|
|
30
|
-
return new ClineInstaller();
|
|
31
|
-
case 'GithubCopilot':
|
|
32
|
-
return new GithubCopilotInstaller();
|
|
33
|
-
default:
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
31
|
+
const InstallerClass = this.installerMap[clientName as keyof typeof this.installerMap];
|
|
32
|
+
return InstallerClass ? new InstallerClass() : undefined;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
/**
|
|
@@ -4,7 +4,7 @@ const FLIGHT_STORAGE_KEY = 'activeFlightSettings';
|
|
|
4
4
|
|
|
5
5
|
// Default flight settings
|
|
6
6
|
const defaultFlights = {
|
|
7
|
-
enableOnboard:
|
|
7
|
+
enableOnboard: false, // Default: Onboarding is enabled. Set to false to disable.
|
|
8
8
|
// Add other default flights here, e.g., newFeatureX: false,
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -90,7 +90,7 @@ function _buildFlightParams() {
|
|
|
90
90
|
// Only add if it's a recognized flight from defaultFlights to avoid polluting URL
|
|
91
91
|
// with unrelated sessionStorage items if FLIGHT_STORAGE_KEY was somehow corrupted.
|
|
92
92
|
if (Object.hasOwnProperty.call(defaultFlights, flightName)) {
|
|
93
|
-
|
|
93
|
+
flightParams.set(flightName, String(effectiveFlightSettings[flightName]));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -129,11 +129,11 @@ async function pollInstallStatus(categoryName, serverName, targets, interval = 2
|
|
|
129
129
|
for (const req of requirements) {
|
|
130
130
|
const reqStatus = requirementsStatus[req.name] || {};
|
|
131
131
|
if (reqStatus.installed === true && !reqStatus.operationStatus) {
|
|
132
|
-
const msg = `Requirement [${req.name}] already installed.`;
|
|
133
|
-
if (msg && lastRequirementMessages[req.name] !== msg) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
132
|
+
// const msg = `Requirement [${req.name}] already installed.`;
|
|
133
|
+
// if (msg && lastRequirementMessages[req.name] !== msg) {
|
|
134
|
+
// delayedAppendInstallLoadingMessage(msg);
|
|
135
|
+
// lastRequirementMessages[req.name] = msg;
|
|
136
|
+
// }
|
|
137
137
|
continue;
|
|
138
138
|
}
|
|
139
139
|
const opStatus = reqStatus.operationStatus || {};
|