Skip to content

Conversation

YunQiAI
Copy link

@YunQiAI YunQiAI commented Mar 10, 2025

image

所见即所得,安装好后,

python app/web/app.py

即可获得这个网页端了。
然后就能交互对话啦。

@XiangJinyu
Copy link
Collaborator

Nice work. I will review this pull request today. Thank you to the open source community partners.

@Liangdi
Copy link

Liangdi commented Mar 10, 2025

missing watchdog dependency

@Li-Hongmin
Copy link

image

python web_run.py

@Devindan
Copy link

image

python web_run.py

这个页面也很棒啊!大佬快提交一个merge吧

@XiangJinyu
Copy link
Collaborator

The front-end page effect of this version is great, but it seems that a lot of code structure needs to be changed. So I first merged the version with fewer changes. Thank you very much for your contribution!

@str02
Copy link

str02 commented Mar 10, 2025

2044e15c58d118b4a35ff4d10e83f66

@str02
Copy link

str02 commented Mar 10, 2025

return HTMLResponse(content=open(current_dir / "static" / "connected_interface.html", encoding='utf-8').read())
还有这里如果不指定 有可能会使用GPK字符集

@str02
Copy link

str02 commented Mar 10, 2025

中途如果发生任务重复 会被代理清理掉web通信链接

@YunQiAI
Copy link
Author

YunQiAI commented Mar 11, 2025

web入口是这样来,现在修正了一些bugs。应该比较稳定了。

uvicorn app.web.app:app --reload

or

python web_run.py

@github-actions github-actions bot added the ⭐ top pull request Top pull request. label Mar 16, 2025
@github-actions github-actions bot mentioned this pull request Mar 16, 2025
@fred913
Copy link
Collaborator

fred913 commented Mar 16, 2025

!pr-diff

Copy link

Diff Report

English

  • Updated the config file (config/config.toml): Changed the revision from “v4.4.0” to “v5.0.0”.
  • Added comprehensive new documentation in Chinese, including project overview, development timeline, technical stack, feature implementation, and solutions to encountered issues.
  • Introduced optional parameters (like cancel_event) into asynchronous functions (such as run, execute, and _create_initial_plan) to allow for task cancellation.
  • Updated web interface instructions with detailed startup commands, browser auto-launch functionality, and expanded API endpoints.
  • Enhanced the LLM communication mechanism via the new LLMCallbackWrapper, incorporating before_request, after_request, and on_error callbacks.
  • Improved logger configuration and log file management by introducing environmental variable control, log rotation, and new output formatting for both console and file logs.
  • Added additional API endpoints for retrieving logs, workspace files, thinking steps, progress, and system logs.
  • Introduced a log monitoring system using watchdog to track modifications in the logs directory.
  • Improved error handling and resource cleanup routines in the browser control and asynchronous flows.

Comments Highlight

  • Numerous non-English (Chinese) comments accompany the code. For example, “OpenManus 开发日志” and detailed development timelines provide rich context. If the project is maintained by an international team, consider adding English comments or a bilingual summary.
  • Inline comments are clear and descriptive, explaining the purpose of logic changes (e.g., adding cancel_event checks, logging enhancements). This improves maintainability.
  • Overall, the documentation is detailed though mainly in Chinese; a parallel English version may help non-Chinese speakers.

Spelling/Offensive Content Check

  • No spelling mistakes or offensive content were detected in the code, comments, or documentation sections.

中文

Diff 报告

  • 更新了配置文件 (config/config.toml):将 “rev” 从 “v4.4.0” 修改为 “v5.0.0”。
  • 添加了全新的中文文档,涵盖项目概述、开发时间线、技术栈、功能实现以及遇到问题的解决方案。
  • 在异步函数(如 run、execute 和 _create_initial_plan)中引入了可选参数 cancel_event,用于支持任务的中断处理。
  • 更新了 Web 界面的相关说明,包括详细的启动命令、自动打开浏览器功能以及扩展的 API 端点说明。
  • 通过新增的 LLMCallbackWrapper,增强了 LLM 通信机制,支持 before_request、after_request 和 on_error 回调功能。
  • 改进了日志记录配置与日志文件管理:使用环境变量控制日志文件路径、配置日志轮换机制,并优化了控制台及文件日志格式。
  • 新增了多个 API 接口,用于获取系统日志、工作区文件、思考过程步骤、任务进度以及其他调试信息。
  • 添加了基于 watchdog 的日志监控系统,实时捕获日志目录中文件的变动情况。
  • 改进了错误处理和资源清理机制,确保当异常或中断发生时,能恰当地释放资源和结束相关任务。

备注

  • 代码中大量使用了中文注释(如 “OpenManus 开发日志” 以及详细的开发日志),为项目提供了丰富的上下文。如果团队成员中有非中文使用者,建议增加英文注释或提供中英文对照的说明文档。
  • 内联注释清晰明确,详细解释了新增参数(例如 cancel_event 检查)、日志配置改进等修改,便于后续维护。
  • 总体文档信息详尽,但主要为中文;若项目为国际化使用,建议同时加入英文说明以便跨语言交流。

拼写/不当内容检查

  • 经过检查,代码、注释及文档中未发现拼写错误或不当言辞,所有内容均准确且专业。

@CheaSim
Copy link

CheaSim commented Mar 18, 2025

LLMCallbackWrapper 针对LLM的输出没有在左边具体显示,请问是设置问题嘛?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⭐ top pull request Top pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.