refactor: Remove unnecessary branching in run_cli

Merge https://github.com/google/adk-python/pull/2537

Streamlined code flow by removing redundant if/else logic

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2537 from ftnext:refactor-run-cli d799e17a7dd7beb0adecd0bd28237a5e09949a6c
PiperOrigin-RevId: 827153566
This commit is contained in:
nikkie
2025-11-02 08:04:19 -08:00
committed by Copybara-Service
parent c4c127df23
commit 4124f54a36
+1 -4
View File
@@ -183,10 +183,7 @@ async def run_cli(
content = event.content
if not content or not content.parts or not content.parts[0].text:
continue
if event.author == 'user':
click.echo(f'[user]: {content.parts[0].text}')
else:
click.echo(f'[{event.author}]: {content.parts[0].text}')
click.echo(f'[{event.author}]: {content.parts[0].text}')
await run_interactively(
root_agent,