Files
oak-gpui/crates
Marshall BowersandMax 91bbf0efc4 assistant: Normalize line endings for prompts loaded from the prompt library (#15708)
This PR makes it so we normalize the line endings for prompts to LFs
(`\n`) when we load a prompt from the library.

In some cases, prompts could end up with CRLF (`\r\n`) line endings.
When these prompts were used with the `/prompt` slash command and
summarily run, the prompt text would be converted into a rope, causing
the line endings to be normalized to LFs.

However, this would happen _after_ the ranges for the
`SlashCommandOutputSection`s were computed based on the text that still
contained the CRLFs. This would then cause these ranges to be invalid
for the text with the normalized endings, resulting in a panic when
converting them to anchors.

Fixes https://github.com/zed-industries/zed/issues/15652.

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-08-02 18:13:17 -04:00
..
2024-05-29 18:06:45 -07:00
2024-07-23 15:01:05 -07:00
2024-07-26 16:42:21 -07:00
2024-07-23 15:01:05 -07:00
2024-04-30 23:31:59 -06:00
2024-07-23 15:01:05 -07:00
2024-07-28 11:07:10 +02:00
2024-07-15 17:04:15 -06:00
2024-07-25 09:00:53 -06:00
2024-07-31 12:05:19 -07:00
2024-06-21 16:32:32 -07:00
2024-07-26 03:31:41 -04:00
2024-04-15 14:21:52 +02:00
2024-08-01 21:57:51 -04:00
2024-07-29 09:22:25 -06:00