Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an AI chat drawer (behind the existing AI feature flag) that uses GitHub Models chat completions, including streaming-first responses with a non-streaming fallback, and updates the layout controls for better responsiveness.
Changes:
- Introduces an AI chat drawer UI with prompt input, message log, repository/status metadata, and optional editor-context inclusion.
- Adds GitHub Models API helpers for streaming (SSE) and non-streaming chat completions, including rate-limit metadata parsing.
- Refactors responsive header/rail controls and adds Playwright coverage for chat drawer behavior (open/close, streaming, fallback, editor-context toggle).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/layout-shell.css | Updates z-index and introduces responsive “View/Agent” rail control layout + popover styling. |
| src/styles/diagnostics.css | Adds a stacked-rail breakpoint rule for diagnostics controls spacing. |
| src/styles/ai-controls.css | Adds styles for chat toggle/drawer and compact AI controls presentation. |
| src/modules/github-chat-drawer.js | New controller for AI chat drawer state, message rendering, and request orchestration. |
| src/modules/github-byot-controls.js | Emits token-change events; plumbs repository htmlUrl into selected repo state. |
| src/modules/github-api.js | Adds GitHub Models chat completion (streaming + JSON) helpers and rate-limit parsing. |
| src/index.html | Adds AI chat drawer markup and reorganizes layout/theme controls into a responsive “View” drawer. |
| src/app.js | Wires BYOT token/repo state into the chat drawer; adds responsive toggle behavior for drawers/controls. |
| playwright/app.spec.ts | Adds E2E tests for chat drawer visibility, streaming, fallback, and editor-context inclusion toggle. |
| docs/next-steps.md | Advances Issue #18 rollout status and defines Phase 3 mini-spec. |
| README.md | Adds quick links for fine-grained PAT setup resources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Address #18 step two.