From 54ce3f900c71269205e8feaabc673edc655d676e Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Fri, 16 May 2025 13:24:20 +0200 Subject: [PATCH] Rename method --- app/models/command/ai/translator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/command/ai/translator.rb b/app/models/command/ai/translator.rb index 3e9eaeda6..437f52c7d 100644 --- a/app/models/command/ai/translator.rb +++ b/app/models/command/ai/translator.rb @@ -20,7 +20,7 @@ class Command::Ai::Translator end def cache_key_for(query) - "command_translator:#{user.id}:#{query}:#{context_description}" + "command_translator:#{user.id}:#{query}:#{current_view_description}" end def chat @@ -145,11 +145,11 @@ class Command::Ai::Translator ## Current view: - The user is currently #{context_description} }. + The user is currently #{current_view_description} }. PROMPT end - def context_description + def current_view_description if context.viewing_card_contents? "inside a card" elsif context.viewing_list_of_cards?