feat: add custom prompt box for screenshots

This commit is contained in:
tux
2025-07-02 23:50:31 +05:30
parent 5683f7cce1
commit e07f507db1
5 changed files with 13 additions and 9 deletions

View File

@@ -27,7 +27,6 @@ public partial class ChatUserControl : UserControl
{
try
{
var timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
var fileName = $"screenshot_{timestamp}.png";
var filePath = Path.Combine(Environment.CurrentDirectory, fileName);
@@ -41,8 +40,7 @@ public partial class ChatUserControl : UserControl
List<ChatMessage> messages =
[
new UserChatMessage(
ChatMessageContentPart.CreateTextPart(
"I'm attaching a screenshot of a problem. I want you to read it and give me the appropriate answer."),
ChatMessageContentPart.CreateTextPart(InMemoryDb.Obj.SettingsManager.Settings.ScreenshotPrompt),
ChatMessageContentPart.CreateImagePart(imageBytes, "image/png")
)
];