Reorganize Settings sections + add LLM model/prompt configs (#116)

* Reshuffle/organize settings UI
* Settings: AI prompt display/minor touch-ups
* API key settings tests
* Moved import/export together
* Collapsible LLM prompt DIVs
* Add export tests
This commit is contained in:
Juan José Mata
2025-08-22 11:43:24 -07:00
committed by GitHub
parent fb6e094f78
commit d054cd0bb2
38 changed files with 1036 additions and 420 deletions

View File

@@ -0,0 +1,12 @@
class Settings::AiPromptsController < ApplicationController
layout "settings"
def show
@breadcrumbs = [
[ "Home", root_path ],
[ "AI Prompts", nil ]
]
@family = Current.family
@assistant_config = Assistant.config_for(OpenStruct.new(user: Current.user))
end
end

View File

@@ -8,7 +8,7 @@ class Settings::ApiKeysController < ApplicationController
def show
@breadcrumbs = [
[ "Home", root_path ],
[ "API Keys", nil ]
[ "API Key", nil ]
]
@current_api_key = @api_key
end

View File

@@ -0,0 +1,18 @@
class Settings::GuidesController < ApplicationController
layout "settings"
def show
@breadcrumbs = [
[ "Home", root_path ],
[ "Guides", nil ]
]
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
autolink: true,
tables: true,
fenced_code_blocks: true,
strikethrough: true,
superscript: true
)
@guide_content = markdown.render(File.read(Rails.root.join("docs/onboarding/guide.md")))
end
end

View File

@@ -5,6 +5,10 @@ class Settings::ProfilesController < ApplicationController
@user = Current.user
@users = Current.family.users.order(:created_at)
@pending_invitations = Current.family.invitations.pending
@breadcrumbs = [
[ "Home", root_path ],
[ "Profile Info", nil ]
]
end
def destroy