Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Move GPT into
@gravity-ui/markdown-editor-gpt-extension: the extension registration, ProseMirror/CodeMirror plugins, dialog, request and feedback state, styles, icons, and translations now belong to a separate publishable workspace package. The package receives renderer and Markdown conversion capabilities from its host and has no dependency on the editor package.Keep the editor's existing
gptExtension,mGptExtension, toolbar items, options, callbacks, CSS classes, and language configuration through compatibility adapters. A dedicated renderer subpath andcreateGptExtensionsupport direct package integration. Preserve source history with a separate move commit before the implementation changes.Split the dialog into prompt, answer, and shared popup components. Isolate request and feedback lifecycles; ignore stale responses after a newer request, reset, or unmount. Close the dialog when the document/selection changes so late results cannot replace edited text. Remove unconditional scrolling and synthetic scroll events, focus the prompt without scrolling, restore editor focus on close, and support a popup container for modal/drawer focus boundaries. Also preserve the apply callback in Markdown mode.
Validation: 14 focused unit/integration tests; package/editor builds and typechecks, demo typecheck, lint, ESM/CJS bundling and package-boundary checks, zero circular dependencies, frozen-lockfile installation, and npm tarball generation. Four Chromium scenarios passed inside Docker, covering focus/scroll/reopen and replacement/undo in both editor modes. Docker has 2 GB RAM, so browser scenarios were run as separate processes after warming the build cache.
Add release/publish configuration and integration documentation. Publish the GPT package before the editor version that depends on it. No npm package has been published by this PR.