diff --git a/distribution/linux/euler-copilot-shell.spec b/distribution/linux/euler-copilot-shell.spec index 83bab27b01cc1000eec61dc82f98f4a2c921b314..c1f8d0195e2f22a2e142faaf8f693fc044165afb 100644 --- a/distribution/linux/euler-copilot-shell.spec +++ b/distribution/linux/euler-copilot-shell.spec @@ -3,7 +3,7 @@ %global debug_package %{nil} Name: euler-copilot-shell -Version: 0.10.0 +Version: 1.0.0 Release: 1%{?dist} Summary: openEuler Intelligence 智能命令行工具集 License: MulanPSL-2.0 @@ -99,6 +99,11 @@ ln -sf /usr/lib/openeuler-intelligence/scripts/deploy %{buildroot}%{_bindir}/ope %{_bindir}/openeuler-intelligence-installer %changelog +* Thu Aug 28 2025 openEuler - 1.0.0-1 +- 新增 openEuler Intelligence 部署功能 TUI +- 新增选择默认 Agent 功能 +- 版本号升级至 1.0.0 + * Wed Aug 13 2025 openEuler - 0.10.0-1 - 重构为子包形式:openeuler-intelligence-cli 和 openeuler-intelligence-installer - openeuler-intelligence-cli 替换原 euler-copilot-shell 包 diff --git a/setup.py b/setup.py index 0fd4721f54fa891e524a3799cf2de654d3efadab..5fec4d776e50c63d35076a9fcefd9af41ca0e06a 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import find_packages, setup setup( name="oi-cli", - version="0.10.0", + version="1.0.0", description="智能 Shell 命令行工具", author="openEuler", author_email="contact@openeuler.org", diff --git a/src/app/deployment/service.py b/src/app/deployment/service.py index 3c4b3f7839dc13150e68c5ff52979888b29c1970..7a6bf59aecf4ffc42f315c66f0918ca120131498 100644 --- a/src/app/deployment/service.py +++ b/src/app/deployment/service.py @@ -420,30 +420,11 @@ class DeploymentService: # 读取安装输出 output_lines = [] if process.stdout: - while True: - try: - # 使用超时读取,避免长时间阻塞 - line = await asyncio.wait_for( - process.stdout.readline(), - timeout=0.1, # 100ms 超时 - ) - except TimeoutError: - # 超时时让出控制权给 UI 事件循环 - await asyncio.sleep(0) - continue - - if not line: - break - - decoded_line = line.decode("utf-8", errors="ignore").strip() - if decoded_line: - output_lines.append(decoded_line) - if progress_callback: - temp_state.add_log(f"安装: {decoded_line}") - progress_callback(temp_state) - - # 每次读取后让出控制权 - await asyncio.sleep(0) + async for line in self._read_process_output_lines(process): + output_lines.append(line) + if progress_callback: + temp_state.add_log(f"安装: {line}") + progress_callback(temp_state) # 等待进程结束 return_code = await process.wait() @@ -578,7 +559,7 @@ class DeploymentService: try: # 读取输出 - async for line in self._read_process_output(): + async for line in self._read_process_output_lines(self._process): self.state.add_log(line) if progress_callback: progress_callback(self.state) @@ -787,24 +768,14 @@ class DeploymentService: msg = f"写入 config.toml 文件失败: {error_msg}" raise RuntimeError(msg) - async def _read_process_output(self) -> AsyncGenerator[str, None]: - """读取进程输出""" - if not self._process or not self._process.stdout: + async def _read_process_output_lines(self, process: asyncio.subprocess.Process) -> AsyncGenerator[str, None]: + """读取进程输出行""" + if not process.stdout: return - while True: + while not process.stdout.at_eof(): try: - # 使用超时读取,避免长时间阻塞 - try: - line = await asyncio.wait_for( - self._process.stdout.readline(), - timeout=0.1, # 100ms 超时 - ) - except TimeoutError: - # 超时时让出控制权给 UI 事件循环 - await asyncio.sleep(0) - continue - + line = await process.stdout.readline() if not line: break diff --git a/src/log/manager.py b/src/log/manager.py index 6831494f254d2ecc67bdd0c09a15dacaa25249a2..f0fa867819cc2b4d5ae71da3e0f7e2cb955c4858 100644 --- a/src/log/manager.py +++ b/src/log/manager.py @@ -133,10 +133,6 @@ class LogManager: handlers=handlers, ) - # 为 httpx 设置更高的日志级别以减少噪音 - logging.getLogger("httpx").setLevel(logging.WARNING) - logging.getLogger("openai").setLevel(logging.WARNING) - def _parse_log_file_date(self, log_file: Path) -> datetime | None: """解析日志文件名中的日期""" try: