Skip to content

fix: preserve packaged resources and prompt routing - #10

Open
Firstp1ck wants to merge 2 commits into
mainfrom
fix/resource-bundling-and-rpi-routing
Open

fix: preserve packaged resources and prompt routing#10
Firstp1ck wants to merge 2 commits into
mainfrom
fix/resource-bundling-and-rpi-routing

Conversation

@Firstp1ck

Copy link
Copy Markdown
Owner

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

  • Added a new shouldRouteLocalWikiPrompt function in lib/prompt-routing.mjs to 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)).
  • Updated index.ts to 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

  • Added a new test suite prompt-routing.test.mjs to 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

  • Added a test script to package.json for 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)).
  • Updated the files list in package.json to include the lib and tests directories 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

  • Updated package-lock.json in pi-package-webui to use bundleDependencies for several extensions and marked relevant dependencies as inBundle for 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).

@Firstp1ck Firstp1ck self-assigned this Jul 30, 2026
Copilot AI review requested due to automatic review settings July 30, 2026 15:31
@Firstp1ck Firstp1ck added bug Something isn't working dependencies Pull requests that update a dependency file labels Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

# Conflicts:
#	pi-package-webui/package-lock.json
#	pi-package-webui/tests/mobile-static.test.mjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants