-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nx-dev): improve initial prompt of the AI Chat to remove bad res…
…ponses (#19244)
- Loading branch information
Showing
5 changed files
with
66 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { normalizeContent } from './feed-answer'; | ||
|
||
describe('FeedAnswer', () => { | ||
describe('normalizeContent', () => { | ||
it('should normalize links to format expected by renderMarkdown', () => { | ||
expect( | ||
normalizeContent(`[!](https://nx.dev/shared/assets/image.png)`) | ||
).toEqual(`[!](/shared/assets/image.png)`); | ||
}); | ||
|
||
it('should escape numbers the beginning of lines to prevent numbered lists', () => { | ||
expect( | ||
normalizeContent(` | ||
1. Hello | ||
2. World | ||
`) | ||
).toEqual(` | ||
1\\. Hello | ||
2\\. World | ||
`); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3b3fc92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev