You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(packages): insert import at top of document (was copy-to-clipboard)
The PackageDetail "insert import" button previously copied the
#import snippet to the clipboard. Now it inserts the snippet at the very
top of the active document via a new MonacoEditorApi.insertAtTop method
(insert at line 1, push existing content down, place caret at end of the
inserted snippet, reveal + focus).
- MonacoEditor.tsx: add insertAtTop to the API interface + implementation
(executeEdits at range 1:1, forceMoveMarkers, trailing newline).
- PackageDetail.tsx: button calls editorApiRef.current?.insertAtTop
instead of navigator.clipboard.writeText.
- i18n: copyImport -> insertImport (en "Insert import" / zh "插入 import").