Skip to content

Commit

Permalink
增加/quit函数
Browse files Browse the repository at this point in the history
  • Loading branch information
pwh-pwh committed Jul 29, 2024
1 parent 37ff536 commit 512d582
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import Message = types.Message;
const inputMsg = ref('')
const helpMsg = ref('/help: 显示帮助信息\n/clear: 清除历史信息\n/loadconf: 重新加载配置文件\n/opconf: 打开配置文件夹')
const helpMsg = ref('/help: 显示帮助信息\n/clear: 清除历史信息\n/loadconf: 重新加载配置文件\n/opconf: 打开配置文件夹\n' +
'/quit: 退出应用')
const msgList = reactive<Message[]>([{content: '欢迎使用Ai-Gui,用法介绍如下', userType: 'user', id: 'tool'},
{content: helpMsg.value, userType: 'assistant', id: 'tool'}])
const doChat = () => {
Expand Down Expand Up @@ -51,6 +52,8 @@ const dispatchMsg = (msg: string): boolean => {
showInfoToast('打开配置文件夹成功', '提示', 3000)
})
return false
case '/quit':
quitApp()
default:
return true
}
Expand Down

0 comments on commit 512d582

Please sign in to comment.