AI wizard/test/doctor: native-auth handling, Responses API test, safe temp, stale profile

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
2026-08-24 20:50:11 -04:00
co-authored by Claude Fable 5
parent a942500712
commit 78909cbfd5
3 changed files with 35 additions and 10 deletions
+10 -2
View File
@@ -30,6 +30,15 @@ fi
default_name="$harness-$provider"
name=$(gum input --header "Profile 名称" --value "$default_name")
proto=$(cn_ai_harness_field "$harness" protocol)
if [[ $proto == "native" ]]; then
omarchy-cn-ai-profile-create "$name" "$harness" "$provider" "$model"
omarchy-cn-ai-profile-use "$name"
echo "$harness 自管鉴权:首次启动时按其官方流程登录/配置"
echo "完成。启动: omarchycn ai launch"
exit 0
fi
if ! omarchy-cn-ai-secret get "$provider" > /dev/null 2>&1; then
key=$(gum input --password --header "$provider API Key(获取: $(jq -r --arg p "$provider" '.providers[$p].key_url' "$CN_AI_PROVIDERS")")
printf '%s' "$key" | omarchy-cn-ai-secret set "$provider"
@@ -38,8 +47,7 @@ fi
omarchy-cn-ai-profile-create "$name" "$harness" "$provider" "$model"
omarchy-cn-ai-profile-use "$name"
proto=$(cn_ai_harness_field "$harness" protocol)
if [[ $proto != "native" ]] && gum confirm "运行连接测试?"; then
if gum confirm "运行连接测试?"; then
omarchy-cn-ai-test "$name"
fi