- add language

- prepare AI functions
This commit is contained in:
Roland 2026-05-20 07:27:41 +02:00
parent e5515edcab
commit 9b8ac0ef24
14 changed files with 628 additions and 446 deletions

View file

@ -2,6 +2,30 @@
"Version": 1,
"WorkspaceRootPath": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\pages\\ollamaassistant.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\pages\\ollamaassistant.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\layout\\mainlayout.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\layout\\mainlayout.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
@ -14,10 +38,6 @@
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\projectservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\projectservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@ -26,14 +46,6 @@
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\filescannerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\filescannerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\models\\project.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:models\\project.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@ -58,14 +70,6 @@
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Data\\AppDbContext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Data\\AppDbContext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\themeservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\themeservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@ -122,70 +126,32 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 7,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Program.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeDocumentMoniker": "Program.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeToolTip": "Program.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAApwBoAAAANAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-20T04:07:21.54Z",
"EditorCaption": ""
},
{
"$type": "Bookmark",
"Name": "RST:0:0:{b3f9f954-0ca5-0091-76b4-34a47f44c954}"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "ISettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs",
"RelativeDocumentMoniker": "Services\\ISettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs*",
"RelativeToolTip": "Services\\ISettingsService.cs*",
"ViewState": "AgIAABoAAAAAAAAAAAA8wCYAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T13:21:26.951Z",
"DocumentIndex": 0,
"Title": "OllamaAssistant.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\OllamaAssistant.razor",
"RelativeDocumentMoniker": "Components\\Pages\\OllamaAssistant.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\OllamaAssistant.razor",
"RelativeToolTip": "Components\\Pages\\OllamaAssistant.razor",
"ViewState": "AgIAAAkAAAAAAAAAAAAAABAAAAARAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-20T05:14:39.037Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "SettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeDocumentMoniker": "Services\\SettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeToolTip": "Services\\SettingsService.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAqwAYAAAAmAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:05:12.928Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "RagService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeDocumentMoniker": "Services\\RagService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeToolTip": "Services\\RagService.cs",
"ViewState": "AgIAABIAAAAAAAAAAAAxwBoAAAAIAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-18T15:40:05.413Z"
},
{
"$type": "Document",
"DocumentIndex": 8,
"DocumentIndex": 11,
"Title": "Project.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\Project.cs",
"RelativeDocumentMoniker": "Models\\Project.cs",
@ -197,33 +163,33 @@
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 6,
"Title": "MainLayout.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor*",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor*",
"ViewState": "AgIAALUAAAAAAAAAAAApwM4AAABAAAAAAAAAAA==",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAALYAAAAAAAAAAAApwNMAAABAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 6,
"DocumentIndex": 3,
"Title": "OllamaSettings.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\OllamaSettings.cs",
"RelativeDocumentMoniker": "Models\\OllamaSettings.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\OllamaSettings.cs",
"RelativeToolTip": "Models\\OllamaSettings.cs",
"ViewState": "AgIAAAIAAAAAAAAAAAAxwAUAAAA+AAAAAAAAAA==",
"ViewState": "AgIAAAYAAAAAAAAAAAAkwBQAAAASAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T13:39:46.179Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 13,
"DocumentIndex": 16,
"Title": "AppDbContext.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Data\\AppDbContext.cs",
"RelativeDocumentMoniker": "Data\\AppDbContext.cs",
@ -234,7 +200,7 @@
},
{
"$type": "Document",
"DocumentIndex": 5,
"DocumentIndex": 10,
"Title": "FileScannerService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\FileScannerService.cs",
"RelativeDocumentMoniker": "Services\\FileScannerService.cs",
@ -247,7 +213,97 @@
},
{
"$type": "Document",
"DocumentIndex": 10,
"DocumentIndex": 4,
"Title": "IOllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeDocumentMoniker": "Services\\IOllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeToolTip": "Services\\IOllamaService.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAqwAkAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T07:20:19.212Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "Settings.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Settings.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAAAwAAAAAAAAAAAAAAIYAAAAlAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "SettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeDocumentMoniker": "Services\\SettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeToolTip": "Services\\SettingsService.cs",
"ViewState": "AgIAAEUBAAAAAAAAAAAQwFwBAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:05:12.928Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "OllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeDocumentMoniker": "Services\\OllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeToolTip": "Services\\OllamaService.cs",
"ViewState": "AgIAAFkAAAAAAAAAAAAqwGsAAAAeAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:43:46.404Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 12,
"Title": "RagService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeDocumentMoniker": "Services\\RagService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeToolTip": "Services\\RagService.cs",
"ViewState": "AgIAABIAAAAAAAAAAAAxwBoAAAAIAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-18T15:40:05.413Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "ISettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs",
"RelativeDocumentMoniker": "Services\\ISettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs",
"RelativeToolTip": "Services\\ISettingsService.cs",
"ViewState": "AgIAABoAAAAAAAAAAAA8wCoAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T13:21:26.951Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "Program.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeDocumentMoniker": "Program.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeToolTip": "Program.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAApwBoAAAANAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-20T04:07:21.54Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 13,
"Title": "IRagService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IRagService.cs",
"RelativeDocumentMoniker": "Services\\IRagService.cs",
@ -259,7 +315,7 @@
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 9,
"Title": "ProjectService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ProjectService.cs",
"RelativeDocumentMoniker": "Services\\ProjectService.cs",
@ -272,19 +328,7 @@
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "OllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeDocumentMoniker": "Services\\OllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeToolTip": "Services\\OllamaService.cs",
"ViewState": "AgIAAHoAAAAAAAAAAAAcwCoAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:43:46.404Z"
},
{
"$type": "Document",
"DocumentIndex": 12,
"DocumentIndex": 15,
"Title": "NavMenu.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\NavMenu.razor",
"RelativeDocumentMoniker": "Components\\Layout\\NavMenu.razor",
@ -296,20 +340,20 @@
},
{
"$type": "Document",
"DocumentIndex": 11,
"DocumentIndex": 14,
"Title": "Editor.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Editor.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Editor.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Editor.razor",
"RelativeToolTip": "Components\\Pages\\Editor.razor",
"ViewState": "AgIAAAoAAACA6NuCpTYvwJkAAAAcAAAAAAAAAA==",
"ViewState": "AgIAAAoAAACA6NuCpTYvwKAAAAAcAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-16T13:01:59.743Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 16,
"DocumentIndex": 17,
"Title": "ThemeService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ThemeService.cs",
"RelativeDocumentMoniker": "Services\\ThemeService.cs",
@ -321,31 +365,7 @@
},
{
"$type": "Document",
"DocumentIndex": 15,
"Title": "Settings.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Settings.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAAHMAAAAAAAAAAADwv4UAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z"
},
{
"$type": "Document",
"DocumentIndex": 14,
"Title": "IOllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeDocumentMoniker": "Services\\IOllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeToolTip": "Services\\IOllamaService.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAqwAkAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T07:20:19.212Z"
},
{
"$type": "Document",
"DocumentIndex": 17,
"DocumentIndex": 18,
"Title": "App.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\App.razor",
"RelativeDocumentMoniker": "Components\\App.razor",
@ -357,7 +377,7 @@
},
{
"$type": "Document",
"DocumentIndex": 20,
"DocumentIndex": 21,
"Title": "Models.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Models.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Models.razor",
@ -369,7 +389,7 @@
},
{
"$type": "Document",
"DocumentIndex": 18,
"DocumentIndex": 19,
"Title": "LLM_Model.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\LLM_Model.cs",
"RelativeDocumentMoniker": "Models\\LLM_Model.cs",
@ -381,7 +401,7 @@
},
{
"$type": "Document",
"DocumentIndex": 19,
"DocumentIndex": 20,
"Title": "ModelStatus.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\ModelStatus.cs",
"RelativeDocumentMoniker": "Models\\ModelStatus.cs",
@ -393,7 +413,7 @@
},
{
"$type": "Document",
"DocumentIndex": 23,
"DocumentIndex": 24,
"Title": "MainLayout.razor.css",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor.css",
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor.css",
@ -405,7 +425,7 @@
},
{
"$type": "Document",
"DocumentIndex": 21,
"DocumentIndex": 22,
"Title": "IFileScannerService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IFileScannerService.cs",
"RelativeDocumentMoniker": "Services\\IFileScannerService.cs",
@ -417,7 +437,7 @@
},
{
"$type": "Document",
"DocumentIndex": 22,
"DocumentIndex": 23,
"Title": "bootstrap-utilities.css",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\wwwroot\\lib\\bootstrap\\dist\\css\\bootstrap-utilities.css",
"RelativeDocumentMoniker": "wwwroot\\lib\\bootstrap\\dist\\css\\bootstrap-utilities.css",
@ -429,7 +449,7 @@
},
{
"$type": "Document",
"DocumentIndex": 25,
"DocumentIndex": 26,
"Title": "ProjectEntity.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Data\\ProjectEntity.cs",
"RelativeDocumentMoniker": "Data\\ProjectEntity.cs",
@ -441,7 +461,7 @@
},
{
"$type": "Document",
"DocumentIndex": 24,
"DocumentIndex": 25,
"Title": "IProjectService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IProjectService.cs",
"RelativeDocumentMoniker": "Services\\IProjectService.cs",
@ -453,7 +473,7 @@
},
{
"$type": "Document",
"DocumentIndex": 26,
"DocumentIndex": 27,
"Title": "AuthorBuddy.Web.csproj",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\AuthorBuddy.Web.csproj",
"RelativeDocumentMoniker": "AuthorBuddy.Web.csproj",
@ -465,7 +485,7 @@
},
{
"$type": "Document",
"DocumentIndex": 27,
"DocumentIndex": 28,
"Title": "appsettings.json",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\appsettings.json",
"RelativeDocumentMoniker": "appsettings.json",

View file

@ -3,13 +3,33 @@
"WorkspaceRootPath": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\pages\\ollamaassistant.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\pages\\ollamaassistant.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\layout\\mainlayout.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\layout\\mainlayout.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\settingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\isettingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\isettingsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@ -26,14 +46,6 @@
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\filescannerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\filescannerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:models\\ollamasettings.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\ollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\models\\project.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:models\\project.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@ -58,14 +70,6 @@
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Data\\AppDbContext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Data\\AppDbContext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\iollamaservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:components\\pages\\settings.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}"
},
{
"AbsoluteMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|e:\\ollama_net\\ollama\\authorbuddy.web\\services\\themeservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4F4697EF-EFFA-26AC-C8A1-C9859805D247}|AuthorBuddy.Web.csproj|solutionrelative:services\\themeservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@ -122,7 +126,7 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 4,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Bookmark",
@ -132,60 +136,22 @@
"$type": "Bookmark",
"Name": "RST:0:0:{b3f9f954-0ca5-0091-76b4-34a47f44c954}"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Program.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeDocumentMoniker": "Program.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeToolTip": "Program.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAApwBoAAAANAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-20T04:07:21.54Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "ISettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs",
"RelativeDocumentMoniker": "Services\\ISettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs",
"RelativeToolTip": "Services\\ISettingsService.cs",
"ViewState": "AgIAABoAAAAAAAAAAAA8wCYAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T13:21:26.951Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "SettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeDocumentMoniker": "Services\\SettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeToolTip": "Services\\SettingsService.cs",
"ViewState": "AgIAADcBAAAAAAAAAAAQwEoBAAAIAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:05:12.928Z",
"Title": "OllamaAssistant.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\OllamaAssistant.razor",
"RelativeDocumentMoniker": "Components\\Pages\\OllamaAssistant.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\OllamaAssistant.razor*",
"RelativeToolTip": "Components\\Pages\\OllamaAssistant.razor*",
"ViewState": "AgIAAAkAAAAAAAAAAAAAABEAAABsAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-20T05:14:39.037Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "RagService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeDocumentMoniker": "Services\\RagService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeToolTip": "Services\\RagService.cs",
"ViewState": "AgIAABIAAAAAAAAAAAAxwBoAAAAIAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-18T15:40:05.413Z"
},
{
"$type": "Document",
"DocumentIndex": 8,
"DocumentIndex": 11,
"Title": "Project.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\Project.cs",
"RelativeDocumentMoniker": "Models\\Project.cs",
@ -203,27 +169,27 @@
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor",
"RelativeToolTip": "Components\\Layout\\MainLayout.razor",
"ViewState": "AgIAALUAAAAAAAAAAAApwM4AAABAAAAAAAAAAA==",
"ViewState": "AgIAAH8AAAAAAAAAAAApwJMAAAAyAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:04:36.444Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 6,
"DocumentIndex": 4,
"Title": "OllamaSettings.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\OllamaSettings.cs",
"RelativeDocumentMoniker": "Models\\OllamaSettings.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\OllamaSettings.cs",
"RelativeToolTip": "Models\\OllamaSettings.cs",
"ViewState": "AgIAAAIAAAAAAAAAAAAxwAUAAAA+AAAAAAAAAA==",
"ViewState": "AgIAAAYAAAAAAAAAAAAkwBQAAAASAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T13:39:46.179Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 13,
"DocumentIndex": 16,
"Title": "AppDbContext.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Data\\AppDbContext.cs",
"RelativeDocumentMoniker": "Data\\AppDbContext.cs",
@ -234,7 +200,7 @@
},
{
"$type": "Document",
"DocumentIndex": 5,
"DocumentIndex": 10,
"Title": "FileScannerService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\FileScannerService.cs",
"RelativeDocumentMoniker": "Services\\FileScannerService.cs",
@ -247,7 +213,97 @@
},
{
"$type": "Document",
"DocumentIndex": 10,
"DocumentIndex": 5,
"Title": "IOllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeDocumentMoniker": "Services\\IOllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeToolTip": "Services\\IOllamaService.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAqwAkAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T07:20:19.212Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Settings.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Settings.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAAAwAAAAAAAAAAAAAAIYAAAAlAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "SettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeDocumentMoniker": "Services\\SettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\SettingsService.cs",
"RelativeToolTip": "Services\\SettingsService.cs",
"ViewState": "AgIAAEUBAAAAAAAAAAAQwFwBAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:05:12.928Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "OllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeDocumentMoniker": "Services\\OllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeToolTip": "Services\\OllamaService.cs",
"ViewState": "AgIAAFkAAAAAAAAAAAAqwGsAAAAeAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:43:46.404Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 12,
"Title": "RagService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeDocumentMoniker": "Services\\RagService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\RagService.cs",
"RelativeToolTip": "Services\\RagService.cs",
"ViewState": "AgIAABIAAAAAAAAAAAAxwBoAAAAIAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-18T15:40:05.413Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "ISettingsService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs",
"RelativeDocumentMoniker": "Services\\ISettingsService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ISettingsService.cs",
"RelativeToolTip": "Services\\ISettingsService.cs",
"ViewState": "AgIAABoAAAAAAAAAAAA8wCoAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T13:21:26.951Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "Program.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeDocumentMoniker": "Program.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Program.cs",
"RelativeToolTip": "Program.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAApwBoAAAANAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-20T04:07:21.54Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 13,
"Title": "IRagService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IRagService.cs",
"RelativeDocumentMoniker": "Services\\IRagService.cs",
@ -259,7 +315,7 @@
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 9,
"Title": "ProjectService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ProjectService.cs",
"RelativeDocumentMoniker": "Services\\ProjectService.cs",
@ -272,19 +328,7 @@
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "OllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeDocumentMoniker": "Services\\OllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\OllamaService.cs",
"RelativeToolTip": "Services\\OllamaService.cs",
"ViewState": "AgIAAHoAAAAAAAAAAAAcwCoAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T06:43:46.404Z"
},
{
"$type": "Document",
"DocumentIndex": 12,
"DocumentIndex": 15,
"Title": "NavMenu.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\NavMenu.razor",
"RelativeDocumentMoniker": "Components\\Layout\\NavMenu.razor",
@ -296,20 +340,20 @@
},
{
"$type": "Document",
"DocumentIndex": 11,
"DocumentIndex": 14,
"Title": "Editor.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Editor.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Editor.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Editor.razor",
"RelativeToolTip": "Components\\Pages\\Editor.razor",
"ViewState": "AgIAAAoAAACA6NuCpTYvwJkAAAAcAAAAAAAAAA==",
"ViewState": "AgIAAAoAAACA6NuCpTYvwKAAAAAcAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-16T13:01:59.743Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 16,
"DocumentIndex": 17,
"Title": "ThemeService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\ThemeService.cs",
"RelativeDocumentMoniker": "Services\\ThemeService.cs",
@ -321,31 +365,7 @@
},
{
"$type": "Document",
"DocumentIndex": 15,
"Title": "Settings.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Settings.razor",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Settings.razor",
"RelativeToolTip": "Components\\Pages\\Settings.razor",
"ViewState": "AgIAAHMAAAAAAAAAAADwv4UAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
"WhenOpened": "2026-05-15T16:43:26.6Z"
},
{
"$type": "Document",
"DocumentIndex": 14,
"Title": "IOllamaService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeDocumentMoniker": "Services\\IOllamaService.cs",
"ToolTip": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IOllamaService.cs",
"RelativeToolTip": "Services\\IOllamaService.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAqwAkAAAAPAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-05-16T07:20:19.212Z"
},
{
"$type": "Document",
"DocumentIndex": 17,
"DocumentIndex": 18,
"Title": "App.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\App.razor",
"RelativeDocumentMoniker": "Components\\App.razor",
@ -357,7 +377,7 @@
},
{
"$type": "Document",
"DocumentIndex": 20,
"DocumentIndex": 21,
"Title": "Models.razor",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Pages\\Models.razor",
"RelativeDocumentMoniker": "Components\\Pages\\Models.razor",
@ -369,7 +389,7 @@
},
{
"$type": "Document",
"DocumentIndex": 18,
"DocumentIndex": 19,
"Title": "LLM_Model.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\LLM_Model.cs",
"RelativeDocumentMoniker": "Models\\LLM_Model.cs",
@ -381,7 +401,7 @@
},
{
"$type": "Document",
"DocumentIndex": 19,
"DocumentIndex": 20,
"Title": "ModelStatus.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Models\\ModelStatus.cs",
"RelativeDocumentMoniker": "Models\\ModelStatus.cs",
@ -393,7 +413,7 @@
},
{
"$type": "Document",
"DocumentIndex": 23,
"DocumentIndex": 24,
"Title": "MainLayout.razor.css",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Components\\Layout\\MainLayout.razor.css",
"RelativeDocumentMoniker": "Components\\Layout\\MainLayout.razor.css",
@ -405,7 +425,7 @@
},
{
"$type": "Document",
"DocumentIndex": 21,
"DocumentIndex": 22,
"Title": "IFileScannerService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IFileScannerService.cs",
"RelativeDocumentMoniker": "Services\\IFileScannerService.cs",
@ -417,7 +437,7 @@
},
{
"$type": "Document",
"DocumentIndex": 22,
"DocumentIndex": 23,
"Title": "bootstrap-utilities.css",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\wwwroot\\lib\\bootstrap\\dist\\css\\bootstrap-utilities.css",
"RelativeDocumentMoniker": "wwwroot\\lib\\bootstrap\\dist\\css\\bootstrap-utilities.css",
@ -429,7 +449,7 @@
},
{
"$type": "Document",
"DocumentIndex": 25,
"DocumentIndex": 26,
"Title": "ProjectEntity.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Data\\ProjectEntity.cs",
"RelativeDocumentMoniker": "Data\\ProjectEntity.cs",
@ -441,7 +461,7 @@
},
{
"$type": "Document",
"DocumentIndex": 24,
"DocumentIndex": 25,
"Title": "IProjectService.cs",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\Services\\IProjectService.cs",
"RelativeDocumentMoniker": "Services\\IProjectService.cs",
@ -453,7 +473,7 @@
},
{
"$type": "Document",
"DocumentIndex": 26,
"DocumentIndex": 27,
"Title": "AuthorBuddy.Web.csproj",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\AuthorBuddy.Web.csproj",
"RelativeDocumentMoniker": "AuthorBuddy.Web.csproj",
@ -465,7 +485,7 @@
},
{
"$type": "Document",
"DocumentIndex": 27,
"DocumentIndex": 28,
"Title": "appsettings.json",
"DocumentMoniker": "E:\\ollama_net\\ollama\\AuthorBuddy.Web\\appsettings.json",
"RelativeDocumentMoniker": "appsettings.json",

View file

@ -11,54 +11,54 @@
<div class="nav-section">
<button class="nav-section-header" @onclick='() => ToggleSection("file")'>
<span class="nav-icon">@(activeSection == "file" ? "▼" : "▶")</span>
Datei
@T("Datei", "File")
</button>
@if (activeSection == "file")
{
<div class="nav-section-body">
<button class="nav-item" @onclick="CreateNewProject">Neues Projekt</button>
<button class="nav-item" @onclick="OpenEditor">Editor öffnen</button>
<button class="nav-item" @onclick="CreateNewProject">@T("Neues Projekt", "New project")</button>
<button class="nav-item" @onclick="OpenEditor">@T("Editor \u00f6ffnen", "Open editor")</button>
<div class="nav-separator"></div>
<button class="nav-item" @onclick="ExitApp">Beenden</button>
<button class="nav-item" @onclick="ExitApp">@T("Beenden", "Exit")</button>
</div>
}
</div>
<div class="nav-section">
<button class="nav-section-header" @onclick='() => ToggleSection("extras")'>
<span class="nav-icon">@(activeSection == "extras" ? "▼" : "▶")</span>
Extras
@T("Extras", "Extras")
</button>
@if (activeSection == "extras")
{
<div class="nav-section-body">
<button class="nav-item" @onclick='() => NavigateTo("/settings")'>Einstellungen</button>
<button class="nav-item" @onclick='() => NavigateTo("/models")'>Modelle verwalten</button>
<button class="nav-item" @onclick='() => NavigateTo("/assistant")'>Assistent</button>
<button class="nav-item" @onclick='() => NavigateTo("/settings")'>@T("Einstellungen", "Settings")</button>
<button class="nav-item" @onclick='() => NavigateTo("/models")'>@T("Modelle verwalten", "Manage models")</button>
<button class="nav-item" @onclick='() => NavigateTo("/assistant")'>@T("Assistent", "Assistant")</button>
</div>
}
</div>
<div class="nav-section">
<button class="nav-section-header" @onclick='() => ToggleSection("projects")'>
<span class="nav-icon">@(activeSection == "projects" ? "▼" : "▶")</span>
Projekte
@T("Projekte", "Projects")
</button>
@if (activeSection == "projects")
{
<div class="nav-section-body">
<button class="nav-item nav-item-toggle" @onclick='() => showProjectList = !showProjectList'>
<span class="nav-icon">@(showProjectList ? "▼" : "▶")</span>
Liste vorhandener Projekte
@T("Liste vorhandener Projekte", "List existing projects")
</button>
@if (showProjectList)
{
<div class="nav-sublist">
@if (projects == null)
{
<span class="nav-hint">Lade Projekte...</span>
<span class="nav-hint">@T("Lade Projekte...", "Loading projects...")</span>
}
else if (projects.Count == 0)
{
<span class="nav-hint">Keine Projekte vorhanden.</span>
<span class="nav-hint">@T("Keine Projekte vorhanden.", "No projects available.")</span>
}
else
{
@ -70,7 +70,7 @@
</div>
}
<div class="nav-separator"></div>
<button class="nav-item" @onclick="CreateNewProject">Projekt erstellen</button>
<button class="nav-item" @onclick="CreateNewProject">@T("Projekt erstellen", "Create project")</button>
</div>
}
</div>
@ -78,9 +78,9 @@
{
<div class="nav-section nav-section-open">
<div class="nav-section-header">
<span>Projektdateien</span>
<span>@T("Projektdateien", "Project files")</span>
<span class="nav-header-actions">
<button class="nav-item-icon" @onclick="RefreshFileTree" title="Dateibaum aktualisieren">↻</button>
<button class="nav-item-icon" @onclick="RefreshFileTree" title="@T("Dateibaum aktualisieren", "Refresh file tree")">↻</button>
</span>
</div>
<div class="nav-section-body">
@ -92,11 +92,11 @@
<span class="tree-name">@item.Name</span>
@if (item.IsDirectory)
{
<button class="tree-rename" @onclick="() => BeginNewFile(item)" @onclick:stopPropagation title="Neue Datei">+</button>
<button class="tree-rename" @onclick="() => BeginNewFile(item)" @onclick:stopPropagation title="@T("Neue Datei", "New file")">+</button>
}
else
{
<button class="tree-rename" @onclick="() => BeginRename(item)" @onclick:stopPropagation title="Umbenennen">✎</button>
<button class="tree-rename" @onclick="() => BeginRename(item)" @onclick:stopPropagation title="@T("Umbenennen", "Rename")">✎</button>
}
</div>
@foreach (var child in item.Children)
@ -105,7 +105,7 @@
@onclick="() => OpenFile(child)">
<span class="tree-icon">📄</span>
<span class="tree-name">@child.Name</span>
<button class="tree-rename" @onclick="() => BeginRename(child)" @onclick:stopPropagation title="Umbenennen">✎</button>
<button class="tree-rename" @onclick="() => BeginRename(child)" @onclick:stopPropagation title="@T("Umbenennen", "Rename")">✎</button>
</div>
}
}
@ -117,16 +117,16 @@
{
<div class="modal-overlay">
<div class="modal-dialog">
<div class="modal-title">Datei umbenennen</div>
<div class="modal-title">@T("Datei umbenennen", "Rename file")</div>
<div class="modal-body">
<div class="form-group">
<label>Neuer Name</label>
<input @bind="renameNewName" placeholder="neuer_name.md" />
<label>@T("Neuer Name", "New name")</label>
<input @bind="renameNewName" placeholder="@T("neuer_name.md", "new_name.md")" />
</div>
</div>
<div class="modal-actions">
<button @onclick="CancelRename">Abbrechen</button>
<button @onclick="ConfirmRename" disabled="@(string.IsNullOrWhiteSpace(renameNewName))" class="primary">Umbenennen</button>
<button @onclick="CancelRename">@T("Abbrechen", "Cancel")</button>
<button @onclick="ConfirmRename" disabled="@(string.IsNullOrWhiteSpace(renameNewName))" class="primary">@T("Umbenennen", "Rename")</button>
</div>
</div>
</div>
@ -136,16 +136,16 @@
{
<div class="modal-overlay">
<div class="modal-dialog">
<div class="modal-title">Neue Datei</div>
<div class="modal-title">@T("Neue Datei", "New file")</div>
<div class="modal-body">
<div class="form-group">
<label>Dateiname</label>
<input @bind="newFileName" placeholder="meine_datei.md" />
<label>@T("Dateiname", "Filename")</label>
<input @bind="newFileName" placeholder="@T("meine_datei.md", "my_file.md")" />
</div>
</div>
<div class="modal-actions">
<button @onclick="CancelNewFile">Abbrechen</button>
<button @onclick="ConfirmNewFile" disabled="@(string.IsNullOrWhiteSpace(newFileName))" class="primary">Erstellen</button>
<button @onclick="CancelNewFile">@T("Abbrechen", "Cancel")</button>
<button @onclick="ConfirmNewFile" disabled="@(string.IsNullOrWhiteSpace(newFileName))" class="primary">@T("Erstellen", "Create")</button>
</div>
</div>
</div>
@ -168,6 +168,7 @@
</div>
@code {
private string _language = "de";
private string? activeSection;
private bool showProjectList;
private List<Project>? projects;
@ -184,12 +185,16 @@
private string newFileName = string.Empty;
private FileTreeItem? newFileParentDir;
private string T(string de, string en) => _language == "en" ? en : de;
[Inject]
private NavigationManager Navigation { get; set; } = default!;
protected override async Task OnInitializedAsync()
{
await SettingsService.InitializeAsync();
_language = await SettingsService.GetLanguageAsync() ?? "de";
statusText = T("Bereit", "Ready");
Navigation.LocationChanged += OnLocationChanged;
await LoadProjects();
await LoadProjectContext();
@ -341,7 +346,7 @@
var newPath = Path.Combine(dir, renameNewName);
if (File.Exists(newPath))
{
statusText = "Datei existiert bereits.";
statusText = T("Datei existiert bereits.", "File already exists.");
return;
}
File.Move(renameTarget.FullPath, newPath);
@ -349,11 +354,11 @@
if (currentFilePath == renameTarget.FullPath)
SettingsService.CurrentFilePath = newPath;
statusText = $"Umbenannt zu: {renameNewName}";
statusText = $"{T("Umbenannt zu:", "Renamed to:")} {renameNewName}";
}
catch (Exception ex)
{
statusText = $"Fehler: {ex.Message}";
statusText = $"{T("Fehler:", "Error:")} {ex.Message}";
}
finally
{
@ -390,15 +395,15 @@
path += ".md";
if (File.Exists(path))
{
statusText = "Datei existiert bereits.";
statusText = T("Datei existiert bereits.", "File already exists.");
return;
}
File.WriteAllText(path, $"# {Path.GetFileNameWithoutExtension(path)}\n\n");
statusText = $"Erstellt: {Path.GetFileName(path)}";
statusText = $"{T("Erstellt:", "Created:")} {Path.GetFileName(path)}";
}
catch (Exception ex)
{
statusText = $"Fehler: {ex.Message}";
statusText = $"{T("Fehler:", "Error:")} {ex.Message}";
}
finally
{

View file

@ -11,10 +11,10 @@
@implements IDisposable
@rendermode InteractiveServer
<PageTitle>Editor - Author Buddy</PageTitle>
<PageTitle>@T("Editor - Author Buddy", "Editor - Author Buddy")</PageTitle>
<div class="editor-page">
<textarea class="editor-area" @bind="editorContent" placeholder="Schreibe hier deinen Text..."></textarea>
<textarea class="editor-area" @bind="editorContent" placeholder="@T("Schreibe hier deinen Text...", "Write your text here...")"></textarea>
<div class="editor-toolbar">
<span style="flex: 1; font-size: 12px; color: var(--border-color);">
@ -24,37 +24,38 @@
{
<progress value="@checkProgress" max="100"></progress>
}
<button @onclick="CheckStyle" disabled="@isChecking">Stil prüfen</button>
<button @onclick="SpellCheck" disabled="@isChecking">Rechtschreibung prüfen</button>
<button @onclick="SaveCurrentFile" disabled="@(string.IsNullOrEmpty(currentFile))">Speichern</button>
<button @onclick="ShowVersionDialog" disabled="@(string.IsNullOrEmpty(currentFile))">Version</button>
<button @onclick="IndexProject" disabled="@isChecking">Projekt indexieren</button>
<button @onclick="CheckStyle" disabled="@isChecking">@T("Stil pr\u00fcfen", "Check style")</button>
<button @onclick="SpellCheck" disabled="@isChecking">@T("Rechtschreibung pr\u00fcfen", "Spell check")</button>
<button @onclick="SaveCurrentFile" disabled="@(string.IsNullOrEmpty(currentFile))">@T("Speichern", "Save")</button>
<button @onclick="ShowVersionDialog" disabled="@(string.IsNullOrEmpty(currentFile))">@T("Version", "Version")</button>
<button @onclick="OpenAssistant">@T("Assistent", "Assistant")</button>
<button @onclick="IndexProject" disabled="@isChecking">@T("Projekt indexieren", "Index project")</button>
</div>
@if (showVersionDialog)
{
<div class="modal-overlay">
<div class="modal-dialog">
<div class="modal-title">Version speichern</div>
<div class="modal-title">@T("Version speichern", "Save version")</div>
<div class="modal-body">
<div class="form-group">
<label>Kommentar (optional)</label>
<input @bind="versionComment" placeholder="Was hat sich geandert?" />
<label>@T("Kommentar (optional)", "Comment (optional)")</label>
<input @bind="versionComment" placeholder="@T("Was hat sich ge\u00e4ndert?", "What changed?")" />
</div>
</div>
<div class="modal-actions">
<button @onclick="() => showVersionDialog = false">Abbrechen</button>
<button @onclick="SaveVersioned" class="primary">Version speichern</button>
<button @onclick="() => showVersionDialog = false">@T("Abbrechen", "Cancel")</button>
<button @onclick="SaveVersioned" class="primary">@T("Version speichern", "Save version")</button>
</div>
</div>
</div>
}
<div class="search-section">
<input value="@searchQuery" @oninput="HandleSearchInput" placeholder="Suchbegriff für Fakten-/Wikipedia-Recherche..."
<input value="@searchQuery" @oninput="HandleSearchInput" placeholder="@T("Suchbegriff f\u00fcr Fakten-/Wikipedia-Recherche...", "Search term for fact/Wikipedia research...")"
disabled="@isChecking" />
<button @onclick="RagSearch" disabled=@buttonDisabled>Fakten suchen (RAG)</button>
<button @onclick="SearchWikipedia" disabled=@buttonDisabled>Wikipedia-Recherche</button>
<button @onclick="RagSearch" disabled=@buttonDisabled>@T("Fakten suchen (RAG)", "Search facts (RAG)")</button>
<button @onclick="SearchWikipedia" disabled=@buttonDisabled>@T("Wikipedia-Recherche", "Wikipedia research")</button>
</div>
<div style="display:none">@searchQuery</div>
@ -62,7 +63,7 @@
{
<div class="results-area">
<div class="diff-panel">
<h4>Rechtschreibprüfung - Änderungen:</h4>
<h4>@T("Rechtschreibpr\u00fcfung - \u00c4nderungen:", "Spell check - Changes:")</h4>
<DiffView Original="@originalText" Corrected="@correctedText" />
</div>
</div>
@ -70,11 +71,11 @@
else if (ragResults != null && ragResults.Count > 0)
{
<div class="results-area">
<h4>Gefundene Fakten (RAG):</h4>
<h4>@T("Gefundene Fakten (RAG):", "Found facts (RAG):")</h4>
@foreach (var r in ragResults)
{
<div class="fact-card">
<div class="fact-similarity">Ähnlichkeit: @r.Similarity.ToString("P1")</div>
<div class="fact-similarity">@T("\u00c4hnlichkeit:", "Similarity:") @r.Similarity.ToString("P1")</div>
<div class="fact-path">@r.FilePath</div>
<div class="fact-text">@r.Text</div>
</div>
@ -84,7 +85,7 @@
else if (wikipediaResults != null && wikipediaResults.Count > 0)
{
<div class="results-area">
<h4>Wikipedia-Recherche:</h4>
<h4>@T("Wikipedia-Recherche:", "Wikipedia research:")</h4>
@foreach (var r in wikipediaResults)
{
<div class="fact-card">
@ -99,10 +100,12 @@
}
<div class="fact-actions">
<button @onclick="() => LoadFullArticle(r)" disabled="@(loadedArticles.ContainsKey(r.Url))">
@(loadedArticles.ContainsKey(r.Url) ? "✓ Geladen" : "Vollständigen Artikel laden")
@(loadedArticles.ContainsKey(r.Url)
? T("✓ Geladen", "✓ Loaded")
: T("Vollst\u00e4ndigen Artikel laden", "Load full article"))
</button>
<button @onclick="() => SaveAsFact(r)" disabled="@(string.IsNullOrWhiteSpace(r.Extract) || currentProjectId == 0)">
Als Fakt speichern
@T("Als Fakt speichern", "Save as fact")
</button>
</div>
</div>
@ -112,7 +115,7 @@
else if (!string.IsNullOrEmpty(analysisResult))
{
<div class="results-area">
<h4>Ergebnis:</h4>
<h4>@T("Ergebnis:", "Result:")</h4>
<div class="result-text">@analysisResult</div>
</div>
}
@ -122,26 +125,30 @@
{
<div class="modal-overlay">
<div class="modal-dialog">
<div class="modal-title">Neues Projekt erstellen</div>
<div class="modal-title">@T("Neues Projekt erstellen", "Create new project")</div>
<div class="modal-body">
<div class="form-group">
<label>Projektname</label>
<input @bind="newProjectName" placeholder="z.B. Mein Roman" />
<label>@T("Projektname", "Project name")</label>
<input @bind="newProjectName" placeholder="@T("z.B. Mein Roman", "e.g. My novel")" />
</div>
<div class="form-group">
<label>Projektpfad</label>
<input @bind="newProjectPath" placeholder="z.B. C:\Projekte\MeinRoman" />
<label>@T("Projektpfad", "Project path")</label>
<input @bind="newProjectPath" placeholder="@T("z.B. C:\\Projekte\\MeinRoman", "e.g. C:\\Projects\\MyNovel")" />
</div>
</div>
<div class="modal-actions">
<button @onclick="CancelCreateProject">Abbrechen</button>
<button @onclick="CreateProject" disabled="@(() => string.IsNullOrWhiteSpace(newProjectName) || string.IsNullOrWhiteSpace(newProjectPath))" class="primary">Erstellen</button>
<button @onclick="CancelCreateProject">@T("Abbrechen", "Cancel")</button>
<button @onclick="CreateProject" disabled="@(() => string.IsNullOrWhiteSpace(newProjectName) || string.IsNullOrWhiteSpace(newProjectPath))" class="primary">@T("Erstellen", "Create")</button>
</div>
</div>
</div>
}
@code {
private string _language = "de";
private string T(string de, string en) => _language == "en" ? en : de;
[Parameter]
public string? Action { get; set; }
@ -150,7 +157,7 @@
private string editorContent = string.Empty;
private string searchQuery = string.Empty;
private string statusText = "Bereit";
private string statusText = string.Empty;
private bool isChecking;
private bool buttonDisabled;
private double checkProgress;
@ -175,9 +182,21 @@
protected override async Task OnInitializedAsync()
{
_language = await SettingsService.GetLanguageAsync() ?? "de";
statusText = T("Bereit", "Ready");
Navigation.LocationChanged += OnLocationChanged;
await LoadProjectContext();
var pendingOutput = SettingsService.PendingAssistantOutput;
if (!string.IsNullOrEmpty(pendingOutput))
{
SettingsService.PendingAssistantOutput = null;
editorContent = pendingOutput;
statusText = T("Text aus Assistent \u00fcbernommen.", "Text imported from assistant.");
}
if (string.Equals(Action, "newproject", StringComparison.OrdinalIgnoreCase))
{
showCreateDialog = true;
@ -195,6 +214,12 @@
Navigation.LocationChanged -= OnLocationChanged;
}
private void OpenAssistant()
{
SettingsService.PendingAssistantInput = editorContent;
Navigation.NavigateTo("/assistant");
}
private void HandleSearchInput(ChangeEventArgs e)
{
searchQuery = e.Value?.ToString() ?? string.Empty;
@ -222,7 +247,7 @@
{
currentFile = filePath;
editorContent = await File.ReadAllTextAsync(filePath);
statusText = $"Geladen: {Path.GetFileName(filePath)}";
statusText = $"{T("Geladen:", "Loaded:")} {Path.GetFileName(filePath)}";
RefreshLatestVersion();
}
}
@ -232,7 +257,7 @@
if (string.IsNullOrWhiteSpace(editorContent)) return;
isChecking = true;
statusText = "Ollama analysiert Stil...";
statusText = T("Ollama analysiert Stil...", "Ollama analyzing style...");
checkProgress = 50;
showSpellDiff = false;
ragResults = null;
@ -240,15 +265,14 @@
try
{
//analysisResult = await OllamaService.StreamStyleCheckAsync(editorContent);
}
catch (Exception ex)
{
analysisResult = $"Fehler: {ex.Message}";
analysisResult = $"{T("Fehler:", "Error:")} {ex.Message}";
}
finally
{
statusText = "Bereit";
statusText = T("Bereit", "Ready");
isChecking = false;
checkProgress = 0;
}
@ -259,7 +283,7 @@
if (string.IsNullOrWhiteSpace(editorContent)) return;
isChecking = true;
statusText = "Ollama prüft Rechtschreibung...";
statusText = T("Ollama pr\u00fcft Rechtschreibung...", "Ollama checking spelling...");
checkProgress = 50;
showSpellDiff = false;
ragResults = null;
@ -273,11 +297,11 @@
}
catch (Exception ex)
{
analysisResult = $"Fehler: {ex.Message}";
analysisResult = $"{T("Fehler:", "Error:")} {ex.Message}";
}
finally
{
statusText = "Bereit";
statusText = T("Bereit", "Ready");
isChecking = false;
checkProgress = 0;
}
@ -288,7 +312,7 @@
if (string.IsNullOrWhiteSpace(searchQuery)) return;
isChecking = true;
statusText = "Suche verwandte Fakten...";
statusText = T("Suche verwandte Fakten...", "Searching related facts...");
showSpellDiff = false;
analysisResult = string.Empty;
ragResults = null;
@ -298,7 +322,7 @@
{
if (currentProjectId == 0)
{
analysisResult = "Kein Projekt geladen. Öffne zuerst ein Projekt über die Sidebar.";
analysisResult = T("Kein Projekt geladen. \u00d6ffne zuerst ein Projekt \u00fcber die Sidebar.", "No project loaded. Open a project via the sidebar first.");
return;
}
@ -306,16 +330,16 @@
if (ragResults.Count == 0)
{
analysisResult = "Keine relevanten Fakten gefunden. Indexiere das Projekt ggf. über 'Projekt indexieren'.";
analysisResult = T("Keine relevanten Fakten gefunden. Indexiere das Projekt ggf. \u00fcber 'Projekt indexieren'.", "No relevant facts found. Index the project if needed via 'Index project'.");
}
}
catch (Exception ex)
{
analysisResult = $"RAG-Fehler: {ex.Message}";
analysisResult = $"{T("RAG-Fehler:", "RAG error:")} {ex.Message}";
}
finally
{
statusText = "Bereit";
statusText = T("Bereit", "Ready");
isChecking = false;
}
}
@ -325,7 +349,7 @@
if (string.IsNullOrWhiteSpace(searchQuery)) return;
isChecking = true;
statusText = "Suche auf Wikipedia...";
statusText = T("Suche auf Wikipedia...", "Searching Wikipedia...");
showSpellDiff = false;
analysisResult = string.Empty;
ragResults = null;
@ -352,22 +376,22 @@
}
if (wikipediaResults.Count == 0)
analysisResult = "Keine Wikipedia-Artikel gefunden.";
analysisResult = T("Keine Wikipedia-Artikel gefunden.", "No Wikipedia articles found.");
}
catch (Exception ex)
{
analysisResult = $"Wikipedia-Fehler: {ex.Message}";
analysisResult = $"{T("Wikipedia-Fehler:", "Wikipedia error:")} {ex.Message}";
}
finally
{
statusText = "Bereit";
statusText = T("Bereit", "Ready");
isChecking = false;
}
}
private async Task LoadFullArticle(WikipediaResult result)
{
statusText = $"Lade Artikel: {result.Title}...";
statusText = $"{T("Lade Artikel:", "Loading article:")} {result.Title}...";
try
{
@ -376,16 +400,16 @@
{
result.Extract = fullText;
loadedArticles[result.Url] = true;
statusText = "Artikel geladen.";
statusText = T("Artikel geladen.", "Article loaded.");
}
else
{
statusText = "Konnte Artikel nicht laden.";
statusText = T("Konnte Artikel nicht laden.", "Could not load article.");
}
}
catch (Exception ex)
{
statusText = $"Fehler: {ex.Message}";
statusText = $"{T("Fehler:", "Error:")} {ex.Message}";
}
}
@ -393,7 +417,7 @@
{
if (string.IsNullOrWhiteSpace(result.Extract) || currentProjectId == 0) return;
statusText = "Speichere als Fakt...";
statusText = T("Speichere als Fakt...", "Saving as fact...");
try
{
@ -401,7 +425,7 @@
var project = projects.FirstOrDefault(p => p.Id == currentProjectId);
if (project == null)
{
statusText = "Projekt nicht gefunden.";
statusText = T("Projekt nicht gefunden.", "Project not found.");
return;
}
@ -418,11 +442,11 @@
result.Extract;
await File.WriteAllTextAsync(filePath, content);
statusText = $"Gespeichert als: {safeName}.md";
statusText = $"{T("Gespeichert als:", "Saved as:")} {safeName}.md";
}
catch (Exception ex)
{
statusText = $"Fehler beim Speichern: {ex.Message}";
statusText = $"{T("Fehler beim Speichern:", "Error saving:")} {ex.Message}";
}
}
@ -444,7 +468,7 @@
if (string.IsNullOrWhiteSpace(newProjectName) || string.IsNullOrWhiteSpace(newProjectPath)) return;
isChecking = true;
statusText = "Erstelle Projekt...";
statusText = T("Erstelle Projekt...", "Creating project...");
try
{
@ -457,12 +481,12 @@
}
catch (Exception ex)
{
analysisResult = $"Fehler beim Erstellen: {ex.Message}";
analysisResult = $"{T("Fehler beim Erstellen:", "Error creating:")} {ex.Message}";
}
finally
{
isChecking = false;
statusText = "Bereit";
statusText = T("Bereit", "Ready");
}
}
@ -470,12 +494,12 @@
{
if (currentProjectId == 0)
{
analysisResult = "Kein Projekt geladen. Offne zuerst ein Projekt uber die Sidebar.";
analysisResult = T("Kein Projekt geladen. \u00d6ffne zuerst ein Projekt \u00fcber die Sidebar.", "No project loaded. Open a project via the sidebar first.");
return;
}
isChecking = true;
statusText = "Indexiere Projekt...";
statusText = T("Indexiere Projekt...", "Indexing project...");
analysisResult = string.Empty;
ragResults = null;
@ -485,7 +509,7 @@
var project = projects.FirstOrDefault(p => p.Id == currentProjectId);
if (project == null)
{
analysisResult = "Projekt nicht gefunden.";
analysisResult = T("Projekt nicht gefunden.", "Project not found.");
return;
}
@ -496,15 +520,15 @@
});
await RagService.IndexProjectAsync(currentProjectId, project.RootPath, p);
analysisResult = "Projekt erfolgreich indexiert.";
analysisResult = T("Projekt erfolgreich indexiert.", "Project indexed successfully.");
}
catch (Exception ex)
{
analysisResult = $"Indexierungsfehler: {ex.Message}";
analysisResult = $"{T("Indexierungsfehler:", "Indexing error:")} {ex.Message}";
}
finally
{
statusText = "Bereit";
statusText = T("Bereit", "Ready");
isChecking = false;
}
}
@ -513,7 +537,7 @@
{
if (string.IsNullOrEmpty(currentFile)) return;
await File.WriteAllTextAsync(currentFile, editorContent);
statusText = $"Gespeichert: {Path.GetFileName(currentFile)}";
statusText = $"{T("Gespeichert:", "Saved:")} {Path.GetFileName(currentFile)}";
}
private void ShowVersionDialog()
@ -540,7 +564,7 @@
var meta = $"Kommentar: {versionComment}";
await File.WriteAllTextAsync(versionPath + ".meta", meta);
statusText = $"Version gespeichert: {name}_{stamp}{ext}";
statusText = $"{T("Version gespeichert:", "Version saved:")} {name}_{stamp}{ext}";
showVersionDialog = false;
versionComment = string.Empty;
RefreshLatestVersion();
@ -588,11 +612,11 @@
try
{
editorContent = await File.ReadAllTextAsync(latestVersion.FilePath);
statusText = $"Version vom {latestVersion.Timestamp:dd.MM.yyyy HH:mm} geladen.";
statusText = $"{T("Version vom", "Version from")} {latestVersion.Timestamp:dd.MM.yyyy HH:mm} {T("geladen.", "loaded.")}";
}
catch (Exception ex)
{
statusText = $"Fehler: {ex.Message}";
statusText = $"{T("Fehler:", "Error:")} {ex.Message}";
}
}
}

View file

@ -1,18 +1,25 @@
@page "/Error"
@inject ISettingsService SettingsService
@rendermode InteractiveServer
<PageTitle>Fehler</PageTitle>
<PageTitle>@T("Fehler", "Error")</PageTitle>
<h1>Ein Fehler ist aufgetreten</h1>
<p>Entschuldigung, es ist ein unerwarteter Fehler aufgetreten.</p>
<a href="/">Zurück zur Startseite</a>
<h1>@T("Ein Fehler ist aufgetreten", "An error occurred")</h1>
<p>@T("Entschuldigung, es ist ein unerwarteter Fehler aufgetreten.", "Sorry, an unexpected error occurred.")</p>
<a href="/">@T("Zurück zur Startseite", "Back to home")</a>
@code {
private string _language = "de";
private string T(string de, string en) => _language == "en" ? en : de;
[CascadingParameter]
private HttpContext? HttpContext { get; set; }
protected override void OnInitialized()
protected override async Task OnInitializedAsync()
{
_language = await SettingsService.GetLanguageAsync() ?? "de";
if (HttpContext is not null)
{
HttpContext.Response.StatusCode = StatusCodes.Status500InternalServerError;

View file

@ -1,11 +1,13 @@
@page "/"
@inject IOllamaService OllamaService
@inject IProjectService ProjectService
<PageTitle>Dashboard - Author Buddy</PageTitle>
@inject ISettingsService SettingsService
<PageTitle>@T("Dashboard - Author Buddy", "Dashboard - Author Buddy")</PageTitle>
<div class="tab-bar">
<div class="tab @GetTabClass("rag")" @onclick='() => activeTab = "rag"'>Gefundene Fakten (RAG)</div>
<div class="tab @GetTabClass("style")" @onclick='() => activeTab = "style"'>Stil-Analyse</div>
<div class="tab @GetTabClass("rag")" @onclick='() => activeTab = "rag"'>@T("Gefundene Fakten (RAG)", "Found facts (RAG)")</div>
<div class="tab @GetTabClass("style")" @onclick='() => activeTab = "style"'>@T("Stil-Analyse", "Style analysis")</div>
</div>
<div class="tab-content">
@ -13,7 +15,7 @@
{
@if (foundFacts.Count == 0)
{
<p style="color: var(--border-color);">Keine Fakten gefunden. Öffne ein Projekt und scanne die Dateien.</p>
<p style="color: var(--border-color);">@T("Keine Fakten gefunden. Öffne ein Projekt und scanne die Dateien.", "No facts found. Open a project and scan the files.")</p>
}
else
{
@ -30,10 +32,18 @@
</div>
@code {
private string _language = "de";
private string activeTab = "rag";
private List<string> foundFacts = new();
private string styleSuggestions = string.Empty;
private string T(string de, string en) => _language == "en" ? en : de;
protected override async Task OnInitializedAsync()
{
_language = await SettingsService.GetLanguageAsync() ?? "de";
}
private string GetTabClass(string tab)
{
return activeTab == tab ? "active" : "";

View file

@ -1,18 +1,19 @@
@page "/models"
@inject IOllamaService OllamaService
@inject ISettingsService SettingsService
@inject NavigationManager Navigation
<PageTitle>Modelle - Author Buddy</PageTitle>
<PageTitle>@T("Modelle - Author Buddy", "Models - Author Buddy")</PageTitle>
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;">
<h3>Ollama Modelle verwalten</h3>
<button @onclick="RefreshModels" disabled="@isLoading">Aktualisieren</button>
<h3>@T("Ollama Modelle verwalten", "Manage Ollama models")</h3>
<button @onclick="RefreshModels" disabled="@isLoading">@T("Aktualisieren", "Refresh")</button>
</div>
@if (isLoading)
{
<p>Lade Modelle...</p>
<p>@T("Lade Modelle...", "Loading models...")</p>
}
else if (!string.IsNullOrEmpty(errorMessage))
{
@ -26,8 +27,8 @@ else
<div class="model-card">
<div class="model-name">@model.Name</div>
<div class="model-details">
Größe: @FormatSize(model.Size) |
Geändert: @model.ModifiedAt?.ToString("g")
@T("Größe:", "Size:") @FormatSize(model.Size) |
@T("Geändert:", "Modified:") @model.ModifiedAt?.ToString("g")
</div>
</div>
}
@ -35,14 +36,14 @@ else
}
<div style="margin-top: 24px; border-top: 1px solid var(--border-color); padding-top: 16px;">
<h4 style="margin-bottom: 8px;">Neues Modell herunterladen</h4>
<h4 style="margin-bottom: 8px;">@T("Neues Modell herunterladen", "Download new model")</h4>
<div style="display: flex; gap: 8px; align-items: flex-end;">
<div class="form-group" style="flex: 1; margin-bottom: 0;">
<label for="pullModelName">Modellname:</label>
<input id="pullModelName" @bind="modelToPull" placeholder="z.B. llama3.2" />
<label for="pullModelName">@T("Modellname:", "Model name:")</label>
<input id="pullModelName" @bind="modelToPull" placeholder="@T("z.B. llama3.2", "e.g. llama3.2")" />
</div>
<button @onclick="PullModel" disabled="@(isPulling || string.IsNullOrWhiteSpace(modelToPull))">
Herunterladen
@T("Herunterladen", "Download")
</button>
</div>
@if (isPulling)
@ -64,6 +65,7 @@ else
}
@code {
private string _language = "de";
private List<LLM_Model> localModels = new();
private bool isLoading;
private string? errorMessage;
@ -74,8 +76,11 @@ else
private string? pullResult;
private string pullPercentDisplay => $"{pullProgress:F0}%";
private string T(string de, string en) => _language == "en" ? en : de;
protected override async Task OnInitializedAsync()
{
_language = await SettingsService.GetLanguageAsync() ?? "de";
await RefreshModels();
}
@ -91,7 +96,7 @@ else
}
catch (Exception ex)
{
errorMessage = $"Fehler beim Laden der Modelle: {ex.Message}";
errorMessage = $"{T("Fehler beim Laden der Modelle:", "Error loading models:")} {ex.Message}";
localModels = new();
}
finally
@ -106,7 +111,7 @@ else
isPulling = true;
pullProgress = 0;
pullStatus = "Starte Download...";
pullStatus = T("Starte Download...", "Starting download...");
pullResult = null;
try
@ -118,13 +123,13 @@ else
});
await OllamaService.PullModelAsync(modelToPull, progress);
pullResult = $"Modell '{modelToPull}' erfolgreich heruntergeladen.";
pullResult = $"{T("Modell", "Model")} '{modelToPull}' {T("erfolgreich heruntergeladen.", "downloaded successfully.")}";
modelToPull = string.Empty;
await RefreshModels();
}
catch (Exception ex)
{
pullResult = $"Fehler: {ex.Message}";
pullResult = $"{T("Fehler:", "Error:")} {ex.Message}";
}
finally
{
@ -134,7 +139,7 @@ else
private static string FormatSize(long? bytes)
{
if (!bytes.HasValue) return "Unbekannt";
if (!bytes.HasValue) return "---";
if (bytes < 1024 * 1024) return $"{bytes / 1024.0:F1} KB";
if (bytes < 1024 * 1024 * 1024) return $"{bytes / (1024.0 * 1024):F1} MB";
return $"{bytes / (1024.0 * 1024 * 1024):F1} GB";

View file

@ -1,18 +1,25 @@
@page "/not-found"
@inject ISettingsService SettingsService
@rendermode InteractiveServer
<PageTitle>Seite nicht gefunden</PageTitle>
<PageTitle>@T("Seite nicht gefunden", "Page not found")</PageTitle>
<h1>404 - Seite nicht gefunden</h1>
<p>Die angeforderte Seite existiert nicht.</p>
<a href="/">Zurück zur Startseite</a>
<h1>@T("404 - Seite nicht gefunden", "404 - Page not found")</h1>
<p>@T("Die angeforderte Seite existiert nicht.", "The requested page does not exist.")</p>
<a href="/">@T("Zurück zur Startseite", "Back to home")</a>
@code {
private string _language = "de";
private string T(string de, string en) => _language == "en" ? en : de;
[CascadingParameter]
private HttpContext? HttpContext { get; set; }
protected override void OnInitialized()
protected override async Task OnInitializedAsync()
{
_language = await SettingsService.GetLanguageAsync() ?? "de";
if (HttpContext is not null)
{
HttpContext.Response.StatusCode = StatusCodes.Status404NotFound;

View file

@ -5,16 +5,21 @@
@rendermode InteractiveServer
<PageTitle>Assistent - Author Buddy</PageTitle>
<PageTitle>@T("Assistent - Author Buddy", "Assistant - Author Buddy")</PageTitle>
<div class="assistant-page">
<div class="assistant-toolbar">
<select @bind="selectedMode">
<option value="advocatus">Advocatus Diaboli</option>
<option value="hookfinder">Hook-Finder</option>
<option value="eli5">ELI5-Vereinfachung</option>
<option value="lektorat">@T("Lektorat", "Editing")</option>
<option value="advocatus">@T("Advocatus Diaboli", "Advocatus Diaboli")</option>
<option value="hookfinder">@T("Hook-Finder", "Hook finder")</option>
<option value="eli5">@T("ELI5-Vereinfachung", "ELI5 simplification")</option>
</select>
<button @onclick="RunAssistant" disabled="@isRunning || string.IsNullOrWhiteSpace(inputText)">Ausführen</button>
<button @onclick="RunAssistant" disabled="@(() => isRunning || string.IsNullOrWhiteSpace(inputText))">@T("Ausführen", "Execute")</button>
@if (!string.IsNullOrEmpty(outputText))
{
<button @onclick="SendToEditor" class="primary">@T("An Editor übermitteln", "Send to editor")</button>
}
<span style="flex:1;font-size:12px;color:var(--border-color);text-align:right;">@statusText</span>
@if (isRunning)
{
@ -24,11 +29,11 @@
<div class="assistant-panels">
<div class="assistant-input-panel">
<h4>Eingabetext</h4>
<textarea class="assistant-textarea" @bind="inputText" placeholder="Füge hier deinen Text ein..."></textarea>
<h4>@T("Eingabetext", "Input text")</h4>
<textarea class="assistant-textarea" @bind="inputText" placeholder="@T("Füge hier deinen Text ein...", "Paste your text here...")"></textarea>
</div>
<div class="assistant-output-panel">
<h4>Ergebnis</h4>
<h4>@T("Ergebnis", "Result")</h4>
<div class="assistant-output">
@if (!string.IsNullOrEmpty(outputText))
{
@ -40,7 +45,7 @@
}
else
{
<span class="assistant-hint">Ergebnis erscheint hier nach der Ausführung.</span>
<span class="assistant-hint">@T("Ergebnis erscheint hier nach der Ausführung.", "Result appears here after execution.")</span>
}
</div>
</div>
@ -48,17 +53,28 @@
</div>
@code {
private string selectedMode = "advocatus";
private string _language = "de";
private string selectedMode = "lektorat";
private string inputText = string.Empty;
private string outputText = string.Empty;
private string errorMessage = string.Empty;
private string statusText = "Bereit";
private string statusText = string.Empty;
private bool isRunning;
private double progress;
private string T(string de, string en) => _language == "en" ? en : de;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
_language = await SettingsService.GetLanguageAsync() ?? "de";
statusText = T("Bereit", "Ready");
var pending = SettingsService.PendingAssistantInput;
if (!string.IsNullOrEmpty(pending))
{
inputText = pending;
SettingsService.PendingAssistantInput = null;
}
}
private async Task RunAssistant()
@ -69,12 +85,13 @@
progress = 50;
outputText = string.Empty;
errorMessage = string.Empty;
statusText = "Verarbeite...";
statusText = T("Verarbeite...", "Processing...");
try
{
var systemPrompt = selectedMode switch
{
"lektorat" => await SettingsService.GetLektorSystemPromptAsync() ?? string.Empty,
"advocatus" => await SettingsService.GetAdvocatusDiaboliPromptAsync() ?? string.Empty,
"hookfinder" => await SettingsService.GetHookFinderPromptAsync() ?? string.Empty,
"eli5" => await SettingsService.GetEli5PromptAsync() ?? string.Empty,
@ -83,18 +100,18 @@
if (string.IsNullOrEmpty(systemPrompt))
{
errorMessage = "Kein System-Prompt für diesen Modus konfiguriert. Bitte in den Einstellungen hinterlegen.";
errorMessage = T("Kein System-Prompt für diesen Modus konfiguriert. Bitte in den Einstellungen hinterlegen.", "No system prompt configured for this mode. Please configure in settings.");
return;
}
var model = await SettingsService.GetStyleModelAsync() ?? "llama3.2";
outputText = await OllamaService.Chat(model, inputText, systemPrompt);
statusText = "Fertig.";
statusText = T("Fertig.", "Done.");
}
catch (Exception ex)
{
errorMessage = $"Fehler: {ex.Message}";
statusText = "Fehler";
errorMessage = $"{T("Fehler:", "Error:")} {ex.Message}";
statusText = T("Fehler", "Error");
}
finally
{
@ -102,4 +119,10 @@
progress = 0;
}
}
private void SendToEditor()
{
SettingsService.PendingAssistantOutput = outputText;
Navigation.NavigateTo("/editor");
}
}

View file

@ -6,14 +6,14 @@
@inject IJSRuntime JSRuntime
@inject IProjectService ProjectService
<PageTitle>Einstellungen - Author Buddy</PageTitle>
<PageTitle>@T("Einstellungen", "Settings") - Author Buddy</PageTitle>
<div class="settings-page">
<div class="settings-section">
<h3 class="settings-section-title">Benutzer</h3>
<h3 class="settings-section-title">@T("Benutzer", "User")</h3>
<div class="form-group">
<label for="userSelect">Aktiver Benutzer:</label>
<label for="userSelect">@T("Aktiver Benutzer:", "Active user:")</label>
<select id="userSelect" value="@selectedUserId" @onchange="SwitchUser">
@foreach (var u in users)
{
@ -22,10 +22,10 @@
</select>
</div>
<div class="form-group">
<label for="newUserName">Neuer Benutzer:</label>
<label for="newUserName">@T("Neuer Benutzer:", "New user:")</label>
<div style="display: flex; gap: 8px;">
<input id="newUserName" @bind="newUserName" placeholder="Name" style="flex: 1;" />
<button class="btn btn-secondary" @onclick="AddUser">Hinzufügen</button>
<input id="newUserName" @bind="newUserName" placeholder="@T("Name", "Name")" style="flex: 1;" />
<button class="btn btn-secondary" @onclick="AddUser">@T("Hinzuf\u00fcgen", "Add")</button>
</div>
</div>
</div>
@ -34,13 +34,13 @@
<div class="settings-column" >
<div class="settings-section">
<h3 class="settings-section-title">Modelle</h3>
<h3 class="settings-section-title">@T("Modelle", "Models")</h3>
<div class="form-group">
<label for="ragModel">RAG-Modell (Faktenabfrage):</label>
<label for="ragModel">@T("RAG-Modell (Faktenabfrage):", "RAG model (facts):")</label>
<select id="ragModel" @bind="ragModel">
@if (availableModels.Count == 0)
{
<option value="">Keine Modelle gefunden</option>
<option value="">@T("Keine Modelle gefunden", "No models found")</option>
}
@foreach (var m in availableModels)
{
@ -49,11 +49,11 @@
</select>
</div>
<div class="form-group">
<label for="styleModel">Stil-Modell (Lektorat):</label>
<label for="styleModel">@T("Stil-Modell (Lektorat):", "Style model (editing):")</label>
<select id="styleModel" @bind="styleModel">
@if (availableModels.Count == 0)
{
<option value="">Keine Modelle gefunden</option>
<option value="">@T("Keine Modelle gefunden", "No models found")</option>
}
@foreach (var m in availableModels)
{
@ -62,11 +62,11 @@
</select>
</div>
<div class="form-group">
<label for="spellingModel">Rechtschreibprüfungs-Modell:</label>
<label for="spellingModel">@T("Rechtschreibpr\u00fcfungs-Modell:", "Spell check model:")</label>
<select id="spellingModel" @bind="spellingModel">
@if (availableModels.Count == 0)
{
<option value="">Keine Modelle gefunden</option>
<option value="">@T("Keine Modelle gefunden", "No models found")</option>
}
@foreach (var m in availableModels)
{
@ -77,22 +77,33 @@
</div>
<div class="settings-section">
<h3 class="settings-section-title">Ollama Server</h3>
<h3 class="settings-section-title">@T("Ollama Server", "Ollama Server")</h3>
<div class="form-group">
<label for="ollamaUrl">Server-URL:</label>
<label for="ollamaUrl">@T("Server-URL:", "Server URL:")</label>
<input id="ollamaUrl" @bind="ollamaUrl" placeholder="http://localhost:11434" />
<div class="form-hint">Adresse des Ollama-Servers</div>
<div class="form-hint">@T("Adresse des Ollama-Servers", "Ollama server address")</div>
</div>
</div>
<div class="settings-section">
<h3 class="settings-section-title">Design</h3>
<h3 class="settings-section-title">@T("Design", "Appearance")</h3>
<div class="form-group">
<label for="themeSelect">Theme:</label>
<label for="themeSelect">@T("Theme:", "Theme:")</label>
<select id="themeSelect" @bind="selectedTheme">
<option value="light">Hell</option>
<option value="dark">Dunkel</option>
<option value="w95">W95 (Retro)</option>
<option value="light">@T("Hell", "Light")</option>
<option value="dark">@T("Dunkel", "Dark")</option>
<option value="w95">W95 @T("(Retro)", "(Retro)")</option>
</select>
</div>
</div>
<div class="settings-section">
<h3 class="settings-section-title">@T("Sprache", "Language")</h3>
<div class="form-group">
<label for="languageSelect">@T("Sprache:", "Language:")</label>
<select id="languageSelect" @bind="selectedLanguage">
<option value="de">Deutsch</option>
<option value="en">English</option>
</select>
</div>
</div>
@ -100,21 +111,21 @@
<div class="settings-column" >
<div class="settings-section">
<h3 class="settings-section-title">Lektor-System-Prompt</h3>
<h3 class="settings-section-title">@T("Lektor-System-Prompt", "Editor system prompt")</h3>
<div class="form-group">
<textarea id="lektorPrompt" @bind="lektorPrompt" rows="6"></textarea>
</div>
</div>
<div class="settings-section">
<h3 class="settings-section-title">Fact-Check-Vorlage</h3>
<h3 class="settings-section-title">@T("Fact-Check-Vorlage", "Fact check template")</h3>
<div class="form-group">
<textarea id="factCheckTemplate" @bind="factCheckTemplate" rows="6"></textarea>
</div>
</div>
<div class="settings-section">
<h3 class="settings-section-title">Rechtschreibprüfungs-Prompt</h3>
<h3 class="settings-section-title">@T("Rechtschreibpr\u00fcfungs-Prompt", "Spell check prompt")</h3>
<div class="form-group">
<textarea id="spellingPrompt" @bind="spellingPrompt" rows="6"></textarea>
</div>
@ -123,21 +134,21 @@
<div class="settings-column" >
<div class="settings-section">
<h3 class="settings-section-title">Advocatus Diaboli</h3>
<h3 class="settings-section-title">@T("Advocatus Diaboli", "Advocatus Diaboli")</h3>
<div class="form-group">
<textarea id="advocatusDiaboliPrompt" @bind="advocatusDiaboliPrompt" rows="6"></textarea>
</div>
</div>
<div class="settings-section">
<h3 class="settings-section-title">Hook-Finder</h3>
<h3 class="settings-section-title">@T("Hook-Finder", "Hook finder")</h3>
<div class="form-group">
<textarea id="hookFinderPrompt" @bind="hookFinderPrompt" rows="6"></textarea>
</div>
</div>
<div class="settings-section">
<h3 class="settings-section-title">ELI5-Vereinfachung</h3>
<h3 class="settings-section-title">@T("ELI5-Vereinfachung", "ELI5-Simplification")</h3>
<div class="form-group">
<textarea id="eli5Prompt" @bind="eli5Prompt" rows="6"></textarea>
</div>
@ -147,7 +158,7 @@
</div>
<div class="settings-actions">
<button class="btn btn-primary" @onclick="SaveSettings">Speichern</button>
<button class="btn btn-primary" @onclick="SaveSettings">@T("Speichern", "Save")</button>
@if (!string.IsNullOrEmpty(statusMessage))
{
<span class="settings-status">@statusMessage</span>
@ -168,6 +179,7 @@
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;
@ -175,6 +187,8 @@
private List<UserEntity> users = new();
private int selectedUserId;
private string T(string de, string en) => selectedLanguage == "en" ? en : de;
protected override async Task OnInitializedAsync()
{
users = await SettingsService.GetUsersAsync();
@ -207,6 +221,7 @@
advocatusDiaboliPrompt = await SettingsService.GetAdvocatusDiaboliPromptAsync() ?? string.Empty;
hookFinderPrompt = await SettingsService.GetHookFinderPromptAsync() ?? string.Empty;
eli5Prompt = await SettingsService.GetEli5PromptAsync() ?? string.Empty;
selectedLanguage = await SettingsService.GetLanguageAsync() ?? "de";
}
private async Task SwitchUser(ChangeEventArgs e)
@ -225,7 +240,7 @@
var user = await SettingsService.CreateUserAsync(newUserName);
users.Add(user);
newUserName = string.Empty;
statusMessage = $"Benutzer '{user.Name}' erstellt.";
statusMessage = T($"Benutzer '{user.Name}' erstellt.", $"User '{user.Name}' created.");
}
private async Task SaveSettings()
@ -238,7 +253,9 @@
var ok = await OllamaService.TestEmbeddingAsync(ragModel);
if (!ok)
{
statusMessage = $"Modell '{ragModel}' unterstützt keine Embeddings. RAG-Modell nicht gespeichert.";
statusMessage = selectedLanguage == "en"
? $"Model '{ragModel}' does not support embeddings. RAG model not saved."
: $"Modell '{ragModel}' unterstützt keine Embeddings. RAG-Modell nicht gespeichert.";
return;
}
}
@ -252,8 +269,9 @@
await SettingsService.SaveAdvocatusDiaboliPromptAsync(advocatusDiaboliPrompt);
await SettingsService.SaveHookFinderPromptAsync(hookFinderPrompt);
await SettingsService.SaveEli5PromptAsync(eli5Prompt);
await SettingsService.SaveLanguageAsync(selectedLanguage);
statusMessage = "Einstellungen gespeichert.";
statusMessage = T("Einstellungen gespeichert.", "Settings saved.");
await ThemeService.ApplyTheme(selectedTheme);
}
}

View file

@ -7,6 +7,7 @@ public class OllamaSettings
public string SpellingModel { get; set; } = "phi3:mini";
public string OllamaUrl { get; set; } = "http://localhost:11434";
public string Theme { get; set; } = "light";
public string Language { get; set; } = "de";
public string LektorSystemPrompt { get; set; } = "Du bist ein erfahrener Lektor. Analysiere den Text des Autors. " +
"Optimiere ihn auf einen lebendigen, anschaulichen und subjektiven Stil. " +
@ -26,6 +27,29 @@ public class OllamaSettings
public string Eli5Prompt { get; set; } = "Wo ist der Text zu kompliziert geschrieben? Liefere mir konkrete Vorschläge, wie ich komplexe Absätze einfacher formulieren kann, ohne den Kern zu verlieren.";
public string LektorSystemPromptEn { get; } = "You are an experienced editor. Analyze the author's text. " +
"Optimize it for a vivid, descriptive, and subjective style. " +
"Use strong verbs, avoid unnecessary adjectives, and follow 'Show, don't tell'. " +
"Respond directly with the improved text or concrete suggestions.";
public string FactCheckTemplateEn { get; } = "FACTS FROM DATABASE:\n{0}\n\n" +
"QUESTION / CONTEXT:\n{1}\n\n" +
"Based on the facts, write a short, vivid addition or correction.";
public string SpellingPromptEn { get; } = "You are a spell checker. Correct ONLY errors (spelling/grammar). " +
"Do not change the style. Return only the corrected text.";
public string AdvocatusDiaboliPromptEn { get; } = "Take a radical opposing position to my text. What weaknesses in my argumentation do you notice?";
public string HookFinderPromptEn { get; } = "Generate 5 emotional, captivating opening sentences (hooks) for this text that immediately grab the reader's attention.";
public string Eli5PromptEn { get; } = "Where is the text too complicated? Give me concrete suggestions on how to simplify complex paragraphs without losing the core message.";
public string GetDefaultPrompt(string dePrompt, string enPrompt, string currentLanguage)
{
return currentLanguage == "en" ? enPrompt : dePrompt;
}
public string GetFactCheckPrompt(string question, string facts)
{
return string.Format(FactCheckTemplate, question, facts);

View file

@ -28,6 +28,8 @@ public interface ISettingsService
Task SaveAdvocatusDiaboliPromptAsync(string prompt);
Task SaveHookFinderPromptAsync(string prompt);
Task SaveEli5PromptAsync(string prompt);
Task<string?> GetLanguageAsync();
Task SaveLanguageAsync(string language);
Task<List<UserEntity>> GetUsersAsync();
Task<UserEntity> GetCurrentUserAsync();
@ -36,6 +38,8 @@ public interface ISettingsService
int? CurrentProjectId { get; set; }
string? CurrentFilePath { get; set; }
string? PendingAssistantInput { get; set; }
string? PendingAssistantOutput { get; set; }
Task<int?> GetLastProjectIdAsync();
Task SaveLastProjectIdAsync(int projectId);
Task LoadProjectSettingsAsync();

View file

@ -17,6 +17,9 @@ public class SettingsService : ISettingsService
private const string KeyAdvocatusDiaboli = "ollama_advocatus_diaboli";
private const string KeyHookFinder = "ollama_hook_finder";
private const string KeyEli5 = "ollama_eli5";
private const string KeyLanguage = "language";
private const string KeyLastProjectId = "last_project_id";
private readonly ILiteDatabase _db;
private readonly OllamaSettings _ollamaConfig;
@ -36,8 +39,8 @@ public class SettingsService : ISettingsService
}
public string? CurrentFilePath { get; set; }
private const string KeyLastProjectId = "last_project_id";
public string? PendingAssistantInput { get; set; }
public string? PendingAssistantOutput { get; set; }
public Task<int?> GetLastProjectIdAsync()
{
@ -125,6 +128,13 @@ public class SettingsService : ISettingsService
public Task<string?> GetHookFinderPromptAsync() => Task.FromResult(Get(KeyHookFinder));
public Task<string?> GetEli5PromptAsync() => Task.FromResult(Get(KeyEli5));
public Task<string?> GetThemeAsync() => Task.FromResult(Get(KeyTheme));
public Task<string?> GetLanguageAsync() => Task.FromResult(Get(KeyLanguage));
public Task SaveLanguageAsync(string language)
{
Set(KeyLanguage, language);
_ollamaConfig.Language = language;
return Task.CompletedTask;
}
public Task SaveOllamaUrlAsync(string url)
{
@ -252,6 +262,7 @@ public class SettingsService : ISettingsService
(KeyAdvocatusDiaboli, val => _ollamaConfig.AdvocatusDiaboliPrompt = val),
(KeyHookFinder, val => _ollamaConfig.HookFinderPrompt = val),
(KeyEli5, val => _ollamaConfig.Eli5Prompt = val),
(KeyLanguage, val => _ollamaConfig.Language = val),
};
foreach (var entry in entries)
@ -281,6 +292,8 @@ public class SettingsService : ISettingsService
_currentUserId = current?.Id ?? users.FindAll().First().Id;
}
var lang = _ollamaConfig.Language;
var entries = new (string Key, string Default)[]
{
(KeyOllamaUrl, _ollamaConfig.OllamaUrl),
@ -288,12 +301,13 @@ public class SettingsService : ISettingsService
(KeyStyleModel, _ollamaConfig.StyleModel),
(KeySpellingModel, _ollamaConfig.SpellingModel),
(KeyTheme, _ollamaConfig.Theme),
(KeyLektorPrompt, _ollamaConfig.LektorSystemPrompt),
(KeyFactCheckTemplate, _ollamaConfig.FactCheckTemplate),
(KeySpellingPrompt, _ollamaConfig.SpellingPrompt),
(KeyAdvocatusDiaboli, _ollamaConfig.AdvocatusDiaboliPrompt),
(KeyHookFinder, _ollamaConfig.HookFinderPrompt),
(KeyEli5, _ollamaConfig.Eli5Prompt),
(KeyLanguage, lang),
(KeyLektorPrompt, lang == "en" ? _ollamaConfig.LektorSystemPromptEn : _ollamaConfig.LektorSystemPrompt),
(KeyFactCheckTemplate, lang == "en" ? _ollamaConfig.FactCheckTemplateEn : _ollamaConfig.FactCheckTemplate),
(KeySpellingPrompt, lang == "en" ? _ollamaConfig.SpellingPromptEn : _ollamaConfig.SpellingPrompt),
(KeyAdvocatusDiaboli, lang == "en" ? _ollamaConfig.AdvocatusDiaboliPromptEn : _ollamaConfig.AdvocatusDiaboliPrompt),
(KeyHookFinder, lang == "en" ? _ollamaConfig.HookFinderPromptEn : _ollamaConfig.HookFinderPrompt),
(KeyEli5, lang == "en" ? _ollamaConfig.Eli5PromptEn : _ollamaConfig.Eli5Prompt),
};
foreach (var entry in entries)
@ -309,6 +323,7 @@ public class SettingsService : ISettingsService
else if (entry.Key == KeyStyleModel) _ollamaConfig.StyleModel = val;
else if (entry.Key == KeySpellingModel) _ollamaConfig.SpellingModel = val;
else if (entry.Key == KeyTheme) _ollamaConfig.Theme = val;
else if (entry.Key == KeyLanguage) _ollamaConfig.Language = val;
else if (entry.Key == KeyLektorPrompt) _ollamaConfig.LektorSystemPrompt = val;
else if (entry.Key == KeyFactCheckTemplate) _ollamaConfig.FactCheckTemplate = val;
else if (entry.Key == KeySpellingPrompt) _ollamaConfig.SpellingPrompt = val;

View file

@ -613,12 +613,12 @@ button.primary {
/* Settings page */
.settings-page {
max-width: 960px;
width: 100%;
}
.settings-layout {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-columns: 1fr 2fr 2fr;
gap: 16px;
}