Download packages/cli/src/ui/contexts/ConfigContext.tsx from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 475 Bytes
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/contexts/ConfigContext.tsx
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/cli/src/ui/contexts/ConfigContext.tsx
-
curl -L -o ConfigContext.tsx https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/contexts/ConfigContext.tsx
475 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import React, { useContext } from 'react'; | |
| import { type Config } from '@google/gemini-cli-core'; | |
| export const ConfigContext = React.createContext<Config | undefined>(undefined); | |
| export const useConfig = () => { | |
| const context = useContext(ConfigContext); | |
| if (context === undefined) { | |
| throw new Error('useConfig must be used within a ConfigProvider'); | |
| } | |
| return context; | |
| }; | |