Merge pull request #4 from wagesj45/codex/locate-qwen.txt-xml-parsing-error

Fix XML parse warning when loading templates
This commit is contained in:
Jordan Wages 2025-06-17 01:02:11 -05:00 committed by GitHub
commit 31ccd737eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -123,6 +123,7 @@ function loadTemplate(name) {
let url = `resource://aifilter/prompt_templates/${name}.txt`; let url = `resource://aifilter/prompt_templates/${name}.txt`;
let xhr = new XMLHttpRequest(); let xhr = new XMLHttpRequest();
xhr.open("GET", url, false); xhr.open("GET", url, false);
xhr.overrideMimeType("text/plain");
xhr.send(); xhr.send();
if (xhr.status === 0 || xhr.status === 200) { if (xhr.status === 0 || xhr.status === 200) {
return xhr.responseText; return xhr.responseText;