Fix XML parse warning loading templates
This commit is contained in:
parent
74719504a3
commit
f9762674f7
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ function loadTemplate(name) {
|
|||
let url = `resource://aifilter/prompt_templates/${name}.txt`;
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", url, false);
|
||||
xhr.overrideMimeType("text/plain");
|
||||
xhr.send();
|
||||
if (xhr.status === 0 || xhr.status === 200) {
|
||||
return xhr.responseText;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue