Commit Graph

11 Commits

Author SHA1 Message Date
Sarah Fortune
2cedcc5a58
Add vscode CSS properties to the script get-vscode-usages.sh (#3752)
The script will report which vscode CSS vars are being used in the webview, as well the uses of the vscode SDK.
2025-05-22 16:18:08 -07:00
Tomás Barreiro
1700c0e4f8
Run tests against Windows and Ubuntu (#3246)
* add a matrix strategy for testing

* Handle EOL on Windows

* use bash as shell on every os and run the test-ci script

* fix tsconfig path resolution using the __dirnname

* print test results regardless of status

* Limit artifact upload to Linux

* update the test-cli

* Add windows-specific dependencies as optional dependencies

lightningcss-win32-x64-msvc
rollup-win32-x64-msvc

* Do not collect coverage on Windows

* Use UTF-8 on the Python Scripts

* force the ubuntu-latest name to be `test`
2025-05-19 13:32:35 -07:00
Sarah Fortune
ba64d9fafb
Don't use symlinks in the standalone distribution zip. (#3582)
Don't install vscode with file:./vscode because it creates a
symlink which is not portable for the distribution.
2025-05-17 14:52:19 -07:00
Sarah Fortune
8c565b5a7c
Run the cline extension as a standalone process outside of vscode. (#3535)
* Add standalone cline server.

Add directory standalone/ with the scripts to generate
a cline instance that runs a gRPC service for the proto bus.

* Rm unused dependencies

* Build standalone extension

Build stubs for the whole vscode SDK.

Import extension.js instead of putting everything in one file.

Move all the files the extension needs at runtime in files/
  Use local packages for vscode and stub-utils instead of module alias.
  Move vscode-impls into the vscode module.
  Create separate package.json for the standalone extension in files/.

* Handlers for gRPC requests

Add code to the bottom of extension.js to export the gRPC handlers.
Add a wrapper to the handlers to catch and log extensions, otherwise the whole server process fails.
Fix use of open module.

* Standalone gRPC server

Export handers from the extension.
Add reflection and healthcheck to the server.
Add vscode launch file for standalone server.

* Fix formatting

* Better error handling in the server template.

Exit if the server could not bind to the port.
Use internal error code if exception is thrown.

* Formatting

* Stop using google-protobuf npm module to generate JS for protos

The code generated by google-protobuf cannot serialize protos from plain objects. It needs the protos to be class instances created with ProtoExample.create().
But, the protos created in the extension are just POJOs.
Use protoLoader instead which is fine with plain objects.
Protoloader is also the method used in the grpc JS documentation: https://grpc.io/docs/languages/node/basics/#loading-service-descriptors-from-proto-files

* Rm proto that was removed in cline/cline

* Rm old protos when building standalone extension.

* Log gRPC requests

* feat(standalone): implement TypeScript gRPC-based standalone extension

The major improvement is that the gRPC implementation is now written in TypeScript instead of JavaScript, and the standalone extension is compiled together with the original extension rather than using the compiled JS output. This provides full type safety throughout the codebase and prevents issues with the TypeScript compiler renaming handlers during compilation, making the system more robust and maintainable.

- Add new standalone implementation files in src/standalone/ directory using TypeScript
- Implement gRPC server setup in extension-standalone.ts with full type safety
- Generate server setup code with service registrations
- Update build script to support the new standalone architecture
- Reorganize runtime files from standalone/files/ to standalone/runtime-files/
- Replace template-based server generation with gRPC service registration

* Fix issues when doing clean build

Use correct build dir in esbuild.js
Remove undefined type.

* Add handler for gRPC methods with streaming response.

Add a handler-wrapper for rpc's with streaming responses.

Fix issue where grpc-js won't deserialize protos in camelcase. It is the default
for generated code for protos to use camelcase (keepCase: false), but I cannot find
where is being set for the proto serializations to keep the case. For now, just convert the
properties of the proto messages to snake case. This is not a good
solution, but trying to fix this is time sink.

* Formatting

* Add streaming response support to the script that generates setup-server.ts

Add types for the handlers.

* Formatting

* Fix case conversion for gRPC requset protos as well.

Convert snake case to camelcase for incoming request protos.

* formatting

* Improve build process / building for standalone extension

Add separate configs for the extension and the standalone in the esbuild config.
Modules that use __dirname to load files at runtime are marked as external in the build config.
Rename vscode-impls to vscode-context.
Remove unecessary files from the standalone runtime.

* Rename extension-standalone.js to standalone.js

* Move generate-server-setup script to protos dir.

Add the script the npm target `protos`, so it is run when the protos are regenerated.

* formatting

* Add a post build step for the npm run target `protos` to format the generated files.

* Move generate-server-setup to scripts directory

* Add a JS script to package the standalone build, replacing the shell script.

Add a post build step for the standalone target that:
    * copies the vscode module files into the output directory.
    * checks that native modules are not included in the output
    * creates a zip of the build.

* Rm files that were included from merge by mistake

* Move scripts from standalone in scripts directory

Remove unused package.json files from standalone/

* Update scripts and launch.json to use correct paths

* During build install external modules in the dist directory.

Add package.json for the distribution.
Set the node path for the vscode launch config.
Make the prettier silent during `npm run protos`

* Fix ellipsis suggestions
2025-05-15 12:04:46 -07:00
David Nanyan
a43da8d66b
Allow users to create issue via CLI with prefilled system and os info (#3250)
* Change bug report template

* it should be text area

* [TRIVIAL] Add npm script for issue creation

* Adjust script & add changeset

* Use cline repo

* remove comment

* open should work on any platform
2025-05-06 13:13:20 +05:30
Tomás Barreiro
13228ed46f
Fail the test workflow on test failures (#3197)
* Run pretest in CI to build all tests

* Alias paths when running tests

* Bundle ES modules with esbuild

* alias packages

* Preserve the test scripts exit code and display the output

* Remove outdated test
2025-04-30 17:51:03 -07:00
Dennis Bartlett
fdc76c8802
Update scripts so that test runs all tests by default (#2749) 2025-04-08 19:19:12 -07:00
watany
616d56468f
chore: Allow CI testing locally (#1708)
* doc: Adding install for WebIDE Settings

* adding

* test:dev

* Revert "test:dev"

This reverts commit 91eb6a6510.

* update

* updated

* changeset

* update ci script

* update
2025-03-24 21:57:46 -07:00
Saoud Rizwan
7e17ad53ed Add version state; update README and Announcement with new image feature 2024-08-10 03:13:20 -04:00
Saoud Rizwan
7656f8d653 Update version 2024-08-03 15:10:57 -04:00
Saoud Rizwan
2d37c290fa Add script to easily update version 2024-08-03 15:05:49 -04:00