mirror of
https://github.com/open-webui/computer.git
synced 2026-11-26 23:29:25 -05:00
refac
This commit is contained in:
1 parent
c156aea2ae
commit
b3f2aad51a
2 files changed
+5
No files matched your search
@@ -64,6 +64,9 @@ ENABLE_CHAT_RECONCILE_ON_STARTUP: bool = os.environ.get(
|
||||
CHAT_TOOL_MAX_CHARS = int(os.environ.get("CHAT_TOOL_MAX_CHARS", "50000"))
|
||||
CHAT_TOOL_COMMAND_MAX_CHARS = int(os.environ.get("CHAT_TOOL_COMMAND_MAX_CHARS", "8000"))
|
||||
CHAT_COMPACT_TOKEN_THRESHOLD = int(os.environ.get("CHAT_COMPACT_TOKEN_THRESHOLD", "80000"))
|
||||
# Claude SDK stdout JSON buffer; chat/tool output caps apply later after parsing.
|
||||
CLAUDE_CODE_MAX_BUFFER_SIZE = _env_int("CPTR_CLAUDE_CODE_MAX_BUFFER_SIZE", 128 * 1024 * 1024)
|
||||
CLAUDE_CODE_MAX_BUFFER_SIZE = _env_int("CPTR_CLAUDE_CODE_MAX_BUFFER_SIZE", 128 * 1024 * 1024)
|
||||
|
||||
# ── Execute timeout ─────────────────────────────────────────
|
||||
# Default wait (seconds) for run_command / check_task when the caller
|
||||
|
||||
@@ -7,6 +7,7 @@ import os
|
||||
import shlex
|
||||
from typing import Any, AsyncIterator
|
||||
|
||||
from cptr.env import CLAUDE_CODE_MAX_BUFFER_SIZE
|
||||
from cptr.utils.agents.attachments import PreparedAgentAttachments
|
||||
from cptr.utils.agents.events import (
|
||||
AgentDone,
|
||||
@@ -128,6 +129,7 @@ async def run_claude_code_agent(
|
||||
"permission_mode": permission_mode,
|
||||
"env": env,
|
||||
"include_partial_messages": True,
|
||||
"max_buffer_size": CLAUDE_CODE_MAX_BUFFER_SIZE,
|
||||
}
|
||||
if workspace:
|
||||
options_kwargs["cwd"] = workspace
|
||||
|
||||
Reference in new issue
Block a user