refactor: align cd and worker defaults
This commit is contained in:
@@ -23,7 +23,7 @@ chat_id = 123456789
|
||||
|
||||
Optional keys:
|
||||
|
||||
- exec/resume: `codex_workspace`, `codex_exec_args`, `max_workers`
|
||||
- exec/resume: `cd`, `codex_exec_args`
|
||||
|
||||
## Option 1: exec/resume
|
||||
|
||||
@@ -39,7 +39,7 @@ Optional flags:
|
||||
- `--progress-silent/--no-progress-silent` (default silent)
|
||||
- `--final-notify/--no-final-notify` (default notify via new message)
|
||||
- `--ignore-backlog/--process-backlog` (default ignore pending updates)
|
||||
- `--workdir PATH` (override `codex_workspace`)
|
||||
- `--cd PATH` (pass through to `codex --cd`)
|
||||
- `--model NAME` (pass through to `codex exec`)
|
||||
|
||||
To resume an existing thread without a database, reply with (or include) the session id shown at the end of the bot response:
|
||||
|
||||
@@ -350,10 +350,10 @@ def run(
|
||||
"--log-file",
|
||||
help="Write detailed debug logs to this file (set to empty to disable).",
|
||||
),
|
||||
workdir: str | None = typer.Option(
|
||||
cd: str | None = typer.Option(
|
||||
None,
|
||||
"--workdir",
|
||||
help="Override codex workspace (--cd) for this exec-bridge run.",
|
||||
"--cd",
|
||||
help="Pass through to `codex --cd` (defaults to `cd` in ~/.codex/telegram.toml).",
|
||||
),
|
||||
model: str | None = typer.Option(
|
||||
None,
|
||||
@@ -372,7 +372,7 @@ def run(
|
||||
codex_cmd = shutil.which("codex")
|
||||
if not codex_cmd:
|
||||
raise RuntimeError("codex not found on PATH")
|
||||
workspace = workdir if workdir is not None else config.get("codex_workspace")
|
||||
workspace = cd if cd is not None else config.get("cd")
|
||||
raw_exec_args = config.get("codex_exec_args", "")
|
||||
if isinstance(raw_exec_args, list):
|
||||
extra_args = [str(v) for v in raw_exec_args]
|
||||
@@ -405,8 +405,7 @@ def run(
|
||||
codex_cmd=codex_cmd, workspace=workspace, extra_args=extra_args
|
||||
)
|
||||
|
||||
max_workers = config.get("max_workers")
|
||||
pool = ThreadPoolExecutor(max_workers=max_workers or 4)
|
||||
pool = ThreadPoolExecutor(max_workers=16)
|
||||
offset: int | None = None
|
||||
ignore_backlog = bool(ignore_backlog)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user