【代码优化】AI:将对话、聊天挪到 index 目录下,更模块化

This commit is contained in:
YunaiV
2024-07-07 17:22:16 +08:00
parent 4acd379d50
commit f3777f6334
19 changed files with 27 additions and 12 deletions

View File

@ -0,0 +1,13 @@
/**
* Created by 芋道源码
*
* AI 枚举类
*
* 问题:为什么不放在 src/utils/common-utils.ts 呢?
* 回答:主要 AI 是可选模块,考虑到独立、解耦,所以放在了 /views/ai/utils/common-utils.ts
*/
/** 判断字符串是否包含中文 */
export const hasChinese = async (str) => {
return /[\u4e00-\u9fa5]/.test(str)
}