Skip to content

Conversation

@Justineo
Copy link
Member

@Justineo Justineo commented Dec 6, 2025

No description provided.

- Refactored CodeSection.vue to utilize generateCodeBlocksForNode for code generation.
- Enhanced PrefSection.vue with MCP icon button for server connection.
- Updated App.vue to manage MCP connection status and display a badge with connection details.
- Implemented MCP connection logic in a new composable (useMcp) to handle WebSocket interactions.
- Added protocol definitions for messages exchanged between the hub and extensions.
- Created tools for generating code based on selected nodes, including a new get_code tool.
- Removed deprecated schema.ts file and updated types accordingly.
- Introduced MCP icon component for UI representation.
- Improved styling for MCP badge in App.vue.
…ayout; refactor icons and remove unused components
- Added optional `tempadTools` property to the Window interface for MCPHandlers (debug only).
- Updated RequestPayload and ResponsePayload interfaces to include `returnDevComponent` and `devComponent`.
- Refactored codegen function to accept `returnDevComponent` parameter.
- Modified generateCodeBlocksForNode to return ResponsePayload instead of CodeBlock array.
- Introduced `rgbaToCss` utility function for color conversion.
- Adjusted stringifyVueComponent to handle className correctly.
- Implemented token definitions handling in mcp/tools/token-defs.ts for better style and variable management.
…and update handleGetCode to support token resolution
- Introduced AssetUploadedMessageSchema and AssetUploadRequestSchema to handle asset upload messages.
- Implemented AssetStore for managing asset records, including upload, retrieval, and persistence.
- Created AssetHttpServer to serve uploaded assets over HTTP.
- Enhanced tools to support asset management, including asset descriptors and asset upload handling.
- Updated protocol and shared constants to accommodate asset-related operations.
- Refactored code to ensure assets are uploaded and managed correctly within the MCP environment.
Copilot AI review requested due to automatic review settings December 6, 2025 02:13
Copy link

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 adds Model Context Protocol (MCP) server functionality to TemPad Dev, enabling AI coding assistants to interact with Figma design data. The implementation includes tools for extracting code, structure, screenshots, and design tokens from Figma nodes.

Key Changes:

  • Added MCP server package with tools for design data extraction
  • Implemented WebSocket-based communication infrastructure
  • Added comprehensive utility functions for CSS/Tailwind conversion
  • Updated dependencies and workspace configuration

Reviewed changes

Copilot reviewed 93 out of 95 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Updated version to 0.14.0, added MCP dependencies and build scripts
pnpm-workspace.yaml Added workspace configuration for monorepo structure
plugins/package.json Version bump to 0.6.1, added build scripts
plugins/src/index.ts Added RAW_TAG_NAME constant and raw() helper function
utils/tempad.ts Changed parameter type from SelectionNode to SceneNode
utils/tailwind.ts New comprehensive Tailwind CSS utility (1010 lines)
utils/css.ts Major expansion with parsing, normalization, and canonicalization functions
utils/component.ts Added RAW_TAG_NAME support, enhanced stringification with inline rendering
utils/color.ts Added new color utility functions (rgbaToCss, formatHex, compressHex)
utils/codegen.ts Added CodegenConfig type and generateCodeBlocksForNode function
utils/object.ts Code formatting improvements
ui/state.ts Added mcpOn option, removed SelectionNode type alias
types/*.ts Added eslint-disable comments for any types
mcp/* New MCP implementation files (runtime, tools, config, transport)
mcp-server/* New MCP server package structure
entrypoints/ui/style.css Added cursor and user-select styles
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Copy link

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

Copilot reviewed 94 out of 96 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

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