Sync upstream Gemini-CLI v0.8.2 (#838)

This commit is contained in:
tanzhenxin
2025-10-23 09:27:04 +08:00
committed by GitHub
parent 096fabb5d6
commit eb95c131be
644 changed files with 70389 additions and 23709 deletions

View File

@@ -5,7 +5,7 @@
*/
import { useCallback, useState, useEffect } from 'react';
import { Box, Text, useInput } from 'ink';
import { Box, Text } from 'ink';
import type { WizardStepProps } from '../types.js';
import type {
SubagentManager,
@@ -14,6 +14,7 @@ import type {
import { theme } from '../../../semantic-colors.js';
import { shouldShowColor, getColorForDisplay } from '../utils.js';
import { useLaunchEditor } from '../../../hooks/useLaunchEditor.js';
import { useKeypress } from '../../../hooks/useKeypress.js';
/**
* Step 6: Final confirmation and actions.
@@ -192,19 +193,22 @@ export function CreationSummary({
]);
// Handle keyboard input
useInput((input, key) => {
if (saveSuccess) return;
useKeypress(
(key) => {
if (saveSuccess) return;
if (key.return || input === 's') {
handleSave();
return;
}
if (key.name === 'return' || key.sequence === 's') {
handleSave();
return;
}
if (input === 'e') {
handleEdit();
return;
}
});
if (key.sequence === 'e') {
handleEdit();
return;
}
},
{ isActive: true },
);
if (saveSuccess) {
return (