refactor(bot): remove unused max-tokens argument handling

- Simplified the `call_claude` function by removing the unused `MAX_TOKENS` argument handling.
- Ensures cleaner and more maintainable command construction.
This commit is contained in:
Harald Hoyer 2026-02-03 16:30:47 +01:00
parent 1f61a0d1ec
commit 538d7623be

View file

@ -112,10 +112,7 @@ def build_prompt(user_id: str, message: str) -> str:
async def call_claude(prompt: str) -> str: async def call_claude(prompt: str) -> str:
"""Call Claude CLI and return response.""" """Call Claude CLI and return response."""
cmd = [CLAUDE_PATH, "--print"] cmd = [CLAUDE_PATH, "--print"]
if MAX_TOKENS:
cmd.extend(["--max-tokens", str(MAX_TOKENS)])
log.info(f"Calling Claude: {' '.join(cmd)}") log.info(f"Calling Claude: {' '.join(cmd)}")
try: try: