diff --git a/code/code.go b/code/code.go index 1009d987..0757288c 100644 --- a/code/code.go +++ b/code/code.go @@ -9,6 +9,7 @@ package code import ( "fmt" + "io/fs" "log" "log/slog" "os" @@ -135,6 +136,12 @@ func (cv *Code) Init() { tree.AddChildAt(w, "filetree", func(w *filetree.Tree) { w.OpenDepth = 4 cv.Files = w + w.FilterFunc = func(path string, info fs.FileInfo) bool { + if info.Name() == ".DS_Store" { + return false + } + return true + } w.FileNodeType = types.For[FileNode]() w.OnSelect(func(e events.Event) { diff --git a/go.mod b/go.mod index f6004883..820e50e8 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module cogentcore.org/cogent go 1.22 require ( - cogentcore.org/core v0.3.3-0.20240825182959-fe4840922a21 + cogentcore.org/core v0.3.3-0.20240829215614-d202a4746d8b github.com/aandrew-me/tgpt/v2 v2.7.2 github.com/alecthomas/chroma/v2 v2.13.0 github.com/bogdanfinn/fhttp v0.5.27 diff --git a/go.sum b/go.sum index 9b2e525e..0f0c2507 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -cogentcore.org/core v0.3.3-0.20240825182959-fe4840922a21 h1:tffR0tewNHVE36GpZE7ZjTSE4KYoRfbdeL9btV8UmbU= -cogentcore.org/core v0.3.3-0.20240825182959-fe4840922a21/go.mod h1:dg3uRsPcd8S1ZYvRD2TztCtjopRkrB5V/lbl54xsQd4= +cogentcore.org/core v0.3.3-0.20240829215614-d202a4746d8b h1:K5NhkLrQaM9wNjD+cwVwALzTdLzvPeweA+DjgHiv19A= +cogentcore.org/core v0.3.3-0.20240829215614-d202a4746d8b/go.mod h1:dg3uRsPcd8S1ZYvRD2TztCtjopRkrB5V/lbl54xsQd4= github.com/Bios-Marcel/wastebasket v0.0.4-0.20240213135800-f26f1ae0a7c4 h1:6lx9xzJAhdjq0LvVfbITeC3IH9Fzvo1aBahyPu2FuG8= github.com/Bios-Marcel/wastebasket v0.0.4-0.20240213135800-f26f1ae0a7c4/go.mod h1:FChzXi1izqzdPb6BiNZmcZLGyTYiT61iGx9Rxx9GNeI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=