Harden analysis timeout and config/prompt loading for package installs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
喻长发
2026-09-04 17:18:05 +08:00
co-authored by Cursor
parent 8c33d08537
commit 68364966cc
3 changed files with 31 additions and 5 deletions
+2 -1
View File
@@ -53,7 +53,8 @@ def build_system_prompt(system_text):
if override.exists():
try:
data=json.loads(override.read_text('utf-8'))
if data.get('system',{}).get('body'): return data['system']['body'].format(system=system_text, variable_schema=variable_schema())
if isinstance(data, dict) and isinstance(data.get('system'), dict) and data['system'].get('body'):
return data['system']['body'].format(system=system_text, variable_schema=variable_schema())
except Exception: pass
return TEMPLATES["system"].render(system=system_text, variable_schema=variable_schema())