-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: add stop button when generating code #63
Conversation
Apply Sweep Rules to your PR?
|
Should we cancel the request in python too? |
In my understanding, once the client side calls |
frontend/src/App.tsx
Outdated
@@ -26,8 +26,8 @@ import { UrlInputSection } from "./components/UrlInputSection"; | |||
import TermsOfServiceDialog from "./components/TermsOfServiceDialog"; | |||
|
|||
function App() { | |||
const [appState, setAppState] = useState<"INITIAL" | "CODING" | "CODE_READY">( | |||
"INITIAL" | |||
const [appState, setAppState] = useState<AppStatus>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, would be good to keep names like this consistent: AppStatus -> AppState. I'll update
frontend/src/types.ts
Outdated
CODE_READY = "CODE_READY", | ||
} | ||
|
||
export const USER_CLOSE_WEB_SOCKET_CODE = 4333; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would move this to constants.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not a type
Great job on this @clean99 thanks for your contribution |
4333
.4333
status code, it will set theAppStatus
toCODE_READY
and display stop successful toast.