Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR fixes several copilot server bugs and adds UX improvements including continue options, cleaner option displays, and diff display on new chats. Key Changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CopilotUI as Copilot UI
participant CopilotStore as Copilot Store
participant ChatAPI as Chat API Route
participant EditTool as Edit Workflow Tool
participant DeployTool as Deploy Tools
participant DiffStore as Workflow Diff Store
participant StatusAPI as Status API
User->>CopilotUI: Send message (mode: 'agent')
CopilotUI->>CopilotStore: sendMessage()
CopilotStore->>CopilotStore: Capture workflow snapshot
CopilotStore->>ChatAPI: POST /api/copilot/chat (mode: 'agent')
ChatAPI->>ChatAPI: Transform mode: 'agent' → 'build'
ChatAPI->>ChatAPI: Use selectedModel for non-azure/vertex
ChatAPI-->>CopilotStore: Stream response
alt Workflow Edit Tool Called
CopilotStore->>EditTool: execute()
EditTool->>EditTool: Check hasExecuted (prevent duplicates)
EditTool->>EditTool: Normalize array subblock IDs
EditTool->>DiffStore: Apply workflow diff
DiffStore->>DiffStore: Check if diff is empty
alt Diff has changes
DiffStore->>DiffStore: Apply diff optimistically
DiffStore->>CopilotStore: saveMessageCheckpoint()
CopilotStore->>CopilotStore: Persist workflow snapshot
else No changes detected
DiffStore->>DiffStore: Skip diff view
end
EditTool-->>CopilotStore: markToolComplete()
end
alt Deploy Chat Tool Called
CopilotStore->>DeployTool: execute()
DeployTool->>StatusAPI: GET /api/workflows/{id}/chat/status
StatusAPI-->>DeployTool: Return existing deployment
alt Has existing deployment
DeployTool->>DeployTool: Merge args with existing values
DeployTool->>DeployTool: PATCH /api/chat/manage/{id}
else No existing deployment
DeployTool->>DeployTool: POST /api/chat
end
DeployTool-->>CopilotStore: markToolComplete()
end
alt Deploy MCP Tool Called
CopilotStore->>DeployTool: execute()
DeployTool->>DeployTool: POST /api/mcp/workflow-servers/{id}/tools
alt Already exists error
DeployTool->>DeployTool: Fetch existing tool
DeployTool->>DeployTool: PATCH /api/mcp/workflow-servers/{id}/tools/{toolId}
DeployTool-->>CopilotStore: Return updated tool
else Success
DeployTool-->>CopilotStore: Return new tool
end
end
CopilotStore->>CopilotStore: Abort all in-progress tools
CopilotStore->>CopilotStore: Clear subAgentStreaming flags
CopilotStore->>CopilotUI: Update message with continue options
CopilotUI-->>User: Display response with options
|
...nents/panel/components/copilot/components/copilot-message/hooks/use-checkpoint-management.ts
Show resolved
Hide resolved
...nents/panel/components/copilot/components/copilot-message/hooks/use-checkpoint-management.ts
Outdated
Show resolved
Hide resolved
…d continue button
6300d3e to
0e55455
Compare
Contributor
Author
|
@greptile |
...nents/panel/components/copilot/components/copilot-message/hooks/use-checkpoint-management.ts
Show resolved
Hide resolved
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
Fix copilot server bugs
Adds a few ux improvements (continue options, options outside thinking text, diff on new chat)
Type of Change
Testing
Manual
Checklist