Elffuss BraidHub

kikocis/continue public

e8ee99375f3e · 746 BRawPermalink
1import { useAppDispatch } from "../../../../redux/hooks";
2import { cancelStream } from "../../../../redux/thunks/cancelStream";
3import { getAltKeyLabel, getMetaKeyLabel, isJetBrains } from "../../../../util";
4import { Container, StopButton } from "./components";
5import { GeneratingIndicator } from "./GeneratingIndicator";
6
7export function StreamingToolbar() {
8 const dispatch = useAppDispatch();
9 const jetbrains = isJetBrains();
10
11 return (
12 <Container>
13 <GeneratingIndicator />
14 <StopButton
15 className="text-description"
16 onClick={() => {
17 void dispatch(cancelStream());
18 }}
19 >
20 {jetbrains ? getAltKeyLabel() : getMetaKeyLabel()} ⌫ Cancel
21 </StopButton>
22 </Container>
23 );
24}