Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

  • Streamlined Tool Separation: Removed tools from get-blocks-and-tools endpoint (now blocks only) and moved detailed tool information to get-blocks-metadata where it's properly associated with each block

  • Established Clear Data Relationships: Restructured metadata to use nested objects (tools: CopilotToolMetadata[], triggers: CopilotTriggerMetadata[]) instead of disconnected arrays, making relationships between blocks, tools, and triggers explicit

  • Reduced Context Overhead: Removed duplicate information (flattened trigger outputs, redundant toolDetails), excluded UI-specific subBlock details, and filtered out blocks with hideFromToolbar: true to minimize LLM context consumption

Type of Change

  • New feature

Testing

Manually with @Sg312

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Sep 17, 2025 1:54am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 17, 2025 1:54am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR restructures the copilot metadata system by introducing structured authentication modes and separating tool information from block data. The changes add an AuthMode enum with three values (OAuth, ApiKey, BotToken) and systematically update all block configurations to include explicit authMode properties. Additionally, many blocks now include triggerAllowed boolean flags to indicate trigger capabilities.

The architectural changes move from a single get-blocks-and-tools endpoint that returned both blocks and tools to a separated approach where get-blocks-and-tools provides lightweight block discovery and a new get-blocks-metadata endpoint delivers comprehensive metadata including properly nested tools and triggers. This establishes clear hierarchical relationships where tools and triggers are associated with their parent blocks rather than existing as disconnected arrays.

The metadata transformation includes filtering out UI-specific elements (blocks with hideFromToolbar: true, subBlock layout details, colors, icons) and removing redundant information. For example, blocks that previously mentioned "Requires API Key" in their descriptions now use the structured authMode: AuthMode.ApiKey property instead, eliminating duplicate information across text descriptions and configuration metadata.

Confidence score: 4/5

  • This PR introduces significant architectural improvements with mostly safe metadata additions, though the large scope requires careful validation of all endpoint consumers
  • Score reflects the comprehensive nature of changes across many files and the introduction of new data structures that could impact downstream systems
  • Pay close attention to the get-blocks-metadata-tool.ts file which contains complex transformation logic and a potential syntax issue on lines 67-74

61 files reviewed, 4 comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs September 17, 2025 01:44 Inactive
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.

3 participants