Scaffold a chat lib npm module #216
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds
npm run extract-chat-lib
which prepares at/tmp-chat-lib
a npm package containing .ts source code that could be consumed as a library:script/build/extractChatLib.ts
and it traverses the deps of themain.ts
entrypoint and some other useful entrypoints. Once it extracts the source code, tsc is invoked on the extracted code.main.ts
entry point (located atsrc/lib/node/chat-lib-main.ts
)main.ts
file would only export types that are written in themain.ts
file itself. This would allow us to track the API of the npm package and offer semver semantics for the API. This can be done by creating a facade-style API where options are passed in an a live object that can receive file change events, cursor change events, etc. and also be asked for next edits. The creation options could offer hooks for configuring how to make http requests, how to report telemetry, what configuration options to use, etc._internal
. This allows a potential consumer to use them, but they would not have any semver guarantees and they can be changed at any time.IMHO good next steps:
main.ts
.@vscode/...
cc @devm33 @chrmarti