chore: remove outdated example-vscode-lsp project. (#2575)

* chore: remove outdated vscode lsp example project.

* chore: update pnpm-lock.

* chore: update README of outdated vscode-lsp-example project.
This commit is contained in:
Zhiming Ma 2024-07-04 11:58:06 +08:00 committed by GitHub
parent 5cf49a1535
commit 4290c59e94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 5 additions and 186 deletions

View File

@ -1 +0,0 @@
*.png filter=lfs diff=lfs merge=lfs -text

View File

@ -1,3 +0,0 @@
node_modules
dist
*.vsix

View File

@ -1,9 +1,6 @@
# Example VSCode client for Tabby agent (LSP)
This example has been outdated and removed.
This is an example of a VSCode extension for the Tabby agent. It runs the Tabby agent as a language server and creates a client connecting to it.
![Demo](./demo.png)
For more information about Tabby agent, please refer to [Tabby agent](https://github.com/TabbyML/tabby/tree/main/clients/tabby-agent).
For more information about developing a VSCode LSP extension, please refer to [VSCode Language Extensions Guide](https://code.visualstudio.com/api/language-extensions/overview).
As of tabby-agent v1.7, the Language Server Protocol (LSP) has become the only supported method to connect to tabby-agent.
For examples of creating IDE extensions that connect with tabby-agent using LSP, please refer to the source code of our IDE extensions:
- [VSCode Extension](https://github.com/TabbyML/tabby/tree/main/clients/vscode)
- [IntelliJ Platform Plugin](https://github.com/TabbyML/tabby/tree/main/clients/intellij)

BIN
clients/example-vscode-lsp/demo.png (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -1,26 +0,0 @@
{
"name": "example-vscode-tabby-lsp-client",
"description": "Example VSCode client for Tabby agent (LSP).",
"publisher": "TabbyML",
"version": "0.0.1",
"engines": {
"vscode": "^1.82.0"
},
"main": "./dist/extension.js",
"activationEvents": [
"onLanguage"
],
"scripts": {
"build": "tsup --minify",
"watch": "tsup --watch ./ --ignore-watch ./dist"
},
"devDependencies": {
"@types/vscode": "^1.82.0",
"esbuild-plugin-copy": "^2.1.1",
"tabby-agent": "1.5.0",
"tsup": "^7.1.0"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
}
}

View File

@ -1,37 +0,0 @@
import { ExtensionContext } from "vscode";
import { LanguageClient, ServerOptions, TransportKind } from "vscode-languageclient/node";
let client: LanguageClient;
export async function activate(context: ExtensionContext): Promise<void> {
console.debug("Tabby LSP Example: activate");
const serverModulePath = context.asAbsolutePath("dist/server/tabby-agent.js");
const serverOptions: ServerOptions = {
run: {
module: serverModulePath,
args: ["--lsp"],
transport: TransportKind.ipc,
},
debug: {
module: serverModulePath,
args: ["--lsp"],
transport: TransportKind.ipc,
},
};
const clientOptions = {
documentSelector: [{ pattern: "**/*" }],
};
if (!client) {
client = new LanguageClient("Tabby LSP Example", serverOptions, clientOptions);
}
return await client.start();
}
export async function deactivate(): Promise<void> {
console.debug("Tabby LSP Example: deactivate");
if (client) {
return await client.stop();
}
}

View File

@ -1,10 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2020",
"lib": ["ES2020"],
"sourceMap": true,
"strict": true
},
"include": ["./src"]
}

View File

@ -1,30 +0,0 @@
import { defineConfig } from "tsup";
import { copy } from "esbuild-plugin-copy";
import { dependencies } from "./package.json";
export default () => [
defineConfig({
name: "node",
entry: ["src/extension.ts"],
outDir: "dist",
platform: "node",
target: "node18",
external: ["vscode"],
noExternal: Object.keys(dependencies),
clean: true,
esbuildPlugins: [
copy({
assets: [
{
from: "../tabby-agent/dist/cli.js",
to: "./server/tabby-agent.js",
},
{
from: "../tabby-agent/dist/wasm/*",
to: "./server/wasm",
},
],
}),
],
}),
];

View File

@ -12,25 +12,6 @@ importers:
specifier: ^1.13.3
version: 1.13.3
clients/example-vscode-lsp:
dependencies:
vscode-languageclient:
specifier: ^9.0.1
version: 9.0.1
devDependencies:
'@types/vscode':
specifier: ^1.82.0
version: 1.89.0
esbuild-plugin-copy:
specifier: ^2.1.1
version: 2.1.1(esbuild@0.19.12)
tabby-agent:
specifier: 1.5.0
version: 1.5.0
tsup:
specifier: ^7.1.0
version: 7.3.0(@swc/core@1.3.101)(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.3.101)(typescript@5.4.5))(typescript@5.4.5)
clients/intellij:
devDependencies:
tabby-agent:
@ -9522,23 +9503,6 @@ packages:
resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==}
engines: {node: '>=0.6.x'}
tsup@7.3.0:
resolution: {integrity: sha512-Ja1eaSRrE+QarmATlNO5fse2aOACYMBX+IZRKy1T+gpyH+jXgRrl5l4nHIQJQ1DoDgEjHDTw8cpE085UdBZuWQ==}
engines: {node: '>=18'}
deprecated: Breaking node 16
hasBin: true
peerDependencies:
'@swc/core': ^1
postcss: ^8.4.12
typescript: '>=4.5.0'
peerDependenciesMeta:
'@swc/core':
optional: true
postcss:
optional: true
typescript:
optional: true
tsup@8.0.2:
resolution: {integrity: sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==}
engines: {node: '>=18'}
@ -19382,14 +19346,6 @@ snapshots:
postcss: 8.4.38
ts-node: 10.9.2(@swc/core@1.3.101)(@types/node@18.19.33)(typescript@5.4.5)
postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.3.101)(typescript@5.4.5)):
dependencies:
lilconfig: 3.1.1
yaml: 2.4.2
optionalDependencies:
postcss: 8.4.38
ts-node: 10.9.2(@swc/core@1.3.101)(@types/node@18.19.33)(typescript@5.4.5)
postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2):
dependencies:
lilconfig: 3.1.1
@ -21112,30 +21068,6 @@ snapshots:
tsscmp@1.0.6: {}
tsup@7.3.0(@swc/core@1.3.101)(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.3.101)(typescript@5.4.5))(typescript@5.4.5):
dependencies:
bundle-require: 4.1.0(esbuild@0.19.12)
cac: 6.7.14
chokidar: 3.6.0
debug: 4.3.4(supports-color@8.1.1)
esbuild: 0.19.12
execa: 5.1.1
globby: 11.1.0
joycon: 3.1.1
postcss-load-config: 4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.3.101)(typescript@5.4.5))
resolve-from: 5.0.0
rollup: 4.17.2
source-map: 0.8.0-beta.0
sucrase: 3.35.0
tree-kill: 1.2.2
optionalDependencies:
'@swc/core': 1.3.101(@swc/helpers@0.5.2)
postcss: 8.4.38
typescript: 5.4.5
transitivePeerDependencies:
- supports-color
- ts-node
tsup@8.0.2(@swc/core@1.3.101)(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.3.101)(@types/node@18.19.33)(typescript@5.3.3))(typescript@5.3.3):
dependencies:
bundle-require: 4.1.0(esbuild@0.19.12)