* Don't construct the redirect URL in the webview. Add an RPC to the ProtoBus to get the URI to redirect back to the host IDE. Support for JetBrains will be added in a second PR. * Remove the uriScheme and extension name from the ExtensionStateContext. These are being used to construct the IDE redirect URI, but this is not a cross-platform compatible way to do this. * Update the host bridge to return the whole URL to redirect to the IDE Return the whole redirect URI instead of just the URI scheme. VSCode needs the whole URI to redirect back to VSCode and open the cline extension. * Update js doc * Remove unused propertu uriScheme All uses of vscode.env.uriScheme have been moved to platform specific code, so add it to linter rules for vscode API.
55 lines
1.8 KiB
Protocol Buffer
55 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package host;
|
|
option java_package = "bot.cline.host.proto";
|
|
option java_multiple_files = true;
|
|
|
|
import "cline/common.proto";
|
|
|
|
// Provides methods for working with the user's environment.
|
|
service EnvService {
|
|
// Writes text to the system clipboard.
|
|
rpc clipboardWriteText(cline.StringRequest) returns (cline.Empty);
|
|
|
|
// Reads text from the system clipboard.
|
|
rpc clipboardReadText(cline.EmptyRequest) returns (cline.String);
|
|
|
|
// Returns a stable machine identifier for telemetry distinctId purposes.
|
|
rpc getMachineId(cline.EmptyRequest) returns (cline.String);
|
|
|
|
// Returns the name and version of the host IDE or environment.
|
|
rpc getHostVersion(cline.EmptyRequest) returns (GetHostVersionResponse);
|
|
|
|
// Returns a URI that will redirect to the host environment.
|
|
// e.g. vscode://saoudrizwan.claude-dev, idea://, pycharm://, etc.
|
|
// If the host does not support URIs it should return empty.
|
|
rpc getIdeRedirectUri(cline.EmptyRequest) returns (cline.String);
|
|
|
|
// Returns the telemetry settings of the host environment. This may return UNSUPPORTED
|
|
// if the host does not specify telemetry settings for the plugin.
|
|
rpc getTelemetrySettings(cline.EmptyRequest) returns (GetTelemetrySettingsResponse);
|
|
|
|
// Returns events when the telemetry settings change.
|
|
rpc subscribeToTelemetrySettings(cline.EmptyRequest) returns (stream TelemetrySettingsEvent);
|
|
}
|
|
|
|
message GetHostVersionResponse {
|
|
// The name of the host platform, e.g VSCode
|
|
optional string platform = 1;
|
|
// The version of the host platform, e.g. 1.103.0
|
|
optional string version = 2;
|
|
}
|
|
|
|
enum Setting {
|
|
UNSUPPORTED = 0; // This host does not support this setting.
|
|
ENABLED = 1;
|
|
DISABLED = 2;
|
|
}
|
|
message GetTelemetrySettingsResponse {
|
|
Setting is_enabled = 1;
|
|
}
|
|
|
|
message TelemetrySettingsEvent {
|
|
Setting is_enabled = 1;
|
|
}
|