Repository navigation
Conversation
- store: list_all 新增 limit/offset(SQL 层分页),新增 count_all 统计过滤后总数 - cli: list_cmd 新增 --limit/--offset/--all;文本默认 10 条、--json 默认全部; 非末页打印剩余条数与翻页提示;--all 与 --limit 互斥、负值报错 - render: render_memory_entries 新增 start 参数,跨页编号连续 - 测试: store 2 个 + CLI 11 个分页测试,全量 584 通过 - docs: 同步 architecture.md §5.1 mex list 参数表 - gitignore: 忽略 .workbuddy/ 会话记忆目录
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
mex list当前一次性打印全部记忆条目,记忆多时输出过长、刷屏。改动
src/mex/store/memories.py):list_all新增limit/offset参数(SQL 层 LIMIT/OFFSET,limit=0/None表示全部);抽取_list_where_clause复用 WHERE;新增count_all统计过滤后总数(分页提示用)src/mex/cli/write.py):list_cmd新增--limit/--offset/--all;文本模式默认 10 条、--json默认全部(程序消费不截断,向后兼容);非末页打印Showing X-Y of N提示;--all与--limit互斥、负值报 UserErrorsrc/mex/cli/common.py):render_memory_entries新增start参数,跨页编号连续architecture.md§5.1mex list参数表.workbuddy/会话记忆目录用法
测试
list_alllimit/offset 与count_all测试pytest:584 passed;ruff check通过