improve ask_user tool display and memory SOP prompt

This commit is contained in:
Liang Jiaqing committed 2026-04-26 18:24:21 +08:00
1 parent e07c1b046b
commit 2575daf9a6
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -115,4 +115,9 @@ def _compact_tool_args(name, args):
for k in ('path',):
if k in a: a[k] = os.path.basename(a[k])
if name == 'update_working_checkpoint': s = a.get('key_info', ''); return (s[:60]+'...') if len(s)>60 else s
if name == 'ask_user':
q = str(a.get('question', ''))
cs = a.get('candidates') or []
if cs: q += '\ncandidates:\n' + '\n'.join(f'- {c}' for c in cs)
return q
s = json.dumps(a, ensure_ascii=False); return (s[:120]+'...') if len(s)>120 else s
+1 -1
View File
@@ -499,7 +499,7 @@ class GenericAgentHandler(BaseHandler):
''' + get_global_memory()
yield "[Info] Start distilling good memory for long-term storage.\n"
path = './memory/memory_management_sop.md'
if os.path.exists(path): result = file_read(path, show_linenos=False)
if os.path.exists(path): result = '自动读取L0内容:\n' + file_read(path, show_linenos=False)
else: result = "Memory Management SOP not found. Do not update memory."
return StepOutcome(result, next_prompt=prompt)