diff --git a/app/models/ai/tool/list_cards.rb b/app/models/ai/list_cards_tool.rb similarity index 99% rename from app/models/ai/tool/list_cards.rb rename to app/models/ai/list_cards_tool.rb index 47f10947b..77cf2b301 100644 --- a/app/models/ai/tool/list_cards.rb +++ b/app/models/ai/list_cards_tool.rb @@ -1,4 +1,4 @@ -class Ai::Tool::ListCards < Ai::Tool +class Ai::ListCardsTool < Ai::Tool description <<-MD Lists all cards accessible by the current user. The response is paginated so you may need to iterate through multiple pages to get the full list. diff --git a/app/models/ai/tool/list_cards/filter.rb b/app/models/ai/list_cards_tool/filter.rb similarity index 96% rename from app/models/ai/tool/list_cards/filter.rb rename to app/models/ai/list_cards_tool/filter.rb index 8ef1e2eb4..f9aaca32f 100644 --- a/app/models/ai/tool/list_cards/filter.rb +++ b/app/models/ai/list_cards_tool/filter.rb @@ -1,4 +1,4 @@ -class Ai::Tool::ListCards::Filter < Ai::Tool::Filter +class Ai::ListCardsTool::Filter < Ai::Tool::Filter register_filters( query: :apply_search, ids: :apply_ids_filter, diff --git a/app/models/ai/tool/list_collections.rb b/app/models/ai/list_collections_tool.rb similarity index 96% rename from app/models/ai/tool/list_collections.rb rename to app/models/ai/list_collections_tool.rb index 843321001..1e33d2285 100644 --- a/app/models/ai/tool/list_collections.rb +++ b/app/models/ai/list_collections_tool.rb @@ -1,4 +1,4 @@ -class Ai::Tool::ListCollections < Ai::Tool +class Ai::ListCollectionsTool < Ai::Tool description <<-MD Lists all collections accessible by the current user. The response is paginated so you may need to iterate through multiple pages to get the full list. diff --git a/app/models/ai/tool/list_comments.rb b/app/models/ai/list_comments_tool.rb similarity index 98% rename from app/models/ai/tool/list_comments.rb rename to app/models/ai/list_comments_tool.rb index ea2f8a7a2..86a682840 100644 --- a/app/models/ai/tool/list_comments.rb +++ b/app/models/ai/list_comments_tool.rb @@ -1,4 +1,4 @@ -class Ai::Tool::ListComments < Ai::Tool +class Ai::ListCommentsTool < Ai::Tool description <<-MD Lists all comments accessible by the current user. The response is paginated so you may need to iterate through multiple pages to get the full list. diff --git a/app/models/ai/tool/list_comments/filter.rb b/app/models/ai/list_comments_tool/filter.rb similarity index 94% rename from app/models/ai/tool/list_comments/filter.rb rename to app/models/ai/list_comments_tool/filter.rb index e41b51b7a..ddae172b5 100644 --- a/app/models/ai/tool/list_comments/filter.rb +++ b/app/models/ai/list_comments_tool/filter.rb @@ -1,4 +1,4 @@ -class Ai::Tool::ListComments::Filter < Ai::Tool::Filter +class Ai::ListCommentsTool::Filter < Ai::Tool::Filter register_filters( query: :apply_search, ids: :apply_ids_filter, diff --git a/app/models/ai/tool/list_users.rb b/app/models/ai/list_users_tool.rb similarity index 97% rename from app/models/ai/tool/list_users.rb rename to app/models/ai/list_users_tool.rb index a1929db62..679b6d819 100644 --- a/app/models/ai/tool/list_users.rb +++ b/app/models/ai/list_users_tool.rb @@ -1,4 +1,4 @@ -class Ai::Tool::ListUsers < Ai::Tool +class Ai::ListUsersTool < Ai::Tool description <<-MD Lists all users accessible by the current user. The response is paginated so you may need to iterate through multiple pages to get the full list. diff --git a/app/models/ai/tool/list_users/filter.rb b/app/models/ai/list_users_tool/filter.rb similarity index 75% rename from app/models/ai/tool/list_users/filter.rb rename to app/models/ai/list_users_tool/filter.rb index e2212aba0..f6d735c77 100644 --- a/app/models/ai/tool/list_users/filter.rb +++ b/app/models/ai/list_users_tool/filter.rb @@ -1,4 +1,4 @@ -class Ai::Tool::ListUsers::Filter < Ai::Tool::Filter +class Ai::ListUsersTool::Filter < Ai::Tool::Filter register_filter :ids, :apply_ids_filter private diff --git a/app/models/conversation/message/response_generator.rb b/app/models/conversation/message/response_generator.rb index 9ab900eaa..61beed0cd 100644 --- a/app/models/conversation/message/response_generator.rb +++ b/app/models/conversation/message/response_generator.rb @@ -63,10 +63,10 @@ class Conversation::Message::ResponseGenerator def llm RubyLLM.chat(model: llm_model).tap do |chat| - chat.with_tool(Ai::Tool::ListCards.new(user: message.owner)) - chat.with_tool(Ai::Tool::ListCollections.new(user: message.owner)) - chat.with_tool(Ai::Tool::ListComments.new(user: message.owner)) - chat.with_tool(Ai::Tool::ListUsers.new(user: message.owner)) + chat.with_tool(Ai::ListCardsTool.new(user: message.owner)) + chat.with_tool(Ai::ListCollectionsTool.new(user: message.owner)) + chat.with_tool(Ai::ListCommentsTool.new(user: message.owner)) + chat.with_tool(Ai::ListUsersTool.new(user: message.owner)) chat.reset_messages!