feat(api): update API spec from langfuse/langfuse 57537ad #717
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.
Important
Add support for inline comments by updating
CreateCommentRequestandCommentinterfaces and modifyingcreate()inClient.ts.dataField,path,rangeStart, andrangeEndtoCreateCommentRequestinCreateCommentRequest.tsfor inline comments.dataField,path,rangeStart, andrangeEndtoCommentinComment.tsfor inline comments.create()method inClient.tsto handle new fieldsdataField,path,rangeStart, andrangeEnd.This description was created by
for 333eb43. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Extended the Comments API with inline commenting capabilities for IO data (input/output/metadata). The changes add four optional fields (
dataField,path,rangeStart,rangeEnd) to bothCreateCommentRequestandCommenttypes, enabling comments to be anchored to specific text ranges within structured data fields using JSON Path expressions and UTF-16 character offsets.dataFieldto specify which IO field (input, output, metadata) the comment targetspatharray for JSON Path expressions to locate content within the fieldrangeStartandrangeEndarrays for character offset ranges (UTF-16 code units)Confidence Score: 5/5
Important Files Changed
dataField,path,rangeStart,rangeEnddataField,path,rangeStart,rangeEndSequence Diagram
sequenceDiagram participant Client participant CommentsAPI participant Server Client->>CommentsAPI: create(CreateCommentRequest) Note over CommentsAPI: Request includes:<br/>- projectId, objectType, objectId<br/>- content, authorUserId<br/>- [NEW] dataField, path, rangeStart, rangeEnd CommentsAPI->>Server: POST /api/public/comments Server-->>CommentsAPI: CreateCommentResponse CommentsAPI-->>Client: Comment (with inline location data) Client->>CommentsAPI: get(GetCommentsRequest) CommentsAPI->>Server: GET /api/public/comments Server-->>CommentsAPI: GetCommentsResponse Note over CommentsAPI: Response includes Comments<br/>with inline location metadata CommentsAPI-->>Client: Array of Comments Client->>CommentsAPI: getById(commentId) CommentsAPI->>Server: GET /api/public/comments/{commentId} Server-->>CommentsAPI: Comment Note over CommentsAPI: Comment includes:<br/>- [NEW] dataField, path, rangeStart, rangeEnd CommentsAPI-->>Client: Comment