-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Add AI features tab at the org level (#3185)
- Loading branch information
1 parent
ebf4847
commit 42f4e89
Showing
23 changed files
with
706 additions
and
121 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
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
18 changes: 18 additions & 0 deletions
18
.../AccountSettings/shared/Header/Header.jsx → .../AccountSettings/shared/Header/Header.tsx
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import config from 'config' | ||
|
||
import { useFlags } from 'shared/featureFlags' | ||
import Badge from 'ui/Badge' | ||
import TabNavigation from 'ui/TabNavigation' | ||
|
||
function Tabs() { | ||
const { codecovAiFeaturesTab } = useFlags({ | ||
codecovAiFeaturesTab: false, | ||
}) | ||
|
||
return ( | ||
<TabNavigation | ||
tabs={[ | ||
{ pageName: 'owner', children: 'Repos' }, | ||
{ pageName: 'analytics', children: 'Analytics' }, | ||
...(codecovAiFeaturesTab | ||
? [ | ||
{ | ||
pageName: 'codecovAI', | ||
children: ( | ||
<> | ||
Codecov AI <Badge>beta</Badge>{' '} | ||
</> | ||
), | ||
}, | ||
] | ||
: []), | ||
...(config.IS_SELF_HOSTED | ||
? [] | ||
: [{ pageName: 'membersTab' }, { pageName: 'planTab' }]), | ||
{ | ||
pageName: 'accountAdmin', | ||
children: 'Settings', | ||
}, | ||
]} | ||
/> | ||
) | ||
} | ||
|
||
export default Tabs |
55 changes: 55 additions & 0 deletions
55
src/pages/CodecovAIPage/CodecovAICommands/CodecovAICommands.tsx
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,55 @@ | ||
import { Card } from 'ui/Card' | ||
import { ExpandableSection } from 'ui/ExpandableSection' | ||
|
||
const CodecovAICommands: React.FC = () => { | ||
return ( | ||
<div> | ||
<Card> | ||
<Card.Header> | ||
<Card.Title size="base">Codecov AI Commands</Card.Title> | ||
</Card.Header> | ||
<Card.Content> | ||
After installing the app, use these commands in your PR comments: | ||
<ul className="mt-2 list-inside list-disc space-y-1"> | ||
<li> | ||
<span className="rounded border border-gray-200 bg-gray-100 px-1 font-semibold"> | ||
@codecov-ai-reviewer test | ||
</span>{' '} | ||
--the assistant will generate tests for the PR. | ||
</li> | ||
<li> | ||
<span className="rounded border border-gray-200 bg-gray-100 px-1 font-semibold"> | ||
@codecov-ai-reviewer review | ||
</span>{' '} | ||
--the assistant will review the PR and make suggestions. | ||
</li> | ||
</ul> | ||
</Card.Content> | ||
</Card> | ||
<ExpandableSection className="-mt-px"> | ||
<ExpandableSection.Trigger> | ||
<p> | ||
Here is an example of Codecov AI Reviewer in PR comments. Comment | ||
generation may take time. | ||
</p> | ||
</ExpandableSection.Trigger> | ||
<ExpandableSection.Content> | ||
Screenshot goes here | ||
</ExpandableSection.Content> | ||
</ExpandableSection> | ||
<ExpandableSection className="-mt-2 border-t-0"> | ||
<ExpandableSection.Trigger> | ||
<p> | ||
Here is an example of Codecov AI Test Generator in PR comments. | ||
Comment generation may take time. | ||
</p> | ||
</ExpandableSection.Trigger> | ||
<ExpandableSection.Content> | ||
Screenshot goes here | ||
</ExpandableSection.Content> | ||
</ExpandableSection> | ||
</div> | ||
) | ||
} | ||
|
||
export default CodecovAICommands |
Oops, something went wrong.