Commit Graph

903 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
0e52ccd26a feat: debug logs request response details (#407)
* feat: debug logs request response details

closes #399

* fix: lint

* refactor: improvements

* fix: improvements

* fix: test

* fix: centralize body parsing

* fix: compatct
2025-08-01 15:26:05 -03:00
Carlos Alexandro Becker
cd3ef8dbd4 fix: do not init MCP client on every tool request (#459)
* fix: do not init mcp client on every call

Right now it inits each mcp client multiple times, one when discovering tools at startup, and then every time we call any tools.

This makes it so we reuse the client from startup

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* wip

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: even better approach

* fix: unused param

* refactor: more improvements

* fix: if list tools fails, remove client

* fix: improve slice

* chore: smaller changes

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-01 15:22:47 -03:00
Peter Sanchez
c99034909d Use default permissions of 0600 for crush.json to help protect sensitive
data that is stored in plain text (api keys, etc.)

Fixes #411
2025-08-01 17:48:03 +02:00
Kujtim Hoxha
d3f28ddd95 fix: handle code agent not initialized 2025-08-01 16:33:51 +02:00
Kujtim Hoxha
428d71a162 fix: fix mcp clients 2025-08-01 16:33:44 +02:00
Kujtim Hoxha
5b7951051d fix: improve path prefix checking reliability
- Replace HasPrefix implementation to use filepath.Rel instead of filepath.Abs
- More reliable method to determine if a path is within a prefix
- Returns false on error conditions
- Preserves same public API for external usage

This addresses review feedback about improving the path checking logic.
2025-08-01 16:33:34 +02:00
Kujtim Hoxha
2ddc453573 chore: refactor implementation 2025-08-01 16:33:34 +02:00
Kujtim Hoxha
3eed18432f fix: permissions path 2025-08-01 16:33:34 +02:00
Kira Kawai
b1b5851f23 fix(tui): fix background color of file view component (#349) 2025-08-01 10:39:59 -03:00
Carlos Alexandro Becker
867484b46a refactor: move run to its own file 2025-08-01 08:04:30 +02:00
Carlos Alexandro Becker
e698239ace fix: lint noctx issues
ignored slog because in our case it doesn't matter.
2025-08-01 08:03:45 +02:00
Carlos Alexandro Becker
3e213e89aa chore: fmt 2025-08-01 08:03:31 +02:00
Carlos Alexandro Becker
ae421e29b0 refactor: simplify 2025-08-01 08:03:31 +02:00
Carlos Alexandro Becker
5a6329cc34 feat: support .crushignore as well as .gitignore
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-01 08:03:31 +02:00
Carlos Alexandro Becker
705790d336 fix: nil pointer in view (#403)
closes #397
2025-07-31 18:42:54 +02:00
Kujtim Hoxha
8248e4f649 fix: use anthropic provider for vertexAI (#398) 2025-07-31 18:40:54 +02:00
Andrey Nering
e69b513e1a fix(onboarding): fix y/n key press on model list and api key field (#402)
A bug on onboarding made it impossible to press "y" and "n" on
onboarding, on both the model list and the API key field.

This also means that on some terminals, like the Windows Terminal,
pasting an API key would supress all "y" and "n" chars present in the
key, because these terminal receives an even for each character being
pressed.
2025-07-31 10:57:31 -03:00
Kujtim Hoxha
52d459c477 chore: fix tests 2025-07-31 14:46:39 +02:00
Kujtim Hoxha
d2f7bb7cfe fix: fix vertex provider 2025-07-31 13:29:11 +02:00
Kujtim Hoxha
28b67f95ac fix: fix openrouter api 2025-07-31 11:55:15 +02:00
Carlos Alexandro Becker
43ac8d4870 fix: panic in non-interactive mode when no providers set up
closes #212

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-07-30 15:15:14 -03:00
Kujtim Hoxha
329c4dafa7 fix: fix region detection for bedrock 2025-07-30 17:16:37 +02:00
Kujtim Hoxha
d63856d90d chore: fix bedrock and azure 2025-07-30 16:46:40 +02:00
Kira Kawai
4ae839a023 feat: make "list" tool preview cleaner (#335) 2025-07-30 11:07:06 -03:00
Kujtim Hoxha
10500051bf Merge pull request #352 from charmbracelet/fix_providers
chore: fix custom headers and system prefix
2025-07-30 16:06:29 +02:00
Kujtim Hoxha
54bf4a6e02 chore: remove log 2025-07-30 16:06:18 +02:00
Kujtim Hoxha
287fc20a1c Merge pull request #354 from charmbracelet/prevent_model_switch
chore: prevent switching the model while agent is working
2025-07-30 16:05:15 +02:00
Kujtim Hoxha
803b49f87b Merge pull request #355 from charmbracelet/fix_error_select
fix(tui): apply border styling to error messages in selected state
2025-07-30 16:05:08 +02:00
Kujtim Hoxha
dfe5ffc0b0 Merge pull request #357 from charmbracelet/fix-openrouter
Fix some openrouter models
2025-07-30 16:04:57 +02:00
Kujtim Hoxha
121b1a679f Merge pull request #356 from charmbracelet/add_agents
chore: add agents to the default context
2025-07-30 16:04:06 +02:00
Kujtim Hoxha
c5d7e901fd chore: small fix 2025-07-30 16:01:03 +02:00
Kujtim Hoxha
30b508fc5d chore: fix openrouter issues
- this fixes the case where the model sends -1 for indes
- this also adds events for loading tools
- this also fixes the finish reason for some providers
2025-07-30 13:58:03 +02:00
Kujtim Hoxha
34e68acb8a chore: add agents to the default context 2025-07-30 12:57:41 +02:00
Kujtim Hoxha
6235248b93 fix(tui): apply border styling to error messages in selected state
Error messages were not showing the left border indicator when selected/focused,
making them inconsistent with other message types in the chat interface.

💖 Generated with Crush
Co-Authored-By: Crush <crush@charm.land>
2025-07-30 12:51:54 +02:00
Kujtim Hoxha
121825d8e3 chore: prevent switching the model while agent is working 2025-07-30 12:39:56 +02:00
Kujtim Hoxha
11a90e1cf6 chore: fix custom headers and system prefix 2025-07-30 12:34:02 +02:00
Raphael Amorim
3839c364d6 fix: lint for var blocks 2025-07-30 11:28:25 +02:00
Raphael Amorim
760e5c4f12 perf: avoid regex compilation in runtime 2025-07-30 11:22:10 +02:00
Kujtim Hoxha
da42a5b43e chore: small fix 2025-07-29 20:50:41 +02:00
Christian Rocha
172896d7ea chore: toss in some more placeholders 2025-07-29 11:39:40 -04:00
Kujtim Hoxha
e7fa9c77e8 chore: fix model selector 2025-07-29 17:39:05 +02:00
Kujtim Hoxha
1c4546920d Merge pull request #330 from charmbracelet/revert-prompts
Revert prompts
2025-07-29 17:12:58 +02:00
Kujtim Hoxha
b5c171ea9e chore: fix enter 2025-07-29 16:58:44 +02:00
Kujtim Hoxha
72f97399e6 chore: rever prompts 2025-07-29 16:58:34 +02:00
Kujtim Hoxha
d931f57ecf Merge pull request #328 from charmbracelet/cwd-permissions
chore: improve permissions
2025-07-29 16:27:52 +02:00
Andrey Nering
0c1b71c9f0 fix(ls): fix path expand on ls tool 2025-07-29 11:24:54 -03:00
Kujtim Hoxha
dbffab8ceb chore: remove log 2025-07-29 16:20:58 +02:00
Kujtim Hoxha
4eaa13a7fb chore: fix homedir 2025-07-29 16:05:24 +02:00
Ayman Bagabas
334dafcf94 feat(tui): editor: change textarea placeholder based on CoderAgent state (#263)
* feat(tui): change textarea placeholder based on CoderAgent state

* fix(tui): editor: cache random placeholders for editor

Make sure we update the editor's placeholder text when a new message is sent.

* fix(tui): editor: update editor placeholder on new message send

---------

Co-authored-by: Raphael Amorim <rapha850@gmail.com>
2025-07-29 10:02:03 -04:00
Kujtim Hoxha
0fcad3ba02 chore: improve permissions 2025-07-29 15:13:51 +02:00