Add optional PNG icons to canvas declarations - #2699
cschleiden wants to merge 2 commits into
Conversation
Preserve canvas icon paths across Node, Rust, Go, Python, and .NET declaration APIs. Add serialization regressions and document extension-relative paths. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Read the package version relative to its directory instead of embedding a shell path in JavaScript. Cover Windows paths and directories with spaces and apostrophes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cross-SDK Consistency Review — PR #2699 (Canvas icon field)Reviewed the authoritative diff ( ✅ Consistent feature additionThe optional PNG
Naming follows each language's idiom ( i️ Note (not a regression from this PR)The Java SDK ( Other changes in the PR
Overall: This PR maintains excellent cross-SDK consistency for the new
|
Summary
iconPNG paths to existing canvas declaration APIs in Node.js, Rust, Go, Python, and .NET.iconin Node's constructor projection and Python's wire serialization; follow existing optional-field and serialization conventions in the other SDKs, including Rust'swith_iconbuilder.Validation
Regression tests were added before implementation and reproduced missing icon preservation or unsupported arguments in all five affected SDKs. The snapshot path tests also reproduced both Windows
MODULE_NOT_FOUNDerrors and apostrophe-related JavaScript syntax errors before the portability fix.npm test -- test\canvas.test.ts test\rust-version-snapshot.test.tscargo test --lib --no-default-features canvas::tests::declarationgo test . -run '^TestCanvasDeclaration_' -count=1uv run --no-sync pytest test_canvas.py -k canvas_declaration -qdotnet test dotnet\test\GitHub.Copilot.SDK.Test.csproj --framework net8.0 -p:TargetFrameworks=net8.0 -p:CopilotSkipCliDownload=true --filter FullyQualifiedName~CanvasDeclarationTestsBoth complete Rust version snapshot scripts also ran successfully under Windows Git Bash, each producing the pinned version and eight platform hashes.
Also passed: focused Node strict type-check, ESLint and Prettier; Rust library Clippy (
--no-default-features -- -D warnings) and changed-module rustfmt; Go formatting; Python Ruff lint/format; andgit diff --check. Full test suites and feature/framework matrices were not run.