Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 5ebc4c7

Browse files
committed
review feedback
1 parent 81a6338 commit 5ebc4c7

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

app/models/completion_prompt.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# frozen_string_literal: true
22

33
class CompletionPrompt < ActiveRecord::Base
4+
#
5+
# DEPRECATED.
6+
# TODO(roman): Remove after 06-17-25
7+
#
8+
49
TRANSLATE = -301
510
GENERATE_TITLES = -307
611
PROOFREAD = -303

config/locales/server.en.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -340,32 +340,33 @@ en:
340340
name: "Concept Deduplicator"
341341
description: "AI Bot specialized in deduplicating concepts"
342342
custom_prompt:
343-
name: "Custom Prompt"
344-
description: "Default persona powering the AI helper's custom prompt feature"
343+
name: "Custom prompt"
344+
description: "Default persona powering the Helper's custom prompt feature"
345345
smart_dates:
346-
name: "Smart Dates"
347-
description: "Default persona powering the AI helper's smart dates feature"
346+
name: "Smart dates"
347+
description: "Default persona powering the Helper's smart dates feature"
348348
markdown_table_generator:
349-
name: "Markdown Table Generator"
350-
description: "Default persona powering the AI helper's generate Markdown table feature"
349+
name: "Markdown table generator"
350+
description: "Default persona powering the Helper's generate Markdown table feature"
351351
post_illustrator:
352-
name: "Post Illustrator"
353-
description: "Generates StableDiffusion prompts to power the AI helper's illustrate post feature"
352+
name: "Post illustrator"
353+
description: "Generates StableDiffusion prompts to power the Helper's illustrate post feature"
354354
proofreader:
355355
name: "Proofreader"
356-
description: "Default persona powering the AI helper's proofread text feature"
356+
description: "Default persona powering the Helper's proofread text feature"
357357
titles_generator:
358-
name: "Titles Generator"
359-
description: "Default persona powering the AI helper's suggest topic titles feature"
358+
name: "Titles generator"
359+
description: "Default persona powering the Helper's suggest topic titles feature"
360360
tutor:
361361
name: "Tutor"
362-
description: "Default persona powering the AI helper's explain feature"
362+
description: "Default persona powering the Helper's explain feature"
363363
translator:
364364
name: "Translator"
365-
description: "Default persona powering the AI helper's translator feature"
365+
description: "Default persona powering the Helper's translator feature"
366366
image_captioner:
367-
name: "Image Captions"
368-
description: "Default persona powering the AI helper's image caption feature"
367+
name: "Image captions"
368+
description: "Default persona powering the Helper's image caption feature"
369+
369370
topic_not_found: "Summary unavailable, topic not found!"
370371
summarizing: "Summarizing topic"
371372
searching: "Searching for: '%{query}'"

config/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ discourse_ai:
166166
default: "-22"
167167
type: enum
168168
enum: "DiscourseAi::Configuration::PersonaEnumerator"
169-
ai_helper_tittle_suggestions_persona:
169+
ai_helper_title_suggestions_persona:
170170
default: "-23"
171171
type: enum
172172
enum: "DiscourseAi::Configuration::PersonaEnumerator"

lib/ai_helper/assistant.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def find_ai_helper_model(helper_mode, persona_klass)
307307
def personas_prompt_map(include_image_caption: false)
308308
map = {
309309
SiteSetting.ai_helper_translator_persona.to_i => TRANSLATE,
310-
SiteSetting.ai_helper_tittle_suggestions_persona.to_i => GENERATE_TITLES,
310+
SiteSetting.ai_helper_title_suggestions_persona.to_i => GENERATE_TITLES,
311311
SiteSetting.ai_helper_proofreader_persona.to_i => PROOFREAD,
312312
SiteSetting.ai_helper_markdown_tables_persona.to_i => MARKDOWN_TABLE,
313313
SiteSetting.ai_helper_custom_prompt_persona.to_i => CUSTOM_PROMPT,
@@ -325,8 +325,6 @@ def personas_prompt_map(include_image_caption: false)
325325
end
326326

327327
def all_prompts
328-
personas_and_prompts = personas_prompt_map
329-
330328
AiPersona
331329
.where(id: personas_prompt_map.keys)
332330
.map do |ai_persona|

spec/system/page_objects/components/ai_post_helper_menu.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def click_add_footnote
2525
end
2626

2727
def select_helper_model(mode)
28-
find("#{OPTIONS_SELECTOR} .btn[data-value=\"#{mode}\"]").click
28+
find("#{OPTIONS_SELECTOR} .btn[data-name=\"#{mode}\"]").click
2929
end
3030

3131
def suggestion_value

0 commit comments

Comments
 (0)