koishijs / koishi

Cross-platform chatbot framework made with love
https://koishi.chat
MIT License
4.53k stars 246 forks source link

Feature: 控制台数组配置项增加“以JSON格式编辑” #1270

Closed maxoyed closed 10 months ago

maxoyed commented 1 year ago

Describe the problem related to the feature request

需要批量编辑数组配置项的数据,目前的方案怎么在控制台资源管理器中编辑之后手动重启 Koishi,要么只能逐条添加

Describe the solution you'd like

Image_1700385765202 在数组配置项中添加“以JSON格式编辑”功能,方便直接粘贴数据

Describe alternatives you've considered

No response

Additional context

No response

MaikoTan commented 1 year ago

I think a better solution is to use the explorer plugin and then modifying the koishi.yml file manually rather than edit in JSON.

shigma commented 1 year ago

I think a better solution is to use the explorer plugin and then modifying the koishi.yml file manually rather than edit in JSON.

Modifying configuration file will not trigger full reload, unless you enable hmr plugin, which is very dangerous in production.

Also, the requested feature makes it possible to "copy as JSON", which is quite useful when you want to synchronize configuration across plugins / instances.

MaikoTan commented 1 year ago

Modifying configuration file will not trigger full reload, unless you enable hmr plugin, which is very dangerous in production.

I see, you're right. I didn't thought about that.

Also, the requested feature makes it possible to "copy as JSON", which is quite useful when you want to synchronize configuration across plugins / instances.

Amazing! Maiko agreed to that as well.