improvement(copilot): update copilot to match copilot repo#2829
Merged
improvement(copilot): update copilot to match copilot repo#2829
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR syncs copilot implementation with the standalone copilot repository by adding GPT 5.2 model variants, simplifying streaming text animation logic, and fixing UI issues. Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ModelSelector as Model Selector UI
participant CopilotStore as Copilot Store
participant ChatAPI as /api/copilot/chat
participant UserModelsAPI as /api/copilot/user-models
participant SmoothStreaming as Smooth Streaming Component
participant ThinkingBlock as Thinking Block Component
Note over User,ThinkingBlock: Model Selection & Configuration
User->>UserModelsAPI: GET /api/copilot/user-models
UserModelsAPI->>UserModelsAPI: Merge DEFAULT_ENABLED_MODELS<br/>(includes gpt-5.2 variants)
UserModelsAPI-->>ModelSelector: Return enabled models
ModelSelector->>ModelSelector: Render GPT 5.2 Codex, GPT 5.2 Pro options
User->>ModelSelector: Select GPT 5.2 model
Note over User,ThinkingBlock: Message Streaming Flow
User->>CopilotStore: Send message with selected model
CopilotStore->>ChatAPI: POST with model (gpt-5.2-*)
ChatAPI->>ChatAPI: Validate model in ChatMessageSchema<br/>(includes new gpt-5.2 variants)
ChatAPI-->>CopilotStore: Stream SSE events (thinking, content, tool_call)
Note over SmoothStreaming,ThinkingBlock: UI Rendering with Simplified Streaming
CopilotStore->>ThinkingBlock: Update thinking content (isStreaming=true)
ThinkingBlock->>ThinkingBlock: Initialize displayedContent based on isStreaming
ThinkingBlock->>ThinkingBlock: Animate with 0.5ms delay, 3 chars/frame
CopilotStore->>SmoothStreaming: Update message content (isStreaming=true)
SmoothStreaming->>SmoothStreaming: Initialize displayedContent based on isStreaming
SmoothStreaming->>SmoothStreaming: Animate with fixed 3ms CHARACTER_DELAY
Note over User,ThinkingBlock: Loading Persisted Messages
User->>CopilotStore: Load chat from DB
CopilotStore->>CopilotStore: normalizeMessagesForUI()<br/>clearStreamingFlags() on tool calls
CopilotStore->>ThinkingBlock: Render thinking (isStreaming=false)
ThinkingBlock->>ThinkingBlock: Initialize with full content (no flash)
CopilotStore->>SmoothStreaming: Render content (isStreaming=false)
SmoothStreaming->>SmoothStreaming: Initialize with full content (no flash)
|
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
Reverts complex streaming logics, handles proper thinking text scroll, adds gpt 5.2 and codex
Type of Change
Testing
Manual
Checklist