mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-13 23:01:09 -07:00
feat(cli): undeprecate the --prompt flag (#13981)
Co-authored-by: Allen Hutchison <adh@google.com>
This commit is contained in:
committed by
GitHub
parent
fb7640886b
commit
a2dab146b9
@@ -51,7 +51,6 @@ interface RunNonInteractiveParams {
|
||||
settings: LoadedSettings;
|
||||
input: string;
|
||||
prompt_id: string;
|
||||
hasDeprecatedPromptArg?: boolean;
|
||||
resumedSessionData?: ResumedSessionData;
|
||||
}
|
||||
|
||||
@@ -60,7 +59,6 @@ export async function runNonInteractive({
|
||||
settings,
|
||||
input,
|
||||
prompt_id,
|
||||
hasDeprecatedPromptArg,
|
||||
resumedSessionData,
|
||||
}: RunNonInteractiveParams): Promise<void> {
|
||||
return promptIdContext.run(prompt_id, async () => {
|
||||
@@ -264,21 +262,6 @@ export async function runNonInteractive({
|
||||
let currentMessages: Content[] = [{ role: 'user', parts: query }];
|
||||
|
||||
let turnCount = 0;
|
||||
const deprecateText =
|
||||
'The --prompt (-p) flag has been deprecated and will be removed in a future version. Please use a positional argument for your prompt. See gemini --help for more information.\n';
|
||||
if (hasDeprecatedPromptArg) {
|
||||
if (streamFormatter) {
|
||||
streamFormatter.emitEvent({
|
||||
type: JsonStreamEventType.MESSAGE,
|
||||
timestamp: new Date().toISOString(),
|
||||
role: 'assistant',
|
||||
content: deprecateText,
|
||||
delta: true,
|
||||
});
|
||||
} else {
|
||||
process.stderr.write(deprecateText);
|
||||
}
|
||||
}
|
||||
while (true) {
|
||||
turnCount++;
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user