Download apps/vscode/webview-ui/src/main.tsx from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vscode/webview-ui/src/main.tsx
- Command line
-
hf download hf://SaylorTwift/kimi-code/apps/vscode/webview-ui/src/main.tsx
-
curl -L -o main.tsx https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vscode/webview-ui/src/main.tsx
767 Bytes
| import { StrictMode } from "react"; | |
| import { createRoot } from "react-dom/client"; | |
| import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | |
| import App from "./App"; | |
| function syncTheme() { | |
| const isDark = document.body.classList.contains("vscode-dark"); | |
| document.documentElement.classList.toggle("dark", isDark); | |
| } | |
| syncTheme(); | |
| const observer = new MutationObserver(syncTheme); | |
| observer.observe(document.body, { | |
| attributes: true, | |
| attributeFilter: ["class"], | |
| }); | |
| const container = document.getElementById("root"); | |
| const queryClient = new QueryClient(); | |
| if (container) { | |
| createRoot(container).render( | |
| <StrictMode> | |
| <QueryClientProvider client={queryClient}> | |
| <App /> | |
| </QueryClientProvider> | |
| </StrictMode>, | |
| ); | |
| } | |