fix: preserve packaged resources and prompt routing - #10
Open
Firstp1ck wants to merge 2 commits into
Open
Conversation
# Conflicts: # pi-package-webui/package-lock.json # pi-package-webui/tests/mobile-static.test.mjs
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.
This pull request introduces improved prompt routing logic for the Raspberry Pi local wiki extension, adds tests for the new routing behavior, and makes several package management and configuration improvements. The main focus is to ensure that only relevant prompts are routed to the local wiki extension, and that diagnostic or setup-related prompts are ignored. Additionally, the package now includes a test script and better file inclusion for publishing, and the web UI package is updated to use bundled dependencies.
Prompt routing improvements
shouldRouteLocalWikiPromptfunction inlib/prompt-routing.mjsto filter out extension diagnostics and missing documentation messages, ensuring only relevant Raspberry Pi prompts are routed ([pi-extension-raspberrypi-wiki-local/lib/prompt-routing.mjsR1-R6](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-63e81830c4d77705533c09bb721577bb2ff6ccc676499bf5678234925ed0325aR1-R6)).index.tsto use the new routing function, replacing the previous skill-based detection logic ([[1]](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-7defc7e9b05e082c9015c7a2d3611200db0639ca1b229f7ce92dfeafbbe3bf10R7-L12),[[2]](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-7defc7e9b05e082c9015c7a2d3611200db0639ca1b229f7ce92dfeafbbe3bf10L177-R177)).Testing
prompt-routing.test.mjsto verify that the routing logic correctly ignores unrelated and diagnostic prompts while routing genuine Raspberry Pi support questions ([pi-extension-raspberrypi-wiki-local/tests/prompt-routing.test.mjsR1-R22](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-66e7d35ca6382c9f5ddc114e2afaeb2a9b326c1d0260d661162c80af794db395R1-R22)).Package configuration and publishing
testscript topackage.jsonfor running the new tests ([pi-extension-raspberrypi-wiki-local/package.jsonR23-R25](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-3be5ffe9c1baa04fa857dcbf313b19b2e4a84d1b1a270f11c1acf03e16ff9013R23-R25)).fileslist inpackage.jsonto include thelibandtestsdirectories for publishing ([pi-extension-raspberrypi-wiki-local/package.jsonR43-R44](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-3be5ffe9c1baa04fa857dcbf313b19b2e4a84d1b1a270f11c1acf03e16ff9013R43-R44)).Dependency management
package-lock.jsoninpi-package-webuito usebundleDependenciesfor several extensions and marked relevant dependencies asinBundlefor improved deployment and packaging ([[1]](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-58def497ea21a261b85564ad841e1847216574d968f3a74ee7d5ba964e959713R10-L27),[[2]](https://github.com/Firstp1ck/pi-coding-agent-forge/pull/10/files#diff-58def497ea21a261b85564ad841e1847216574d968f3a74ee7d5ba964e959713R76)and subsequent related lines).