Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Playground] Component - Tab for system message and parameters (UI only) #225 #244

Merged
merged 11 commits into from
Aug 31, 2024
Next Next commit
Add Tab for system message and parameters
5jisoo committed Aug 30, 2024
commit 1d06392be38937c20860d05e283a4a21a8a2eed1
Original file line number Diff line number Diff line change
@@ -7,4 +7,6 @@

Welcome to your new app.

<ChatWindowComponent @rendermode="InteractiveServer" />
<ChatWindowComponent @rendermode="InteractiveServer"/>

<ConfigTabComponent @rendermode="InteractiveServer"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@using Microsoft.FluentUI.AspNetCore.Components

<FluentTabs ActiveTabId="system-message" OnTabChange="HandleOnTabChange">
<FluentTab Label="System message" Id="system-message">
This is "System message" tab.
</FluentTab>
<FluentTab Label="Parameters" Id="parameters">
This is "Parameters" tab.
</FluentTab>
</FluentTabs>

<p>[TEST] Active tab changed to: @SelectedTab?.Label</p>

@code {
FluentTab? SelectedTab;

private void HandleOnTabChange(FluentTab tab)
{
SelectedTab = tab;
}
}
2 changes: 2 additions & 0 deletions src/AzureOpenAIProxy.PlaygroundApp/Program.cs
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@

builder.Services.AddScoped<IOpenAIApiClient, OpenAIApiClient>();

builder.Services.AddSingleton<Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration>();

var app = builder.Build();

app.MapDefaultEndpoints();