Commit Graph
15 Commits
Author SHA1 Message Date
2f841fe001 markdown: fix: route undo and redo to the document history (#328245)
* markdown: fix: route undo and redo to the document history

The Agents window Markdown editor attaches an EditContext, so the browser
keeps no native undo history and the Cmd+Z / Cmd+Shift+Z chords never
reached VS Code. Wire them to the backing TextDocument's own history:

- editor.ts: pass a `historyStrategy` to `EditorController` that posts
  `{ type: 'history', command }` to the extension. `record` is omitted so
  the TextDocument stays the single source of truth (no second local stack
  that would drift from the Edit menu, dirty state and hot exit).
- markdownEditorProvider.ts: run the built-in `undo`/`redo` command; the
  active custom editor input scopes it to the resource's IUndoRedoService.
- editor.ts: apply host `update` via `replaceSourceText` instead of
  `sourceText.set`, so the caret is mapped through the change (e.g. after an
  undo shrinks the document) and stale pending-paragraph state is cleared.

Depends on the @vscode/markdown-editor API from microsoft/vscode-packages#189;
the pinned version must be bumped once that is published.

Fixes microsoft/vscode#327535

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b5b60dce-b175-4fe6-b2b5-d18a229c9929

* markdown: chore: bump @vscode/markdown-editor to 0.0.2-40

Pick up the published `@vscode/markdown-editor` release that ships the
`IHistoryStrategy` / `EditorControllerOptions.historyStrategy` and
`EditorModel.replaceSourceText` APIs (microsoft/vscode-packages#189) the
undo/redo integration depends on. Dependency set is unchanged from
0.0.2-26; lockfile integrity matches the published tarball.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b5b60dce-b175-4fe6-b2b5-d18a229c9929

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b5b60dce-b175-4fe6-b2b5-d18a229c9929
2026-07-31 10:03:48 +05:00
Henning DieterichsandGitHub 019bc8f763 Apply smaller markdown editor edits (#328215) 2026-07-30 14:47:10 +00:00
Henning DieterichsandHenning Dieterichs aac8a5aabd Fixes reveal comments in md editor bug 2026-07-28 15:20:39 +02:00
Henning DieterichsandGitHub e2c0ad9ffc markdown editor update 2026-07-11 15:14:54 +00:00
Henning DieterichsandHenning Dieterichs 42a44c0a9c Fixes ci 2026-07-08 17:47:52 +02:00
Henning DieterichsandHenning Dieterichs aaea53646d Don't show comment widget when commenting is not possible 2026-07-08 17:47:52 +02:00
Henning DieterichsandHenning Dieterichs 8c7ce711c9 Fixes ci 2026-07-08 15:13:49 +02:00
Henning DieterichsandHenning Dieterichs 82d7e530a1 Fixes #323297 2026-07-08 15:13:49 +02:00
Henning DieterichsandHenning Dieterichs 93ad71ca81 Fixes tsconfig 2026-07-07 10:54:18 +02:00
Henning DieterichsandHenning Dieterichs 47ec96853f updates markdown editor and enables comment feature 2026-07-07 10:54:18 +02:00
Henning DieterichsandGitHub a9f0f574fc adds proposed createQuickDiffInformation API, adopts it in markdown editor. (#323470)
* adds proposed createQuickDiffInformation API, adopts it in markdown editor.

* Extends textEditorDiffInformation proposal instead of having new quickDiff proposal
2026-06-29 16:37:26 +00:00
Henning DieterichsandGitHub 5b839e0737 Updates markdown editor (#322577)
* updates markdown editor

* fixes class names
2026-06-23 10:40:07 -07:00
Henning DieterichsandHenning Dieterichs 9837699041 Fixes markdown editor dirty on open 2026-06-22 20:16:03 +02:00
Henning DieterichsandHenning Dieterichs d56b538686 Updates markdown editor & implements code block syntax highlighting 2026-06-16 23:46:07 +02:00
Henning DieterichsandHenning Dieterichs 58c0981e26 Registers @vscode/markdown-editor in markdown-language-features extension 2026-06-09 09:49:57 +02:00