on main help sign in
Merge branch 'main' into ui
268d3e2Ayman Bagabas
.github/cla-signatures.json+8
@@ -871,6 +871,14 @@
871 "created_at": "2025-11-19T15:59:07Z",
871 "created_at": "2025-11-19T15:59:07Z",
872 "repoId": 987670088,
872 "repoId": 987670088,
873 "pullRequestNo": 1478
873 "pullRequestNo": 1478
874+ },
875+ {
876+ "name": "heimoshuiyu",
877+ "id": 22657774,
878+ "comment_id": 3565689668,
879+ "created_at": "2025-11-22T05:23:17Z",
880+ "repoId": 987670088,
881+ "pullRequestNo": 1496
874 }
882 }
875 ]
883 ]
876}
884}
.github/workflows/nightly.yml+1−1
@@ -11,7 +11,7 @@ jobs:
11 outputs:
11 outputs:
12 should_run: ${{ steps.check.outputs.should_run }}
12 should_run: ${{ steps.check.outputs.should_run }}
13 steps:
13 steps:
14− - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14+ - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
15 with:
15 with:
16 fetch-depth: 1
16 fetch-depth: 1
17 - id: check
17 - id: check
.github/workflows/schema-update.yml+2−2
@@ -10,10 +10,10 @@ jobs:
10 update-schema:
10 update-schema:
11 runs-on: ubuntu-latest
11 runs-on: ubuntu-latest
12 steps:
12 steps:
13− - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
13+ - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
14 with:
14 with:
15 token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
15 token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
16− - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
16+ - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
17 with:
17 with:
18 go-version-file: go.mod
18 go-version-file: go.mod
19 - run: go run . schema > ./schema.json
19 - run: go run . schema > ./schema.json
crush.json+35−1
@@ -1,6 +1,40 @@
1{
1{
2 "$schema": "https://charm.land/crush.json",
2 "$schema": "https://charm.land/crush.json",
3 "lsp": {
3 "lsp": {
4− "gopls": {}
4+ "gopls": {
5+ "options": {
6+ "gofumpt": true,
7+ "codelenses": {
8+ "gc_details": true,
9+ "generate": true,
10+ "run_govulncheck": true,
11+ "test": true,
12+ "tidy": true,
13+ "upgrade_dependency": true
14+ },
15+ "hints": {
16+ "assignVariableTypes": true,
17+ "compositeLiteralFields": true,
18+ "compositeLiteralTypes": true,
19+ "constantValues": true,
20+ "functionTypeParameters": true,
21+ "parameterNames": true,
22+ "rangeVariableTypes": true
23+ },
24+ "analyses": {
25+ "nilness": true,
26+ "unusedparams": true,
27+ "unusedvariable": true,
28+ "unusedwrite": true,
29+ "useany": true
30+ },
31+ "staticcheck": true,
32+ "directoryFilters": [
33+ "-.git",
34+ "-node_modules"
35+ ],
36+ "semanticTokens": true
37+ }
38+ }
5 }
39 }
6}
40}
internal/agent/tools/edit.go+4−4
@@ -163,7 +163,7 @@ func createNewFile(edit editContext, filePath, content string, call fantasy.Tool
163 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, content)
163 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, content)
164 if err != nil {
164 if err != nil {
165 // Log error but don't fail the operation
165 // Log error but don't fail the operation
166− slog.Debug("Error creating file history version", "error", err)
166+ slog.Error("Error creating file history version", "error", err)
167 }
167 }
168
168
169 recordFileWrite(filePath)
169 recordFileWrite(filePath)
@@ -290,13 +290,13 @@ func deleteContent(edit editContext, filePath, oldString string, replaceAll bool
290 // User Manually changed the content store an intermediate version
290 // User Manually changed the content store an intermediate version
291 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, oldContent)
291 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, oldContent)
292 if err != nil {
292 if err != nil {
293− slog.Debug("Error creating file history version", "error", err)
293+ slog.Error("Error creating file history version", "error", err)
294 }
294 }
295 }
295 }
296 // Store the new version
296 // Store the new version
297 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, "")
297 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, "")
298 if err != nil {
298 if err != nil {
299− slog.Debug("Error creating file history version", "error", err)
299+ slog.Error("Error creating file history version", "error", err)
300 }
300 }
301
301
302 recordFileWrite(filePath)
302 recordFileWrite(filePath)
@@ -431,7 +431,7 @@ func replaceContent(edit editContext, filePath, oldString, newString string, rep
431 // Store the new version
431 // Store the new version
432 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, newContent)
432 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, newContent)
433 if err != nil {
433 if err != nil {
434− slog.Debug("Error creating file history version", "error", err)
434+ slog.Error("Error creating file history version", "error", err)
435 }
435 }
436
436
437 recordFileWrite(filePath)
437 recordFileWrite(filePath)
internal/agent/tools/multiedit.go+3−3
@@ -196,7 +196,7 @@ func processMultiEditWithCreation(edit editContext, params MultiEditParams, call
196
196
197 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
197 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
198 if err != nil {
198 if err != nil {
199− slog.Debug("Error creating file history version", "error", err)
199+ slog.Error("Error creating file history version", "error", err)
200 }
200 }
201
201
202 recordFileWrite(params.FilePath)
202 recordFileWrite(params.FilePath)
@@ -338,14 +338,14 @@ func processMultiEditExistingFile(edit editContext, params MultiEditParams, call
338 // User manually changed the content, store an intermediate version
338 // User manually changed the content, store an intermediate version
339 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, oldContent)
339 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, oldContent)
340 if err != nil {
340 if err != nil {
341− slog.Debug("Error creating file history version", "error", err)
341+ slog.Error("Error creating file history version", "error", err)
342 }
342 }
343 }
343 }
344
344
345 // Store the new version
345 // Store the new version
346 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
346 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
347 if err != nil {
347 if err != nil {
348− slog.Debug("Error creating file history version", "error", err)
348+ slog.Error("Error creating file history version", "error", err)
349 }
349 }
350
350
351 recordFileWrite(params.FilePath)
351 recordFileWrite(params.FilePath)
internal/agent/tools/write.go+2−2
@@ -147,13 +147,13 @@ func NewWriteTool(lspClients *csync.Map[string, *lsp.Client], permissions permis
147 // User Manually changed the content store an intermediate version
147 // User Manually changed the content store an intermediate version
148 _, err = files.CreateVersion(ctx, sessionID, filePath, oldContent)
148 _, err = files.CreateVersion(ctx, sessionID, filePath, oldContent)
149 if err != nil {
149 if err != nil {
150− slog.Debug("Error creating file history version", "error", err)
150+ slog.Error("Error creating file history version", "error", err)
151 }
151 }
152 }
152 }
153 // Store the new version
153 // Store the new version
154 _, err = files.CreateVersion(ctx, sessionID, filePath, params.Content)
154 _, err = files.CreateVersion(ctx, sessionID, filePath, params.Content)
155 if err != nil {
155 if err != nil {
156− slog.Debug("Error creating file history version", "error", err)
156+ slog.Error("Error creating file history version", "error", err)
157 }
157 }
158
158
159 recordFileWrite(filePath)
159 recordFileWrite(filePath)
internal/lsp/client.go+1−1
@@ -417,7 +417,7 @@ func (c *Client) openKeyConfigFiles(ctx context.Context) {
417 if _, err := os.Stat(file); err == nil {
417 if _, err := os.Stat(file); err == nil {
418 // File exists, try to open it
418 // File exists, try to open it
419 if err := c.OpenFile(ctx, file); err != nil {
419 if err := c.OpenFile(ctx, file); err != nil {
420− slog.Debug("Failed to open key config file", "file", file, "error", err)
420+ slog.Error("Failed to open key config file", "file", file, "error", err)
421 } else {
421 } else {
422 slog.Debug("Opened key config file for initialization", "file", file)
422 slog.Debug("Opened key config file for initialization", "file", file)
423 }
423 }
internal/tui/components/core/status/status.go+5−1
@@ -82,7 +82,11 @@ func (m *statusCmp) infoMsg() string {
82 info := ansi.Truncate(m.info.Msg, widthLeft, "…")
82 info := ansi.Truncate(m.info.Msg, widthLeft, "…")
83 message = t.S().Base.Foreground(t.BgOverlay).Width(widthLeft+2).Background(t.Warning).Padding(0, 1).Render(info)
83 message = t.S().Base.Foreground(t.BgOverlay).Width(widthLeft+2).Background(t.Warning).Padding(0, 1).Render(info)
84 default:
84 default:
85+ note := "OKAY!"
86+ if m.info.Type == util.InfoTypeUpdate {
87+ note = "HEY!"
88+ }
85− infoType = t.S().Base.Foreground(t.BgSubtle).Background(t.Green).Padding(0, 1).Bold(true).Render("HEY!")
89+ infoType = t.S().Base.Foreground(t.BgSubtle).Background(t.Green).Padding(0, 1).Bold(true).Render(note)
86 widthLeft := m.width - (lipgloss.Width(infoType) + 2)
90 widthLeft := m.width - (lipgloss.Width(infoType) + 2)
87 info := ansi.Truncate(m.info.Msg, widthLeft, "…")
91 info := ansi.Truncate(m.info.Msg, widthLeft, "…")
88 message = t.S().Base.Background(t.GreenDark).Width(widthLeft+2).Foreground(t.BgSubtle).Padding(0, 1).Render(info)
92 message = t.S().Base.Background(t.GreenDark).Width(widthLeft+2).Foreground(t.BgSubtle).Padding(0, 1).Render(info)
internal/tui/tui.go+2−2
@@ -380,9 +380,9 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
380 statusMsg = fmt.Sprintf("This is a development version of Crush. The latest version is v%s.", msg.LatestVersion)
380 statusMsg = fmt.Sprintf("This is a development version of Crush. The latest version is v%s.", msg.LatestVersion)
381 }
381 }
382 s, statusCmd := a.status.Update(util.InfoMsg{
382 s, statusCmd := a.status.Update(util.InfoMsg{
383− Type: util.InfoTypeInfo,
383+ Type: util.InfoTypeUpdate,
384 Msg: statusMsg,
384 Msg: statusMsg,
385− TTL: 30 * time.Second,
385+ TTL: 10 * time.Second,
386 })
386 })
387 a.status = s.(status.StatusCmp)
387 a.status = s.(status.StatusCmp)
388 return a, statusCmd
388 return a, statusCmd
internal/tui/util/util.go+1
@@ -38,6 +38,7 @@ const (
38 InfoTypeSuccess
38 InfoTypeSuccess
39 InfoTypeWarn
39 InfoTypeWarn
40 InfoTypeError
40 InfoTypeError
41+ InfoTypeUpdate
41)
42)
42
43
43func ReportInfo(info string) tea.Cmd {
44func ReportInfo(info string) tea.Cmd {