Skip to content

refactor: v2 - ai assistant - move ai chat components to shared space#2353

Merged
maxy-shpfy merged 1 commit into
masterfrom
06-02-refactor_v2_-_ai_assistant_-_move_ai_chat_components_to_shared_space
Jun 11, 2026
Merged

refactor: v2 - ai assistant - move ai chat components to shared space#2353
maxy-shpfy merged 1 commit into
masterfrom
06-02-refactor_v2_-_ai_assistant_-_move_ai_chat_components_to_shared_space

Conversation

@maxy-shpfy

@maxy-shpfy maxy-shpfy commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Description

The AI Chat feature has been moved from src/routes/v2/pages/Editor/components/AiChat/ to src/routes/v2/shared/components/AiChat/ so it can be reused outside the Editor (e.g., a future RunView). As part of this, the undo dependency has been removed from the shared BridgeDeps interface and isolated into a new CsomBridgeDeps type that extends BridgeDeps. This makes the shared bridge infrastructure agnostic to Editor-specific concerns.

AiChatContent now accepts a createBridge prop instead of constructing the bridge internally, allowing each consumer to inject the appropriate bridge implementation. The Editor passes createEditorToolBridge (renamed from createToolBridge) with the undo store attached, while other consumers can provide a read-only bridge.

CodeBlock has also been promoted from PinnedTaskContent/components/ to src/routes/v2/shared/components/ since it is now referenced by the shared AI Chat markdown renderer.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  1. Open the Editor and verify the AI Assistant chat window opens and functions correctly, including spec mutations being undoable.
  2. Confirm that createEditorToolBridge tests pass (toolBridge.test.ts).
  3. Verify the PinnedTaskContent code block still renders correctly after the CodeBlock relocation.

Additional Comments

The debugBridge and runBridge modules 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's index.ts.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-02-refactor_v2_-_ai_assistant_-_move_ai_chat_components_to_shared_space/8661e4b

maxy-shpfy commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Jun 10, 11:59 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 11, 12:04 AM UTC: Graphite couldn't merge this PR because it had merge conflicts.
  • Jun 11, 6:05 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 11, 6:05 AM UTC: @maxy-shpfy merged this pull request with Graphite.

@maxy-shpfy maxy-shpfy changed the base branch from 06-02-fix_v2_-_window_state_for_startvisible to graphite-base/2353 June 10, 2026 23:59
@maxy-shpfy maxy-shpfy changed the base branch from graphite-base/2353 to master June 11, 2026 00:03
@maxy-shpfy maxy-shpfy force-pushed the 06-02-refactor_v2_-_ai_assistant_-_move_ai_chat_components_to_shared_space branch from 3556d18 to 8661e4b Compare June 11, 2026 06:01
@maxy-shpfy maxy-shpfy merged commit 1b90122 into master Jun 11, 2026
23 checks passed
@maxy-shpfy maxy-shpfy deleted the 06-02-refactor_v2_-_ai_assistant_-_move_ai_chat_components_to_shared_space branch June 11, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants