[WEB] Add TeXGPT button to the main toolbar (#34219)

* feat: add writefull-toolbar-migration split test and
  sourceEditorToolbarStartButtons slot

* feat: add TeXGPT button to main editor toolbar (writefull-toolbar-migration)

* removing wrapper div

* hide toolbar start buttons from readonly users

GitOrigin-RevId: 6bafe3ad3fade98c318ea0d0b2714957c1d2d9b4
This commit is contained in:
Davinder Singh
2026-06-17 08:06:16 +00:00
committed by Copybot
parent e1881a7645
commit 8e8804a318
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -1039,6 +1039,7 @@ module.exports = {
diagnosticActions: [],
sourceEditorCompletionSources: [],
sourceEditorSymbolPalette: [],
sourceEditorToolbarStartButtons: [],
sourceEditorToolbarButtonGroups: [],
sourceEditorToolbarComponents: [],
sourceEditorToolbarEndButtons: [],
@@ -38,6 +38,10 @@ import { useLayoutContext } from '@/shared/context/layout-context'
import ReviewPanelHeaderBuffer from '@/features/review-panel/components/review-panel-header-buffer'
import { useAreTabsEnabled } from '@/features/ide-react/hooks/use-are-tabs-enabled'
const sourceEditorToolbarStartButtons = importOverleafModules(
'sourceEditorToolbarStartButtons'
) as { import: { default: ElementType }; path: string }[]
const sourceEditorToolbarComponents = importOverleafModules(
'sourceEditorToolbarComponents'
) as { import: { default: ElementType }; path: string }[]
@@ -194,6 +198,12 @@ const Toolbar = memo(function Toolbar() {
className="ol-cm-toolbar toolbar-editor"
ref={handleToolbar}
>
{showActions &&
sourceEditorToolbarStartButtons.map(
({ import: { default: Component }, path }) => (
<Component key={path} />
)
)}
{showActions && (
<ToolbarItems
state={state}