feat: extract component docs for tool description#356
Merged
Conversation
…generation Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
…essing step Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for extracting and utilizing embedded documentation from WebAssembly components, improving tool descriptions with documentation from WIT source files instead of auto-generated placeholders.
- Extracts package documentation from the 'package-docs' custom section in WASM components
- Adds new API functions to generate schemas and tools using extracted documentation
- Updates build process to inject documentation into WASM components during build
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/wassette/src/lib.rs | Updates ComponentInstance to store package docs and use docs-aware schema generation |
| crates/component2json/src/lib.rs | Adds core functionality for extracting and using package docs in schema generation |
| crates/component2json/cmd/main.rs | Updates CLI tool to use package docs when available |
| crates/component2json/Cargo.toml | Adds wasmparser and wat dependencies for WASM parsing and testing |
| Justfile | Adds wit-docs-inject installation and doc injection steps to build process |
| .github/workflows/examples.yml | Installs wit-docs-inject in CI workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
fd41a05 to
ea4e417
Compare
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closese #22