mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-24 21:36:06 +00:00
feat: system.json 的可视化编辑
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"type": "object",
|
||||
"layout": "expansion-panels",
|
||||
"properties": {
|
||||
"access-control": {
|
||||
"type": "object",
|
||||
"title": "访问控制",
|
||||
"properties": {
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"title": "访问控制模式",
|
||||
"description": "访问控制模式,支持黑名单和白名单",
|
||||
"enum": ["blacklist", "whitelist"]
|
||||
},
|
||||
"blacklist": {
|
||||
"type": "array",
|
||||
"title": "黑名单",
|
||||
"description": "黑名单中的会话将无法使用机器人,仅在访问控制模式为黑名单时有效",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "regex",
|
||||
"pattern": "^(person|group)_(\\d)*$"
|
||||
}
|
||||
},
|
||||
"whitelist": {
|
||||
"type": "array",
|
||||
"title": "白名单",
|
||||
"description": "仅白名单中的会话可以使用机器人,仅在访问控制模式为白名单时有效",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "regex",
|
||||
"pattern": "^(person|group)_(\\d)*$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["mode"]
|
||||
},
|
||||
"respond-rules": {
|
||||
"type": "object",
|
||||
"title": "群内响应规则",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "object",
|
||||
"title": "默认响应规则",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "boolean",
|
||||
"title": "是否响应 @ 消息",
|
||||
"layout": {
|
||||
"comp": "switch",
|
||||
"props": {
|
||||
"color": "primary"
|
||||
}
|
||||
}
|
||||
},
|
||||
"prefix": {
|
||||
"type": "array",
|
||||
"title": "前缀响应",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"regexp": {
|
||||
"type": "array",
|
||||
"title": "正则表达式响应",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "regex"
|
||||
}
|
||||
},
|
||||
"random": {
|
||||
"type": "number",
|
||||
"title": "随机响应概率",
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"step": 0.01,
|
||||
"layout": {
|
||||
"comp": "slider",
|
||||
"props": {
|
||||
"color": "primary"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"^(person|group).*$": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "boolean",
|
||||
"title": "是否响应 @ 消息",
|
||||
"layout": {
|
||||
"comp": "switch",
|
||||
"props": {
|
||||
"color": "primary"
|
||||
}
|
||||
}
|
||||
},
|
||||
"prefix": {
|
||||
"type": "array",
|
||||
"title": "前缀响应",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"regexp": {
|
||||
"type": "array",
|
||||
"title": "正则表达式响应",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "regex"
|
||||
}
|
||||
},
|
||||
"random": {
|
||||
"type": "number",
|
||||
"title": "随机响应概率",
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"step": 0.01,
|
||||
"layout": {
|
||||
"comp": "slider",
|
||||
"props": {
|
||||
"color": "primary"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+104
-72
@@ -1,80 +1,112 @@
|
||||
{
|
||||
"type": "object",
|
||||
"layout": "expansion-panels",
|
||||
"properties": {
|
||||
"admin-sessions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"network-proxies": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"http": {
|
||||
"type": "string"
|
||||
},
|
||||
"https": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"report-usage": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"logging-level": {
|
||||
"admin-sessions": {
|
||||
"type": "array",
|
||||
"title": "管理员会话",
|
||||
"description": "",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "regex",
|
||||
"pattern": "^(person|group)_(\\d)*$"
|
||||
}
|
||||
},
|
||||
"network-proxies": {
|
||||
"type": "object",
|
||||
"title": "网络代理",
|
||||
"properties": {
|
||||
"http": {
|
||||
"type": "string"
|
||||
},
|
||||
"session-concurrency": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"^(person|group).*$": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pipeline-concurrency": {
|
||||
"type": "integer"
|
||||
},
|
||||
"qcg-center-url": {
|
||||
},
|
||||
"https": {
|
||||
"type": "string"
|
||||
},
|
||||
"help-message": {
|
||||
"type": "string"
|
||||
},
|
||||
"http-api": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"persistence": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sqlite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"use": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"report-usage": {
|
||||
"type": "boolean",
|
||||
"title": "是否上报遥测数据",
|
||||
"layout": {
|
||||
"comp": "switch",
|
||||
"props": {
|
||||
"color": "primary"
|
||||
}
|
||||
}
|
||||
},
|
||||
"logging-level": {
|
||||
"type": "string",
|
||||
"title": "日志等级"
|
||||
},
|
||||
"session-concurrency": {
|
||||
"type": "object",
|
||||
"title": "会话并行消息数",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "integer",
|
||||
"title": "会话默认并行消息数"
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"^(person|group).*$": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pipeline-concurrency": {
|
||||
"type": "integer",
|
||||
"title": "全局并行消息数"
|
||||
},
|
||||
"qcg-center-url": {
|
||||
"type": "string",
|
||||
"title": "遥测服务器地址"
|
||||
},
|
||||
"help-message": {
|
||||
"type": "string",
|
||||
"title": "help 命令消息",
|
||||
"layout": "textarea"
|
||||
},
|
||||
"http-api": {
|
||||
"type": "object",
|
||||
"title": "HTTP 接口",
|
||||
"properties": {
|
||||
"enable": {
|
||||
"type": "boolean",
|
||||
"layout": {
|
||||
"comp": "switch",
|
||||
"props": {
|
||||
"color": "primary"
|
||||
}
|
||||
},
|
||||
"title": "是否启用"
|
||||
},
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"persistence": {
|
||||
"type": "object",
|
||||
"title": "持久化设置",
|
||||
"properties": {
|
||||
"sqlite": {
|
||||
"type": "object",
|
||||
"title": "sqlite",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"use": {
|
||||
"type": "string",
|
||||
"title": "所使用的数据库",
|
||||
"enum": ["sqlite"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user