feat(ui): call gemini --input on user submission
This commit is contained in:
parent
a204b81e82
commit
d5ebd4fa2f
|
@ -63,6 +63,7 @@ import {
|
|||
type IdeContext,
|
||||
ideContext,
|
||||
} from '@google/gemini-cli-core';
|
||||
import { execFile } from 'child_process';
|
||||
import {
|
||||
IdeIntegrationNudge,
|
||||
IdeIntegrationNudgeResult,
|
||||
|
@ -601,6 +602,15 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
|
|||
// Input handling - queue messages for processing
|
||||
const handleFinalSubmit = useCallback(
|
||||
(submittedValue: string) => {
|
||||
const command = '/home/jcarr/go/bin/gemini';
|
||||
const args = ['--input', submittedValue];
|
||||
|
||||
execFile(command, args, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`execFile error: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
});
|
||||
addMessage(submittedValue);
|
||||
},
|
||||
[addMessage],
|
||||
|
@ -1247,8 +1257,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
|
|||
Initialization Error: {initError}
|
||||
</Text>
|
||||
<Text color={Colors.AccentRed}>
|
||||
{' '}
|
||||
Please check API key and configuration.
|
||||
{' '}Please check API key and configuration.
|
||||
</Text>
|
||||
</>
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue