42a12fd
fix: Delegate unhandled messages to the focused model
Click to expand commit body
Currently, chatPage does not handle anything other than special events.
As a result, API/command responses from child models are passed to the
parent and processed without being communicated to the child (for
example, it is currently possible to open an external editor, but the
new text after closing the editor is not reflected in Crush's editor).
As an alternative solution, it is possible to export the child's tea.Msg
to the parent to address this issue, but we would prefer to handle the
logic closed in the child without communicating the details to the
parent as much as possible.
* feat: support anthropic provider type in custom provider configs
* docs: fix provider configuration field name and add anthropic example
- Change `provider_type` to `type` in documentation to match actual struct field
- Add comprehensive examples for both OpenAI and Anthropic custom providers
- Include missing `api_key` field in examples for completeness
* feat: resolve headers to allow for custom scripts and such in headers
* feat: allow headers in the anthropic client
* feat: if api_key has "Bearer " in front then using it as an
Authorization header and skip the X-API-Key header in the anthropic
client
* feat: add support for templating in the config resolve.go
something like `Bearer $(echo $ENVVAR)-$(bash ~/.config/crush/script.sh)` would work now; also added some tests since the first iteration of this broke stuff majorly lol
* feat: add a system prompt prefix option to the config
---------
Co-authored-by: Kieran Klukas <me@dunkirk.sh>
Co-authored-by: Kieran Klukas <l41cge3m@duck.com>
Kujtim Hoxha
,
Kieran Klukas
, and
Kieran Klukas
created
adcf0e1
Merge pull request #284 from charmbracelet/tools-bg
582eeb0
fix: hide info box when the initialization message is shown
Andrey Nering
created
d6d5cbc
fix: fix panic on onboarding when no model is selected on the list
Click to expand commit body
* `rm -r ~/.local/share/crush`
* run `crush`
* type something on the filter so no model is shown on the list
* press enter
* a panic happens
Fixes #285
e9d797e
Merge pull request #296 from charmbracelet/lipgloss
Click to expand commit body
chore(deps): update lipgloss
Kujtim Hoxha
created
97290c8
fix(tui): completions: improve positioning and handling completions
Click to expand commit body
With this, the completions popup will now reposition itself on
fitlering, resizing, and when the cursor moves. It also ensures that the
completions are correctly positioned relative to the textarea cursor
position.
90d1e2f
fix(diffview): escape content to avoid surprises
Andrey Nering
created
e6186c6
perf(ansiext): grow string builder to optimize allocations
Andrey Nering
created
63efed6
refactor: move ansi escape function to the `ansiext` package
Andrey Nering
created
e7f29ad
fix(diffview): fix rendering issue caused by line breaks added by chroma
Andrey Nering
created
78789b8
refactor(diffview): simplify how we handle line endings
Andrey Nering
created
56b8f43
feat(tui): completions: dynamically adjust width based on items
Click to expand commit body
This will dynamically adjust the width of the completions popup based on
the width of the last 10 items in the list, ensuring that the popup
fits the content better and avoids unnecessary horizontal scrolling.