Skip to content

Commit a48a8e4

Browse files
committed
refactor: 移动 MarkdownContent 到扩展组件库中
1 parent bdf1a26 commit a48a8e4

File tree

4 files changed

+9
-169
lines changed

4 files changed

+9
-169
lines changed

BootstrapBlazor.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9BAF50BE
7878
EndProject
7979
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTest.Benchmarks", "tools\Benchmarks\UnitTest.Benchmarks.csproj", "{3E6D8D0E-5A36-4CFD-8612-7D64E3FFE7B1}"
8080
EndProject
81+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootstrapBlazor.ChatBot", "..\BootstrapBlazor.Extensions\src\components\BootstrapBlazor.ChatBot\BootstrapBlazor.ChatBot.csproj", "{A451679F-C732-2D5C-EB09-B9D0C4711BA4}"
82+
EndProject
8183
Global
8284
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8385
Debug|Any CPU = Debug|Any CPU
@@ -112,6 +114,10 @@ Global
112114
{3E6D8D0E-5A36-4CFD-8612-7D64E3FFE7B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
113115
{3E6D8D0E-5A36-4CFD-8612-7D64E3FFE7B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
114116
{3E6D8D0E-5A36-4CFD-8612-7D64E3FFE7B1}.Release|Any CPU.Build.0 = Release|Any CPU
117+
{A451679F-C732-2D5C-EB09-B9D0C4711BA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
118+
{A451679F-C732-2D5C-EB09-B9D0C4711BA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
119+
{A451679F-C732-2D5C-EB09-B9D0C4711BA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
120+
{A451679F-C732-2D5C-EB09-B9D0C4711BA4}.Release|Any CPU.Build.0 = Release|Any CPU
115121
EndGlobalSection
116122
GlobalSection(SolutionProperties) = preSolution
117123
HideSolutionNode = FALSE
@@ -128,6 +134,7 @@ Global
128134
{D8AEAFE7-10AF-4A5B-BC67-FE740A2CA1DF} = {7C1D79F1-87BC-42C1-BD5A-CDE4044AC1BD}
129135
{C075C6C8-B9CB-4AC0-9BDF-B2002B4AB99C} = {EA765165-0542-41C8-93F2-85787FEDEDFF}
130136
{3E6D8D0E-5A36-4CFD-8612-7D64E3FFE7B1} = {9BAF50BE-141D-4429-93A9-942F373D1F68}
137+
{A451679F-C732-2D5C-EB09-B9D0C4711BA4} = {A2182155-43ED-44C1-BF6F-1B70EBD2DFFE}
131138
EndGlobalSection
132139
GlobalSection(ExtensibilityGlobals) = postSolution
133140
SolutionGuid = {0DCB0756-34FA-4FD0-AE1D-D3F08B5B3A6B}

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@
7474
<PackageReference Include="BootstrapBlazor.Middleware" Version="9.0.0" />
7575
<PackageReference Include="Longbow.Logging" Version="9.0.0" />
7676
<PackageReference Include="Longbow.Tasks" Version="9.0.0" />
77-
<PackageReference Include="Markdig" Version="0.40.0" />
78-
<PackageReference Include="Markdown.ColorCode" Version="3.0.0" />
7977
</ItemGroup>
8078

8179
<ItemGroup>
80+
<ProjectReference Include="..\..\..\BootstrapBlazor.Extensions\src\components\BootstrapBlazor.ChatBot\BootstrapBlazor.ChatBot.csproj" />
8281
<ProjectReference Include="..\BootstrapBlazor\BootstrapBlazor.csproj" />
8382
</ItemGroup>
8483

src/BootstrapBlazor.Server/Components/Components/MarkdownContent.razor

Lines changed: 0 additions & 165 deletions
This file was deleted.

src/BootstrapBlazor.Server/Components/Pages/Chats.razor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
</div>
3838
<div class="msg-body">
3939
<div class="msg-time">@message.Time.ToString("HH:mm:ss")</div>
40-
@* <div>@message.Content</div> *@
41-
<MarkdownContent Content="@message.Content" Id="mdcontent" />
40+
<MarkdownContent Content="@message.Content"></MarkdownContent>
4241
@if (message.Role == ChatRole.Assistant)
4342
{
4443
<div class="msg-desc">AI-generated content may be incorrect</div>

0 commit comments

Comments
 (0)