mirror of
https://github.com/cline/cline.git
synced 2026-10-29 17:42:34 +08:00
Dont export the protobus handlers from the grpc-client protobus-services.ts (#5091)
This commit is contained in:
@@ -8,7 +8,7 @@ import { loadServicesFromProtoDescriptor, getFqn } from "./proto-utils.mjs"
|
||||
const WEBVIEW_CLIENTS_FILE = path.resolve("webview-ui/src/services/grpc-client.ts")
|
||||
const VSCODE_SERVICES_FILE = path.resolve("src/generated/hosts/vscode/protobus-services.ts")
|
||||
const VSCODE_SERVICE_TYPES_FILE = path.resolve("src/generated/hosts/vscode/protobus-service-types.ts")
|
||||
const STANDALONE_SERVER_SETUP_FILE = path.resolve("src/generated/standalone/protobus-server-setup.ts")
|
||||
const STANDALONE_SERVER_SETUP_FILE = path.resolve("src/generated/hosts/standalone/protobus-server-setup.ts")
|
||||
|
||||
const SCRIPT_NAME = path.relative(process.cwd(), fileURLToPath(import.meta.url))
|
||||
|
||||
@@ -117,7 +117,7 @@ async function generateVscodeProtobusServers(protobusServices) {
|
||||
const domain = getDomainName(serviceName)
|
||||
const dir = getDirName(serviceName)
|
||||
imports.push(`// ${domain} Service`)
|
||||
servers.push(`export const ${serviceName}Handlers: serviceTypes.${serviceName}Handlers = {`)
|
||||
servers.push(`const ${serviceName}Handlers: serviceTypes.${serviceName}Handlers = {`)
|
||||
for (const [rpcName, _rpc] of Object.entries(def.service)) {
|
||||
imports.push(`import { ${rpcName} } from "@core/controller/${dir}/${rpcName}"`)
|
||||
servers.push(` ${rpcName}: ${rpcName},`)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Controller } from "@core/controller"
|
||||
import { StreamingResponseHandler } from "@core/controller/grpc-handler"
|
||||
import { addProtobusServices } from "@generated/standalone/protobus-server-setup"
|
||||
import { addProtobusServices } from "@generated/hosts/standalone/protobus-server-setup"
|
||||
import * as grpc from "@grpc/grpc-js"
|
||||
import { ReflectionService } from "@grpc/reflection"
|
||||
import { GrpcHandler, GrpcStreamingResponseHandler } from "@hosts/external/grpc-types"
|
||||
|
||||
Reference in New Issue
Block a user