You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve inspect output for IRB, Rails console, ERB
- Add AI::Message class (Hash subclass) with custom display
- Add AI::Items class (SimpleDelegator) wrapping API response
- Rename items to get_items to indicate API call
- Enable reasoning summaries when reasoning_effort is set
- Add to_html methods with dark terminal-style background
- TTY-aware colorization (disabled when piped/redirected)
- Add examples/16_get_items.rb demonstrating item inspection
Copy file name to clipboardExpand all lines: CHANGELOG.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.5.0] - 2025-12-05
9
+
10
+
### Breaking Changes
11
+
12
+
-**Renamed `items` to `get_items`**: The method now clearly indicates it makes an API call. Returns an `AI::Items` wrapper that delegates to the underlying response while providing nice display formatting.
13
+
14
+
### Added
15
+
16
+
-**Reasoning summaries**: When `reasoning_effort` is set, the API now returns chain-of-thought summaries in `get_items`. These show the model's reasoning process (e.g., "Planning Ruby version search", "Confirming image tool usage").
17
+
18
+
-**Improved console display**: `AI::Chat`, `AI::Message`, and `AI::Items` now display nicely in IRB and Rails console with colorized, formatted output via AmazingPrint.
19
+
20
+
-**HTML output for ERB templates**: All display objects have a `to_html` method for rendering in views. Includes dark terminal-style background for readability.
21
+
22
+
-**`AI::Message` class**: Messages are now `AI::Message` instances (a Hash subclass) with custom display methods.
23
+
24
+
-**`AI::Items` class**: Wraps the conversation items API response with nice display methods while delegating all other methods (like `.data`, `.has_more`, etc.) to the underlying response.
25
+
26
+
-**TTY-aware display**: Console output automatically detects TTY and disables colors when output is piped or redirected.
27
+
28
+
-**New example**: `examples/16_get_items.rb` demonstrates inspecting conversation items including reasoning, web searches, and image generation.
29
+
8
30
## [0.4.0] - 2025-11-25
9
31
10
32
### Breaking Changes
@@ -27,7 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
49
28
50
-**Automatic conversation management**: The gem now automatically creates and manages conversations via OpenAI's Conversations API. The `conversation_id` is set after the first `generate!` call and maintained across subsequent calls.
29
51
30
-
-**`items` method**: Retrieve all conversation items (messages, tool calls, reasoning) from OpenAI's API with `chat.items`.
52
+
-**`get_items` method**: Retrieve all conversation items (messages, tool calls, reasoning) from OpenAI's API with `chat.get_items`.
31
53
32
54
-**Improved test coverage**: Added integration tests for conversation continuity, file handling, and conversation items retrieval.
0 commit comments