🎨 移除扩展模块相关代码
This commit is contained in:
@@ -69,22 +69,20 @@ func Routers() *gin.Engine {
|
||||
appRouter := router.RouterGroupApp.App // 前台应用路由
|
||||
|
||||
// SillyTavern 核心脚本静态文件服务
|
||||
// 扩展通过 ES module 相对路径 import 引用这些核心模块(如 ../../../../../script.js → /script.js)
|
||||
// 所有核心文件存储在 data/st-core-scripts/ 下,完全独立于 web-app/ 目录
|
||||
// 扩展文件存储在 data/st-core-scripts/scripts/extensions/third-party/{name}/ 下
|
||||
stCorePath := "data/st-core-scripts"
|
||||
if _, err := os.Stat(stCorePath); err == nil {
|
||||
Router.Static("/scripts", stCorePath+"/scripts")
|
||||
Router.Static("/css", stCorePath+"/css")
|
||||
Router.Static("/img", stCorePath+"/img")
|
||||
Router.Static("/webfonts", stCorePath+"/webfonts")
|
||||
Router.Static("/lib", stCorePath+"/lib") // SillyTavern 扩展依赖的第三方库
|
||||
Router.Static("/lib", stCorePath+"/lib") // SillyTavern 依赖的第三方库
|
||||
Router.Static("/locales", stCorePath+"/locales") // 国际化文件
|
||||
Router.StaticFile("/script.js", stCorePath+"/script.js") // SillyTavern 主入口
|
||||
Router.StaticFile("/lib.js", stCorePath+"/lib.js") // Webpack 编译后的 lib.js
|
||||
global.GVA_LOG.Info("SillyTavern 核心脚本服务已启动: " + stCorePath)
|
||||
} else {
|
||||
global.GVA_LOG.Warn("SillyTavern 核心脚本目录不存在: " + stCorePath + ",扩展功能将不可用")
|
||||
global.GVA_LOG.Warn("SillyTavern 核心脚本目录不存在: " + stCorePath)
|
||||
}
|
||||
|
||||
// 管理后台前端静态文件(web)
|
||||
@@ -152,7 +150,6 @@ func Routers() *gin.Engine {
|
||||
appRouter.InitAuthRouter(appGroup) // 认证路由:/app/auth/* 和 /app/user/*
|
||||
appRouter.InitCharacterRouter(appGroup) // 角色卡路由:/app/character/*
|
||||
appRouter.InitWorldInfoRouter(appGroup) // 世界书路由:/app/worldbook/*
|
||||
appRouter.InitExtensionRouter(appGroup) // 扩展路由:/app/extension/*
|
||||
appRouter.InitRegexScriptRouter(appGroup) // 正则脚本路由:/app/regex/*
|
||||
appRouter.InitProviderRouter(appGroup) // AI提供商路由:/app/provider/*
|
||||
appRouter.InitChatRouter(appGroup) // 对话路由:/app/chat/*
|
||||
|
||||
Reference in New Issue
Block a user