diff --git a/app/helpers/discourse_ai/ai_bot/shared_ai_conversations_helper.rb b/app/helpers/discourse_ai/ai_bot/shared_ai_conversations_helper.rb new file mode 100644 index 00000000..3e16311c --- /dev/null +++ b/app/helpers/discourse_ai/ai_bot/shared_ai_conversations_helper.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true +module DiscourseAi + module AiBot + module SharedAiConversationsHelper + # bump up version when assets change + # long term we may want to change this cause it is hard to remember + # to bump versions, but for now this does the job + VERSION = "1" + + def share_asset_url(short_path) + ::UrlHelper.local_cdn_url("/plugins/discourse-ai/ai-share/#{short_path}?#{VERSION}") + end + end + end +end diff --git a/app/views/discourse_ai/ai_bot/shared_ai_conversations/show.html.erb b/app/views/discourse_ai/ai_bot/shared_ai_conversations/show.html.erb index b77378f5..8880a67e 100644 --- a/app/views/discourse_ai/ai_bot/shared_ai_conversations/show.html.erb +++ b/app/views/discourse_ai/ai_bot/shared_ai_conversations/show.html.erb @@ -10,8 +10,8 @@ - "> - "> + "> + "> - + -