Skip to content

Commit 3403f07

Browse files
committed
torchagent: add issue links for feature requests and bugs
1 parent 92847a0 commit 3403f07

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

torchci/components/TorchAgentPage.tsx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ export const TorchAgentPage = () => {
4040
const session = useSession();
4141
const theme = useTheme();
4242

43+
const featureRequestUrl =
44+
"https://github.com/pytorch/test-infra/issues/new?title=" +
45+
encodeURIComponent("[TorchAgent][featurerequest]") +
46+
"&body=" +
47+
encodeURIComponent("Please describe your feature request here.");
48+
const bugReportUrl =
49+
"https://github.com/pytorch/test-infra/issues/new?title=" +
50+
encodeURIComponent("[TorchAgent][bug]") +
51+
"&body=" +
52+
encodeURIComponent("Please describe the bug you encountered.");
53+
4354
const [query, setQuery] = useState("");
4455
const [isLoading, setIsLoading] = useState(false);
4556
const [response, setResponse] = useState("");
@@ -761,6 +772,27 @@ export const TorchAgentPage = () => {
761772
TorchAgent
762773
</Typography>
763774

775+
<Box sx={{ display: "flex", justifyContent: "flex-end", mb: 2 }}>
776+
<Button
777+
variant="outlined"
778+
component="a"
779+
href={featureRequestUrl}
780+
target="_blank"
781+
sx={{ mr: 1 }}
782+
>
783+
Feature Request
784+
</Button>
785+
<Button
786+
variant="outlined"
787+
color="error"
788+
component="a"
789+
href={bugReportUrl}
790+
target="_blank"
791+
>
792+
Report Bug
793+
</Button>
794+
</Box>
795+
764796
<Typography
765797
variant="body1"
766798
paragraph
@@ -927,6 +959,27 @@ export const TorchAgentPage = () => {
927959
</Box>
928960
)}
929961
</ResultsSection>
962+
963+
<Box sx={{ display: "flex", justifyContent: "flex-end", mt: 2 }}>
964+
<Button
965+
variant="outlined"
966+
component="a"
967+
href={featureRequestUrl}
968+
target="_blank"
969+
sx={{ mr: 1 }}
970+
>
971+
Feature Request
972+
</Button>
973+
<Button
974+
variant="outlined"
975+
color="error"
976+
component="a"
977+
href={bugReportUrl}
978+
target="_blank"
979+
>
980+
Report Bug
981+
</Button>
982+
</Box>
930983
</TorchAgentPageContainer>
931984
);
932985
};

0 commit comments

Comments
 (0)