@page "/settings"
@attribute [Authorize]
@inject ISettingsService SettingsService
@inject IThemeService ThemeService
@inject IOllamaService OllamaService
@inject NavigationManager Navigation
@inject IJSRuntime JSRuntime
@inject IProjectService ProjectService
@inject ILocalizationService Loc
@Loc["page.title.settings"] - Author Buddy
@Loc["settings.section.user"]
@if (currentProjectName != null)
{
@Loc["settings.context.project"]: @currentProjectName
}
else
{
@Loc["settings.context.user"]
}
@Loc["settings.section.models"]
@Loc["settings.section.ollama_server"]
@Loc["settings.section.appearance"]
@Loc["settings.section.language"]
@Loc["settings.section.editor_prompt"]
@Loc["settings.section.factcheck_template"]
@Loc["settings.section.spellcheck_prompt"]
@Loc["settings.section.advocatus_diaboli"]
@Loc["settings.section.hook_finder"]
@Loc["settings.section.eli5"]
@if (!string.IsNullOrEmpty(statusMessage))
{
@statusMessage
}
@code {
private string ragModel = "llama3.2";
private string styleModel = "llama3.2";
private string spellingModel = "phi3:mini";
private string selectedTheme = "light";
private string ollamaUrl = "http://localhost:11434";
private string lektorPrompt = string.Empty;
private string factCheckTemplate = string.Empty;
private string spellingPrompt = string.Empty;
private string advocatusDiaboliPrompt = string.Empty;
private string hookFinderPrompt = string.Empty;
private string eli5Prompt = string.Empty;
private string selectedLanguage = "de";
private string newProjectName = string.Empty;
private string newUserName = string.Empty;
private string statusMessage = string.Empty;
private List