microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
40.27k stars 3.59k forks source link

[Bug] MultiDiff not work #4584

Open linghaoSu opened 4 months ago

linghaoSu commented 4 months ago

Reproducible in vscode.dev or in VS Code Desktop?

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#XQAAAAJpAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw10_kGqDTilUrSvZdCEkJoct6e5xymsgchVewcCURwZhxLRheEW-k71pa4P8iJPI2Z1mCU61lnXIJThP5sajV1G0U95cq4xFMv0zKkKHKUV4UdCb9PYdHaMbZFaEmJOt12q3yQx89GBy1okUapPVdMokGflkKPL8MSp1KMo0vOmvmBC2C9s8sc5mkZoaJ6jGHCGSU2AZ4tERGtx1UjTjIVkQvM_2JbbN0gI6oHXVLPq_SGq5wVn_2aAR_b5GvEgWdv0zs32PvEl7jk69kzNKXUOdppdfoKO9mI7pHvtI5L7cfAjFpxygM2PBmkHBBQDnPFQLyiCSE3tqvWnO31ZxWU_U5iUuq_6r7RNw

Monaco Editor Playground Code

No response

Reproduction Steps

Hi, I noticed that vscode can do multi-file diff and I found that there is createMultiFileDiffEditor API in monaco-editor, when I looked at the source code, I found that I need to create the required multiFileDiffEditor instances through multiFileDiffEditor instances, but when I called the creation method, I found that they are removed by tree-shake, so I would like to know how I can use this api. multiDiffModelView, but when I call the create method, I find that they have been removed by tree-shake, so I'm trying to figure out how I can use this api.

Actual (Problematic) Behavior

cannot access to createViewModel or setViewModel

image image

Expected Behavior

call these method to create/set viewModel for multiDiffEditor without error

Additional Context

No response

lokmeinmatz commented 1 month ago

I stumbled across the same, wanted to embed monaco editor for multiple diffs, but it seems the createViewModel etc. methods from vscode's src MultiDiffEditorWirdget are not there in the "out-editor-*" or "out-monaco-editor-core" files :/

Is this createMultiFileDiffEditor API exposed by accident? Else there is something wrong / missing!