Compare commits
2 Commits
3f9d3b3399
...
735fbfb83d
| Author | SHA1 | Date |
|---|---|---|
|
|
735fbfb83d | |
|
|
0ab9b35fde |
|
|
@ -379,15 +379,22 @@ public class MarkdownWpfRenderer
|
|||
if (text.StartsWith("<think>"))
|
||||
{
|
||||
text = text.Replace("<think>", "").Replace("</think>", "");
|
||||
}
|
||||
var htmlText = new SelectableTextBlock();
|
||||
htmlText.Text = text;
|
||||
var expander = new Expander();
|
||||
var header = new StackPanel();
|
||||
header.Children.Add(new ProgressBar() { IsIndeterminate = true,Width = 30 });
|
||||
header.Children.Add(new ProgressBar() { IsIndeterminate = true, Width = 30 });
|
||||
expander.Header = header;
|
||||
expander.Content = htmlText;
|
||||
return expander;
|
||||
}
|
||||
else
|
||||
{
|
||||
var htmlText = new SelectableTextBlock();
|
||||
htmlText.Text = text;
|
||||
return htmlText;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public FrameworkElement RenderMathBlock(MathBlock mathBlock, CancellationToken cancellationToken)
|
||||
|
|
|
|||
|
|
@ -50,17 +50,6 @@ class PromptUtil
|
|||
5. 尽量使用比较简短与易懂的公式来回答用户的问题,避免用户无法理解。
|
||||
|
||||
|
||||
|
||||
首先,在<思考>标签中详细说明你解答此问题的思考过程。然后,在<回答>标签中给出最终的回答。
|
||||
|
||||
<think>
|
||||
|
||||
[在此详细说明你的思考过程]
|
||||
|
||||
</think>
|
||||
|
||||
[在此给出你的回答]
|
||||
|
||||
";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
|
||||
<mu:ControlsDictionary />
|
||||
<mu:ThemeDictionary ColorMode="Light" />
|
||||
<mu:ThemeDictionary />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -88,6 +88,15 @@
|
|||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<DockPanel>
|
||||
<hc:ButtonGroup Margin="5,0">
|
||||
<Button
|
||||
Height="20"
|
||||
hc:IconElement.Geometry="{StaticResource WindowRestoreGeometry}"
|
||||
Background="Transparent"
|
||||
FontSize="10"
|
||||
Foreground="#99000000" />
|
||||
</hc:ButtonGroup>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,5,5,0"
|
||||
|
|
@ -100,6 +109,7 @@
|
|||
Foreground="#99000000"
|
||||
Text="{Binding Timestamp, StringFormat='{}{0:HH:mm}'}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<hc:Divider
|
||||
Height="10"
|
||||
Margin="0,3"
|
||||
|
|
|
|||
|
|
@ -321,8 +321,9 @@ public partial class ImportViewModel : ObservableRecipient, IViewModel
|
|||
};
|
||||
|
||||
Messages.Add(aiChat);
|
||||
#if !DEBUG
|
||||
var results = TEST_AI_CONTENT.Split('\n');
|
||||
var promptedMsg = PromptUtil.UsePrompt(message,ExcelPromptString);
|
||||
#if DEBUG
|
||||
var results = promptedMsg.Split('\n');
|
||||
foreach(var result in results)
|
||||
{
|
||||
aiChat.Content += result;
|
||||
|
|
@ -330,7 +331,6 @@ public partial class ImportViewModel : ObservableRecipient, IViewModel
|
|||
await Task.Delay(5);
|
||||
}
|
||||
#else
|
||||
var promptedMsg = PromptUtil.UsePrompt(message,ExcelPromptString);
|
||||
history.Add(new Microsoft.Extensions.AI.ChatMessage
|
||||
{
|
||||
Role = Microsoft.Extensions.AI.ChatRole.User,
|
||||
|
|
|
|||
Loading…
Reference in New Issue