Commit ece19d4
authored
Fix: [devtools] Respect plain text line breaks (#375)
skip-test-verification
- Update README.md of `tests/ai` to list correct variable names for
Azure OpenAI
- Update devtools to parse `\n` and `\r\n` line breaks as HTML `<br />`
With fix, the following is rendered as shown in image:
```typescript
const paragraphs = [
'This is the first paragraph of our test stream. It contains several sentences to demonstrate how streaming works with longer content.<br><br>',
'Short paragraph\n',
'Here\'s the second paragraph. Notice how each paragraph is sent as a separate chunk, creating a nice streaming effect for the user.\r\n',
'This is a third paragraph to show multiple paragraphs streaming in sequence.\n\n',
'fourth'
];
```
<img width="964" height="266" alt="image"
src="https://github.com/user-attachments/assets/ba9c0243-d7bf-4726-b43a-79f9d22771f6"
/>
As reported at microsoft/teams-sdk#2654
---------
Co-authored-by: Corina Gum <>1 parent b2198b8 commit ece19d4
File tree
2 files changed
+7
-3
lines changed- packages/devtools/src/components/HtmlMessageContent
- tests/ai
2 files changed
+7
-3
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments