fix(agent): fix minor bugs in coordinator and view tool#7
fix(agent): fix minor bugs in coordinator and view tool#7huaiyuWangh wants to merge 582 commits intomainfrom
Conversation
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* feat: delete sessions * chore: small cleanup * chore: make delete transactional * refactor: cleanup the delete logic
* wip: stats Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fixup! wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: css Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: cleanup Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * logo Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: cast Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * cleanup Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * improvements Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * provider donut Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: improvements Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * jetbrains mono Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fixes Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: rm border Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: update footer/header Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: footer class Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * refactor: move stuff around Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * refactor: improving Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: anims Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: rename vars Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: remove all card borders * chore: adjust easing * fix: fail if no sessions Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: improvements Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: generated by Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: header hazy Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> Co-authored-by: Christian Rocha <christian@rocha.is>
* feat: update session title * chore: implement review requests
* fix: enable left/rigth scrolling of diff this also fixes an issue introduced in charmbracelet#1931 where the model info was not showing in the landing page. * chore: simplify model info
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* ci: use goreleaser nightly reason: goreleaser/goreleaser@20d273b should fix charmbracelet/nur#42 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: comment Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Bumps the all group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `6.0.1` | `6.0.2` | | [actions/setup-go](https://github.com/actions/setup-go) | `6.1.0` | `6.2.0` | | [github/codeql-action](https://github.com/github/codeql-action) | `4.31.10` | `4.31.11` | | [anchore/scan-action](https://github.com/anchore/scan-action) | `7.2.3` | `7.3.0` | | [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `6.3.0` | `6.4.0` | Updates `actions/checkout` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@8e8c483...de0fac2) Updates `actions/setup-go` from 6.1.0 to 6.2.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@v6.1.0...7a3fe6c) Updates `github/codeql-action` from 4.31.10 to 4.31.11 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@cdefb33...19b2f06) Updates `anchore/scan-action` from 7.2.3 to 7.3.0 - [Release notes](https://github.com/anchore/scan-action/releases) - [Changelog](https://github.com/anchore/scan-action/blob/main/RELEASE.md) - [Commits](anchore/scan-action@62b74fb...0d444ed) Updates `goreleaser/goreleaser-action` from 6.3.0 to 6.4.0 - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](goreleaser/goreleaser-action@9c156ee...e435ccd) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: actions/setup-go dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: github/codeql-action dependency-version: 4.31.11 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: anchore/scan-action dependency-version: 7.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: goreleaser/goreleaser-action dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the all group with 6 updates: | Package | From | To | | --- | --- | --- | | [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) | `2.23.0` | `2.23.1` | | [github.com/bmatcuk/doublestar/v4](https://github.com/bmatcuk/doublestar) | `4.9.2` | `4.10.0` | | [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) | `0.30.4` | `0.30.5` | | [github.com/posthog/posthog-go](https://github.com/posthog/posthog-go) | `1.9.0` | `1.9.1` | | [github.com/zeebo/xxh3](https://github.com/zeebo/xxh3) | `1.0.2` | `1.1.0` | | [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) | `1.44.2` | `1.44.3` | Updates `github.com/alecthomas/chroma/v2` from 2.23.0 to 2.23.1 - [Release notes](https://github.com/alecthomas/chroma/releases) - [Commits](alecthomas/chroma@v2.23.0...v2.23.1) Updates `github.com/bmatcuk/doublestar/v4` from 4.9.2 to 4.10.0 - [Release notes](https://github.com/bmatcuk/doublestar/releases) - [Commits](bmatcuk/doublestar@v4.9.2...v4.10.0) Updates `github.com/ncruces/go-sqlite3` from 0.30.4 to 0.30.5 - [Release notes](https://github.com/ncruces/go-sqlite3/releases) - [Commits](ncruces/go-sqlite3@v0.30.4...v0.30.5) Updates `github.com/posthog/posthog-go` from 1.9.0 to 1.9.1 - [Release notes](https://github.com/posthog/posthog-go/releases) - [Changelog](https://github.com/PostHog/posthog-go/blob/master/CHANGELOG.md) - [Commits](PostHog/posthog-go@v1.9.0...v1.9.1) Updates `github.com/zeebo/xxh3` from 1.0.2 to 1.1.0 - [Commits](zeebo/xxh3@v1.0.2...v1.1.0) Updates `modernc.org/sqlite` from 1.44.2 to 1.44.3 - [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md) - [Commits](https://gitlab.com/cznic/sqlite/compare/v1.44.2...v1.44.3) --- updated-dependencies: - dependency-name: github.com/alecthomas/chroma/v2 dependency-version: 2.23.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: github.com/bmatcuk/doublestar/v4 dependency-version: 4.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: github.com/ncruces/go-sqlite3 dependency-version: 0.30.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: github.com/posthog/posthog-go dependency-version: 1.9.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: github.com/zeebo/xxh3 dependency-version: 1.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: modernc.org/sqlite dependency-version: 1.44.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rmbracelet#1978) it seems that the variable provided to -ldflags, at some point changed from `main.version` to `github.com/charmbracelet/crush/internal/version.Version`. so reflect that to the build script for the AUR package. expected change in the PKGBUILD is: ``` diff --git a/PKGBUILD b/PKGBUILD index e9afb74..58779bf 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -23,7 +23,7 @@ build() { export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" - go build -ldflags="-w -s -buildid='' -linkmode=external -X main.version=v${pkgver}" . + go build -ldflags="-w -s -buildid='' -linkmode=external -X github.com/charmbracelet/crush/internal/version.Version=v${pkgver}" . ./crush completion bash >./completions/crush.bash ./crush completion zsh >./completions/crush.zsh ./crush completion fish >./completions/crush.fish ```
…ows (charmbracelet#1992) Before, only dragging a single file was working. If you tried to drag & drop multiple, it would fail. Also, because Windows paste in a totally different format, it wasn't working at all before.
…charmbracelet#1993) * fix(ui): ensure the message list does not scroll beyond the last item Ensure that when scrolling down, the message list does not scroll beyond the last item, preventing empty space from appearing below the last message. * fix: lint --------- Co-authored-by: Kujtim Hoxha <kujtimii.h@gmail.com>
…t messages (charmbracelet#2252) Assistant messages can have long content, and rendering them can be expensive. To improve performance, we cache the rendered content for both blurred and focused states separately.
…assistant messages (charmbracelet#2252)" This reverts commit 2656a18.
…harmbracelet#2256) Co-authored-by: andreynering <7011819+andreynering@users.noreply.github.com>
…harmbracelet#2258) This commit attempts to fix an issue where the rendering of assistant messages in the chat UI can become significantly degraded in performance, especially for long messages. The root cause of the performance degradation was identified as the use of lipgloss.Render for applying styles to the message content, which involves wrapping logic that can be expensive for long messages.
Bumps the all group with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [actions/dependency-review-action](https://github.com/actions/dependency-review-action). Updates `github/codeql-action` from 4.32.3 to 4.32.4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@9e907b5...89a39a4) Updates `actions/dependency-review-action` from 4.8.2 to 4.8.3 - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](actions/dependency-review-action@3c4e3dc...05fe457) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.32.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: actions/dependency-review-action dependency-version: 4.8.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Greg Slepak <contact@taoeffect.com>
…armbracelet#2270) Bumps the all group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [charm.land/catwalk](https://github.com/charmbracelet/catwalk) | `0.19.2` | `0.20.2` | | [charm.land/fantasy](https://github.com/charmbracelet/fantasy) | `0.8.1` | `0.9.0` | | [github.com/aymanbagabas/go-udiff](https://github.com/aymanbagabas/go-udiff) | `0.3.1` | `0.4.0` | | [github.com/clipperhouse/uax29/v2](https://github.com/clipperhouse/uax29) | `2.6.0` | `2.7.0` | | [github.com/modelcontextprotocol/go-sdk](https://github.com/modelcontextprotocol/go-sdk) | `1.2.0` | `1.3.1` | | [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) | `1.44.3` | `1.46.1` | Updates `charm.land/catwalk` from 0.19.2 to 0.20.2 - [Release notes](https://github.com/charmbracelet/catwalk/releases) - [Commits](charmbracelet/catwalk@v0.19.2...v0.20.2) Updates `charm.land/fantasy` from 0.8.1 to 0.9.0 - [Release notes](https://github.com/charmbracelet/fantasy/releases) - [Commits](charmbracelet/fantasy@v0.8.1...v0.9.0) Updates `github.com/aymanbagabas/go-udiff` from 0.3.1 to 0.4.0 - [Release notes](https://github.com/aymanbagabas/go-udiff/releases) - [Commits](aymanbagabas/go-udiff@v0.3.1...v0.4.0) Updates `github.com/clipperhouse/uax29/v2` from 2.6.0 to 2.7.0 - [Release notes](https://github.com/clipperhouse/uax29/releases) - [Commits](clipperhouse/uax29@v2.6.0...v2.7.0) Updates `github.com/modelcontextprotocol/go-sdk` from 1.2.0 to 1.3.1 - [Release notes](https://github.com/modelcontextprotocol/go-sdk/releases) - [Commits](modelcontextprotocol/go-sdk@v1.2.0...v1.3.1) Updates `golang.org/x/net` from 0.49.0 to 0.50.0 - [Commits](golang/net@v0.49.0...v0.50.0) Updates `modernc.org/sqlite` from 1.44.3 to 1.46.1 - [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md) - [Commits](https://gitlab.com/cznic/sqlite/compare/v1.44.3...v1.46.1) --- updated-dependencies: - dependency-name: charm.land/catwalk dependency-version: 0.20.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: charm.land/fantasy dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: github.com/aymanbagabas/go-udiff dependency-version: 0.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: github.com/clipperhouse/uax29/v2 dependency-version: 2.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: github.com/modelcontextprotocol/go-sdk dependency-version: 1.3.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: golang.org/x/net dependency-version: 0.50.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: modernc.org/sqlite dependency-version: 1.46.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
They changed the `/models` endpoint so it actually validates the API key header if given.
…mbracelet#2236) When building the small model provider, we were incorrectly passing largeModelCfg instead of smallModelCfg to buildProvider. This caused isAnthropicThinking to check the wrong model config, preventing the small model from enabling Anthropic thinking mode even when configured. Fixes charmbracelet#2141
- Fix misleading error message: report "small model provider not configured" instead of "large" when the small model provider is missing - Fix error handling order in view tool: check readTextFile error before UTF-8 validation to avoid validating partial/empty content - Fix MCP tool filtering: move "MCP not allowed" log into correct branch and break after tool is added to prevent duplicate additions
| if runner != nil { | ||
| s.updateShellFromRunner(runner) | ||
| } | ||
| s.logger.InfoPersist("command finished", "command", command, "err", err) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 14 days ago
General approach: avoid logging the raw shell command string when it may contain secrets, or sanitize it before logging. We still want to keep useful diagnostics (e.g., that a command finished and whether there was an error), but without exposing sensitive contents.
Best minimal fix here: in internal/shell/shell.go, change the deferred log in execCommon so it no longer includes the command value, while keeping other context (like the error). This directly breaks the taint flow from API-key–derived values into logs and addresses all CodeQL variants, because they all converge on that sink.
Concretely:
- In
execCommon, update thedeferblock to calls.logger.InfoPersist("command finished", "err", err)instead of logging"command", command. - No new imports, types, or helpers are required; we simply reduce the logged fields.
- All other files (
internal/agent/coordinator.go,internal/config/config.go,internal/config/resolve.go,internal/config/load.go) remain unchanged; they can continue to useResolveand build commands, because we’ve removed the sensitive logging sink.
This preserves all functional behavior (commands still execute exactly the same, errors are still logged) while eliminating clear-text logging of potentially sensitive command text and embedded API keys.
| @@ -268,7 +268,7 @@ | ||
| if runner != nil { | ||
| s.updateShellFromRunner(runner) | ||
| } | ||
| s.logger.InfoPersist("command finished", "command", command, "err", err) | ||
| s.logger.InfoPersist("command finished", "err", err) | ||
| }() | ||
|
|
||
| line, err := syntax.NewParser().Parse(strings.NewReader(command), "") |
Summary
readTextFileerror before UTF-8 validation to avoid validating partial/empty contentbreakafter tool is added to prevent duplicate additionsTest plan