Skip to content

feat: chat editor integration.#55

Merged
knightedcodemonkey merged 2 commits intomainfrom
bananas
Apr 1, 2026
Merged

feat: chat editor integration.#55
knightedcodemonkey merged 2 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

@knightedcodemonkey knightedcodemonkey commented Apr 1, 2026

Copilot AI review requested due to automatic review settings April 1, 2026 02:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the AI chat drawer into a mode-aware assistant that can propose structured edits to the Component/Styles editors and lets users apply (and undo) those proposals, while also updating the GitHub Models chat API wrapper to support tool calls.

Changes:

  • Adds editor-proposal tooling + apply/undo workflow to the AI chat drawer, including mode-aware system prompting and conversation compaction.
  • Extends github-api chat completion helpers to send/receive tools + tool_choice (including streaming tool-call deltas).
  • Updates render-runtime auto-render behavior for export default cases and adds Playwright coverage for the new behaviors.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/styles/ai-controls.css Adds styles for new chat title/icon, message label icons, proposal action buttons, and undo actions UI.
src/modules/render-runtime.js Skips implicit App wrapping when export default is present (supports default-export entry patterns).
src/modules/github-pr-drawer.js Dedupes/serializes PR context verification requests to avoid repeated network work.
src/modules/github-chat-drawer/chat-utils.js Extracts shared chat-related normalization/utilities into a dedicated module.
src/modules/github-chat-drawer/payload.js Builds outbound chat payload with mode-aware policy prompt + conversation summarization/byte-budget trimming.
src/modules/github-chat-drawer/proposals.js Adds tool schema + extraction of editor proposals from tool calls or markdown code fences.
src/modules/github-chat-drawer/drawer.js Rebuilds chat drawer controller with tool-call proposals, apply-to-editor + undo, and improved message rendering.
src/modules/github-chat-drawer.js Removes the previous monolithic chat drawer implementation.
src/modules/github-api.js Adds tool definitions/tool_choice support and tool-call extraction for both streaming and non-stream responses.
src/index.html Updates AI chat header markup (title + icon) and removes rate-limit display node.
src/app.js Rewires chat drawer import and passes editor setters + render scheduling hook for apply/undo integration.
playwright/rendering-modes.spec.ts Adds E2E coverage for auto-render handling of default-exported named components.
playwright/helpers/app-test-helpers.ts Extends chat request body typing and adds editor-source helper setters used by new E2E tests.
playwright/github-byot-ai.spec.ts Updates AI chat tests for tools/tool_choice and adds E2E coverage for apply/undo proposal flow.
docs/next-steps.md Removes completed roadmap section for prior AI assistant phases.
AGENTS.md Adds guidance to avoid index/barrel files and prefer explicit import paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey merged commit d1145c5 into main Apr 1, 2026
5 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch April 1, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants