Skip to content

Commit e9dc02e

Browse files
authored
rename torchdash to TorchAgent (#6769)
1 parent 67b1584 commit e9dc02e

File tree

10 files changed

+66
-31
lines changed

10 files changed

+66
-31
lines changed

torchci/components/McpQueryPage.tsx renamed to torchci/components/TorchAgentPage.tsx

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,33 @@ import {
1010
import { useSession } from "next-auth/react";
1111
import { useEffect, useRef, useState } from "react";
1212
import AISpinner from "./AISpinner";
13-
import { GrafanaEmbed } from "./McpQueryPage/GrafanaEmbed";
13+
import { GrafanaEmbed } from "./TorchAgentPage/GrafanaEmbed";
1414
import {
1515
useAnimatedCounter,
1616
useAutoScroll,
1717
useThinkingMessages,
1818
useTokenCalculator,
19-
} from "./McpQueryPage/hooks";
19+
} from "./TorchAgentPage/hooks";
2020
import {
2121
ChunkMetadata,
2222
LoaderWrapper,
23-
McpQueryPageContainer,
2423
QuerySection,
2524
ResponseText,
2625
ResultsSection,
2726
ScrollToBottomButton,
28-
} from "./McpQueryPage/styles";
29-
import { TodoList } from "./McpQueryPage/TodoList";
30-
import { ToolUse } from "./McpQueryPage/ToolUse";
31-
import { MessageWrapper, ParsedContent } from "./McpQueryPage/types";
27+
TorchAgentPageContainer,
28+
} from "./TorchAgentPage/styles";
29+
import { TodoList } from "./TorchAgentPage/TodoList";
30+
import { ToolUse } from "./TorchAgentPage/ToolUse";
31+
import { MessageWrapper, ParsedContent } from "./TorchAgentPage/types";
3232
import {
3333
extractGrafanaLinks,
3434
formatElapsedTime,
3535
formatTokenCount,
3636
renderTextWithLinks,
37-
} from "./McpQueryPage/utils";
37+
} from "./TorchAgentPage/utils";
3838

39-
export const McpQueryPage = () => {
39+
export const TorchAgentPage = () => {
4040
const session = useSession();
4141
const theme = useTheme();
4242

@@ -51,10 +51,10 @@ export const McpQueryPage = () => {
5151
const [typingSpeed] = useState(10);
5252
const [thinkingMessageIndex, setThinkingMessageIndex] = useState(0);
5353
const [startTime, setStartTime] = useState<number | null>(null);
54-
const [elapsedTime, setElapsedTime] = useState(0); // in seconds
55-
const [totalTokens, setTotalTokens] = useState(0); // track total tokens for display
56-
const [completedTokens, setCompletedTokens] = useState(0); // final token count after completion
57-
const [completedTime, setCompletedTime] = useState(0); // final time after completion
54+
const [elapsedTime, setElapsedTime] = useState(0);
55+
const [totalTokens, setTotalTokens] = useState(0);
56+
const [completedTokens, setCompletedTokens] = useState(0);
57+
const [completedTime, setCompletedTime] = useState(0);
5858
const [error, setError] = useState("");
5959
const [debugVisible, setDebugVisible] = useState(false);
6060

@@ -554,14 +554,14 @@ export const McpQueryPage = () => {
554554
// Authentication check
555555
if (session.status === "loading") {
556556
return (
557-
<McpQueryPageContainer>
557+
<TorchAgentPageContainer>
558558
<QuerySection sx={{ padding: "20px", textAlign: "center" }}>
559559
<AISpinner />
560560
<Typography variant="h6" sx={{ mt: 2 }}>
561561
Checking authentication...
562562
</Typography>
563563
</QuerySection>
564-
</McpQueryPageContainer>
564+
</TorchAgentPageContainer>
565565
);
566566
}
567567

@@ -571,7 +571,7 @@ export const McpQueryPage = () => {
571571
!(session.data as any)?.accessToken
572572
) {
573573
return (
574-
<McpQueryPageContainer>
574+
<TorchAgentPageContainer>
575575
<QuerySection sx={{ padding: "20px", textAlign: "center" }}>
576576
<Typography variant="h4" gutterBottom>
577577
Authentication Required
@@ -584,7 +584,7 @@ export const McpQueryPage = () => {
584584
Please sign in to continue.
585585
</Typography>
586586
</QuerySection>
587-
</McpQueryPageContainer>
587+
</TorchAgentPageContainer>
588588
);
589589
}
590590

@@ -743,7 +743,7 @@ export const McpQueryPage = () => {
743743
};
744744

745745
return (
746-
<McpQueryPageContainer>
746+
<TorchAgentPageContainer>
747747
{showScrollButton && (
748748
<Tooltip title="Go to bottom and resume auto-scroll">
749749
<ScrollToBottomButton
@@ -758,10 +758,45 @@ export const McpQueryPage = () => {
758758
)}
759759

760760
<Typography variant="h4" gutterBottom>
761-
PyTorch Grafana Agent
761+
TorchAgent
762762
</Typography>
763+
764+
<Typography
765+
variant="body1"
766+
paragraph
767+
sx={{
768+
mb: 3,
769+
p: 2,
770+
backgroundColor: "background.paper",
771+
borderRadius: 1,
772+
border: "1px solid",
773+
borderColor: "divider",
774+
}}
775+
>
776+
Welcome to TorchAgent, your intelligent assistant for PyTorch
777+
infrastructure analysis and monitoring. This tool helps you create
778+
custom time-series visualizations, analyze CI/CD metrics, and gain
779+
insights into the PyTorch development workflow. Simply describe what
780+
you&apos;d like to explore, and TorchAgent will generate the appropriate
781+
queries and dashboards for you. Data we have access to:
782+
<ul>
783+
<li>
784+
PyTorch GitHub repository data (comments, issues, PRs, including
785+
text inside of these)
786+
</li>
787+
<li>
788+
PyTorch GitHub Actions CI data (build/test/workflow results, error
789+
log classifications, duration, runner types)
790+
</li>
791+
<li>
792+
CI cost / duration data: how long does the average job/workflow run)
793+
</li>
794+
<li>Benchmarking data in the benchmarking database</li>
795+
</ul>
796+
</Typography>
797+
763798
<Typography variant="body1" paragraph>
764-
What timeseries should we create for you?
799+
What can I help you graph today?
765800
</Typography>
766801

767802
<QuerySection>
@@ -892,6 +927,6 @@ export const McpQueryPage = () => {
892927
</Box>
893928
)}
894929
</ResultsSection>
895-
</McpQueryPageContainer>
930+
</TorchAgentPageContainer>
896931
);
897932
};

torchci/components/McpQueryPage/hooks.ts renamed to torchci/components/TorchAgentPage/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const useAutoScroll = (
8787
parsedResponses: ParsedContent[]
8888
) => {
8989
const [autoScrollEnabled, setAutoScrollEnabled] = useState(true);
90-
const [showScrollButton, setShowScrollButton] = useState(false); // whether to show the scroll-to-bottom button
90+
const [showScrollButton, setShowScrollButton] = useState(false);
9191

9292
const scrollToBottomAndEnable = useCallback(() => {
9393
setAutoScrollEnabled(true);

torchci/components/McpQueryPage/styles.ts renamed to torchci/components/TorchAgentPage/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Box, Button, Paper, Typography } from "@mui/material";
22
import { styled } from "@mui/material/styles";
33

4-
export const McpQueryPageContainer = styled("div")({
4+
export const TorchAgentPageContainer = styled("div")({
55
fontFamily: "Roboto",
66
padding: "20px",
77
maxWidth: "1200px",

torchci/pages/mcp_query.tsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

torchci/pages/torchagent.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { TorchAgentPage } from "../components/TorchAgentPage";
2+
3+
/**
4+
* TorchAgent page for PyTorch infrastructure analysis and monitoring
5+
*/
6+
export default function Page() {
7+
return <TorchAgentPage />;
8+
}

0 commit comments

Comments
 (0)