Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Scaffold a chat lib npm module#216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
alexdima wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromalexd/thin-leopon
Draft

Conversation

alexdima
Copy link
Member

@alexdimaalexdima commentedJul 11, 2025
edited
Loading

Addsnpm run extract-chat-lib which prepares at/tmp-chat-lib a npm package containing .ts source code that could be consumed as a library:

  • the script that extracts the code is atscript/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.
  • the npm package has amain.ts entry point (located atsrc/lib/node/chat-lib-main.ts)
  • the idea is that themain.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.
  • the rest of the files are placed at_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:

  • this now produces a package which compiles, but which will throw as soon as someone tries to use it due to missing services.
  • explore if a package in this shape could be useful/adopted or if it presents challenges
  • one-by-one, add the tens of services necessary to make instantiating the code possible
  • add necessary options / API tomain.ts.
  • add CI actions to make sure this doesn't get broken
  • add builds to allow for publishing this somewhere at@vscode/...

cc@devm33@chrmarti

devm33, jiec-msft, and testforstephen reacted with hooray emoji
@alexdimaalexdima self-assigned thisJul 11, 2025
@alexdimaalexdima assignedchrmarti and unassignedalexdimaJul 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@chrmartichrmarti

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@alexdima@chrmarti

[8]ページ先頭

©2009-2025 Movatter.jp