Skip to content

解决记忆文件菜单对应的工作记忆,记忆归档,核心文件,创建文件无法显示问题#162

Open
roc-xie wants to merge 1 commit intoqingchencloud:mainfrom
roc-xie:develop
Open

解决记忆文件菜单对应的工作记忆,记忆归档,核心文件,创建文件无法显示问题#162
roc-xie wants to merge 1 commit intoqingchencloud:mainfrom
roc-xie:develop

Conversation

@roc-xie
Copy link
Copy Markdown

@roc-xie roc-xie commented Mar 28, 2026

fixed the issue where memory files were being created successfully but not appearing in the expected tabs.

变更描述

Tab Directory Alignment:
Working Memory: Now correctly uses workspace/memory/.
Memory Archive: Now correctly uses workspace-memory/ (sibling of workspace).
Core Files: Now correctly uses workspace/ (the root).

Recursive Search: Updated the file listing to search subdirectories recursively and support more file extensions (.txt, .json, .jsonl).
Agent Support: Fixed the workspace path for non-default agents to use the correct agents/{id}/workspace structure.
Consistent Operations: Ensured that reading and deleting files now searches across all three categories, resolving "file not found" errors when navigating between tabs.

变更类型

  • 新功能 (feat)
  • Bug 修复 (fix)
  • 代码重构 (refactor)
  • 样式调整 (style)
  • 性能优化 (perf)
  • 文档更新 (docs)
  • 构建/CI 配置 (ci/build)
  • 其他 (chore)

测试清单

  • 本地运行 npm run build 前端构建通过
  • 本地运行 cargo check Rust 编译通过
  • 在 macOS 上测试通过
  • 在 Windows 上测试通过
  • 在 Linux 上测试通过
  • 新功能已添加对应测试
  • 所有现有测试通过

相关 Issue

截图 (如涉及 UI 变更)

修改前
我在.openclaw/workspace目录下新建了memory文件夹后,将文件移动到memory目录下后在工作记忆下可以显示文件信息
修改后
我创建.md文件分别在workspace的子目录memory和跟workspace平级的workspace-memory目录下存放,在界面显示为对应工作记忆和记忆归档选项卡下,核心文件显示workspace下的文件信息,修改前这些也没有在核心文件tab下显示

image image image image 修改后 image image

Copy link
Copy Markdown
Contributor

@1186258278 1186258278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢贡献!记忆文件路径修复很有价值,但有以下问题需要处理:

1. 大量无关的格式变更
PR 中大量 catch {}catch { } 的格式化变更(约50处),与核心修复无关,建议拆分为两个 PR:一个纯格式化,一个功能修复。这样方便 Review 和追踪。

2. 跨分类搜索的安全隐患

  • read_memory_filedelete_memory_file 遍历所有三个分类目录搜索文件。如果不同分类下有同名文件,可能读取/删除错误的文件。
  • 建议:这两个函数应接收 category 参数,精确定位目录,而非全局搜索。

3. parseCookies 缩进变更
parseCookies 函数的缩进改动改变了代码结构(首行分号位置),请确认这不影响功能。

请修复以上问题后重新提交 🙏

1186258278 added a commit that referenced this pull request Mar 30, 2026
- 新增「升级面板」章节:macOS/Windows/Linux 桌面版、Linux Web 版、Docker 五种场景
- 新增「卸载面板」章节:五种场景完整卸载步骤,含数据清理警告
- 代码贡献者新增 octo-patch(#163)、SEVENTEEN-TAN(#161)、roc-xie(#162)
- 社区反馈者新增 17 位近期 Issue 提交用户
@lewisliuyi
Copy link
Copy Markdown

mark

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants