Skip to content

Commit df66c59

Browse files
committed
fix: Register IThemeManager service to fix DI error
Add AddAutoComplete() call to register core AutoComplete services including IThemeManager, which is required by the AutoComplete component.
1 parent 62dd0af commit df66c59

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

samples/AutoComplete.Playground/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using AutoComplete.Playground.Components;
2+
using EasyAppDev.Blazor.AutoComplete.Extensions;
23
using Microsoft.Extensions.AI;
34
using Microsoft.SemanticKernel;
45

@@ -17,6 +18,9 @@
1718
builder.Services.AddRazorComponents()
1819
.AddInteractiveServerComponents();
1920

21+
// Register AutoComplete core services (IThemeManager, etc.)
22+
builder.Services.AddAutoComplete();
23+
2024
// Configure OpenAI for semantic search using the simplified extension method
2125
builder.Services.AddAutoCompleteSemanticSearch(builder.Configuration);
2226

0 commit comments

Comments
 (0)