fix: move input outside try block to allow Ctrl+C exit

This commit is contained in:
Liang Jiaqing
2026-02-20 12:54:29 +08:00
parent 08d6cedc7d
commit b8ce2ecf13

View File

@@ -152,9 +152,9 @@ if __name__ == '__main__':
else: else:
agent.inc_out = True agent.inc_out = True
while True: while True:
try:
q = input('> ').strip() q = input('> ').strip()
if not q: continue if not q: continue
try:
dq = agent.put_task(q, source='user') dq = agent.put_task(q, source='user')
while True: while True:
item = dq.get() item = dq.get()