refactor: v2 - ai assistant - move ai chat components to shared space#2353
Open
maxy-shpfy wants to merge 2 commits into
Open
refactor: v2 - ai assistant - move ai chat components to shared space#2353maxy-shpfy wants to merge 2 commits into
maxy-shpfy wants to merge 2 commits into
Conversation
🎩 PreviewA preview build has been created at: |
Collaborator
Author
This was referenced Jun 3, 2026
morgan-wowk
approved these changes
Jun 10, 2026
Mbeaulne
approved these changes
Jun 10, 2026
Collaborator
Author
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.

Description
The AI Chat feature has been moved from
src/routes/v2/pages/Editor/components/AiChat/tosrc/routes/v2/shared/components/AiChat/so it can be reused outside the Editor (e.g., a future RunView). As part of this, theundodependency has been removed from the sharedBridgeDepsinterface and isolated into a newCsomBridgeDepstype that extendsBridgeDeps. This makes the shared bridge infrastructure agnostic to Editor-specific concerns.AiChatContentnow accepts acreateBridgeprop instead of constructing the bridge internally, allowing each consumer to inject the appropriate bridge implementation. The Editor passescreateEditorToolBridge(renamed fromcreateToolBridge) with the undo store attached, while other consumers can provide a read-only bridge.CodeBlockhas also been promoted fromPinnedTaskContent/components/tosrc/routes/v2/shared/components/since it is now referenced by the shared AI Chat markdown renderer.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
createEditorToolBridgetests pass (toolBridge.test.ts).PinnedTaskContentcode block still renders correctly after theCodeBlockrelocation.Additional Comments
The
debugBridgeandrunBridgemodules have also been relocated to the shared toolbridge directory, as they contain no Editor-specific logic and are now imported from there by the Editor'sindex.ts.