Skip to content

Commit 2c5b27e

Browse files
Alex Holmbergclaude
authored andcommitted
feat(agent): add extended thinking, conversation compaction, and UI improvements
## Extended Thinking for Claude via Bedrock - Patch rig-bedrock to preserve Reasoning blocks with tool calls - The upstream rig-bedrock drops thinking content when tool calls are present - Enable Claude's extended thinking with 8K token budget - Display thinking in beautiful peach/coral themed UI before responses ## Conversation Compaction System - Add automatic context compaction when token count exceeds thresholds - Smart eviction strategy preserving tool call/result adjacency - Generate summaries of compacted turns for context continuity - Configurable thresholds via CompactionConfig ## Profile Management - Add /profile command for managing multiple API key configurations - Support for work/personal/project-specific profiles - Store OpenAI, Anthropic, and Bedrock credentials per profile - Switch profiles on-the-fly during chat sessions ## Terraform Tools - Add terraform_fmt tool for formatting .tf files - Add terraform_validate tool for configuration validation - Add terraform_install tool for automated Terraform installation ## UI/UX Improvements - Remove language headers from code blocks (cleaner output) - Add beautiful markdown rendering with syntax highlighting - Improve tool execution display with Claude Code style - Add thinking display section with warm peach colors ## Other Changes - Add test Dockerfiles for hadolint testing - Improve IDE client connection handling - Enhanced session management with better error recovery 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 0b29ac7 commit 2c5b27e

61 files changed

Lines changed: 16082 additions & 683 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 998 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,17 @@ rand = "0.8"
7272
futures-util = "0.3"
7373

7474
# Agent dependencies (using Rig - LLM application framework)
75-
rig-core = { version = "0.26", features = ["derive"] }
75+
rig-core = { version = "0.27", features = ["derive"] }
76+
rig-bedrock = "0.3" # AWS Bedrock provider for Rig
7677

7778
# Diff rendering for file confirmation UI
7879
similar = "2.6"
7980

81+
# Markdown rendering and syntax highlighting
82+
termimad = "0.30" # Terminal markdown rendering
83+
syntect = "5" # Syntax highlighting
84+
strip-ansi-escapes = "0.2" # Strip ANSI codes for testing
85+
8086
# Dockerfile linting (hadolint-rs)
8187
nom = "7" # Parser combinators for Dockerfile parsing
8288

@@ -98,4 +104,10 @@ path = "examples/check_vulnerabilities.rs"
98104

99105
[[example]]
100106
name = "security_analysis"
101-
path = "examples/security_analysis.rs"
107+
path = "examples/security_analysis.rs"
108+
109+
# Patch rig-bedrock to fix extended thinking support with tool use
110+
# The upstream version drops Reasoning blocks when a tool call is present.
111+
# See: patches/rig-bedrock/src/types/assistant_content.rs for the fix.
112+
[patch.crates-io]
113+
rig-bedrock = { path = "patches/rig-bedrock" }

patches/rig-bedrock/.cargo-ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"v":1}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"git": {
3+
"sha1": "133cad1671e703f42449e52650a993a11a433fd6"
4+
},
5+
"path_in_vcs": "rig-integrations/rig-bedrock"
6+
}

patches/rig-bedrock/CHANGELOG.md

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.3.9](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.8...rig-bedrock-v0.3.9) - 2025-12-15
11+
12+
### Other
13+
14+
- ToolCall Signature and additional parameters ([#1154](https://github.com/0xPlaygrounds/rig/pull/1154))
15+
- *(rig-1090)* crate re-org ([#1145](https://github.com/0xPlaygrounds/rig/pull/1145))
16+
17+
## [0.3.8](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.7...rig-bedrock-v0.3.8) - 2025-12-04
18+
19+
### Other
20+
21+
- updated the following local packages: rig-core
22+
23+
## [0.3.7](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.6...rig-bedrock-v0.3.7) - 2025-12-01
24+
25+
### Added
26+
27+
- Gemini Assistant Image Responses ([#1048](https://github.com/0xPlaygrounds/rig/pull/1048))
28+
- *(rig-985)* Consolidate provider clients ([#1050](https://github.com/0xPlaygrounds/rig/pull/1050))
29+
30+
### Fixed
31+
32+
- *(rig-1050)* Inconsistent model/agent initialisation methods ([#1069](https://github.com/0xPlaygrounds/rig/pull/1069))
33+
34+
### Other
35+
36+
- Deprecate `DynClientBuilder` ([#1105](https://github.com/0xPlaygrounds/rig/pull/1105))
37+
38+
## [0.3.6](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.5...rig-bedrock-v0.3.6) - 2025-11-10
39+
40+
### Added
41+
42+
- *(providers)* Emit tool call deltas ([#1020](https://github.com/0xPlaygrounds/rig/pull/1020))
43+
44+
## [0.3.5](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.4...rig-bedrock-v0.3.5) - 2025-10-28
45+
46+
### Other
47+
48+
- updated the following local packages: rig-core
49+
50+
## [0.3.4](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.3...rig-bedrock-v0.3.4) - 2025-10-27
51+
52+
### Added
53+
54+
- *(bedrock)* Support streaming thinking ([#946](https://github.com/0xPlaygrounds/rig/pull/946))
55+
- *(bedrock)* Implement usage ([#934](https://github.com/0xPlaygrounds/rig/pull/934))
56+
57+
### Other
58+
59+
- Fix bedrock tool calls with zero arguments ([#989](https://github.com/0xPlaygrounds/rig/pull/989))
60+
- Dependent packages no longer force unnecessary features on rig-core ([#964](https://github.com/0xPlaygrounds/rig/pull/964))
61+
62+
## [0.3.3](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.2...rig-bedrock-v0.3.3) - 2025-10-14
63+
64+
### Added
65+
66+
- *(rig-973)* DocumentSourceKind::String ([#882](https://github.com/0xPlaygrounds/rig/pull/882))
67+
68+
### Other
69+
70+
- provider SDK has issue with DocumentBlock ([#892](https://github.com/0xPlaygrounds/rig/pull/892))
71+
72+
## [0.3.2](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.1...rig-bedrock-v0.3.2) - 2025-09-29
73+
74+
### Added
75+
76+
- *(rig-795)* support file URLs for audio, video, documents ([#823](https://github.com/0xPlaygrounds/rig/pull/823))
77+
78+
### Other
79+
80+
- *(rig-963)* fix feature regression in AWS bedrock ([#863](https://github.com/0xPlaygrounds/rig/pull/863))
81+
82+
## [0.3.1](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.3.0...rig-bedrock-v0.3.1) - 2025-09-15
83+
84+
### Added
85+
86+
- *(rig-931)* support file input for images on Gemini ([#790](https://github.com/0xPlaygrounds/rig/pull/790))
87+
88+
## [0.3.0](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.9...rig-bedrock-v0.3.0) - 2025-09-02
89+
90+
### Added
91+
92+
- VerifyClient trait ([#724](https://github.com/0xPlaygrounds/rig/pull/724))
93+
94+
### Other
95+
96+
- added AWS Bedrock client creation using from_env ([#710](https://github.com/0xPlaygrounds/rig/pull/710))
97+
98+
## [0.2.9](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.8...rig-bedrock-v0.2.9) - 2025-08-20
99+
100+
### Other
101+
102+
- updated the following local packages: rig-core
103+
104+
## [0.2.8](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.7...rig-bedrock-v0.2.8) - 2025-08-19
105+
106+
### Other
107+
108+
- updated the following local packages: rig-core
109+
110+
## [0.2.7](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.6...rig-bedrock-v0.2.7) - 2025-08-19
111+
112+
### Added
113+
114+
- *(rig-865)* multi turn streaming ([#712](https://github.com/0xPlaygrounds/rig/pull/712))
115+
- video input for gemini ([#690](https://github.com/0xPlaygrounds/rig/pull/690))
116+
117+
## [0.2.6](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.5...rig-bedrock-v0.2.6) - 2025-08-05
118+
119+
### Other
120+
121+
- updated the following local packages: rig-core
122+
123+
## [0.2.5](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.4...rig-bedrock-v0.2.5) - 2025-08-05
124+
125+
### Other
126+
127+
- updated the following local packages: rig-core
128+
129+
## [0.2.4](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.3...rig-bedrock-v0.2.4) - 2025-07-30
130+
131+
### Added
132+
133+
- *(rig-812)* yield final response with total usage metrics from streaming completion response in stream impl ([#584](https://github.com/0xPlaygrounds/rig/pull/584))
134+
- *(rig-784)* thinking/reasoning ([#557](https://github.com/0xPlaygrounds/rig/pull/557))
135+
136+
## [0.2.3](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.2...rig-bedrock-v0.2.3) - 2025-07-16
137+
138+
### Other
139+
140+
- updated the following local packages: rig-core
141+
142+
## [0.2.2](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.1...rig-bedrock-v0.2.2) - 2025-07-14
143+
144+
### Added
145+
146+
- *(rig-801)* DynClientBuilder::from_values ([#556](https://github.com/0xPlaygrounds/rig/pull/556))
147+
- add `.extended_details` to `PromptRequest` ([#555](https://github.com/0xPlaygrounds/rig/pull/555))
148+
149+
## [0.2.1](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.2.0...rig-bedrock-v0.2.1) - 2025-07-07
150+
151+
### Added
152+
153+
- *(rig-780)* integrate openAI responses API ([#508](https://github.com/0xPlaygrounds/rig/pull/508))
154+
155+
### Other
156+
157+
- Migrate all crates to Rust 2024 ([#539](https://github.com/0xPlaygrounds/rig/pull/539))
158+
- Declare shared dependencies in workspace ([#538](https://github.com/0xPlaygrounds/rig/pull/538))
159+
- Make clippy happy on all targets ([#542](https://github.com/0xPlaygrounds/rig/pull/542))
160+
161+
## [0.2.0](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.1.3...rig-bedrock-v0.2.0) - 2025-06-09
162+
163+
### Added
164+
165+
- Improve Streaming API ([#388](https://github.com/0xPlaygrounds/rig/pull/388))
166+
167+
### Other
168+
169+
- Introduce Client Traits and Testing ([#440](https://github.com/0xPlaygrounds/rig/pull/440))
170+
171+
## [0.1.3](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.1.2...rig-bedrock-v0.1.3) - 2025-04-30
172+
173+
### Fixed
174+
175+
- fixed bug with base64 encoding on AWS Bedrock ([#432](https://github.com/0xPlaygrounds/rig/pull/432))
176+
177+
## [0.1.2](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.1.1...rig-bedrock-v0.1.2) - 2025-04-29
178+
179+
### Added
180+
181+
- multi-turn / reasoning loops + parallel tool calling ([#370](https://github.com/0xPlaygrounds/rig/pull/370))
182+
- support custom clients for bedrock ([#403](https://github.com/0xPlaygrounds/rig/pull/403))
183+
184+
## [0.1.1](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.1.0...rig-bedrock-v0.1.1) - 2025-04-12
185+
186+
### Other
187+
188+
- updated the following local packages: rig-derive

0 commit comments

Comments
 (0)