mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
* WIP host bridge
* Run formatter
* remove tmp impl & rename host grpc client
* gitignore more files
* better layout
* host handler to make other hosts easier to add
* remove adapter pattern
* get host responses correctly
* fix streaming mode for host bridge
* first wip subscription host bridge demo for watching mcp server config
* format, comment
* add cancellation for host grpc stream
* remove unneeded functions from host-grpc-handler
* add a method for canceling request rather than using the registry
* another todo
* use StringRequest for uri.proto
* debounce new file watcher
* remove test setup
* remove some todos and logs
* remove registry use todo
* Revert "remove registry use todo"
This reverts commit 84078d3469.
* fix capitalization of uri.proto
* a better pattern for a callback based bridge without using the requestRegistry directly
---------
Co-authored-by: Andrei Edell <andrei@nugbase.com>
Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
Co-authored-by: Andrei Eternal <eternal@cline.bot>
21 lines
590 B
TypeScript
21 lines
590 B
TypeScript
import * as vscode from "vscode"
|
|
import { Uri } from "../../../src/shared/proto/host/uri"
|
|
import { StringRequest } from "../../../src/shared/proto/common"
|
|
|
|
/**
|
|
* Parses a string URI into a Uri object
|
|
* @param request The request containing the URI string
|
|
* @returns A URI object representing the parsed URI
|
|
*/
|
|
export async function parse(request: StringRequest): Promise<Uri> {
|
|
const uri = vscode.Uri.parse(request.value)
|
|
return Uri.create({
|
|
scheme: uri.scheme,
|
|
authority: uri.authority,
|
|
path: uri.path,
|
|
query: uri.query,
|
|
fragment: uri.fragment,
|
|
fsPath: uri.fsPath,
|
|
})
|
|
}
|