diff options
| author | Evan Senter <[email protected]> | 2025-04-19 19:45:42 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-19 19:45:42 +0100 |
| commit | 3fce6cea27d3e6129d6c06e528b62e1b11bf7094 (patch) | |
| tree | 244b8e9ab94f902d65d4bda8739a6538e377ed17 /packages/cli/src/gemini.ts | |
| parent | 0c9e1ef61be7db53e6e73b7208b649cd8cbed6c3 (diff) | |
Starting to modularize into separate cli / server packages. (#55)
* Starting to move a lot of code into packages/server
* More of the massive refactor, builds and runs, some issues though.
* Fixing outstanding issue with double messages.
* Fixing a minor UI issue.
* Fixing the build post-merge.
* Running formatting.
* Addressing comments.
Diffstat (limited to 'packages/cli/src/gemini.ts')
| -rw-r--r-- | packages/cli/src/gemini.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/cli/src/gemini.ts b/packages/cli/src/gemini.ts index feab6c17..c69810a5 100644 --- a/packages/cli/src/gemini.ts +++ b/packages/cli/src/gemini.ts @@ -16,20 +16,19 @@ import { EditTool } from './tools/edit.tool.js'; import { TerminalTool } from './tools/terminal.tool.js'; import { WriteFileTool } from './tools/write-file.tool.js'; import { WebFetchTool } from './tools/web-fetch.tool.js'; -import { globalConfig } from './config/config.js'; - -// TODO(b/411707095): remove. left here as an example of how to pull in inter-package deps -import { helloServer } from '@gemini-code/server'; -helloServer(); +import { loadCliConfig } from './config/config.js'; async function main() { - // Configure tools - registerTools(globalConfig.getTargetDir()); + // Load configuration + const config = loadCliConfig(); + + // Configure tools using the loaded config + registerTools(config.getTargetDir()); - // Render UI + // Render UI, passing necessary config values render( React.createElement(App, { - directory: globalConfig.getTargetDir(), + config, }), ); } @@ -81,12 +80,13 @@ main().catch((error) => { }); function registerTools(targetDir: string) { + const config = loadCliConfig(); const lsTool = new LSTool(targetDir); const readFileTool = new ReadFileTool(targetDir); const grepTool = new GrepTool(targetDir); const globTool = new GlobTool(targetDir); const editTool = new EditTool(targetDir); - const terminalTool = new TerminalTool(targetDir); + const terminalTool = new TerminalTool(targetDir, config); const writeFileTool = new WriteFileTool(targetDir); const webFetchTool = new WebFetchTool(); |
