Merged
Conversation
added 7 commits
December 10, 2025 18:08
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR refactors tool outputs across multiple integrations (Asana, Confluence, OneDrive, HubSpot, Pipedrive, Google Groups, Google Vault) by flattening nested response structures and improving error handling. Key Changes
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant ToolConfig
participant APIRoute
participant ExternalAPI
participant FileUtils
Note over Client,FileUtils: Tool Output Flattening Pattern
Client->>ToolConfig: Execute tool (e.g., asana_get_task)
ToolConfig->>APIRoute: POST request with params
APIRoute->>ExternalAPI: Fetch data from external service
ExternalAPI-->>APIRoute: Return API response
APIRoute->>APIRoute: Transform to flat structure
Note over APIRoute: Returns {success, ts, gid, name, ...}<br/>instead of {success, output: {...}}
APIRoute-->>ToolConfig: Flat JSON response
ToolConfig->>ToolConfig: transformResponse() extracts {success, error, ...output}
ToolConfig-->>Client: Flattened output structure
Note over Client,FileUtils: File Upload Flow (OneDrive/Confluence)
Client->>ToolConfig: Upload file with params
ToolConfig->>APIRoute: POST with file reference
APIRoute->>FileUtils: processSingleFileToUserFile()
FileUtils-->>APIRoute: UserFile object
APIRoute->>FileUtils: downloadFileFromStorage()
FileUtils-->>APIRoute: File buffer
APIRoute->>FileUtils: getExtensionFromMimeType()
FileUtils-->>APIRoute: File extension
APIRoute->>APIRoute: Add extension to filename if needed
APIRoute->>ExternalAPI: Upload file with proper headers
ExternalAPI-->>APIRoute: Upload response
APIRoute-->>Client: Success with file metadata
Note over Client,FileUtils: Error Handling (Confluence)
Client->>APIRoute: Create page with invalid spaceId
APIRoute->>APIRoute: Validate spaceId format (numeric check)
APIRoute-->>Client: Helpful error message with guidance
|
Collaborator
|
@greptile |
This was referenced Dec 12, 2025
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 for various variable references, file uploading in onedrive, confluence error handling. Fixed and tested as I went.
Fixes #(issue)
Type of Change
Testing
Tested manually
Checklist