- 新增小红书前端模块(启动服务、内容分析、爆款创作、发布记录、技能卡片、拟人设置、AI 助手) - 新增 xhs-agent-desktop 独立桌面 Agent,对接 OMS 任务调度 - 登录页重构,整合微信登录与 OMS JWT 认证 - 订单、渠道、用户中心等页面与 API 增强 Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
669 B
Python
23 lines
669 B
Python
"""Windows 子进程启动辅助(隐藏控制台黑窗)。"""
|
||
|
||
from __future__ import annotations
|
||
|
||
import subprocess
|
||
import sys
|
||
|
||
|
||
def _no_window_flag() -> int:
|
||
return getattr(subprocess, "CREATE_NO_WINDOW", 0x08000000)
|
||
|
||
|
||
def popen_kwargs_hide_console(*, new_process_group: bool = False, **extra) -> dict:
|
||
"""供 subprocess.Popen 使用:GUI 调用 CLI/Bridge 时不弹出 cmd 窗口。"""
|
||
if sys.platform != "win32":
|
||
return extra
|
||
flags = int(extra.pop("creationflags", 0) or 0)
|
||
flags |= _no_window_flag()
|
||
if new_process_group:
|
||
flags |= subprocess.CREATE_NEW_PROCESS_GROUP
|
||
extra["creationflags"] = flags
|
||
return extra
|