Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.3.6
ruby 3.4.7
5 changes: 4 additions & 1 deletion app/controllers/concerns/has_conversation_starter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ module HasConversationStarter

def set_conversation_starters
starters = I18n.t("app.conversations.starters")
image_starters = I18n.t("app.conversations.image_starters")
# Ensure we have an array of hashes with title/description
starters = Array(starters).map { |s| [s[:title] || s["title"], s[:description] || s["description"]] }.select { |a| a[0].present? && a[1].present? }
@conversation_starters = starters.shuffle.take(4)
image_starters = Array(image_starters).map { |s| [s[:title] || s["title"], s[:description] || s["description"]] }.select { |a| a[0].present? && a[1].present? }

@conversation_starters = starters.shuffle.take(3) + image_starters.shuffle.take(1)
end
end
3 changes: 3 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ de:
description: "für einen Tag ohne Kaffee"
- title: "Hilf mir zu planen"
description: "einen Roadtrip von Charleston nach Key West"
image_starters:
- title: "Entwirf ein Buchcover-Bild."
description: "für einen neuen Fantasy-Roman, der in einem magischen Wald spielt"
flashes:
auth:
invalid_login: "Ungültige E-Mail oder Passwort"
Expand Down
7 changes: 7 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ en:
description: "for making it through a day with no coffee"
- title: "Help me plan"
description: "a roadtrip from Charleston to Key West"
image_starters:
- title: "Generate an image"
description: "of a spookey black cat with glowing eyes"
- title: "Create a logo image"
description: "for a new AI-powered productivity app"
- title: "Design a book cover image"
description: "for a new fantasy novel set in a magical forest"
flashes:
auth:
invalid_login: "Invalid email or password"
Expand Down
Loading