Fixed send-to-chat conversion

This commit is contained in:
Thorsten Sommer 2026-03-16 10:39:22 +01:00
parent a590d628fa
commit 93160d3fac
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -111,7 +111,36 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
} }
}, },
this.chatThread.Blocks.First().DeepClone(changeHideState: true, hideFromUser: true), // Hidden user block with inputContent data:
new ContentBlock
{
Time = this.chatThread.Blocks.First().Time,
Role = ChatRole.USER,
HideFromUser = true,
ContentType = ContentType.TEXT,
Content = new ContentText
{
Text = string.IsNullOrWhiteSpace(this.inputContent)
? $"""
# PRESENTATION_TITLE
```
{this.inputTitle}
```
"""
: $"""
# PRESENTATION_TITLE
```
{this.inputTitle}
```
# PRESENTATION_CONTENT
```
{this.inputContent}
```
""",
}
},
// Then, append the last block of the current chat thread // Then, append the last block of the current chat thread
// (which is expected to be the AI response): // (which is expected to be the AI response):