mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-12 20:49:53 +08:00
Merge origin/main (#984, the canvas shell) into the cleanup branch
Conflicts resolved in 16 files. Where main's new shell, classic page and tests depend on a wire format or a signature the cleanup had changed, main wins; where main only extended code the cleanup had restructured, main's change is carried over into the new structure: - MCP HTTP server: the poll response keeps main's separate export fields (exportFormat, exportXml, exportOptions, exportId with a random id) instead of the cleanup's pendingExport object; the classic preview page is main's version - MCP index: start_session keeps the cleanup's structure and gains main's BROWSER=none, previewUrl and same-origin note; get_selection is written in the registerTool style; create_new_diagram keeps the cleanup's helpers with main's comment - history: addHistory takes main's source parameter and returns the index again (main's signature) - new-diagram: the cleanup's prepareNewModel split plus main's page ids for diagrams without one - diagram context: one ExportResult type (main's, with optional fields) for both the tagged exports and main's requestExport; the cleanup's single export resolver stays - versions store and version-text test: main's VersionItem base type and describeChangeSummary rename, without the legacy history conversion the cleanup removed - dictionaries: main's shell section added; openFileHint stays removed (unused on main too) - tests: the server wiring test keeps the SDK client and gains main's session cases; the HTTP server test uses main's export fields; the DOM polyfill comes from tests/setup.ts - package.json: main's postcss kept, the cleanup's removals kept; lockfile regenerated
This commit is contained in:
@@ -4,12 +4,14 @@ import { MessageSquare, PanelRightOpen, Settings, Shapes } from "lucide-react"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
import { useEffect, useRef, useState } from "react"
|
||||
import { CanvasStage } from "@/components/canvas/canvas-stage"
|
||||
import { CompareDialog } from "@/components/canvas/compare-dialog"
|
||||
import { SelectionAsk } from "@/components/canvas/selection-ask"
|
||||
import {
|
||||
ChatEngineProvider,
|
||||
useChatEngine,
|
||||
} from "@/components/chat/chat-engine"
|
||||
import { ChatPanel } from "@/components/chat/chat-panel"
|
||||
import { CompareDialog } from "@/components/chat/compare-dialog"
|
||||
import { ChatVersionsProvider } from "@/components/chat/chat-versions"
|
||||
import { LobbyHero } from "@/components/chat/lobby-hero"
|
||||
import { SaveDialog } from "@/components/save-dialog"
|
||||
import { SettingsDialog } from "@/components/settings-dialog"
|
||||
@@ -116,7 +118,9 @@ export function Workspace() {
|
||||
|
||||
return (
|
||||
<ChatEngineProvider>
|
||||
<WorkspaceLayout />
|
||||
<ChatVersionsProvider>
|
||||
<WorkspaceLayout />
|
||||
</ChatVersionsProvider>
|
||||
</ChatEngineProvider>
|
||||
)
|
||||
}
|
||||
@@ -267,6 +271,13 @@ function WorkspaceLayout() {
|
||||
}
|
||||
style={isMobile ? undefined : { right: canvasRight }}
|
||||
hideOverlays={!isMobile && showHero}
|
||||
overlay={(size) => (
|
||||
<SelectionAsk
|
||||
width={size.width}
|
||||
height={size.height}
|
||||
/>
|
||||
)}
|
||||
waitForSavedLocale
|
||||
/>
|
||||
{isMobile ? (
|
||||
mobileView === "chat" &&
|
||||
|
||||
Reference in New Issue
Block a user