优化适配提示词卡片
This commit is contained in:
parent
35054ee7c0
commit
3b9005381a
@ -585,7 +585,8 @@ public class Gateway
|
|||||||
type = MessageType.TOOL_MESSAGE,
|
type = MessageType.TOOL_MESSAGE,
|
||||||
status = "success",
|
status = "success",
|
||||||
content = "成功调用提示词:"+promptRequest.PromptName,
|
content = "成功调用提示词:"+promptRequest.PromptName,
|
||||||
id = (timestamp+1).ToString()
|
id = (timestamp+1).ToString(),
|
||||||
|
result = "成功调用提示词:"+promptRequest.PromptName
|
||||||
};
|
};
|
||||||
Application.Current.Dispatcher.Invoke(() =>
|
Application.Current.Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -144,11 +144,13 @@ namespace LinkToolAddin.ui.dockpane
|
|||||||
Border border = GetToolChatBorder(msg);
|
Border border = GetToolChatBorder(msg);
|
||||||
borderItemsDict[msgId] = border;
|
borderItemsDict[msgId] = border;
|
||||||
ChatHistoryStackPanel.Children.Add(border);
|
ChatHistoryStackPanel.Children.Add(border);
|
||||||
|
StatusTextBlock.Text = "正在执行工具";
|
||||||
}else if (msg.type == MessageType.CHAT_MESSAGE)
|
}else if (msg.type == MessageType.CHAT_MESSAGE)
|
||||||
{
|
{
|
||||||
Border border = GetUserChatBorder(msg);
|
Border border = GetUserChatBorder(msg);
|
||||||
borderItemsDict[msgId] = border;
|
borderItemsDict[msgId] = border;
|
||||||
ChatHistoryStackPanel.Children.Add(border);
|
ChatHistoryStackPanel.Children.Add(border);
|
||||||
|
StatusTextBlock.Text = "正在读取用户输入";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(msg.role == "assistant")
|
else if(msg.role == "assistant")
|
||||||
@ -158,11 +160,16 @@ namespace LinkToolAddin.ui.dockpane
|
|||||||
Border border = GetAiReasonBorder(msg);
|
Border border = GetAiReasonBorder(msg);
|
||||||
borderItemsDict[msgId] = border;
|
borderItemsDict[msgId] = border;
|
||||||
ChatHistoryStackPanel.Children.Add(border);
|
ChatHistoryStackPanel.Children.Add(border);
|
||||||
|
StatusTextBlock.Text = "深度思考中";
|
||||||
}else if (msg.type == MessageType.CHAT_MESSAGE)
|
}else if (msg.type == MessageType.CHAT_MESSAGE)
|
||||||
{
|
{
|
||||||
Border border = GetAiChatBorder(msg);
|
Border border = GetAiChatBorder(msg);
|
||||||
borderItemsDict[msgId] = border;
|
borderItemsDict[msgId] = border;
|
||||||
ChatHistoryStackPanel.Children.Add(border);
|
ChatHistoryStackPanel.Children.Add(border);
|
||||||
|
StatusTextBlock.Text = "回答生成中";
|
||||||
|
}else if (msg.type == MessageType.END_TAG)
|
||||||
|
{
|
||||||
|
StatusTextBlock.Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -463,6 +470,7 @@ namespace LinkToolAddin.ui.dockpane
|
|||||||
borderItemsDict.Clear();
|
borderItemsDict.Clear();
|
||||||
ChatHistoryStackPanel.Children.Clear();
|
ChatHistoryStackPanel.Children.Clear();
|
||||||
QuestionTextbox.Clear();
|
QuestionTextbox.Clear();
|
||||||
|
StatusTextBlock.Text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TopButton_OnClick(object sender, RoutedEventArgs e)
|
private void TopButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
@ -478,6 +486,7 @@ namespace LinkToolAddin.ui.dockpane
|
|||||||
private void StopButton_OnClick(object sender, RoutedEventArgs e)
|
private void StopButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Gateway.StopConversation();
|
Gateway.StopConversation();
|
||||||
|
StatusTextBlock.Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user