From ac79d6c0d049591ec955ee0df37190c662d76e99 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 17 Jun 2026 18:32:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20get=5Fsearch=5Fapiname=E8=BF=94=E5=9B=9E?= =?UTF-8?q?value/text=E5=8F=8C=E9=94=AE=E5=85=BC=E5=AE=B9=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/get_search_apiname.dspy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wwwroot/api/get_search_apiname.dspy b/wwwroot/api/get_search_apiname.dspy index 2630a80..7215ec5 100644 --- a/wwwroot/api/get_search_apiname.dspy +++ b/wwwroot/api/get_search_apiname.dspy @@ -3,7 +3,7 @@ allow_empty = params_kw.get('allow_empty', '') result = [] if allow_empty: - result = [{'apiname': '', 'apiname_text': '不指定'}] + result = [{'apiname': '', 'apiname_text': '不指定', 'value': '', 'text': '不指定'}] try: if not llmid: @@ -26,6 +26,10 @@ try: "select name as apiname, name as apiname_text from uapi where upappid = ${upappid}$ order by name", {'upappid': upappid} ) + # Add value/text keys for form dropdown compatibility + for a in apis: + a['value'] = a['apiname'] + a['text'] = a['apiname_text'] return json.dumps(result + list(apis), ensure_ascii=False) except Exception as e: debug(f'get_search_apiname error: {e}')