Update app.js

This commit is contained in:
Namhyeon Go 2025-01-20 10:11:04 +09:00
parent 94601cbf4f
commit e585b3e2d4

5
app.js
View File

@ -215,7 +215,7 @@ function require(pathname) {
if (cache[FN]) return cache[FN];
var T = null;
var pos = FN.indexOf('://');
var sep = '://', pos = FN.indexOf(sep);
if (pos > -1) {
var scheme = FN.substring(0, pos);
@ -234,7 +234,8 @@ function require(pathname) {
if (["ai"].indexOf(scheme) > -1) {
require._addScriptProvider(function(url) {
try {
return require("lib/chatgpt").get(url);
var text = url.substring(pos + sep.length);
return require("lib/chatgpt").chat(text);
} catch (e) {
return null;
}