Skip to content

Commit af67747

Browse files
committed
fix formatting
1 parent 76cf879 commit af67747

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/rfds/next-edit-suggestions.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ The client requests a suggestion by calling `nes/suggest`. Context fields are in
306306
`selection` is the current text selection range, if any. When the selection is empty (cursor is a point), this field may be omitted or have `start` equal to `end`. Agents can use selection state to predict replacements or transformations of the selected text.
307307

308308
`triggerKind` is one of:
309+
309310
- `"automatic"` — triggered by user typing or cursor movement
310311
- `"diagnostic"` — triggered by a diagnostic (error/warning) appearing at or near the cursor position. The client includes the relevant diagnostics in the `diagnostics` context field so the agent can target a fix.
311312
- `"manual"` — triggered by explicit user action (keyboard shortcut)
@@ -385,24 +386,29 @@ A suggestion is one of three kinds: an **edit** (text changes), a **jump** (navi
385386
```
386387

387388
Action suggestions reference an IDE action that the client previously advertised in its capabilities:
389+
388390
- `actionId` — matches an `id` from the client's advertised `ideActions`.
389391
- `arguments` — matches the parameter schema declared by the client for that action.
390392

391393
A response may contain a mix of edit, jump, and action suggestions. The client decides how to present them (e.g. inline ghost text for edits, a navigation hint for jumps).
392394

393395
Each suggestion contains:
396+
394397
- `id` — unique identifier for accept/reject tracking.
395398
- `kind``"edit"`, `"jump"`, or `"action"`.
396399

397400
Edit suggestions additionally contain:
401+
398402
- `edits` — one or more text edits to apply.
399403
- `cursorPosition` — optional suggested cursor position after applying edits.
400404

401405
Jump suggestions additionally contain:
406+
402407
- `uri` — the file to navigate to.
403408
- `position` — the target position within that file.
404409

405410
Action suggestions additionally contain:
411+
406412
- `actionId` — the IDE action to perform (must match a client-advertised action `id`).
407413
- `arguments` — action parameters matching the schema from the client's capability.
408414

@@ -430,6 +436,7 @@ Action suggestions additionally contain:
430436
```
431437

432438
`reason` is one of:
439+
433440
- `"rejected"` — the user explicitly dismissed the suggestion (e.g. pressed Escape or typed something incompatible).
434441
- `"ignored"` — the suggestion was shown but the user continued editing without interacting with it, and the context changed enough to invalidate it.
435442
- `"replaced"` — the suggestion was superseded by a newer suggestion before the user could act on it.
@@ -484,13 +491,15 @@ The following actions are well-known and have standardized parameter schemas. Cl
484491
**`rename`** — Rename a symbol across the workspace.
485492

486493
Parameters:
494+
487495
- `uri` (`string`) — the file URI containing the symbol.
488496
- `position` (`Position`) — the position of the symbol to rename.
489497
- `newName` (`string`) — the new name for the symbol.
490498

491499
**`searchAndReplace`** — Search and replace text within a file.
492500

493501
Parameters:
502+
494503
- `uri` (`string`) — the file URI to search within.
495504
- `search` (`string`) — the text or pattern to find.
496505
- `replace` (`string`) — the replacement text.
@@ -538,6 +547,7 @@ An agent may want both (events for incremental file tracking + context for edit
538547
### Why not reuse LSP's `textDocument/didOpen` etc. directly?
539548

540549
LSP's document sync notifications carry the same information, but:
550+
541551
1. ACP is not LSP — reusing method names could cause confusion in implementations that bridge both.
542552
2. We may want to evolve the event payloads independently (e.g. adding metadata fields).
543553
3. Keeping them namespaced under `nes/` makes capability negotiation cleaner.

0 commit comments

Comments
 (0)