Repository navigation
Reduce Agent-key navigation latency - #2
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The helper rejects valid URL casing accepted by the JavaScript validators.
Review effort: Balanced
Findings: 1
What changed in this PR
Reduces Agent-key navigation latency through short-lived caches and a reusable PowerShell URI helper.
Changes:
- Caches session status and validated session URLs.
- Reuses a prewarmed, serialized PowerShell helper.
- Adds lifecycle cleanup, regression tests, and documentation.
| File | Description |
|---|---|
controller.mjs |
Reuses recent status snapshots. |
extension.mjs |
Integrates caches and URI-helper lifecycle. |
navigation.mjs |
Adds session URL catalogue caching. |
windows-uri.mjs |
Implements reusable PowerShell URI dispatch. |
tests/bridge.test.mjs |
Tests navigation and caching behavior. |
tests/windows-uri.test.mjs |
Tests helper serialization and failures. |
README.md |
Documents caching and helper limitations. |
package.json |
Adds syntax checking for the helper. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Exercise the production PowerShell validator with mixed-case App URLs and invalid suffixes while stubbing only the OS launch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.

Summary
Reduce AI Micro Agent-key navigation latency in GitHub Copilot App by avoiding redundant App queries and per-keypress PowerShell startup.
Changes
Performance
Measured Windows URI dispatch time across five calls on the same machine:
The helper's startup cost was approximately 619 ms, paid once when the bridge starts.
These measurements cover URI dispatch acknowledgment, not end-to-end App rendering latency. Physical USB testing also confirmed noticeably faster switching.
Validation
Scope and known limitations
peek_session/open_session_by_idhandling. This issue remains unresolved.