Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export const INTENT_GROUP_META: Record<string, IntentGroupMeta> = {
toolName: 'superdoc_comment',
description:
'Manage document comment threads: create, read, update, and delete. ' +
'To create a comment, first use superdoc_search to find the target text, then pass action "create" with the comment text and a target: {kind:"text", blockId:"<blockId>", range:{start:<N>, end:<N>}} using the blockId and highlightRange from the search result. ' +
'To create a comment, first use superdoc_search to find the target text, then pass action "create" with the comment text and a target built from the search result: use result.items[0].context.textRanges[0] directly as the target — it is already a complete {kind:"text", blockId, range:{start,end}} block-relative address. Do NOT use result.highlightRange — it is offset relative to the snippet preview (up to 30 chars off) and will mis-anchor the comment or trigger TARGET_NOT_FOUND. ' +
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reference an actual search result field

When an agent follows this new superdoc_comment guidance after superdoc_search, result.items[0].context is undefined: I checked packages/sdk/langs/browser/src/intent-dispatch.ts, where superdoc_search dispatches to doc.query.match, and the query.match schema defines text match items with target, highlightRange, and blocks, but no context or textRanges. That makes the instructed target undefined or invalid, so comment creation fails for the exact search-then-comment workflow this description documents; point to a real query.match field such as the item’s blocks range data or otherwise expose the desired text address.

Useful? React with 👍 / 👎.

'For threaded replies, pass "parentId" with the parent comment ID. ' +
'Action "list" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). ' +
'Action "get" retrieves a single comment by ID. Action "update" changes status to "resolved" or marks as internal. Action "delete" removes a comment or reply by ID. ' +
Expand Down
Loading