Skip to content

Commit fcdc5a5

Browse files
authored
Add some tips and tricks, info on what to query (#6818)
• UX polish – New TipsInfoButton with markdown “Tips & Tricks”. – Cleaner loader (renderLoader() helper). – QueryInputSection / WelcomeSection simplified: only one “RUN” button, no Cancel/Debug here. – Input no longer disabled while streaming (still blocks Cmd + Enter + RUN btn when isLoading). • Session handling overhaul – Front-end switches from userUuid → sessionId. – POST body may now contain an optional sessionId to continue a chat. – Server route /api/torchagent-api forwards that sessionId instead of userUuid. – UI immediately injects user query into parsedResponses so you see it before first token arrives. • Code housekeeping – Removed a lot of inline comments / console.logs. – Debug toggle is now only in the Results header. – Added helper types & utilities; minimal styling tweaks.
1 parent c2b4e39 commit fcdc5a5

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
2+
import { Box, IconButton, Tooltip } from "@mui/material";
3+
import React from "react";
4+
import ReactMarkdown from "react-markdown";
5+
6+
const tipsMarkdown = `
7+
### Tips & Tricks
8+
9+
- **Explore the data:** TorchAgent has access to a wide range of data, including PyTorch GitHub repository data, GitHub Actions CI data, benchmarking data, and more. You can ask questions about any of this data, and TorchAgent will generate the appropriate queries and dashboards for you
10+
- ** Use natural language:** You can ask questions in plain English, e.g. "How long on average does it take to add the label 'triaged' to issues with label 'module: dynamo'? Average per week.".
11+
- ** TorchAgent knows who you are:** You can use your GitHub username to filter results, e.g. "Show me the number issues I open per month, per repo".
12+
- **Try tool actions:** Expand tool sections for more details - you can see sql queries used, go to Clickhouse and get the raw data for that query, or see the model's reasoning and table schemas.
13+
- **Keyboard shortcut:** Press Cmd+Enter to submit
14+
- **Feedback:** Use the thumbs up/down to help us improve TorchAgent! Submit feature requests or report issues with the feedback buttons on the top right corner of the page.
15+
`;
16+
17+
export const TipsInfoButton: React.FC = () => (
18+
<Tooltip
19+
title={
20+
<Box sx={{ maxWidth: 350, p: 1 }}>
21+
<ReactMarkdown>{tipsMarkdown}</ReactMarkdown>
22+
</Box>
23+
}
24+
placement="bottom"
25+
arrow
26+
enterTouchDelay={0}
27+
>
28+
<IconButton size="small" sx={{ ml: 1 }} aria-label="Tips & Tricks">
29+
<InfoOutlinedIcon fontSize="small" />
30+
</IconButton>
31+
</Tooltip>
32+
);

torchci/components/TorchAgentPage/WelcomeSection.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Box, Button, TextField, Typography } from "@mui/material";
22
import React from "react";
33
import { QuerySection } from "./styles";
4+
import { TipsInfoButton } from "./TipsInfoButton";
45

56
interface WelcomeSectionProps {
67
query: string;
@@ -59,6 +60,7 @@ export const WelcomeSection: React.FC<WelcomeSectionProps> = ({
5960

6061
<Typography variant="body1" paragraph>
6162
What can I help you graph today?
63+
<TipsInfoButton />
6264
</Typography>
6365

6466
<QuerySection>

0 commit comments

Comments
 (0)