chat_manager 0.2.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b511ecced21ece0ee04d99c18a5ddc602583a0e8ec259669f8127e81fc80624
4
- data.tar.gz: f7dfc3090521f0e533a5c1ab684f1ad3b25c8ed5f00d61c0bcc589d095760563
3
+ metadata.gz: 8ddf6c7e7730f55843f51ac1ea037abbd9e071a16a06d1b40896ebee66dc9bd7
4
+ data.tar.gz: 3a0769394095c3b8b5bfcae45cfd8a28c41833adefed7a5b8c16eb575da1f330
5
5
  SHA512:
6
- metadata.gz: 584400568e1b29a5de4cf9379399427815c7deccd1e59003a4fb69ecf850ce71636682a047115fb2170d14fb760afca584a6e0f29e7a5f625c493782c29975e4
7
- data.tar.gz: 7643eac34c2623e4c46e068b9daf8e54b1adb41f71b0f59c1bab94c5c3953596b97a9cab1b0795567cc584d8499954044feea34d7f0f8082db79325056335daa
6
+ metadata.gz: b8b1758695c42ae4ca116c3f5d771c4523d2294298826a0e872e11121b3386703745a6fcc0c2979919238dd1fbf05182562b114e2fff140dfd191fe6ceb0963a
7
+ data.tar.gz: 75f3f05bb3e6cbc7bfadb25579c4a5f7cb438fbf26ad02e7b7ff2cb3dbb863e66a6d0f04d4dc7b717cabbdf418ee525c5f58d21a55e3a325d917195515cd52dd
data/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ 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/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [1.1.0] - 2026-04-22
9
+
10
+ ### Added
11
+
12
+ - Optional `delete_path:` keyword argument to the `chat_list` helper. When provided, each chat card renders a delete button (trash icon) next to the download button. The host app still owns the destroy route and action; the gem only renders the button when a path is supplied.
13
+ - CSS styles for `.chat-card-delete` and `.chat-card-delete-form` matching the existing icon-button visual language (red hover for destructive intent).
14
+
15
+ ### Changed
16
+
17
+ - Revert Ruby version to 3.4.9 (from 4.0.1). README requirement updated to "Ruby 3.4+".
18
+
19
+ ## [1.0.0] - 2026-03-25
20
+
21
+ ### Changed
22
+
23
+ - Stable release — no functional changes from 0.2.0
24
+
25
+ ## [0.2.0] - 2026-03-14
26
+
27
+ ### Changed
28
+
29
+ - Bump Ruby version to 4.0.1
30
+ - Update README with detailed features and setup guide
31
+ - Improve README guidance for Ruby 4.0+
32
+
8
33
  ## [0.1.0] - 2026-02-26
9
34
 
10
35
  ### Added
data/README.md CHANGED
@@ -13,7 +13,7 @@ A Rails engine for managing LLM chat conversations with CSV export, auto-titling
13
13
 
14
14
  ## Requirements
15
15
 
16
- - Ruby 4.0+
16
+ - Ruby 3.4+
17
17
  - Rails 8.1+
18
18
 
19
19
  ## Installation
@@ -133,7 +133,8 @@ Use the `chat_list` helper in your views to render the chat list UI:
133
133
  ->(uuid) { chat_path(uuid) },
134
134
  active_uuid: @active_uuid,
135
135
  download_csv_path: ->(uuid) { download_csv_chat_path(uuid) },
136
- download_all_csv_path: download_all_csv_chats_path
136
+ download_all_csv_path: download_all_csv_chats_path,
137
+ delete_path: ->(uuid) { chat_path(uuid) }
137
138
  ) %>
138
139
  ```
139
140
 
@@ -145,6 +146,7 @@ Parameters:
145
146
  | `active_uuid` | Keyword | No | ID of the currently active chat (for highlighting) |
146
147
  | `download_csv_path` | Keyword | No | Proc/lambda that receives a UUID string and returns the CSV download path for each chat |
147
148
  | `download_all_csv_path` | Keyword | No | Path for the "Download All Chats CSV" button |
149
+ | `delete_path` | Keyword | No | Proc/lambda that receives a UUID string and returns the delete path for each chat. When provided, a delete button (trash icon) appears on each card. The host app must provide a `DELETE` route and controller action. |
148
150
 
149
151
  ### UI Components
150
152
 
@@ -86,6 +86,37 @@
86
86
  }
87
87
  }
88
88
 
89
+ .chat-card-delete-form {
90
+ margin: 0;
91
+ display: flex;
92
+ align-items: center;
93
+ }
94
+
95
+ .chat-card-delete {
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ width: 24px;
100
+ height: 24px;
101
+ padding: 0;
102
+ border: none;
103
+ background: transparent;
104
+ border-radius: 4px;
105
+ color: #888;
106
+ cursor: pointer;
107
+ flex-shrink: 0;
108
+ transition: color 0.15s ease, background-color 0.15s ease;
109
+
110
+ &:hover {
111
+ color: #dc2626;
112
+ background-color: rgba(220, 38, 38, 0.1);
113
+ }
114
+
115
+ i {
116
+ font-size: 12px;
117
+ }
118
+ }
119
+
89
120
  .chat-download-all {
90
121
  margin-top: 12px;
91
122
  padding-left: 32px;
@@ -3,6 +3,7 @@
3
3
  is_active = locals[:is_active]
4
4
  card_path = locals[:card_path]
5
5
  download_csv_path = locals[:download_csv_path]
6
+ delete_path = locals[:delete_path]
6
7
  %>
7
8
 
8
9
  <div class="chat-card<%= ' is-active' if is_active %>"
@@ -21,6 +22,16 @@
21
22
  <i class="bi bi-download"></i>
22
23
  <% end %>
23
24
  <% end %>
25
+ <% if delete_path %>
26
+ <%= button_to delete_path.call(ann.uuid),
27
+ method: :delete,
28
+ class: "chat-card-delete",
29
+ title: "Delete chat",
30
+ form: { class: "chat-card-delete-form" },
31
+ data: { turbo_confirm: "Delete this chat? This cannot be undone." } do %>
32
+ <i class="bi bi-trash"></i>
33
+ <% end %>
34
+ <% end %>
24
35
  </div>
25
36
  <input type="text" class="chat-card-title-input"
26
37
  data-chat-title-edit-target="input"
@@ -3,6 +3,7 @@
3
3
  card_path = locals[:card_path]
4
4
  download_csv_path = locals[:download_csv_path]
5
5
  download_all_csv_path = locals[:download_all_csv_path]
6
+ delete_path = locals[:delete_path]
6
7
  titled_chats = @chats.select { |c| c.title.present? }
7
8
  %>
8
9
 
@@ -10,7 +11,7 @@
10
11
  <% if titled_chats.present? %>
11
12
  <div class="chat-stack" data-controller="chat">
12
13
  <% titled_chats.each_with_index do |ann, idx| %>
13
- <%= render 'chat_manager/chat_card', locals: { ann: ann, next_ann: titled_chats[idx + 1], is_active: ann.id == active_uuid, card_path: card_path, download_csv_path: download_csv_path } %>
14
+ <%= render 'chat_manager/chat_card', locals: { ann: ann, next_ann: titled_chats[idx + 1], is_active: ann.id == active_uuid, card_path: card_path, download_csv_path: download_csv_path, delete_path: delete_path } %>
14
15
  <% end %>
15
16
  </div>
16
17
  <% if download_all_csv_path %>
@@ -1,7 +1,7 @@
1
1
  module ChatManager
2
2
  module Helpers
3
- def chat_list(card_path, active_uuid: nil, download_csv_path: nil, download_all_csv_path: nil)
4
- render "chat_manager/chat_list", locals: { card_path: card_path, active_uuid: active_uuid, download_csv_path: download_csv_path, download_all_csv_path: download_all_csv_path }
3
+ def chat_list(card_path, active_uuid: nil, download_csv_path: nil, download_all_csv_path: nil, delete_path: nil)
4
+ render "chat_manager/chat_list", locals: { card_path: card_path, active_uuid: active_uuid, download_csv_path: download_csv_path, download_all_csv_path: download_all_csv_path, delete_path: delete_path }
5
5
  end
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module ChatManager
2
- VERSION = "0.2.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chat_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubygems_version: 4.0.3
97
+ rubygems_version: 3.6.9
98
98
  specification_version: 4
99
99
  summary: A Rails engine for managing LLM chat conversations with CSV export and auto-titling.
100
100
  test_files: []