Commit b48b419
Yogesh Prajapati
fix(v1.4.1): F5 Run File works again — fix AMD-loader script ordering + PTY routing
The Run File (F5) feature has been broken since the AMD-loader regression:
1. UMD libraries (xterm, xterm-addon-fit, mermaid, diff) loaded AFTER
monaco-editor/vs/loader.js were eaten by Monaco's global define(),
so window.Terminal was undefined and the integrated terminal
silently failed to render. Reordered to load all UMD libs BEFORE
vs/loader.js, matching the marked.umd.js pattern.
2. runCurrentFile() was spawning a separate cmd.exe via the run-command
IPC and piping output to terminal id 0 — but the visible PowerShell
terminal is a node-pty session with its own id, so output went
nowhere. Now types the run command directly into the existing PTY,
which gives live stdout/stderr in the visible panel and proper cwd.
3. CSP relaxed: worker-src adds 'self' (Monaco can now spawn its
workerMain.js from file://, removing the "falling back to main
thread, may cause UI freezes" warning). script-src adds
'unsafe-inline' so the inline mermaid.initialize() block executes.
Verified: F5 on test.py now types `cd "<dir>"; python "<file>"` into
the live PowerShell PTY and shows real Python output / tracebacks.1 parent d6bfd53 commit b48b419
4 files changed
Lines changed: 28 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
1102 | | - | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1103 | 1105 | | |
1104 | 1106 | | |
1105 | 1107 | | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
1106 | 1112 | | |
1107 | 1113 | | |
1108 | 1114 | | |
| |||
1115 | 1121 | | |
1116 | 1122 | | |
1117 | 1123 | | |
1118 | | - | |
1119 | 1124 | | |
1120 | 1125 | | |
1121 | 1126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1894 | 1894 | | |
1895 | 1895 | | |
1896 | 1896 | | |
1897 | | - | |
1898 | | - | |
1899 | 1897 | | |
1900 | 1898 | | |
1901 | 1899 | | |
1902 | 1900 | | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1903 | 1904 | | |
1904 | 1905 | | |
1905 | 1906 | | |
| |||
1909 | 1910 | | |
1910 | 1911 | | |
1911 | 1912 | | |
1912 | | - | |
1913 | | - | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
1914 | 1916 | | |
1915 | 1917 | | |
1916 | 1918 | | |
| |||
1919 | 1921 | | |
1920 | 1922 | | |
1921 | 1923 | | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
1926 | 1931 | | |
1927 | | - | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
1928 | 1936 | | |
1929 | 1937 | | |
1930 | 1938 | | |
| |||
0 commit comments