Skip to content

Commit

Permalink
Font files cleanup, progress on translation page UI, introducing some…
Browse files Browse the repository at this point in the history
… reusable razor components (#88)
  • Loading branch information
BeepBeepBopBop authored Dec 25, 2024
1 parent 7356722 commit a1f507f
Show file tree
Hide file tree
Showing 38 changed files with 752 additions and 2,951 deletions.
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<!-- Horizontal separator-->
<BoxView HeightRequest="3" />

<Border Grid.Row="1" StrokeThickness="0" BackgroundColor="{StaticResource Surface}" Stroke="Transparent">
<Grid Padding="12, 0">
<HorizontalStackLayout
Expand Down
5 changes: 0 additions & 5 deletions LM-Kit-Maestro/LM-Kit-Maestro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
<MauiFont Include="Resources\Fonts\Font Awesome 6 Free-Solid-900.otf" Alias="Material" />
</ItemGroup>-->

<ItemGroup>
<MauiCss Include="wwwroot\css\font-awesome.css" />
<MauiCss Include="wwwroot\css\font-awesome.min.css" />
</ItemGroup>

<ItemGroup>
<None Include="wwwroot\css\bootstrap.min.css" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/Services/Interfaces/ILLMFileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public interface ILLMFileManager

public event PropertyChangedEventHandler PropertyChanged;
public event NotifyCollectionChangedEventHandler? SortedModelCollectionChanged;
}
}
10 changes: 5 additions & 5 deletions LM-Kit-Maestro/Services/LLMFileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace LMKit.Maestro.Services;


/// <summary>
/// This service is intended to be used as a singleton via Dependency Injection.
/// This service is intended to be used as a singleton via Dependency Injection.
/// Please register with <c>services.AddSingleton&lt;LLMFileManager&gt;()</c>.
/// </summary>
public partial class LLMFileManager : ObservableObject, ILLMFileManager
Expand All @@ -26,14 +26,14 @@ public partial class LLMFileManager : ObservableObject, ILLMFileManager
private readonly FileSystemEntryRecorder _fileSystemEntryRecorder;
private readonly IAppSettingsService _appSettingsService;
private readonly HttpClient _httpClient;
private bool _enablePredefinedModels = true; //todo: Implement this as a configurable option in the configuration panel
private bool _enableCustomModels = true; //todo: Implement this as a configurable option in the configuration panel
private bool _enablePredefinedModels = true; //todo: Implement this as a configurable option in the configuration panel
private bool _enableCustomModels = true; //todo: Implement this as a configurable option in the configuration panel
private bool _isLoaded = false;

private readonly Dictionary<Uri, FileDownloader> _fileDownloads = new Dictionary<Uri, FileDownloader>();

private delegate bool ModelDownloadingProgressCallback(string path, long? contentLength, long bytesRead);
public event NotifyCollectionChangedEventHandler? SortedModelCollectionChanged;
public event NotifyCollectionChangedEventHandler? SortedModelCollectionChanged;

private CancellationTokenSource? _cancellationTokenSource;
private Task? _collectModelFilesTask;
Expand Down Expand Up @@ -250,7 +250,7 @@ public void DeleteModel(ModelCard modelCard)
if (_models.Contains(modelCard))
{
_models.Remove(modelCard);
}
}
}
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/Services/LMKitDefaultSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ public static class LMKitDefaultSettings
public const float DefaultMirostat2SamplingTemperature = 0.8f;
public const float DefaultMirostat2SamplingTargetEntropy = 5.0f;
public const float DefaultMirostat2SamplingLearningRate = 0.1f;
}
}
3 changes: 1 addition & 2 deletions LM-Kit-Maestro/UI/Pages/AssistantsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@
</BlazorWebView.RootComponents>
</BlazorWebView>
</ui:PageBase.Body>

</ui:PageBase>
</ui:PageBase>
32 changes: 32 additions & 0 deletions LM-Kit-Maestro/UI/Razor/Components/Assistants.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@inherits MvvmComponentBase<AssistantsPageViewModel>

@page "/assistants"

<div class="container">

<div id="assistant-container">
<Translation TranslationViewModel="@ViewModel.CurrentTranslation" />
</div>
</div>

<style>
.container {
color: white;
width: 100vw;
height: 100vh;
overflow: hidden;
padding-inline: 8px;
padding-block: 8px;
display: flex;
justify-content: center;
align-items: center;
}
#assistant-container {
max-width: 800px;
width: 100%;
align-content: center;
}
</style>
@code {
}
Loading

0 comments on commit a1f507f

Please sign in to comment.