Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Updates the JS SDK’s documentation and API doc generation setup to provide a richer hand-written README and a slimmer, class-focused auto-generated Markdown reference.
Changes:
- Rewrites
sdk_v2/js/README.mdinto a feature-focused guide with usage examples and links into generated class docs. - Adds
sdk_v2/js/typedoc.jsonand updatessdk_v2/js/package.jsonto generate docs via TypeDoc +typedoc-plugin-markdown. - Removes previously generated TypeDoc pages for interfaces/enums/globals and refreshes the generated class Markdown under
sdk_v2/js/docs/classes/.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk_v2/js/typedoc.json | Adds TypeDoc config for Markdown output and class-per-page generation. |
| sdk_v2/js/package.json | Simplifies docs script to run TypeDoc using config defaults. |
| sdk_v2/js/docs/interfaces/Runtime.md | Removes old generated interface page. |
| sdk_v2/js/docs/interfaces/PromptTemplate.md | Removes old generated interface page. |
| sdk_v2/js/docs/interfaces/Parameter.md | Removes old generated interface page. |
| sdk_v2/js/docs/interfaces/ModelSettings.md | Removes old generated interface page. |
| sdk_v2/js/docs/interfaces/ModelInfo.md | Removes old generated interface page. |
| sdk_v2/js/docs/interfaces/IModel.md | Removes old generated interface page. |
| sdk_v2/js/docs/interfaces/FoundryLocalConfig.md | Removes old generated interface page. |
| sdk_v2/js/docs/globals.md | Removes old generated globals index page. |
| sdk_v2/js/docs/enumerations/DeviceType.md | Removes old generated enum page. |
| sdk_v2/js/docs/classes/ModelVariant.md | Refreshes generated class docs formatting/links for ModelVariant. |
| sdk_v2/js/docs/classes/ModelLoadManager.md | Refreshes generated class docs formatting/links for ModelLoadManager. |
| sdk_v2/js/docs/classes/Model.md | Refreshes generated class docs formatting/links for Model. |
| sdk_v2/js/docs/classes/FoundryLocalManager.md | Refreshes generated class docs formatting/links for FoundryLocalManager. |
| sdk_v2/js/docs/classes/CoreInterop.md | Removes old generated internal class page. |
| sdk_v2/js/docs/classes/Configuration.md | Removes old generated internal class page. |
| sdk_v2/js/docs/classes/ChatClientSettings.md | Refreshes generated class docs formatting; hides internal members. |
| sdk_v2/js/docs/classes/ChatClient.md | Refreshes generated class docs formatting; hides internal ctor. |
| sdk_v2/js/docs/classes/Catalog.md | Refreshes generated class docs formatting/links for Catalog. |
| sdk_v2/js/docs/classes/AudioClientSettings.md | Refreshes generated class docs formatting; hides internal members. |
| sdk_v2/js/docs/classes/AudioClient.md | Refreshes generated class docs formatting; hides internal ctor. |
| sdk_v2/js/docs/README.md | Removes old generated docs index/README page. |
| sdk_v2/js/README.md | Replaces minimal quick start with a comprehensive guide and API reference links. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Download if not cached (with optional progress tracking) | ||
| if (!model.isCached) { | ||
| model.download((progress) => { | ||
| console.log(`Download: ${progress}%`); | ||
| }); | ||
| } | ||
|
|
||
| // Load into memory and run inference | ||
| await model.load(); | ||
| const chatClient = model.createChatClient(); |
There was a problem hiding this comment.
This example uses model.download(progressCallback) and then immediately calls await model.load(). In the current implementation, Model.download() is void and does not await the underlying async ModelVariant.download() when a progress callback is provided, so load() can run before the download completes. Consider changing the example to await a specific ModelVariant.download(...) (which returns a Promise) or remove the progress callback here to keep the download path synchronous.
| "entryPoints": ["src/index.ts"], | ||
| "out": "docs", | ||
| "plugin": ["typedoc-plugin-markdown"], | ||
| "readme": "none", |
There was a problem hiding this comment.
readme: "none" removes the generated docs/README.md, but the committed Markdown output under docs/classes/* still links to ../README.md and uses ../README.md#... anchors for types. Either adjust the TypeDoc markdown configuration so generated pages don't reference ../README.md, or generate/commit a docs/README.md entry document so these links resolve.
| "readme": "none", | |
| "readme": "README.md", |
| *** | ||
|
|
||
| [@prathikrao/foundry-local-sdk](../globals.md) / AudioClient | ||
| [@prathikrao/foundry-local-sdk](../README.md) / AudioClient |
There was a problem hiding this comment.
This page links to ../README.md, but sdk_v2/js/docs/README.md is deleted in this PR, so the breadcrumb and any ../README.md#... type links will be broken on GitHub. Either keep a docs/README.md entry page (even a stub that redirects to ../../README.md) or adjust the TypeDoc markdown output/settings so these links point at an existing document.
| [@prathikrao/foundry-local-sdk](../README.md) / AudioClient | |
| [@prathikrao/foundry-local-sdk](../../README.md) / AudioClient |
| *** | ||
|
|
||
| [@prathikrao/foundry-local-sdk](../globals.md) / Catalog | ||
| [@prathikrao/foundry-local-sdk](../README.md) / Catalog |
There was a problem hiding this comment.
This page links to ../README.md, but sdk_v2/js/docs/README.md is deleted in this PR, so the breadcrumb and any ../README.md#... type links will be broken. Either keep a docs/README.md entry page (even a stub that redirects to ../../README.md) or adjust the TypeDoc markdown output/settings so these links point at an existing document.
| [@prathikrao/foundry-local-sdk](../README.md) / Catalog | |
| [@prathikrao/foundry-local-sdk](../../README.md) / Catalog |
| [@prathikrao/foundry-local-sdk](../README.md) / FoundryLocalManager | ||
|
|
There was a problem hiding this comment.
This page links to ../README.md, but sdk_v2/js/docs/README.md is deleted in this PR, so the breadcrumb and any ../README.md#... type links will be broken. Either keep a docs/README.md entry page (even a stub that redirects to ../../README.md) or adjust the TypeDoc markdown output/settings so these links point at an existing document.
| *** | ||
|
|
||
| [@prathikrao/foundry-local-sdk](../globals.md) / ModelLoadManager | ||
| [@prathikrao/foundry-local-sdk](../README.md) / ModelLoadManager |
There was a problem hiding this comment.
This page links to ../README.md, but sdk_v2/js/docs/README.md is deleted in this PR, so the breadcrumb and any ../README.md#... type links will be broken. Either keep a docs/README.md entry page (even a stub that redirects to ../../README.md) or adjust the TypeDoc markdown output/settings so these links point at an existing document.
| [@prathikrao/foundry-local-sdk](../README.md) / ModelLoadManager | |
| [@prathikrao/foundry-local-sdk](../../README.md) / ModelLoadManager |
| *** | ||
|
|
||
| [@prathikrao/foundry-local-sdk](../globals.md) / AudioClientSettings | ||
| [@prathikrao/foundry-local-sdk](../README.md) / AudioClientSettings |
There was a problem hiding this comment.
This page links to ../README.md, but sdk_v2/js/docs/README.md is deleted in this PR, so the breadcrumb and any ../README.md#... type links will be broken. Either keep a docs/README.md entry page (even a stub that redirects to ../../README.md) or adjust the TypeDoc markdown output/settings so these links point at an existing document.
| [@prathikrao/foundry-local-sdk](../README.md) / AudioClientSettings | |
| [@prathikrao/foundry-local-sdk](../../README.md) / AudioClientSettings |
| *** | ||
|
|
||
| [@prathikrao/foundry-local-sdk](../globals.md) / ChatClientSettings | ||
| [@prathikrao/foundry-local-sdk](../README.md) / ChatClientSettings |
There was a problem hiding this comment.
This page links to ../README.md, but sdk_v2/js/docs/README.md is deleted in this PR, so the breadcrumb and any ../README.md#... type links will be broken. Either keep a docs/README.md entry page (even a stub that redirects to ../../README.md) or adjust the TypeDoc markdown output/settings so these links point at an existing document.
| [@prathikrao/foundry-local-sdk](../README.md) / ChatClientSettings | |
| [@prathikrao/foundry-local-sdk](../../README.md) / ChatClientSettings |
| *** | ||
|
|
||
| [@prathikrao/foundry-local-sdk](../globals.md) / ChatClient | ||
| [@prathikrao/foundry-local-sdk](../README.md) / ChatClient |
There was a problem hiding this comment.
This page links to ../README.md, but sdk_v2/js/docs/README.md is deleted in this PR, so the breadcrumb and any ../README.md#... type links will be broken. Either keep a docs/README.md entry page (even a stub that redirects to ../../README.md) or adjust the TypeDoc markdown output/settings so these links point at an existing document.
| [@prathikrao/foundry-local-sdk](../README.md) / ChatClient | |
| [@prathikrao/foundry-local-sdk](../../README.md) / ChatClient |
| #### Throws | ||
|
|
||
| Error - If progress callback is provided (not implemented). | ||
|
|
There was a problem hiding this comment.
The download() docs say the progress callback is "not implemented", but the implementation in src/modelVariant.ts does stream chunks and invokes the callback. This is misleading for users; please update the TSDoc for ModelVariant.download and regenerate these docs so the Throws section reflects actual behavior.
JS SDK Documentation Updates
What Changed
README.md— RewrittenReplaced the minimal quick start with a comprehensive, feature-focused guide:
--winmlinstall flag and automatic EP managementdocs/index.htmlreferencestypedoc.json— AddedNew config controlling API doc generation: hides
@internalexports, removes source links, renders params as tables, expands object types inline, and only generates per-class pages.package.json— UpdateddocsscriptNow reads from
typedoc.jsonand strips the auto-generated index page (interfaces/enums already covered in README).Result