fix prompt flow

This commit is contained in:
Jiaqing Liang
2026-04-15 13:57:36 +08:00
parent 273150a9ce
commit d111db5454
3 changed files with 33 additions and 31 deletions

View File

@@ -105,9 +105,10 @@ class GeneraticAgent:
except ValueError:
try: v = float(v)
except ValueError: pass
if k == 'history': v = json.loads(open(v, encoding='utf-8').read()) if os.path.exists(v) else []
setattr(self.llmclient.backend, k, v)
display_queue.put({'done': f"✅ session.{k} = {v!r}"})
self.task_queue.task_done(); continue
self.task_queue.task_done(); continue
self.is_running = True
rquery = smart_format(raw_query.replace('\n', ' '), max_str_len=200)
self.history.append(f"[USER]: {rquery}")