fix(external_editor): cache auto-detect result, avoid hitting registry on every UI frame

This commit is contained in:
2026-05-07 21:00:41 -04:00
parent 93f6bcbd67
commit ca4719687a
6 changed files with 117 additions and 15 deletions
+11
View File
@@ -0,0 +1,11 @@
import sys
with open('config.toml', 'rb') as f:
data = f.read()
BOM = bytes([0xef, 0xbb, 0xbf])
if data.startswith(BOM):
with open('config.toml', 'wb') as f:
f.write(data[3:])
print('BOM removed')
else:
print('No BOM found')
sys.exit(0)