Open jimniels opened 2 months ago
Monaco editor does not allow selecting text outside itself and it cannot scroll parent element while text selection.
One possible solution is to display the AI code as markdown code block, with language highlights. We can remove moncao here.
That's probably the best idea.
Initially we just dumped it in Monaco because it had the same syntax highlighting as we used in the code editor (which is custom) so it was the quickest way to get something that felt unified with the code editor itself in terms of the display of code.
But it does bring all the baggage of Monaco. I think you're right, pulling out the display via Monaco is probably the best solution.
Is this still required ? @jimniels
It's still a bug — even in the AI branch. If generate code in the code editor AI and it overflows that area you can't drag to select it
I meant the monaco editor is collapsed now in AI branch, user interaction with generated code will be different. Also @davidkircos still wants monaco in ai output, so not sure what is the way forward... we may keep this issue open, but I don't think it is actionable.
Try to drag to select specific text that is code in the AI assistant and it doesn't scroll down as you drag, which makes it impossible to select text off the screen.
https://github.com/user-attachments/assets/d92876e3-ed12-4acc-9a65-68056815ed01