Repository navigation
feat(Log): Filter by Author 支持作者候选前缀建议与多选过滤 - #149
Merged
ThreeFish-AI merged 1 commit intoOct 23, 2026
Merged
Conversation
- LogFilter.author 单值改为 authors: AuthorTerm[](exact 身份/pattern 正则,多选 OR); - 候选经 git shortlog -sne 按当前视图 scope 取数(canSelectMany 多选 + 模糊建议); - exact 项按 BRE 语义转义锚定(修复 dependabot[bot] 等含元字符作者名 0 命中缺陷); - 保留手输任意 pattern 逃生口;空选清除、Esc 不变、空仓库降级。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
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.
变更内容
「Filter Graph…」→「Filter by Author…」从裸 InputBox(要求完整手输单一作者名)升级为候选建议 + 多选选择器:
git shortlog -sne(按当前 Graph 视图 scope 取数、按提交数降序),QuickPick 内建模糊过滤——输入Thr即建议ThreeFish,姓名/邮箱均可匹配;--author(git 取 OR)直接过滤 Graph 视图;空选确认 = 清除该维度,Esc = 不变;--author缺省 POSIX BRE,列表选中的作者身份按 BRE 语义转义并锚定全行(^Name <email>$)——顺带修复旧实现中dependabot[bot]等含正则元字符作者名 0 命中的缺陷(本仓库实测:不转义 0 命中、BRE 转义 36 命中)。实现要点
src/engine/log/log-filter.tsLogFilter.author: string→authors: readonly AuthorTerm[](tagged union:exact 身份 / pattern 正则,单一字段 SSOT);新增escapeBreLiteral/exactAuthorPatternsrc/engine/log/log-query.tsscopeRefs()单一事实源;authors → 多条--author=(去重、空值跳过)src/engine/log/author-suggest.ts(新增)src/adapter/history-commands.tslogFilterAuthor重写为仓库首个createQuickPick动态用法:busy 取数、勾选自维护(重建 items 回写 selectedItems)、settle 幂等守卫src/adapter/webview/log-webview.tsLogFilterControl增加getScope()(视图状态,不入 LogFilter)验证
pnpm run check-types/pnpm run lint/pnpm run test:unit(505 用例全过,含新增 author-suggest 13 例与 log-query authors 翻译护栏)全绿;dependabot[bot](含+邮箱)36 命中;shortlog -sne HEADcurrent scope 正常。🤖 Generated with Claude Code