mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
Sync upstream Gemini-CLI v0.8.2 (#838)
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user