diff options
Diffstat (limited to 'packages/cli/src/gemini.tsx')
| -rw-r--r-- | packages/cli/src/gemini.tsx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/packages/cli/src/gemini.tsx b/packages/cli/src/gemini.tsx index 9efafecd..f7089e28 100644 --- a/packages/cli/src/gemini.tsx +++ b/packages/cli/src/gemini.tsx @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +import React from 'react'; import { render } from 'ink'; -import { MainComponent } from './ui/MainComponent.js'; +import { AppWrapper } from './ui/App.js'; import { loadCliConfig, parseArguments } from './config/config.js'; import { readStdin } from './utils/readStdin.js'; import { basename } from 'node:path'; @@ -45,6 +46,7 @@ import { detectAndEnableKittyProtocol } from './ui/utils/kittyProtocolDetector.j import { checkForUpdates } from './ui/utils/updateCheck.js'; import { handleAutoUpdate } from './utils/handleAutoUpdate.js'; import { appEvents, AppEvent } from './utils/events.js'; +import { SettingsContext } from './ui/contexts/SettingsContext.js'; export function validateDnsResolutionOrder( order: string | undefined, @@ -273,20 +275,18 @@ export async function main() { // Detect and enable Kitty keyboard protocol once at startup await detectAndEnableKittyProtocol(); setWindowTitle(basename(workspaceRoot), settings); - const instance = render( - <MainComponent - initialConfig={config} - settings={settings} - startupWarnings={startupWarnings} - version={version} - workspaceRoot={workspaceRoot} - extensions={extensions} - argv={argv} - />, - { - exitOnCtrlC: false, - }, + <React.StrictMode> + <SettingsContext.Provider value={settings}> + <AppWrapper + config={config} + settings={settings} + startupWarnings={startupWarnings} + version={version} + /> + </SettingsContext.Provider> + </React.StrictMode>, + { exitOnCtrlC: false }, ); checkForUpdates() |
