From f7ffd8a884cd07ad3b59ef00e79a50b787500bab Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 5 Aug 2025 22:40:57 -0400 Subject: [PATCH 01/22] fix: don't supress application level panics --- main.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/main.go b/main.go index 49dbcd7d3c045ae1510d7ca2055fa480c6fadadf..e75cb03e3575cf902c2ff4b44ddd15e0405f0b60 100644 --- a/main.go +++ b/main.go @@ -3,23 +3,14 @@ package main import ( "log/slog" "net/http" + _ "net/http/pprof" "os" - _ "net/http/pprof" // profiling - - _ "github.com/joho/godotenv/autoload" // automatically load .env files - "github.com/charmbracelet/crush/internal/cmd" - "github.com/charmbracelet/crush/internal/event" - "github.com/charmbracelet/crush/internal/log" + _ "github.com/joho/godotenv/autoload" ) func main() { - defer log.RecoverPanic("main", func() { - event.Flush() - slog.Error("Application terminated due to unhandled panic") - }) - if os.Getenv("CRUSH_PROFILE") != "" { go func() { slog.Info("Serving pprof at localhost:6060") From d0724b16aa37057635896d04d0032413cf7923c7 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 1 Oct 2025 15:15:46 -0300 Subject: [PATCH 02/22] feat(tui): progress bar (#1162) Signed-off-by: Carlos Alexandro Becker --- go.mod | 6 +++--- go.sum | 12 ++++++++---- internal/app/app.go | 9 ++++++--- internal/tui/tui.go | 7 +++++++ 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 699233cdd52fe59165e8f9c44a85d1413f1bc4b6..4beabb5b74efb565432aa36329698169e8aaae8d 100644 --- a/go.mod +++ b/go.mod @@ -13,13 +13,13 @@ require ( github.com/bmatcuk/doublestar/v4 v4.9.1 github.com/charlievieth/fastwalk v1.0.14 github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 - github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250910155747-997384b0b35e + github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7 github.com/charmbracelet/catwalk v0.6.1 github.com/charmbracelet/fang v0.4.2 github.com/charmbracelet/glamour/v2 v2.0.0-20250811143442-a27abb32f018 github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3.0.20250917201909-41ff0bf215ea github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706 - github.com/charmbracelet/x/ansi v0.10.1 + github.com/charmbracelet/x/ansi v0.10.2 github.com/charmbracelet/x/exp/charmtone v0.0.0-20250708181618-a60a724ba6c3 github.com/charmbracelet/x/exp/golden v0.0.0-20250207160936-21c02780d27a github.com/disintegration/imageorient v0.0.0-20180920195336-8147d86e83ec @@ -104,7 +104,7 @@ require ( github.com/lucasb-eyer/go-colorful v1.3.0 github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mattn/go-runewidth v0.0.17 // indirect github.com/mfridman/interpolate v0.0.2 // indirect github.com/microcosm-cc/bluemonday v1.0.27 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect diff --git a/go.sum b/go.sum index f54651f8f6b5fa0e6f9f4a3ee53a61d0eec0970c..55872255a6bf56f4ef8093dc277fc17c6df9092a 100644 --- a/go.sum +++ b/go.sum @@ -80,6 +80,8 @@ github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250910155747-997384b0b35e h1:4BBnKWFwJ5FLyhw/ijFxKE04i9rubr8WIPR1kjO57iA= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250910155747-997384b0b35e/go.mod h1:F7AfLKYQqpM3NNBVs7ctW417tavhvoh9SBjsgtwpzbY= +github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7 h1:wH4F+UvxcZSDOxy8j45tghiRo8amrYHejbE9+1C6xv0= +github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7/go.mod h1:5IzIGXU1n0foRc8bRAherC8ZuQCQURPlwx3ANLq1138= github.com/charmbracelet/catwalk v0.6.1 h1:2rRqUlwo+fdyIty8jEvUufRTgqBl0aea21LV6YQPqb0= github.com/charmbracelet/catwalk v0.6.1/go.mod h1:ReU4SdrLfe63jkEjWMdX2wlZMV3k9r11oQAmzN0m+KY= github.com/charmbracelet/colorprofile v0.3.2 h1:9J27WdztfJQVAQKX2WOlSSRB+5gaKqqITmrvb1uTIiI= @@ -94,8 +96,10 @@ github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706 h1:WkwO6Ks3mS github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706/go.mod h1:mjJGp00cxcfvD5xdCa+bso251Jt4owrQvuimJtVmEmM= github.com/charmbracelet/ultraviolet v0.0.0-20250915111650-81d4262876ef h1:VrWaUi2LXYLjfjCHowdSOEc6dQ9Ro14KY7Bw4IWd19M= github.com/charmbracelet/ultraviolet v0.0.0-20250915111650-81d4262876ef/go.mod h1:AThRsQH1t+dfyOKIwXRoJBniYFQUkUpQq4paheHMc2o= -github.com/charmbracelet/x/ansi v0.10.1 h1:rL3Koar5XvX0pHGfovN03f5cxLbCF2YvLeyz7D2jVDQ= -github.com/charmbracelet/x/ansi v0.10.1/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE= +github.com/charmbracelet/x/ansi v0.10.2-0.20250929231137-76218bae042e h1:aN905mmYvQsT4xKUZTdM+lCcuxTrubM3DGVTPxk0ArM= +github.com/charmbracelet/x/ansi v0.10.2-0.20250929231137-76218bae042e/go.mod h1:HbLdJjQH4UH4AqA2HpRWuWNluRE6zxJH/yteYEYCFa8= +github.com/charmbracelet/x/ansi v0.10.2 h1:ith2ArZS0CJG30cIUfID1LXN7ZFXRCww6RUvAPA+Pzw= +github.com/charmbracelet/x/ansi v0.10.2/go.mod h1:HbLdJjQH4UH4AqA2HpRWuWNluRE6zxJH/yteYEYCFa8= github.com/charmbracelet/x/cellbuf v0.0.14-0.20250811133356-e0c5dbe5ea4a h1:zYSNtEJM9jwHbJts2k+Hroj+xQwsW1yxc4Wopdv7KaI= github.com/charmbracelet/x/cellbuf v0.0.14-0.20250811133356-e0c5dbe5ea4a/go.mod h1:rc2bsPC6MWae3LdOxNO1mOb443NlMrrDL0xEya48NNc= github.com/charmbracelet/x/exp/charmtone v0.0.0-20250708181618-a60a724ba6c3 h1:1xwHZg6eMZ9Wv5TE1UGub6ARubyOd1Lo5kPUI/6VL50= @@ -198,8 +202,8 @@ github.com/mark3labs/mcp-go v0.41.0 h1:IFfJaovCet65F3av00bE1HzSnmHpMRWM1kz96R98I github.com/mark3labs/mcp-go v0.41.0/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.17 h1:78v8ZlW0bP43XfmAfPsdXcoNCelfMHsDmd/pkENfrjQ= +github.com/mattn/go-runewidth v0.0.17/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= diff --git a/internal/app/app.go b/internal/app/app.go index 2b3d81fb58acdeb2570a765c0a25ec53b65121da..29631c1be84e96617adfeb705b2e35e0b68725e5 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -17,12 +17,12 @@ import ( "github.com/charmbracelet/crush/internal/history" "github.com/charmbracelet/crush/internal/llm/agent" "github.com/charmbracelet/crush/internal/log" - "github.com/charmbracelet/crush/internal/pubsub" - "github.com/charmbracelet/crush/internal/lsp" "github.com/charmbracelet/crush/internal/message" "github.com/charmbracelet/crush/internal/permission" + "github.com/charmbracelet/crush/internal/pubsub" "github.com/charmbracelet/crush/internal/session" + "github.com/charmbracelet/x/ansi" ) type App struct { @@ -107,7 +107,10 @@ func (app *App) RunNonInteractive(ctx context.Context, prompt string, quiet bool ctx, cancel := context.WithCancel(ctx) defer cancel() - // Start spinner if not in quiet mode. + // Start progress bar and spinner + fmt.Printf(ansi.SetIndeterminateProgressBar) + defer fmt.Printf(ansi.ResetProgressBar) + var spinner *format.Spinner if !quiet { spinner = format.NewSpinner(ctx, cancel, "Generating") diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 2c935810b833af01c582866ec38d5f7b277bc203..74d82e15514c70ee96b507a01b8f611d3ade6a4d 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -3,6 +3,7 @@ package tui import ( "context" "fmt" + "math/rand" "strings" "time" @@ -601,6 +602,12 @@ func (a *appModel) View() tea.View { view.Layer = canvas view.Cursor = cursor + view.ProgressBar = tea.NewProgressBar(tea.ProgressBarNone, 0) + if a.app.CoderAgent.IsBusy() { + // use a random percentage to prevent the ghostty from hiding it after + // a timeout. + view.ProgressBar = tea.NewProgressBar(tea.ProgressBarIndeterminate, rand.Intn(100)) + } return view } From 75a602ae3bdb8d3d22cb95f294f48348e0d4a267 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 1 Oct 2025 13:42:06 -0400 Subject: [PATCH 03/22] chore: print a bug reporting notice when crush crashes All the credit in this revision goes to @andreynering. --- internal/cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 0a2be1cbe6e480fe5719640711bd4caffb430229..c1adfc8016033673610e0b37970ec75a9aea778a 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "bytes" "context" + "errors" "fmt" "io" "log/slog" @@ -93,7 +94,7 @@ crush -y if _, err := program.Run(); err != nil { event.Error(err) slog.Error("TUI run error", "error", err) - return fmt.Errorf("TUI error: %v", err) + return errors.New("Crush crashed. If metrics are enabled, we were notified about it. If you'd like to report it, please copy the stacktrace above and open an issue at https://github.com/charmbracelet/crush/issues/new?template=bug.yml") } return nil }, From fccc49f4cb9ba90027b6eda64ae7257b633def66 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 1 Oct 2025 14:17:07 -0400 Subject: [PATCH 04/22] chore(lint): ignore staticcheck in helpful crash error Co-authored-by: Andrey Nering --- internal/cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/root.go b/internal/cmd/root.go index c1adfc8016033673610e0b37970ec75a9aea778a..d6a26d818643a05704f554223a7b7960792970c5 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -94,7 +94,7 @@ crush -y if _, err := program.Run(); err != nil { event.Error(err) slog.Error("TUI run error", "error", err) - return errors.New("Crush crashed. If metrics are enabled, we were notified about it. If you'd like to report it, please copy the stacktrace above and open an issue at https://github.com/charmbracelet/crush/issues/new?template=bug.yml") + return errors.New("Crush crashed. If metrics are enabled, we were notified about it. If you'd like to report it, please copy the stacktrace above and open an issue at https://github.com/charmbracelet/crush/issues/new?template=bug.yml") //nolint:staticcheck } return nil }, From 8c1e3764c76b47845e066ca7a4fddd4820b2b551 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 1 Oct 2025 12:39:42 -0400 Subject: [PATCH 05/22] chore(task): add helper for fetching tags --- Taskfile.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Taskfile.yaml b/Taskfile.yaml index 0739cab998f34c7b4129b0765b9b225a2455f8ae..8f714b0e5afba0dec28f85627be47503dc59c0fb 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -102,3 +102,8 @@ tasks: - git tag --annotate --sign {{.NEXT}} {{.CLI_ARGS}} - echo "Pushing {{.NEXT}}..." - git push origin --tags + + fetch-tags: + cmds: + - git tag -d nightly || true + - git fetch --tags From 08e384dae68fb364c31ceb6fb49b288bdf508c95 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 1 Oct 2025 21:22:17 -0400 Subject: [PATCH 06/22] chore(task): fetch tags before releasing --- Taskfile.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index 8f714b0e5afba0dec28f85627be47503dc59c0fb..a990205a63497fbb020c78298fb826890ee1dcda 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -90,15 +90,15 @@ tasks: vars: NEXT: sh: go run github.com/caarlos0/svu/v3@latest next --always - prompt: "This will release {{.NEXT}}. Please make sure you've fetch tags. Continue?" + prompt: "This will release {{.NEXT}}. Continue?" preconditions: - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]' msg: Not on main branch - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]" msg: "Git is dirty" cmds: + - task: fetch-tags - git commit --allow-empty -m "{{.NEXT}}" - - git tag -d nightly - git tag --annotate --sign {{.NEXT}} {{.CLI_ARGS}} - echo "Pushing {{.NEXT}}..." - git push origin --tags From 255aa3bcaaa79a270b48da607b2adab6a7e89bbd Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 1 Oct 2025 21:23:33 -0400 Subject: [PATCH 07/22] chore(task): just use svu if it's already installed --- Taskfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index a990205a63497fbb020c78298fb826890ee1dcda..13c171ed2e67faa9aa87c6f9f7d0ec3b7018f382 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -89,7 +89,7 @@ tasks: desc: Create and push a new tag following semver vars: NEXT: - sh: go run github.com/caarlos0/svu/v3@latest next --always + sh: svu next --always || go run github.com/caarlos0/svu/v3@latest next --always prompt: "This will release {{.NEXT}}. Continue?" preconditions: - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]' From 1afeeb78f711b4210ac64cac79ce5fdd0054a82e Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Sun, 5 Oct 2025 15:14:06 -0300 Subject: [PATCH 08/22] chore(legal): @kucukkanat has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index 4ecfd86887d5d072491a8fa764628e8935e4ebfe..be16926ef1dc52cf523997eead83ed5ffe19eb95 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -679,6 +679,14 @@ "created_at": "2025-09-29T01:19:40Z", "repoId": 987670088, "pullRequestNo": 1148 + }, + { + "name": "kucukkanat", + "id": 914316, + "comment_id": 3369230313, + "created_at": "2025-10-05T18:13:57Z", + "repoId": 987670088, + "pullRequestNo": 1195 } ] } \ No newline at end of file From a2b69450c0215676121a50755c059ded4e31ab82 Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Sun, 5 Oct 2025 16:17:23 -0300 Subject: [PATCH 09/22] chore(legal): @thuggys has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index be16926ef1dc52cf523997eead83ed5ffe19eb95..665f0d0e5c3af5ab0492a898cd1303535616273d 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -687,6 +687,14 @@ "created_at": "2025-10-05T18:13:57Z", "repoId": 987670088, "pullRequestNo": 1195 + }, + { + "name": "thuggys", + "id": 150315417, + "comment_id": 3369149503, + "created_at": "2025-10-05T15:59:55Z", + "repoId": 987670088, + "pullRequestNo": 1194 } ] } \ No newline at end of file From f1122df71fab7d11f369a936ef636abd40a7dc48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 09:58:05 +0000 Subject: [PATCH 10/22] chore(deps): bump the all group with 7 updates (#1198) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 20 ++++++++++---------- go.sum | 40 ++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index 4beabb5b74efb565432aa36329698169e8aaae8d..170788928c44d7e233da6c25871927f3a8bf2073 100644 --- a/go.mod +++ b/go.mod @@ -7,15 +7,15 @@ require ( github.com/MakeNowJust/heredoc v1.0.0 github.com/PuerkitoBio/goquery v1.10.3 github.com/alecthomas/chroma/v2 v2.20.0 - github.com/anthropics/anthropic-sdk-go v1.12.0 + github.com/anthropics/anthropic-sdk-go v1.13.0 github.com/atotto/clipboard v0.1.4 github.com/aymanbagabas/go-udiff v0.3.1 github.com/bmatcuk/doublestar/v4 v4.9.1 github.com/charlievieth/fastwalk v1.0.14 github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7 - github.com/charmbracelet/catwalk v0.6.1 - github.com/charmbracelet/fang v0.4.2 + github.com/charmbracelet/catwalk v0.6.3 + github.com/charmbracelet/fang v0.4.3 github.com/charmbracelet/glamour/v2 v2.0.0-20250811143442-a27abb32f018 github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3.0.20250917201909-41ff0bf215ea github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706 @@ -26,13 +26,13 @@ require ( github.com/google/uuid v1.6.0 github.com/invopop/jsonschema v0.13.0 github.com/joho/godotenv v1.5.1 - github.com/mark3labs/mcp-go v0.41.0 + github.com/mark3labs/mcp-go v0.41.1 github.com/muesli/termenv v0.16.0 - github.com/ncruces/go-sqlite3 v0.29.0 + github.com/ncruces/go-sqlite3 v0.29.1 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/nxadm/tail v1.4.11 github.com/openai/openai-go v1.12.0 - github.com/pressly/goose/v3 v3.25.0 + github.com/pressly/goose/v3 v3.26.0 github.com/qjebbs/go-jsons v1.0.0-alpha.4 github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 github.com/sahilm/fuzzy v0.1.1 @@ -72,7 +72,7 @@ require ( github.com/aymerick/douceur v0.2.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect - github.com/charmbracelet/colorprofile v0.3.2 // indirect + github.com/charmbracelet/colorprofile v0.3.2 github.com/charmbracelet/ultraviolet v0.0.0-20250915111650-81d4262876ef github.com/charmbracelet/x/cellbuf v0.0.14-0.20250811133356-e0c5dbe5ea4a // indirect github.com/charmbracelet/x/exp/slice v0.0.0-20250829135019-44e44e21330d @@ -141,18 +141,18 @@ require ( go.opentelemetry.io/otel/metric v1.37.0 // indirect go.opentelemetry.io/otel/trace v1.37.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.41.0 // indirect + golang.org/x/crypto v0.42.0 // indirect golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect golang.org/x/image v0.26.0 // indirect golang.org/x/net v0.43.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.17.0 // indirect golang.org/x/sys v0.36.0 // indirect - golang.org/x/term v0.34.0 // indirect + golang.org/x/term v0.35.0 // indirect golang.org/x/text v0.29.0 golang.org/x/time v0.8.0 // indirect google.golang.org/api v0.211.0 // indirect - google.golang.org/genai v1.26.0 + google.golang.org/genai v1.28.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect google.golang.org/grpc v1.71.0 // indirect google.golang.org/protobuf v1.36.8 // indirect diff --git a/go.sum b/go.sum index 55872255a6bf56f4ef8093dc277fc17c6df9092a..3669305d22b191791df373899305e5e18a4e1f71 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ github.com/alecthomas/repr v0.5.1/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW5 github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM= github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA= -github.com/anthropics/anthropic-sdk-go v1.12.0 h1:xPqlGnq7rWrTiHazIvCiumA0u7mGQnwDQtvA1M82h9U= -github.com/anthropics/anthropic-sdk-go v1.12.0/go.mod h1:WTz31rIUHUHqai2UslPpw5CwXrQP3geYBioRV4WOLvE= +github.com/anthropics/anthropic-sdk-go v1.13.0 h1:Bhbe8sRoDPtipttg8bQYrMCKe2b79+q6rFW1vOKEUKI= +github.com/anthropics/anthropic-sdk-go v1.13.0/go.mod h1:WTz31rIUHUHqai2UslPpw5CwXrQP3geYBioRV4WOLvE= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go-v2 v1.30.3 h1:jUeBtG0Ih+ZIFH0F4UkmL9w3cSpaMv9tYYDbzILP8dY= @@ -78,16 +78,14 @@ github.com/charlievieth/fastwalk v1.0.14 h1:3Eh5uaFGwHZd8EGwTjJnSpBkfwfsak9h6ICg github.com/charlievieth/fastwalk v1.0.14/go.mod h1:diVcUreiU1aQ4/Wu3NbxxH4/KYdKpLDojrQ1Bb2KgNY= github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 h1:973OHYuq2Jx9deyuPwe/6lsuQrDCatOsjP8uCd02URE= github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw= -github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250910155747-997384b0b35e h1:4BBnKWFwJ5FLyhw/ijFxKE04i9rubr8WIPR1kjO57iA= -github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250910155747-997384b0b35e/go.mod h1:F7AfLKYQqpM3NNBVs7ctW417tavhvoh9SBjsgtwpzbY= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7 h1:wH4F+UvxcZSDOxy8j45tghiRo8amrYHejbE9+1C6xv0= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7/go.mod h1:5IzIGXU1n0foRc8bRAherC8ZuQCQURPlwx3ANLq1138= -github.com/charmbracelet/catwalk v0.6.1 h1:2rRqUlwo+fdyIty8jEvUufRTgqBl0aea21LV6YQPqb0= -github.com/charmbracelet/catwalk v0.6.1/go.mod h1:ReU4SdrLfe63jkEjWMdX2wlZMV3k9r11oQAmzN0m+KY= +github.com/charmbracelet/catwalk v0.6.3 h1:RyL8Yqd4QsV3VyvBEsePScv1z2vKaZxPfQQ0XB5L5AA= +github.com/charmbracelet/catwalk v0.6.3/go.mod h1:ReU4SdrLfe63jkEjWMdX2wlZMV3k9r11oQAmzN0m+KY= github.com/charmbracelet/colorprofile v0.3.2 h1:9J27WdztfJQVAQKX2WOlSSRB+5gaKqqITmrvb1uTIiI= github.com/charmbracelet/colorprofile v0.3.2/go.mod h1:mTD5XzNeWHj8oqHb+S1bssQb7vIHbepiebQ2kPKVKbI= -github.com/charmbracelet/fang v0.4.2 h1:nWr7Tb82/TTNNGMGG35aTZ1X68loAOQmpb0qxkKXjas= -github.com/charmbracelet/fang v0.4.2/go.mod h1:wHJKQYO5ReYsxx+yZl+skDtrlKO/4LLEQ6EXsdHhRhg= +github.com/charmbracelet/fang v0.4.3 h1:qXeMxnL4H6mSKBUhDefHu8NfikFbP/MBNTfqTrXvzmY= +github.com/charmbracelet/fang v0.4.3/go.mod h1:wHJKQYO5ReYsxx+yZl+skDtrlKO/4LLEQ6EXsdHhRhg= github.com/charmbracelet/glamour/v2 v2.0.0-20250811143442-a27abb32f018 h1:PU4Zvpagsk5sgaDxn5W4sxHuLp9QRMBZB3bFSk40A4w= github.com/charmbracelet/glamour/v2 v2.0.0-20250811143442-a27abb32f018/go.mod h1:Z/GLmp9fzaqX4ze3nXG7StgWez5uBM5XtlLHK8V/qSk= github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3.0.20250917201909-41ff0bf215ea h1:g1HfUgSMvye8mgecMD1mPscpt+pzJoDEiSA+p2QXzdQ= @@ -96,8 +94,6 @@ github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706 h1:WkwO6Ks3mS github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706/go.mod h1:mjJGp00cxcfvD5xdCa+bso251Jt4owrQvuimJtVmEmM= github.com/charmbracelet/ultraviolet v0.0.0-20250915111650-81d4262876ef h1:VrWaUi2LXYLjfjCHowdSOEc6dQ9Ro14KY7Bw4IWd19M= github.com/charmbracelet/ultraviolet v0.0.0-20250915111650-81d4262876ef/go.mod h1:AThRsQH1t+dfyOKIwXRoJBniYFQUkUpQq4paheHMc2o= -github.com/charmbracelet/x/ansi v0.10.2-0.20250929231137-76218bae042e h1:aN905mmYvQsT4xKUZTdM+lCcuxTrubM3DGVTPxk0ArM= -github.com/charmbracelet/x/ansi v0.10.2-0.20250929231137-76218bae042e/go.mod h1:HbLdJjQH4UH4AqA2HpRWuWNluRE6zxJH/yteYEYCFa8= github.com/charmbracelet/x/ansi v0.10.2 h1:ith2ArZS0CJG30cIUfID1LXN7ZFXRCww6RUvAPA+Pzw= github.com/charmbracelet/x/ansi v0.10.2/go.mod h1:HbLdJjQH4UH4AqA2HpRWuWNluRE6zxJH/yteYEYCFa8= github.com/charmbracelet/x/cellbuf v0.0.14-0.20250811133356-e0c5dbe5ea4a h1:zYSNtEJM9jwHbJts2k+Hroj+xQwsW1yxc4Wopdv7KaI= @@ -198,8 +194,8 @@ github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQ github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mark3labs/mcp-go v0.41.0 h1:IFfJaovCet65F3av00bE1HzSnmHpMRWM1kz96R98I70= -github.com/mark3labs/mcp-go v0.41.0/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= +github.com/mark3labs/mcp-go v0.41.1 h1:w78eWfiQam2i8ICL7AL0WFiq7KHNJQ6UB53ZVtH4KGA= +github.com/mark3labs/mcp-go v0.41.1/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.17 h1:78v8ZlW0bP43XfmAfPsdXcoNCelfMHsDmd/pkENfrjQ= @@ -222,8 +218,8 @@ github.com/muesli/roff v0.1.0 h1:YD0lalCotmYuF5HhZliKWlIx7IEhiXeSfq7hNjFqGF8= github.com/muesli/roff v0.1.0/go.mod h1:pjAHQM9hdUUwm/krAfrLGgJkXJ+YuhtsfZ42kieB2Ig= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= -github.com/ncruces/go-sqlite3 v0.29.0 h1:1tsLiagCoqZEfcHDeKsNSv5jvrY/Iu393pAnw2wLNJU= -github.com/ncruces/go-sqlite3 v0.29.0/go.mod h1:r1hSvYKPNJ+OlUA1O3r8o9LAawzPAlqeZiIdxTBBBJ0= +github.com/ncruces/go-sqlite3 v0.29.1 h1:NIi8AISWBToRHyoz01FXiTNvU147Tqdibgj2tFzJCqM= +github.com/ncruces/go-sqlite3 v0.29.1/go.mod h1:PpccBNNhvjwUOwDQEn2gXQPFPTWdlromj0+fSkd5KSg= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= @@ -243,8 +239,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posthog/posthog-go v1.6.10 h1:OA6bkiUg89rI7f5cSXbcrH5+wLinyS6hHplnD92Pu/M= github.com/posthog/posthog-go v1.6.10/go.mod h1:LcC1Nu4AgvV22EndTtrMXTy+7RGVC0MhChSw7Qk5XkY= -github.com/pressly/goose/v3 v3.25.0 h1:6WeYhMWGRCzpyd89SpODFnCBCKz41KrVbRT58nVjGng= -github.com/pressly/goose/v3 v3.25.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= +github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM= +github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= github.com/qjebbs/go-jsons v1.0.0-alpha.4 h1:Qsb4ohRUHQODIUAsJKdKJ/SIDbsO7oGOzsfy+h1yQZs= github.com/qjebbs/go-jsons v1.0.0-alpha.4/go.mod h1:wNJrtinHyC3YSf6giEh4FJN8+yZV7nXBjvmfjhBIcw4= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= @@ -342,8 +338,8 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= -golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= +golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o= golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= golang.org/x/image v0.26.0 h1:4XjIFEZWQmCZi6Wv8BoxsDhRU3RVnLX04dToTDAEPlY= @@ -405,8 +401,8 @@ golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= -golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= +golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ= +golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -429,8 +425,8 @@ golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxb golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.211.0 h1:IUpLjq09jxBSV1lACO33CGY3jsRcbctfGzhj+ZSE/Bg= google.golang.org/api v0.211.0/go.mod h1:XOloB4MXFH4UTlQSGuNUxw0UT74qdENK8d6JNsXKLi0= -google.golang.org/genai v1.26.0 h1:r4HGL54kFv/WCRMTAbZg05Ct+vXfhAbTRlXhFyBkEQo= -google.golang.org/genai v1.26.0/go.mod h1:OClfdf+r5aaD+sCd4aUSkPzJItmg2wD/WON9lQnRPaY= +google.golang.org/genai v1.28.0 h1:6qpUWFH3PkHPhxNnu3wjaCVJ6Jri1EIR7ks07f9IpIk= +google.golang.org/genai v1.28.0/go.mod h1:7pAilaICJlQBonjKKJNhftDFv3SREhZcTe9F6nRcjbg= google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g= google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= From 2d05fe8164076765b1bb5d62b6f89fe585ef846c Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:32:04 -0300 Subject: [PATCH 11/22] chore(legal): @nikaro has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index 665f0d0e5c3af5ab0492a898cd1303535616273d..dc7d5873d3110320f09b8457b696a47d307ef41a 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -695,6 +695,14 @@ "created_at": "2025-10-05T15:59:55Z", "repoId": 987670088, "pullRequestNo": 1194 + }, + { + "name": "nikaro", + "id": 3918653, + "comment_id": 3373586148, + "created_at": "2025-10-06T19:31:50Z", + "repoId": 987670088, + "pullRequestNo": 1200 } ] } \ No newline at end of file From 886bb7c7101ec637104d17b34dce8573e1daa5ee Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 9 Oct 2025 19:32:10 +0200 Subject: [PATCH 12/22] fix(mcp): fix ui description, double spaces (#1210) Signed-off-by: Carlos Alexandro Becker --- internal/tui/components/core/core.go | 7 +++++-- .../core/testdata/TestStatus/EmptyDescription.golden | 2 +- internal/tui/components/mcp/mcp.go | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/tui/components/core/core.go b/internal/tui/components/core/core.go index 18de56b17f08e4513bde34fe9fef7aaf4e08c09f..80c28ba1e11c4ddeb7e6da1f4802577d23e8b4dc 100644 --- a/internal/tui/components/core/core.go +++ b/internal/tui/components/core/core.go @@ -110,14 +110,17 @@ func Status(opts StatusOpts, width int) string { extraContentWidth += 1 } description = ansi.Truncate(description, width-lipgloss.Width(icon)-lipgloss.Width(title)-2-extraContentWidth, "…") + description = t.S().Base.Foreground(descriptionColor).Render(description) } - description = t.S().Base.Foreground(descriptionColor).Render(description) content := []string{} if icon != "" { content = append(content, icon) } - content = append(content, title, description) + content = append(content, title) + if description != "" { + content = append(content, description) + } if opts.ExtraContent != "" { content = append(content, opts.ExtraContent) } diff --git a/internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden b/internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden index 5b396377658610dd0fbc0746fd960f2faaf76f49..db4acad54383ecbc2cc50061ee5ba77491dc545d 100644 --- a/internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden +++ b/internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden @@ -1 +1 @@ -● Title Only  \ No newline at end of file +● Title Only \ No newline at end of file diff --git a/internal/tui/components/mcp/mcp.go b/internal/tui/components/mcp/mcp.go index d11826b77749ba65276b5336a5d88cdbc8552881..fd3bd012732397538cc263b2eff92ae617e866d8 100644 --- a/internal/tui/components/mcp/mcp.go +++ b/internal/tui/components/mcp/mcp.go @@ -55,7 +55,7 @@ func RenderMCPList(opts RenderOptions) []string { // Determine icon and color based on state icon := t.ItemOfflineIcon - description := l.MCP.Command + description := "" extraContent := "" if state, exists := mcpStates[l.Name]; exists { From 390983a851b54d39b5812bd5aaaab2101703ca14 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 9 Oct 2025 14:46:11 -0300 Subject: [PATCH 13/22] chore: allow to pass args to task run Signed-off-by: Carlos Alexandro Becker --- Taskfile.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index 13c171ed2e67faa9aa87c6f9f7d0ec3b7018f382..1c4225158fc21508e8dccac8d6f47610f7d81faf 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -38,7 +38,7 @@ tasks: run: desc: Run build cmds: - - go run . + - go run . {{.CLI_ARGS}} test: desc: Run tests @@ -104,6 +104,6 @@ tasks: - git push origin --tags fetch-tags: - cmds: + cmds: - git tag -d nightly || true - git fetch --tags From 04210801f02d2ee5db7ae89a7ec28e34d5d14d5b Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 9 Oct 2025 23:16:55 +0200 Subject: [PATCH 14/22] fix(lsp): small UI improvements (#1211) Signed-off-by: Carlos Alexandro Becker --- internal/tui/components/lsp/lsp.go | 51 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/internal/tui/components/lsp/lsp.go b/internal/tui/components/lsp/lsp.go index f5f4061045901c91ecb8bce1f47eab3ac1f7abcf..0c0384e91c36744b8f318f9bbc71e5e076a26abf 100644 --- a/internal/tui/components/lsp/lsp.go +++ b/internal/tui/components/lsp/lsp.go @@ -56,32 +56,7 @@ func RenderLSPList(lspClients *csync.Map[string, *lsp.Client], opts RenderOption break } - // Determine icon color and description based on state - icon := t.ItemOfflineIcon - description := l.LSP.Command - - if l.LSP.Disabled { - description = t.S().Subtle.Render("disabled") - } else if state, exists := lspStates[l.Name]; exists { - switch state.State { - case lsp.StateStarting: - icon = t.ItemBusyIcon - description = t.S().Subtle.Render("starting...") - case lsp.StateReady: - icon = t.ItemOnlineIcon - description = l.LSP.Command - case lsp.StateError: - icon = t.ItemErrorIcon - if state.Error != nil { - description = t.S().Subtle.Render(fmt.Sprintf("error: %s", state.Error.Error())) - } else { - description = t.S().Subtle.Render("error") - } - case lsp.StateDisabled: - icon = t.ItemOfflineIcon.Foreground(t.FgMuted) - description = t.S().Base.Foreground(t.FgMuted).Render("no root markers found") - } - } + icon, description := iconAndDescription(l, t, lspStates) // Calculate diagnostic counts if we have LSP clients var extraContent string @@ -134,6 +109,30 @@ func RenderLSPList(lspClients *csync.Map[string, *lsp.Client], opts RenderOption return lspList } +func iconAndDescription(l config.LSP, t *styles.Theme, states map[string]app.LSPClientInfo) (lipgloss.Style, string) { + if l.LSP.Disabled { + return t.ItemOfflineIcon.Foreground(t.FgMuted), t.S().Subtle.Render("disabled") + } + + info := states[l.Name] + switch info.State { + case lsp.StateStarting: + return t.ItemBusyIcon, t.S().Subtle.Render("starting...") + case lsp.StateReady: + return t.ItemOnlineIcon, "" + case lsp.StateError: + description := t.S().Subtle.Render("error") + if info.Error != nil { + description = t.S().Subtle.Render(fmt.Sprintf("error: %s", info.Error.Error())) + } + return t.ItemErrorIcon, description + case lsp.StateDisabled: + return t.ItemOfflineIcon.Foreground(t.FgMuted), t.S().Subtle.Render("inactive") + default: + return t.ItemOfflineIcon, "" + } +} + // RenderLSPBlock renders a complete LSP block with optional truncation indicator. func RenderLSPBlock(lspClients *csync.Map[string, *lsp.Client], opts RenderOptions, showTruncationIndicator bool) string { t := styles.CurrentTheme() From a430043677c5fdf019ec0a7cc19bfc26d401b6a4 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 9 Oct 2025 23:51:01 -0300 Subject: [PATCH 15/22] fix: move some logs to debug Signed-off-by: Carlos Alexandro Becker --- internal/fsext/ls.go | 2 +- internal/llm/agent/agent.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/fsext/ls.go b/internal/fsext/ls.go index 80d25a57f19867a4ca2af44df7e691bb9d109496..c22b960ad02a42bf6adac7768b7d99e55a9390ee 100644 --- a/internal/fsext/ls.go +++ b/internal/fsext/ls.go @@ -210,7 +210,7 @@ func ListDirectory(initialPath string, ignorePatterns []string, depth, limit int found := csync.NewSlice[string]() dl := NewDirectoryLister(initialPath) - slog.Warn("listing directory", "path", initialPath, "depth", depth, "limit", limit, "ignorePatterns", ignorePatterns) + slog.Debug("listing directory", "path", initialPath, "depth", depth, "limit", limit, "ignorePatterns", ignorePatterns) conf := fastwalk.Config{ Follow: true, diff --git a/internal/llm/agent/agent.go b/internal/llm/agent/agent.go index 1efc3fc268392c06481d61ae6e11c9d67cdc13e8..32032280908fc0045125f31db2d6112eddf6a7c9 100644 --- a/internal/llm/agent/agent.go +++ b/internal/llm/agent/agent.go @@ -175,9 +175,9 @@ func NewAgent( } baseToolsFn := func() map[string]tools.BaseTool { - slog.Info("Initializing agent base tools", "agent", agentCfg.ID) + slog.Debug("Initializing agent base tools", "agent", agentCfg.ID) defer func() { - slog.Info("Initialized agent base tools", "agent", agentCfg.ID) + slog.Debug("Initialized agent base tools", "agent", agentCfg.ID) }() // Base tools available to all agents @@ -201,9 +201,9 @@ func NewAgent( return result } mcpToolsFn := func() map[string]tools.BaseTool { - slog.Info("Initializing agent mcp tools", "agent", agentCfg.ID) + slog.Debug("Initializing agent mcp tools", "agent", agentCfg.ID) defer func() { - slog.Info("Initialized agent mcp tools", "agent", agentCfg.ID) + slog.Debug("Initialized agent mcp tools", "agent", agentCfg.ID) }() mcpToolsOnce.Do(func() { From ca66a11ab6293b7f598a83596f724f00e2960831 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Fri, 10 Oct 2025 10:07:49 -0300 Subject: [PATCH 16/22] refactor(mcp): use the new mcp library (#1208) Signed-off-by: Carlos Alexandro Becker --- go.mod | 4 +- go.sum | 16 +-- internal/config/config.go | 2 +- internal/llm/agent/agent.go | 1 + internal/llm/agent/mcp-tools.go | 193 +++++++++++++++----------------- 5 files changed, 100 insertions(+), 116 deletions(-) diff --git a/go.mod b/go.mod index 170788928c44d7e233da6c25871927f3a8bf2073..843e7f231f729e86d4e299349fa1293005ad3971 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/google/uuid v1.6.0 github.com/invopop/jsonschema v0.13.0 github.com/joho/godotenv v1.5.1 - github.com/mark3labs/mcp-go v0.41.1 + github.com/modelcontextprotocol/go-sdk v1.0.0 github.com/muesli/termenv v0.16.0 github.com/ncruces/go-sqlite3 v0.29.1 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 @@ -91,6 +91,7 @@ require ( github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/google/go-cmp v0.7.0 // indirect + github.com/google/jsonschema-go v0.3.0 // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect github.com/googleapis/gax-go/v2 v2.14.1 // indirect @@ -121,7 +122,6 @@ require ( github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sethvargo/go-retry v0.3.0 // indirect github.com/sourcegraph/jsonrpc2 v0.2.1 // indirect - github.com/spf13/cast v1.7.1 // indirect github.com/spf13/pflag v1.0.9 // indirect github.com/tetratelabs/wazero v1.9.0 // indirect github.com/tidwall/gjson v1.18.0 // indirect diff --git a/go.sum b/go.sum index 3669305d22b191791df373899305e5e18a4e1f71..563016cca9ffcec4a7be40aeed80822a105d1769 100644 --- a/go.sum +++ b/go.sum @@ -130,8 +130,6 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= @@ -144,13 +142,15 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/jsonschema-go v0.3.0 h1:6AH2TxVNtk3IlvkkhjrtbUc4S8AvO0Xii0DxIygDg+Q= +github.com/google/jsonschema-go v0.3.0/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -194,8 +194,6 @@ github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQ github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mark3labs/mcp-go v0.41.1 h1:w78eWfiQam2i8ICL7AL0WFiq7KHNJQ6UB53ZVtH4KGA= -github.com/mark3labs/mcp-go v0.41.1/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.17 h1:78v8ZlW0bP43XfmAfPsdXcoNCelfMHsDmd/pkENfrjQ= @@ -206,6 +204,8 @@ github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwX github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modelcontextprotocol/go-sdk v1.0.0 h1:Z4MSjLi38bTgLrd/LjSmofqRqyBiVKRyQSJgw8q8V74= +github.com/modelcontextprotocol/go-sdk v1.0.0/go.mod h1:nYtYQroQ2KQiM0/SbyEPUWQ6xs4B95gJjEalc9AQyOs= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/mango v0.1.0 h1:DZQK45d2gGbql1arsYA4vfg4d7I9Hfx5rX/GCmzsAvI= @@ -265,8 +265,6 @@ github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas= github.com/sourcegraph/jsonrpc2 v0.2.1 h1:2GtljixMQYUYCmIg7W9aF2dFmniq/mOr2T9tFRh6zSQ= github.com/sourcegraph/jsonrpc2 v0.2.1/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= -github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= -github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= @@ -422,6 +420,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.211.0 h1:IUpLjq09jxBSV1lACO33CGY3jsRcbctfGzhj+ZSE/Bg= google.golang.org/api v0.211.0/go.mod h1:XOloB4MXFH4UTlQSGuNUxw0UT74qdENK8d6JNsXKLi0= diff --git a/internal/config/config.go b/internal/config/config.go index 858fa1c47b33f6a5e6bafb81b4799ea5739736f9..b37b98cad717e789ad16237b3ca250a2f1555ba9 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -99,7 +99,7 @@ type MCPType string const ( MCPStdio MCPType = "stdio" - MCPSse MCPType = "sse" + MCPSSE MCPType = "sse" MCPHttp MCPType = "http" ) diff --git a/internal/llm/agent/agent.go b/internal/llm/agent/agent.go index 32032280908fc0045125f31db2d6112eddf6a7c9..e338eef782912bdfea48ca72ebfd33c4cd981f62 100644 --- a/internal/llm/agent/agent.go +++ b/internal/llm/agent/agent.go @@ -1,3 +1,4 @@ +// Package agent contains the implementation of the AI agent service. package agent import ( diff --git a/internal/llm/agent/mcp-tools.go b/internal/llm/agent/mcp-tools.go index 181f32b7280faf3eb36040d2ebecf3f892350f53..67f0b39ccfb6eb8aad3abd337e7545a59766d872 100644 --- a/internal/llm/agent/mcp-tools.go +++ b/internal/llm/agent/mcp-tools.go @@ -6,8 +6,11 @@ import ( "encoding/json" "errors" "fmt" + "io" "log/slog" "maps" + "net/http" + "os/exec" "strings" "sync" "time" @@ -19,9 +22,7 @@ import ( "github.com/charmbracelet/crush/internal/permission" "github.com/charmbracelet/crush/internal/pubsub" "github.com/charmbracelet/crush/internal/version" - "github.com/mark3labs/mcp-go/client" - "github.com/mark3labs/mcp-go/client/transport" - "github.com/mark3labs/mcp-go/mcp" + "github.com/modelcontextprotocol/go-sdk/mcp" ) // MCPState represents the current state of an MCP client @@ -71,7 +72,7 @@ type MCPClientInfo struct { Name string State MCPState Error error - Client *client.Client + Client *mcp.ClientSession ToolCount int ConnectedAt time.Time } @@ -80,14 +81,14 @@ var ( mcpToolsOnce sync.Once mcpTools = csync.NewMap[string, tools.BaseTool]() mcpClient2Tools = csync.NewMap[string, []tools.BaseTool]() - mcpClients = csync.NewMap[string, *client.Client]() + mcpClients = csync.NewMap[string, *mcp.ClientSession]() mcpStates = csync.NewMap[string, MCPClientInfo]() mcpBroker = pubsub.NewBroker[MCPEvent]() ) type McpTool struct { mcpName string - tool mcp.Tool + tool *mcp.Tool permissions permission.Service workingDir string } @@ -97,14 +98,9 @@ func (b *McpTool) Name() string { } func (b *McpTool) Info() tools.ToolInfo { - required := b.tool.InputSchema.Required - if required == nil { - required = make([]string, 0) - } - parameters := b.tool.InputSchema.Properties - if parameters == nil { - parameters = make(map[string]any) - } + input := b.tool.InputSchema.(map[string]any) + required, _ := input["required"].([]string) + parameters, _ := input["properties"].(map[string]any) return tools.ToolInfo{ Name: fmt.Sprintf("mcp_%s_%s", b.mcpName, b.tool.Name), Description: b.tool.Description, @@ -123,11 +119,9 @@ func runTool(ctx context.Context, name, toolName string, input string) (tools.To if err != nil { return tools.NewTextErrorResponse(err.Error()), nil } - result, err := c.CallTool(ctx, mcp.CallToolRequest{ - Params: mcp.CallToolParams{ - Name: toolName, - Arguments: args, - }, + result, err := c.CallTool(ctx, &mcp.CallToolParams{ + Name: toolName, + Arguments: args, }) if err != nil { return tools.NewTextErrorResponse(err.Error()), nil @@ -135,8 +129,8 @@ func runTool(ctx context.Context, name, toolName string, input string) (tools.To output := make([]string, 0, len(result.Content)) for _, v := range result.Content { - if v, ok := v.(mcp.TextContent); ok { - output = append(output, v.Text) + if vv, ok := v.(*mcp.TextContent); ok { + output = append(output, vv.Text) } else { output = append(output, fmt.Sprintf("%v", v)) } @@ -144,8 +138,8 @@ func runTool(ctx context.Context, name, toolName string, input string) (tools.To return tools.NewTextResponse(strings.Join(output, "\n")), nil } -func getOrRenewClient(ctx context.Context, name string) (*client.Client, error) { - c, ok := mcpClients.Get(name) +func getOrRenewClient(ctx context.Context, name string) (*mcp.ClientSession, error) { + sess, ok := mcpClients.Get(name) if !ok { return nil, fmt.Errorf("mcp '%s' not available", name) } @@ -157,20 +151,20 @@ func getOrRenewClient(ctx context.Context, name string) (*client.Client, error) timeout := mcpTimeout(m) pingCtx, cancel := context.WithTimeout(ctx, timeout) defer cancel() - err := c.Ping(pingCtx) + err := sess.Ping(pingCtx, nil) if err == nil { - return c, nil + return sess, nil } updateMCPState(name, MCPStateError, maybeTimeoutErr(err, timeout), nil, state.ToolCount) - c, err = createAndInitializeClient(ctx, name, m, cfg.Resolver()) + sess, err = createMCPSession(ctx, name, m, cfg.Resolver()) if err != nil { return nil, err } - updateMCPState(name, MCPStateConnected, nil, c, state.ToolCount) - mcpClients.Set(name, c) - return c, nil + updateMCPState(name, MCPStateConnected, nil, sess, state.ToolCount) + mcpClients.Set(name, sess) + return sess, nil } func (b *McpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolResponse, error) { @@ -197,8 +191,8 @@ func (b *McpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolRes return runTool(ctx, b.mcpName, b.tool.Name, params.Input) } -func getTools(ctx context.Context, name string, permissions permission.Service, c *client.Client, workingDir string) ([]tools.BaseTool, error) { - result, err := c.ListTools(ctx, mcp.ListToolsRequest{}) +func getTools(ctx context.Context, name string, permissions permission.Service, c *mcp.ClientSession, workingDir string) ([]tools.BaseTool, error) { + result, err := c.ListTools(ctx, &mcp.ListToolsParams{}) if err != nil { return nil, err } @@ -230,7 +224,7 @@ func GetMCPState(name string) (MCPClientInfo, bool) { } // updateMCPState updates the state of an MCP client and publishes an event -func updateMCPState(name string, state MCPState, err error, client *client.Client, toolCount int) { +func updateMCPState(name string, state MCPState, err error, client *mcp.ClientSession, toolCount int) { info := MCPClientInfo{ Name: name, State: state, @@ -257,19 +251,14 @@ func updateMCPState(name string, state MCPState, err error, client *client.Clien }) } -// publishMCPEventToolsListChanged publishes a tool list changed event -func publishMCPEventToolsListChanged(name string) { - mcpBroker.Publish(pubsub.UpdatedEvent, MCPEvent{ - Type: MCPEventToolsListChanged, - Name: name, - }) -} - // CloseMCPClients closes all MCP clients. This should be called during application shutdown. func CloseMCPClients() error { var errs []error for name, c := range mcpClients.Seq2() { - if err := c.Close(); err != nil { + if err := c.Close(); err != nil && + !errors.Is(err, io.EOF) && + !errors.Is(err, context.Canceled) && + err.Error() != "signal: killed" { errs = append(errs, fmt.Errorf("close mcp: %s: %w", name, err)) } } @@ -277,16 +266,6 @@ func CloseMCPClients() error { return errors.Join(errs...) } -var mcpInitRequest = mcp.InitializeRequest{ - Params: mcp.InitializeParams{ - ProtocolVersion: mcp.LATEST_PROTOCOL_VERSION, - ClientInfo: mcp.Implementation{ - Name: "Crush", - Version: version.Version, - }, - }, -} - func doGetMCPTools(ctx context.Context, permissions permission.Service, cfg *config.Config) { var wg sync.WaitGroup // Initialize states for all configured MCPs @@ -322,7 +301,7 @@ func doGetMCPTools(ctx context.Context, permissions permission.Service, cfg *con ctx, cancel := context.WithTimeout(ctx, mcpTimeout(m)) defer cancel() - c, err := createAndInitializeClient(ctx, name, m, cfg.Resolver()) + c, err := createMCPSession(ctx, name, m, cfg.Resolver()) if err != nil { return } @@ -359,49 +338,46 @@ func updateMcpTools(mcpName string, tools []tools.BaseTool) { } } -func createAndInitializeClient(ctx context.Context, name string, m config.MCPConfig, resolver config.VariableResolver) (*client.Client, error) { - c, err := createMcpClient(name, m, resolver) +func createMCPSession(ctx context.Context, name string, m config.MCPConfig, resolver config.VariableResolver) (*mcp.ClientSession, error) { + timeout := mcpTimeout(m) + mcpCtx, cancel := context.WithCancel(ctx) + cancelTimer := time.AfterFunc(timeout, cancel) + + transport, err := createMCPTransport(mcpCtx, m, resolver) if err != nil { updateMCPState(name, MCPStateError, err, nil, 0) slog.Error("error creating mcp client", "error", err, "name", name) return nil, err } - c.OnNotification(func(n mcp.JSONRPCNotification) { - slog.Debug("Received MCP notification", "name", name, "notification", n) - switch n.Method { - case "notifications/tools/list_changed": - publishMCPEventToolsListChanged(name) - default: - slog.Debug("Unhandled MCP notification", "name", name, "method", n.Method) - } - }) - - // XXX: ideally we should be able to use context.WithTimeout here, but, - // the SSE MCP client will start failing once that context is canceled. - timeout := mcpTimeout(m) - mcpCtx, cancel := context.WithCancel(ctx) - cancelTimer := time.AfterFunc(timeout, cancel) + client := mcp.NewClient( + &mcp.Implementation{ + Name: "crush", + Version: version.Version, + Title: "Crush", + }, + &mcp.ClientOptions{ + ToolListChangedHandler: func(context.Context, *mcp.ToolListChangedRequest) { + mcpBroker.Publish(pubsub.UpdatedEvent, MCPEvent{ + Type: MCPEventToolsListChanged, + Name: name, + }) + }, + KeepAlive: time.Minute * 10, + }, + ) - if err := c.Start(mcpCtx); err != nil { + session, err := client.Connect(mcpCtx, transport, nil) + if err != nil { updateMCPState(name, MCPStateError, maybeTimeoutErr(err, timeout), nil, 0) slog.Error("error starting mcp client", "error", err, "name", name) - _ = c.Close() - cancel() - return nil, err - } - - if _, err := c.Initialize(mcpCtx, mcpInitRequest); err != nil { - updateMCPState(name, MCPStateError, maybeTimeoutErr(err, timeout), nil, 0) - slog.Error("error initializing mcp client", "error", err, "name", name) - _ = c.Close() cancel() return nil, err } cancelTimer.Stop() slog.Info("Initialized mcp client", "name", name) - return c, nil + return session, nil } func maybeTimeoutErr(err error, timeout time.Duration) error { @@ -411,7 +387,7 @@ func maybeTimeoutErr(err error, timeout time.Duration) error { return err } -func createMcpClient(name string, m config.MCPConfig, resolver config.VariableResolver) (*client.Client, error) { +func createMCPTransport(ctx context.Context, m config.MCPConfig, resolver config.VariableResolver) (mcp.Transport, error) { switch m.Type { case config.MCPStdio: command, err := resolver.ResolveValue(m.Command) @@ -421,44 +397,51 @@ func createMcpClient(name string, m config.MCPConfig, resolver config.VariableRe if strings.TrimSpace(command) == "" { return nil, fmt.Errorf("mcp stdio config requires a non-empty 'command' field") } - return client.NewStdioMCPClientWithOptions( - home.Long(command), - m.ResolvedEnv(), - m.Args, - transport.WithCommandLogger(mcpLogger{name: name}), - ) + cmd := exec.CommandContext(ctx, home.Long(command), m.Args...) + cmd.Env = m.ResolvedEnv() + return &mcp.CommandTransport{ + Command: cmd, + }, nil case config.MCPHttp: if strings.TrimSpace(m.URL) == "" { return nil, fmt.Errorf("mcp http config requires a non-empty 'url' field") } - return client.NewStreamableHttpClient( - m.URL, - transport.WithHTTPHeaders(m.ResolvedHeaders()), - transport.WithHTTPLogger(mcpLogger{name: name}), - ) - case config.MCPSse: + client := &http.Client{ + Transport: &headerRoundTripper{ + headers: m.ResolvedHeaders(), + }, + } + return &mcp.StreamableClientTransport{ + Endpoint: m.URL, + HTTPClient: client, + }, nil + case config.MCPSSE: if strings.TrimSpace(m.URL) == "" { return nil, fmt.Errorf("mcp sse config requires a non-empty 'url' field") } - return client.NewSSEMCPClient( - m.URL, - client.WithHeaders(m.ResolvedHeaders()), - transport.WithSSELogger(mcpLogger{name: name}), - ) + client := &http.Client{ + Transport: &headerRoundTripper{ + headers: m.ResolvedHeaders(), + }, + } + return &mcp.SSEClientTransport{ + Endpoint: m.URL, + HTTPClient: client, + }, nil default: return nil, fmt.Errorf("unsupported mcp type: %s", m.Type) } } -// for MCP's clients. -type mcpLogger struct{ name string } - -func (l mcpLogger) Errorf(format string, v ...any) { - slog.Error(fmt.Sprintf(format, v...), "name", l.name) +type headerRoundTripper struct { + headers map[string]string } -func (l mcpLogger) Infof(format string, v ...any) { - slog.Info(fmt.Sprintf(format, v...), "name", l.name) +func (rt headerRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + for k, v := range rt.headers { + req.Header.Set(k, v) + } + return http.DefaultTransport.RoundTrip(req) } func mcpTimeout(m config.MCPConfig) time.Duration { From 7ac96ef0686106b53324a6901fac10a9f00e8a4f Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Fri, 10 Oct 2025 11:45:12 -0300 Subject: [PATCH 17/22] fix(vertex): small fix for anthropic models via google vertex (#1214) --- internal/llm/provider/vertexai.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/llm/provider/vertexai.go b/internal/llm/provider/vertexai.go index 871ff092b058af70833ba615260efcdbc09f2514..e7591af70c24a528d48895c11e653f023ba86c89 100644 --- a/internal/llm/provider/vertexai.go +++ b/internal/llm/provider/vertexai.go @@ -30,7 +30,7 @@ func newVertexAIClient(opts providerClientOptions) VertexAIClient { } model := opts.model(opts.modelType) - if strings.Contains(model.ID, "anthropic") || strings.Contains(model.ID, "claude-sonnet") { + if strings.Contains(model.ID, "anthropic") || strings.Contains(model.ID, "claude") || strings.Contains(model.ID, "sonnet") { return newAnthropicClient(opts, AnthropicClientTypeVertex) } return &geminiClient{ From 4969c34d18747159dcdb2f6c8543afe3ef2c2e0d Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sat, 11 Oct 2025 18:07:50 -0300 Subject: [PATCH 18/22] fix(tui): panic (#1220) Signed-off-by: Carlos Alexandro Becker --- internal/tui/tui.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 74d82e15514c70ee96b507a01b8f611d3ade6a4d..fe3875d256b3b7c7e3d2fdafecca57b20c3d2fbb 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -603,9 +603,9 @@ func (a *appModel) View() tea.View { view.Layer = canvas view.Cursor = cursor view.ProgressBar = tea.NewProgressBar(tea.ProgressBarNone, 0) - if a.app.CoderAgent.IsBusy() { - // use a random percentage to prevent the ghostty from hiding it after - // a timeout. + if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() { + // HACK: use a random percentage to prevent ghostty from hiding it + // after a timeout. view.ProgressBar = tea.NewProgressBar(tea.ProgressBarIndeterminate, rand.Intn(100)) } return view From a824240d128010ef52f870356dea6ba7c5b5f00e Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sat, 11 Oct 2025 18:11:59 -0300 Subject: [PATCH 19/22] fix(tui): fix progress not cleaning up some times (#1219) Signed-off-by: Carlos Alexandro Becker --- go.mod | 2 +- go.sum | 4 ++-- internal/app/app.go | 8 ++++---- internal/tui/tui.go | 1 - 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 843e7f231f729e86d4e299349fa1293005ad3971..22daf1ce6d08d57d64174fcc705c9f3026eb48e4 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/bmatcuk/doublestar/v4 v4.9.1 github.com/charlievieth/fastwalk v1.0.14 github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 - github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7 + github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20251011205917-3b687ffc1619 github.com/charmbracelet/catwalk v0.6.3 github.com/charmbracelet/fang v0.4.3 github.com/charmbracelet/glamour/v2 v2.0.0-20250811143442-a27abb32f018 diff --git a/go.sum b/go.sum index 563016cca9ffcec4a7be40aeed80822a105d1769..30ee83eba84c07b1135a8983fdfd04e162258c64 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,8 @@ github.com/charlievieth/fastwalk v1.0.14 h1:3Eh5uaFGwHZd8EGwTjJnSpBkfwfsak9h6ICg github.com/charlievieth/fastwalk v1.0.14/go.mod h1:diVcUreiU1aQ4/Wu3NbxxH4/KYdKpLDojrQ1Bb2KgNY= github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 h1:973OHYuq2Jx9deyuPwe/6lsuQrDCatOsjP8uCd02URE= github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw= -github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7 h1:wH4F+UvxcZSDOxy8j45tghiRo8amrYHejbE9+1C6xv0= -github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250930175933-4cafc092c5e7/go.mod h1:5IzIGXU1n0foRc8bRAherC8ZuQCQURPlwx3ANLq1138= +github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20251011205917-3b687ffc1619 h1:hjOhtqsxa+LVuCAkzhfA43wtusOaUPyQdSTg/wbRscw= +github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20251011205917-3b687ffc1619/go.mod h1:5IzIGXU1n0foRc8bRAherC8ZuQCQURPlwx3ANLq1138= github.com/charmbracelet/catwalk v0.6.3 h1:RyL8Yqd4QsV3VyvBEsePScv1z2vKaZxPfQQ0XB5L5AA= github.com/charmbracelet/catwalk v0.6.3/go.mod h1:ReU4SdrLfe63jkEjWMdX2wlZMV3k9r11oQAmzN0m+KY= github.com/charmbracelet/colorprofile v0.3.2 h1:9J27WdztfJQVAQKX2WOlSSRB+5gaKqqITmrvb1uTIiI= diff --git a/internal/app/app.go b/internal/app/app.go index 29631c1be84e96617adfeb705b2e35e0b68725e5..8f305f765f3391e1a6afce294e3c42525ec65668 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -107,10 +107,6 @@ func (app *App) RunNonInteractive(ctx context.Context, prompt string, quiet bool ctx, cancel := context.WithCancel(ctx) defer cancel() - // Start progress bar and spinner - fmt.Printf(ansi.SetIndeterminateProgressBar) - defer fmt.Printf(ansi.ResetProgressBar) - var spinner *format.Spinner if !quiet { spinner = format.NewSpinner(ctx, cancel, "Generating") @@ -154,7 +150,11 @@ func (app *App) RunNonInteractive(ctx context.Context, prompt string, quiet bool messageEvents := app.Messages.Subscribe(ctx) messageReadBytes := make(map[string]int) + defer fmt.Printf(ansi.ResetProgressBar) for { + // HACK: add it again on every iteration so it doesn't get hidden by + // the terminal due to inactivity. + fmt.Printf(ansi.SetIndeterminateProgressBar) select { case result := <-done: stopSpinner() diff --git a/internal/tui/tui.go b/internal/tui/tui.go index fe3875d256b3b7c7e3d2fdafecca57b20c3d2fbb..26d23f46ee62aafe07d1bb6209a4fedea929c6e1 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -602,7 +602,6 @@ func (a *appModel) View() tea.View { view.Layer = canvas view.Cursor = cursor - view.ProgressBar = tea.NewProgressBar(tea.ProgressBarNone, 0) if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() { // HACK: use a random percentage to prevent ghostty from hiding it // after a timeout. From e9be0dfce158697df19ca28a28e766c8af9b8329 Mon Sep 17 00:00:00 2001 From: Charm <124303983+charmcli@users.noreply.github.com> Date: Mon, 13 Oct 2025 02:56:30 -0300 Subject: [PATCH 20/22] chore(legal): @daps94 has signed the CLA --- .github/cla-signatures.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/cla-signatures.json b/.github/cla-signatures.json index dc7d5873d3110320f09b8457b696a47d307ef41a..61a8b03447ae07a5dc775ca59a5eef7aacfe9c2b 100644 --- a/.github/cla-signatures.json +++ b/.github/cla-signatures.json @@ -703,6 +703,14 @@ "created_at": "2025-10-06T19:31:50Z", "repoId": 987670088, "pullRequestNo": 1200 + }, + { + "name": "daps94", + "id": 35882689, + "comment_id": 3395964275, + "created_at": "2025-10-13T05:56:20Z", + "repoId": 987670088, + "pullRequestNo": 1223 } ] } \ No newline at end of file From 8814881209fa099d2a8a373d077d0233637cd619 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:18:21 +0000 Subject: [PATCH 21/22] chore(deps): bump the all group with 4 updates (#1225) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 22daf1ce6d08d57d64174fcc705c9f3026eb48e4..5f32e148b92ac8e6c456157465061c759d267dd9 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/charlievieth/fastwalk v1.0.14 github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20251011205917-3b687ffc1619 - github.com/charmbracelet/catwalk v0.6.3 + github.com/charmbracelet/catwalk v0.6.4 github.com/charmbracelet/fang v0.4.3 github.com/charmbracelet/glamour/v2 v2.0.0-20250811143442-a27abb32f018 github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3.0.20250917201909-41ff0bf215ea @@ -117,7 +117,7 @@ require ( github.com/ncruces/julianday v1.0.0 // indirect github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/posthog/posthog-go v1.6.10 + github.com/posthog/posthog-go v1.6.11 github.com/rivo/uniseg v0.4.7 github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sethvargo/go-retry v0.3.0 // indirect @@ -149,10 +149,10 @@ require ( golang.org/x/sync v0.17.0 // indirect golang.org/x/sys v0.36.0 // indirect golang.org/x/term v0.35.0 // indirect - golang.org/x/text v0.29.0 + golang.org/x/text v0.30.0 golang.org/x/time v0.8.0 // indirect google.golang.org/api v0.211.0 // indirect - google.golang.org/genai v1.28.0 + google.golang.org/genai v1.30.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect google.golang.org/grpc v1.71.0 // indirect google.golang.org/protobuf v1.36.8 // indirect diff --git a/go.sum b/go.sum index 30ee83eba84c07b1135a8983fdfd04e162258c64..2d53e85a40001ea9241e4c7ee728baa734a889d9 100644 --- a/go.sum +++ b/go.sum @@ -80,8 +80,8 @@ github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2 github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250820203609-601216f68ee2/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20251011205917-3b687ffc1619 h1:hjOhtqsxa+LVuCAkzhfA43wtusOaUPyQdSTg/wbRscw= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20251011205917-3b687ffc1619/go.mod h1:5IzIGXU1n0foRc8bRAherC8ZuQCQURPlwx3ANLq1138= -github.com/charmbracelet/catwalk v0.6.3 h1:RyL8Yqd4QsV3VyvBEsePScv1z2vKaZxPfQQ0XB5L5AA= -github.com/charmbracelet/catwalk v0.6.3/go.mod h1:ReU4SdrLfe63jkEjWMdX2wlZMV3k9r11oQAmzN0m+KY= +github.com/charmbracelet/catwalk v0.6.4 h1:zFHtuP94mSDE48nST3DS3a37wfsQqNcVnsFkS3v6N6E= +github.com/charmbracelet/catwalk v0.6.4/go.mod h1:ReU4SdrLfe63jkEjWMdX2wlZMV3k9r11oQAmzN0m+KY= github.com/charmbracelet/colorprofile v0.3.2 h1:9J27WdztfJQVAQKX2WOlSSRB+5gaKqqITmrvb1uTIiI= github.com/charmbracelet/colorprofile v0.3.2/go.mod h1:mTD5XzNeWHj8oqHb+S1bssQb7vIHbepiebQ2kPKVKbI= github.com/charmbracelet/fang v0.4.3 h1:qXeMxnL4H6mSKBUhDefHu8NfikFbP/MBNTfqTrXvzmY= @@ -237,8 +237,8 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjL github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posthog/posthog-go v1.6.10 h1:OA6bkiUg89rI7f5cSXbcrH5+wLinyS6hHplnD92Pu/M= -github.com/posthog/posthog-go v1.6.10/go.mod h1:LcC1Nu4AgvV22EndTtrMXTy+7RGVC0MhChSw7Qk5XkY= +github.com/posthog/posthog-go v1.6.11 h1:5G8Y3pxnOpc3S4+PK1z1dCmZRuldiWxBsqqvvSfC2+w= +github.com/posthog/posthog-go v1.6.11/go.mod h1:LcC1Nu4AgvV22EndTtrMXTy+7RGVC0MhChSw7Qk5XkY= github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM= github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= github.com/qjebbs/go-jsons v1.0.0-alpha.4 h1:Qsb4ohRUHQODIUAsJKdKJ/SIDbsO7oGOzsfy+h1yQZs= @@ -410,8 +410,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= -golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -420,13 +420,13 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.211.0 h1:IUpLjq09jxBSV1lACO33CGY3jsRcbctfGzhj+ZSE/Bg= google.golang.org/api v0.211.0/go.mod h1:XOloB4MXFH4UTlQSGuNUxw0UT74qdENK8d6JNsXKLi0= -google.golang.org/genai v1.28.0 h1:6qpUWFH3PkHPhxNnu3wjaCVJ6Jri1EIR7ks07f9IpIk= -google.golang.org/genai v1.28.0/go.mod h1:7pAilaICJlQBonjKKJNhftDFv3SREhZcTe9F6nRcjbg= +google.golang.org/genai v1.30.0 h1:7021aneIvl24nEBLbtQFEWleHsMbjzpcQvkT4WcJ1dc= +google.golang.org/genai v1.30.0/go.mod h1:7pAilaICJlQBonjKKJNhftDFv3SREhZcTe9F6nRcjbg= google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g= google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= From e5f171ba8640c1eff33db28e42914f7803311cc1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:20:28 +0000 Subject: [PATCH 22/22] chore(deps): bump stefanzweifel/git-auto-commit-action from 6.0.1 to 7.0.0 in the all group (#1226) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/schema-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schema-update.yml b/.github/workflows/schema-update.yml index bc1a69c68273c007a764c268958858be3b62bcd2..466c3a25fb3698a183ed84436d5dca9813b2dcb6 100644 --- a/.github/workflows/schema-update.yml +++ b/.github/workflows/schema-update.yml @@ -17,7 +17,7 @@ jobs: with: go-version-file: go.mod - run: go run . schema > ./schema.json - - uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v5 + - uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v5 with: commit_message: "chore: auto-update generated files" branch: main