已合并
[refactor] 全局配置目录与工作区状态分离 #228
[refactor] 全局配置目录与工作区状态分离 #228
已合并
fanglanyue创建于 8月22日
fanglanyue
fanglanyue成员
8月22日

PR 合入模板

注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。


1. 修改描述

  • 修改原因: 此前每个工作目录都会生成一套 .msagent/,存在需要重复设置model等问题,本次改造将“安装包默认配置”“用户全局配置”和“workspace 状态”拆分为三个独立层次。
  • 修改内容:
  1. 新增统一配置路径,支持通过 MSAGENT_HOME 自定义全局目录。
~/.msagent/
├── config/                         # 全局用户配置
├── prompts/                        # 用户 Prompt
├── skills/                         # 用户安装的 Skill
├── cache/                          # 全局缓存
├── oauth/                          # MCP OAuth
├── logs/                           # 全局日志
└── state/projects/<project-id>/    # workspace 独立状态
  1. 默认配置改为只读加载默认配置直接从 wheel 的 resources/configs/default/ 读取。
  • 不再向工作目录复制整套默认配置。
  • ~/.msagent/config/ 只保存用户覆盖项。
  • 工作目录不再创建 .msagent/。
  1. Agent/Model 与 workspace 绑定,Agent 和每个 Agent 使用的 Model 保存在项目 project.json

备注说明:当前pr改动量超1k,主要涉及多个组件对于配置文件的联动修改,以及对应ut修改,无法拆分


2. 功能验证

环境 验证项 说明/截图
Linux 编包后当前workspace下不会再创建 .msagent,LLM配置通用 image.png
Linux 在 ~/.msagent 下记录配置和checkpoint image.png
Linux 迁移验证:<workspace>/.msagent存在,新版本无影响 image.png
Linux 迁移验证:~/.msagent存在,启动时有提示,需手动删除后重新开启 image.png
Windows 在<workspace>下启动msagent,配置目录统一在~/.msagent image.png
Windows 迁移验证:<workspace>/.msagent存在,新版本无影响 image.png
Windows 迁移验证:~/.msagent存在,启动时有提示,需手动删除后重新开启 image.png

3. 分支合并要求


4. 代码检视

  • 要求:

    • 合入代码超过 200 行,需三人以上会议检视。
    • 检视密度≥1个/100行。
    • 检视缺陷密度未达要求需提供说明。
    • 大于 1000 行代码原则上不允许合入,需进行备案。
  • 检视意见数:____ 条 (请填写本次检视的意见总数,用于commit合入前审视)


5. 安全自检

Python、C++

C++


6. 变更知会


likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 fanglanyue 的贡献)
ascend-robotascend-robot成员
8月22日 添加了label:ascend-cla/yes
xzm123成员
8月22日 评论:

🤖 AIDD 文档质量检测报告

PR #228 的文档检测已全部完成。

📊 任务统计:共 20 个任务(✅ 12 完成 / ❌ 0 失败 / ⊘ 8 取消)
🐛 问题统计:共 158 个问题(致命 0 / 严重 2 / 一般 155 / 提示 1)

🔗 查看完整报告:点击进入平台报告
🔗 查看 PR 检测问题:点击查看问题列表

评论由 AIDD 自动生成,多次推送会增量更新本评论。

likedislike
ascend-robot
ascend-robot成员
8月22日 评论:

CLA Signature Pass

fanglanyue0916, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robot
ascend-robot成员
8月22日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-Ascend/msagent ✅ 张伟, 刘鹏程 (2/2) ✅ 张伟 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

fanglanyue0916, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
此处折叠了249条消息 查看更多
ascend-robot
ascend-robot成员
8月27日 评论:

This pull request cannot be merged because it is not associated with any issue or milestone.

likedislike
fanglanyuefanglanyue成员
8月27日 关联了issue:msagent config 命令未明确说明配置保存在当前目录的 .msagent 隐藏文件夹中,导致用户误以为是全局配置而配置失败
fanglanyuefanglanyue成员
8月27日 关联了里程碑:MindStudio 26.2.0
fanglanyuefanglanyue成员
8月27日 解决了最后一个问题
ascend-robotascend-robot成员
8月27日 合入了pull request,合并节点 SHA:1445ef8f1650a9e074a21e5c66d149a5d85fef18