fix: 网关兼容 Python 3.6 (Tuple 类型注解)
Some checks failed
Sync GitHub to CKB NAS Gitea / sync (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-17 20:01:10 +08:00
parent 30c4aa6e01
commit 01c175a988

View File

@@ -5,6 +5,7 @@
from pathlib import Path
import os
import re
from typing import Tuple
from fastapi import FastAPI
from fastapi.responses import HTMLResponse
from pydantic import BaseModel
@@ -29,7 +30,7 @@ def load_registry() -> str:
return "技能注册表未找到。"
def match_skill(prompt: str) -> tuple[str, str]:
def match_skill(prompt: str) -> Tuple[str, str]:
"""根据 prompt 在 SKILL_REGISTRY 中匹配技能,返回 (技能名, 路径)。"""
text = load_registry()
lines = text.split("\n")