Update s_full.py - Fix: Print text responses in __main__ REPL loop

When running s_full.py directly, the LLM's text responses are not printed to the terminal. Users cannot see the assistant's replies in the REPL, making the interactive loop unusable.
This commit is contained in:
meowsaic
2026-03-27 00:24:50 +08:00
committed by GitHub
parent a9c71002d2
commit b17fa2b880

View File

@@ -733,4 +733,9 @@ if __name__ == "__main__":
continue continue
history.append({"role": "user", "content": query}) history.append({"role": "user", "content": query})
agent_loop(history) agent_loop(history)
response_content = history[-1]["content"]
if isinstance(response_content, list):
for block in response_content:
if hasattr(block, "text"):
print(block.text)
print() print()