diff --git a/AIGrammar.xcworkspace/xcuserdata/oscar.xcuserdatad/UserInterfaceState.xcuserstate b/AIGrammar.xcworkspace/xcuserdata/oscar.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..c8ec5c1 Binary files /dev/null and b/AIGrammar.xcworkspace/xcuserdata/oscar.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/AIGrammar/Info.plist b/AIGrammar/Info.plist new file mode 100644 index 0000000..ca9a074 --- /dev/null +++ b/AIGrammar/Info.plist @@ -0,0 +1,10 @@ + + + + + UIBackgroundModes + + remote-notification + + + diff --git a/AIGrammar/View/TranslateView.swift b/AIGrammar/View/TranslateView.swift index a75c6c3..b0efbe8 100644 --- a/AIGrammar/View/TranslateView.swift +++ b/AIGrammar/View/TranslateView.swift @@ -379,7 +379,7 @@ struct TranslateCardView: View { logger.info("Synthesis succ.") }, onFailure: { error in isSynthesizing = false - logger.info("Synthesis error: \(error)") + logger.error("Synthesis error: \(error)") }) } diff --git a/commit.sh b/commit.sh new file mode 100755 index 0000000..c0c522c --- /dev/null +++ b/commit.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# 确保脚本有执行权限(只需执行一次) +# chmod +x git_commit.sh + +# 检查是否在 Git 仓库内 +if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then + echo "❌ 当前目录不是 Git 仓库,请先执行 git init" + exit 1 +fi + +# 获取 commit message +commit_msg="$1" + +# 如果没有提供 commit message,提示用户输入 +if [ -z "$commit_msg" ]; then + commit_msg="modify files" + #read -p "请输入 commit message: " commit_msg + #if [ -z "$commit_msg" ]; then + # echo "❌ 提交信息不能为空!" + # exit 1 + #fi +fi + +# 添加所有更改 +git add . +if [ $? -ne 0 ]; then + echo "❌ git add 失败!" + exit 1 +fi + +# 提交更改 +git commit -m "$commit_msg" +if [ $? -ne 0 ]; then + echo "❌ git commit 失败!" + exit 1 +fi + +# 推送到远程仓库 +git push -u origin master +if [ $? -ne 0 ]; then + echo "❌ git push 失败!请检查远程仓库设置。" + exit 1 +fi + +echo "✅ 代码提交成功!" \ No newline at end of file diff --git a/gitignore b/gitignore new file mode 100644 index 0000000..1515a1b --- /dev/null +++ b/gitignore @@ -0,0 +1,11 @@ +# 其他已有的忽略规则 +*.pyc +__pycache__/ + +# 忽略环境配置文件 +.env + +# 忽略所有 log 目录 和 data 目录 +**/log/ +**/data/ +**/result/