mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-13 04:59:51 +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:
+7
-1
@@ -284,7 +284,13 @@ export function sameFileVars(a: string | null, b: string | null): boolean {
|
||||
|
||||
/**
|
||||
* Whether two documents hold the same pages (names, cells, their order),
|
||||
* page settings and file variables
|
||||
* page settings and file variables. This is the web app's one rule for "is
|
||||
* this version on the canvas" (versions, compare, one-step commits). The
|
||||
* MCP server's edit gate has its own (contentFingerprint): it compares the
|
||||
* cells as written, and leaves page settings and file variables out. The
|
||||
* two disagree both ways (a background change is a difference only here;
|
||||
* a geometry written "40.0" and "40" is one only there), so neither is a
|
||||
* subset of the other.
|
||||
*/
|
||||
export function isSameDocument(a: string, b: string): boolean {
|
||||
const pagesOf = (doc: Document) => {
|
||||
|
||||
Reference in New Issue
Block a user