Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

@langfuse-bot langfuse-bot commented Jan 6, 2026

Important

Add support for inline comments by updating CreateCommentRequest and Comment interfaces and modifying create() in Client.ts.

  • API Changes:
    • Add dataField, path, rangeStart, and rangeEnd to CreateCommentRequest in CreateCommentRequest.ts for inline comments.
    • Add dataField, path, rangeStart, and rangeEnd to Comment in Comment.ts for inline comments.
  • Client Updates:
    • Update create() method in Client.ts to handle new fields dataField, path, rangeStart, and rangeEnd.

This description was created by Ellipsis 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 both CreateCommentRequest and Comment types, enabling comments to be anchored to specific text ranges within structured data fields using JSON Path expressions and UTF-16 character offsets.

  • Added dataField to specify which IO field (input, output, metadata) the comment targets
  • Added path array for JSON Path expressions to locate content within the field
  • Added rangeStart and rangeEnd arrays for character offset ranges (UTF-16 code units)
  • Updated client documentation example to reflect new optional parameters
  • All new fields are optional, maintaining backward compatibility

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it's an auto-generated API spec update that adds optional fields
  • Auto-generated code from API spec with simple additive changes. All new fields are optional, maintaining backward compatibility. No logic changes, imports, or runtime behavior modifications. Documentation properly updated.
  • No files require special attention

Important Files Changed

Filename Overview
packages/core/src/api/api/resources/comments/types/CreateCommentRequest.ts Added optional fields for inline IO comments: dataField, path, rangeStart, rangeEnd
packages/core/src/api/api/resources/commons/types/Comment.ts Added matching optional fields for inline IO comments: dataField, path, rangeStart, rangeEnd
packages/core/src/api/api/resources/comments/client/Client.ts Updated example documentation to include new inline comment fields

Sequence 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
Loading

@langfuse-bot langfuse-bot requested a review from nimarb January 6, 2026 16:05
@vercel
Copy link

vercel bot commented Jan 6, 2026

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

Project Deployment Review Updated (UTC)
langfuse-js Ready Ready Preview Jan 6, 2026 4:06pm

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.

2 participants