Elffuss BraidHub

kikocis/continue public

8eb3ae7b8d16 · 955 BRawPermalink
1import { useAppDispatch } from "../../../../redux/hooks";
2import { cancelStream } from "../../../../redux/thunks/cancelStream";
3import { getAltKeyLabel, getMetaKeyLabel, isJetBrains } from "../../../../util";
4import { GeneratingIndicator } from "./GeneratingIndicator";
5
6export function StreamingToolbar() {
7 const jetbrains = isJetBrains();
8 const dispatch = useAppDispatch();
9
10 return (
11 <div className="flex w-full items-center justify-between">
12 <GeneratingIndicator />
13 <div
14 onClick={() => void dispatch(cancelStream())}
15 className="text-2xs cursor-pointer px-1.5 py-0.5 hover:brightness-125"
16 >
17 <span className="text-description">Stop</span>
18 {/* JetBrains overrides cmd+backspace, so we have to use another shortcut */}
19 <span className="text-description-muted ml-1 opacity-75">
20 {jetbrains ? getAltKeyLabel() : getMetaKeyLabel()}⌫
21 </span>
22 </div>
23 </div>
24 );
25}