feat: 提交详情能看 diff,也能丢给 AI 审这一次改动。文件检查可单独排除路径,TODO 只认大写,避免把 todo 表和模块当成待办标记。

热力图按容器宽度铺满一年,不再横向滚动。托盘右键换成可换皮肤的弹层;更新下载显示进度,退出后再由脚本拉起安装器,避免还占着 exe。
This commit is contained in:
李琦
2026-08-19 15:46:03 +08:00
parent 1694397245
commit 7c4109f687
38 changed files with 2618 additions and 129 deletions

View File

@@ -9,6 +9,7 @@ import (
gitignore "github.com/sabhiram/go-gitignore"
"io/fs"
"os"
"path"
"path/filepath"
"sort"
"strings"
@@ -23,12 +24,22 @@ type Scanner struct{}
func MatchExcludedPattern(pattern, rel string) bool {
pattern = filepath.ToSlash(strings.TrimSpace(pattern))
rel = filepath.ToSlash(rel)
if pattern == "" || rel == "" {
return false
}
if strings.Contains(pattern, "/") {
ok, _ := filepath.Match(filepath.FromSlash(pattern), filepath.FromSlash(rel))
pattern = strings.TrimSuffix(pattern, "/")
if ok, _ := path.Match(pattern, rel); ok {
return true
}
if strings.HasPrefix(rel, pattern+"/") {
return true
}
ok, _ := path.Match(pattern+"/*", rel)
return ok
}
for _, part := range strings.Split(rel, "/") {
if ok, _ := filepath.Match(pattern, part); ok {
if ok, _ := path.Match(pattern, part); ok {
return true
}
}