mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-01 12:02:05 +00:00
fix(windows): hide pdftoppm console flash on PDF attach
server.py's PDF-attach handler shells out to `pdftoppm` from the console-less desktop/gateway backend; on Windows that pops a conhost window each attach. Route it through windows_hide_flags() like the sibling _list_repo_files git calls (no-op on POSIX).
This commit is contained in:
parent
32087e4bc9
commit
ee22d853eb
1 changed files with 6 additions and 1 deletions
|
|
@ -9126,8 +9126,13 @@ def _(rid, params: dict) -> dict:
|
|||
"-f", str(first_page), "-l", str(last_page),
|
||||
str(pdf_path), str(out_prefix),
|
||||
]
|
||||
from hermes_cli._subprocess_compat import windows_hide_flags
|
||||
|
||||
try:
|
||||
res = subprocess.run(argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)
|
||||
res = subprocess.run(
|
||||
argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL,
|
||||
creationflags=windows_hide_flags(),
|
||||
)
|
||||
except subprocess.TimeoutExpired:
|
||||
return _err(rid, 5028, "pdftoppm timed out (>120s)")
|
||||
if res.returncode != 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue