fix(plugin): resolve DSH Viewer assets in clean builds - #2257
Merged
Conversation
Collaborator
|
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.
Description
Fix the DSH Viewer static-root resolution exposed by the 2.0.16 release dry run. In a clean checkout, the test job runs before
prepackbuildsviewer/dist; the previous existence-based fallback therefore selectedapps/viewer/distinstead of the plugin-owned Viewer directory.The resolver now identifies the package root through its stable
package.jsonmarker, so both source (adapters/deepseek-harness) and packed (dist/adapters/deepseek-harness) layouts resolve to<package>/viewer/disteven before Viewer assets are built. A regression test covers both clean layouts, including a package root itself nameddist.Failed dry-run evidence: https://github.com/MemTensor/MemOS/actions/runs/31927133607
Related Issue (Required): Follow-up fix for #2254
Type of change
How Has This Been Tested?
npx vitest run tests/unit/adapters/deepseek-harness-viewer.test.ts(11 passed)npm run lintnpx vitest run --silent(175 files passed; 1448 passed, 2 skipped)npm pack --pack-destination tmp/dsh-viewer-static-root-packand verified the tarball contains the compiled DSH adapter plusviewer/dist/index.htmlChecklist
Reviewer Checklist