2025-04-18 17:44:24 -07:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-04-30 08:31:32 -07:00
|
|
|
import React, { useCallback } from 'react';
|
2025-05-20 16:50:32 -07:00
|
|
|
import { Text, Box, useInput, useStdin } from 'ink';
|
2025-04-19 12:38:09 -04:00
|
|
|
import { Colors } from '../colors.js';
|
2025-05-20 16:50:32 -07:00
|
|
|
import { SuggestionsDisplay } from './SuggestionsDisplay.js';
|
2025-05-13 16:23:14 -07:00
|
|
|
import { useInputHistory } from '../hooks/useInputHistory.js';
|
2025-05-20 16:50:32 -07:00
|
|
|
import { useTextBuffer, cpSlice, cpLen } from './shared/text-buffer.js';
|
|
|
|
|
import chalk from 'chalk';
|
|
|
|
|
import { useTerminalSize } from '../hooks/useTerminalSize.js';
|
|
|
|
|
import stringWidth from 'string-width';
|
|
|
|
|
import process from 'node:process';
|
|
|
|
|
import { useCompletion } from '../hooks/useCompletion.js';
|
|
|
|
|
import { isAtCommand, isSlashCommand } from '../utils/commandUtils.js';
|
|
|
|
|
import { SlashCommand } from '../hooks/slashCommandProcessor.js';
|
2025-05-30 18:25:47 -07:00
|
|
|
import { Config } from '@gemini-code/core';
|
2025-04-18 11:12:18 -07:00
|
|
|
|
Initial commit of Gemini Code CLI
This commit introduces the initial codebase for the Gemini Code CLI, a command-line interface designed to facilitate interaction with the Gemini API for software engineering tasks.
The code was migrated from a previous git repository as a single squashed commit.
Core Features & Components:
* **Gemini Integration:** Leverages the `@google/genai` SDK to interact with the Gemini models, supporting chat history, streaming responses, and function calling (tools).
* **Terminal UI:** Built with Ink (React for CLIs) providing an interactive chat interface within the terminal, including input prompts, message display, loading indicators, and tool interaction elements.
* **Tooling Framework:** Implements a robust tool system allowing Gemini to interact with the local environment. Includes tools for:
* File system listing (`ls`)
* File reading (`read-file`)
* Content searching (`grep`)
* File globbing (`glob`)
* File editing (`edit`)
* File writing (`write-file`)
* Executing bash commands (`terminal`)
* **State Management:** Handles the streaming state of Gemini responses and manages the conversation history.
* **Configuration:** Parses command-line arguments (`yargs`) and loads environment variables (`dotenv`) for setup.
* **Project Structure:** Organized into `core`, `ui`, `tools`, `config`, and `utils` directories using TypeScript. Includes basic build (`tsc`) and start scripts.
This initial version establishes the foundation for a powerful CLI tool enabling developers to use Gemini for coding assistance directly in their terminal environment.
---
Created by yours truly: __Gemini Code__
2025-04-15 21:41:08 -07:00
|
|
|
interface InputPromptProps {
|
2025-04-17 18:06:21 -04:00
|
|
|
onSubmit: (value: string) => void;
|
2025-05-13 16:23:14 -07:00
|
|
|
userMessages: readonly string[];
|
2025-05-14 17:33:37 -07:00
|
|
|
onClearScreen: () => void;
|
2025-05-20 16:50:32 -07:00
|
|
|
config: Config; // Added config for useCompletion
|
|
|
|
|
slashCommands: SlashCommand[]; // Added slashCommands for useCompletion
|
|
|
|
|
placeholder?: string;
|
|
|
|
|
height?: number; // Visible height of the editor area
|
|
|
|
|
focus?: boolean;
|
|
|
|
|
widthFraction: number;
|
2025-05-18 01:18:32 -07:00
|
|
|
shellModeActive: boolean;
|
|
|
|
|
setShellModeActive: (value: boolean) => void;
|
2025-05-13 11:24:04 -07:00
|
|
|
}
|
|
|
|
|
|
2025-04-30 08:31:32 -07:00
|
|
|
export const InputPrompt: React.FC<InputPromptProps> = ({
|
|
|
|
|
onSubmit,
|
2025-05-13 16:23:14 -07:00
|
|
|
userMessages,
|
2025-05-14 17:33:37 -07:00
|
|
|
onClearScreen,
|
2025-05-20 16:50:32 -07:00
|
|
|
config,
|
|
|
|
|
slashCommands,
|
2025-05-21 07:55:20 -07:00
|
|
|
placeholder = 'Type your message or @path/to/file',
|
2025-05-20 16:50:32 -07:00
|
|
|
height = 10,
|
|
|
|
|
focus = true,
|
|
|
|
|
widthFraction,
|
2025-05-18 01:18:32 -07:00
|
|
|
shellModeActive,
|
|
|
|
|
setShellModeActive,
|
2025-04-30 08:31:32 -07:00
|
|
|
}) => {
|
2025-05-20 16:50:32 -07:00
|
|
|
const terminalSize = useTerminalSize();
|
|
|
|
|
const padding = 3;
|
|
|
|
|
const effectiveWidth = Math.max(
|
|
|
|
|
20,
|
|
|
|
|
Math.round(terminalSize.columns * widthFraction) - padding,
|
|
|
|
|
);
|
|
|
|
|
const suggestionsWidth = Math.max(60, Math.floor(terminalSize.columns * 0.8));
|
|
|
|
|
|
|
|
|
|
const { stdin, setRawMode } = useStdin();
|
|
|
|
|
|
|
|
|
|
const buffer = useTextBuffer({
|
|
|
|
|
initialText: '',
|
|
|
|
|
viewport: { height, width: effectiveWidth },
|
|
|
|
|
stdin,
|
|
|
|
|
setRawMode,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const completion = useCompletion(
|
|
|
|
|
buffer.text,
|
|
|
|
|
config.getTargetDir(),
|
|
|
|
|
isAtCommand(buffer.text) || isSlashCommand(buffer.text),
|
|
|
|
|
slashCommands,
|
Ignore folders files (#651)
# Add .gitignore-Aware File Filtering to gemini-cli
This pull request introduces .gitignore-based file filtering to the gemini-cli, ensuring that git-ignored files are automatically excluded from file-related operations and suggestions throughout the CLI. The update enhances usability, reduces noise from build artifacts and dependencies, and provides new configuration options for fine-tuning file discovery.
Key Improvements
.gitignore File Filtering
All @ (at) commands, file completions, and core discovery tools now honor .gitignore patterns by default.
Git-ignored files (such as node_modules/, dist/, .env, and .git) are excluded from results unless explicitly overridden.
The behavior can be customized via a new fileFiltering section in settings.json, including options for:
Turning .gitignore respect on/off.
Adding custom ignore patterns.
Allowing or excluding build artifacts.
Configuration & Documentation Updates
settings.json schema extended with fileFiltering options.
Documentation updated to explain new filtering controls and usage patterns.
Testing
New and updated integration/unit tests for file filtering logic, configuration merging, and edge cases.
Test coverage ensures .gitignore filtering works as intended across different workflows.
Internal Refactoring
Core file discovery logic refactored for maintainability and extensibility.
Underlying tools (ls, glob, read-many-files) now support git-aware filtering out of the box.
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-03 21:40:46 -07:00
|
|
|
config,
|
2025-05-20 16:50:32 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const resetCompletionState = completion.resetCompletionState;
|
|
|
|
|
|
|
|
|
|
const handleSubmitAndClear = useCallback(
|
2025-05-13 16:23:14 -07:00
|
|
|
(submittedValue: string) => {
|
2025-05-30 15:16:06 -07:00
|
|
|
// Clear the buffer *before* calling onSubmit to prevent potential re-submission
|
|
|
|
|
// if onSubmit triggers a re-render while the buffer still holds the old value.
|
2025-05-20 16:50:32 -07:00
|
|
|
buffer.setText('');
|
2025-05-30 15:16:06 -07:00
|
|
|
onSubmit(submittedValue);
|
2025-05-20 16:50:32 -07:00
|
|
|
resetCompletionState();
|
2025-05-13 16:23:14 -07:00
|
|
|
},
|
2025-05-20 16:50:32 -07:00
|
|
|
[onSubmit, buffer, resetCompletionState],
|
|
|
|
|
);
|
|
|
|
|
|
2025-05-13 16:23:14 -07:00
|
|
|
const inputHistory = useInputHistory({
|
|
|
|
|
userMessages,
|
2025-05-20 16:50:32 -07:00
|
|
|
onSubmit: handleSubmitAndClear,
|
|
|
|
|
isActive: !completion.showSuggestions,
|
|
|
|
|
currentQuery: buffer.text,
|
2025-05-23 09:40:01 -07:00
|
|
|
onChange: buffer.setText,
|
2025-05-13 16:23:14 -07:00
|
|
|
});
|
|
|
|
|
|
2025-05-20 16:50:32 -07:00
|
|
|
const completionSuggestions = completion.suggestions;
|
2025-05-07 12:30:32 -07:00
|
|
|
const handleAutocomplete = useCallback(
|
|
|
|
|
(indexToUse: number) => {
|
2025-05-20 16:50:32 -07:00
|
|
|
if (indexToUse < 0 || indexToUse >= completionSuggestions.length) {
|
2025-05-07 12:30:32 -07:00
|
|
|
return;
|
|
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
const query = buffer.text;
|
|
|
|
|
const selectedSuggestion = completionSuggestions[indexToUse];
|
2025-04-30 08:31:32 -07:00
|
|
|
|
2025-05-20 16:50:32 -07:00
|
|
|
if (query.trimStart().startsWith('/')) {
|
2025-05-07 12:30:32 -07:00
|
|
|
const slashIndex = query.indexOf('/');
|
|
|
|
|
const base = query.substring(0, slashIndex + 1);
|
|
|
|
|
const newValue = base + selectedSuggestion.value;
|
2025-05-20 16:50:32 -07:00
|
|
|
buffer.setText(newValue);
|
|
|
|
|
handleSubmitAndClear(newValue);
|
2025-05-07 12:30:32 -07:00
|
|
|
} else {
|
|
|
|
|
const atIndex = query.lastIndexOf('@');
|
|
|
|
|
if (atIndex === -1) return;
|
|
|
|
|
const pathPart = query.substring(atIndex + 1);
|
|
|
|
|
const lastSlashIndexInPath = pathPart.lastIndexOf('/');
|
2025-05-20 16:50:32 -07:00
|
|
|
let autoCompleteStartIndex = atIndex + 1;
|
|
|
|
|
if (lastSlashIndexInPath !== -1) {
|
|
|
|
|
autoCompleteStartIndex += lastSlashIndexInPath + 1;
|
2025-05-07 12:30:32 -07:00
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
buffer.replaceRangeByOffset(
|
|
|
|
|
autoCompleteStartIndex,
|
|
|
|
|
buffer.text.length,
|
|
|
|
|
selectedSuggestion.value,
|
|
|
|
|
);
|
2025-05-07 12:30:32 -07:00
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
resetCompletionState();
|
2025-05-07 12:30:32 -07:00
|
|
|
},
|
2025-05-20 16:50:32 -07:00
|
|
|
[resetCompletionState, handleSubmitAndClear, buffer, completionSuggestions],
|
2025-05-07 12:30:32 -07:00
|
|
|
);
|
2025-04-30 08:31:32 -07:00
|
|
|
|
2025-05-20 16:50:32 -07:00
|
|
|
useInput(
|
|
|
|
|
(input, key) => {
|
|
|
|
|
if (!focus) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const query = buffer.text;
|
|
|
|
|
|
|
|
|
|
if (input === '!' && query === '' && !completion.showSuggestions) {
|
2025-05-18 01:18:32 -07:00
|
|
|
setShellModeActive(!shellModeActive);
|
2025-05-20 16:50:32 -07:00
|
|
|
buffer.setText(''); // Clear the '!' from input
|
2025-05-18 01:18:32 -07:00
|
|
|
return true;
|
|
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
|
|
|
|
|
if (completion.showSuggestions) {
|
2025-04-30 08:31:32 -07:00
|
|
|
if (key.upArrow) {
|
2025-05-20 16:50:32 -07:00
|
|
|
completion.navigateUp();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (key.downArrow) {
|
|
|
|
|
completion.navigateDown();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (key.tab) {
|
|
|
|
|
if (completion.suggestions.length > 0) {
|
2025-05-07 12:30:32 -07:00
|
|
|
const targetIndex =
|
2025-05-20 16:50:32 -07:00
|
|
|
completion.activeSuggestionIndex === -1
|
|
|
|
|
? 0
|
|
|
|
|
: completion.activeSuggestionIndex;
|
|
|
|
|
if (targetIndex < completion.suggestions.length) {
|
2025-05-07 12:30:32 -07:00
|
|
|
handleAutocomplete(targetIndex);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (key.return) {
|
|
|
|
|
if (completion.activeSuggestionIndex >= 0) {
|
|
|
|
|
handleAutocomplete(completion.activeSuggestionIndex);
|
|
|
|
|
} else if (query.trim()) {
|
|
|
|
|
handleSubmitAndClear(query);
|
2025-05-07 12:30:32 -07:00
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
return;
|
2025-04-19 19:45:42 +01:00
|
|
|
}
|
2025-05-14 17:33:37 -07:00
|
|
|
} else {
|
|
|
|
|
// Keybindings when suggestions are not shown
|
|
|
|
|
if (key.ctrl && input === 'l') {
|
|
|
|
|
onClearScreen();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (key.ctrl && input === 'p') {
|
|
|
|
|
inputHistory.navigateUp();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (key.ctrl && input === 'n') {
|
|
|
|
|
inputHistory.navigateDown();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
if (key.escape) {
|
2025-05-20 22:45:10 -07:00
|
|
|
if (shellModeActive) {
|
|
|
|
|
setShellModeActive(false);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
completion.resetCompletionState();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Ctrl+A (Home)
|
|
|
|
|
if (key.ctrl && input === 'a') {
|
|
|
|
|
buffer.move('home');
|
|
|
|
|
buffer.moveToOffset(0);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// Ctrl+E (End)
|
|
|
|
|
if (key.ctrl && input === 'e') {
|
|
|
|
|
buffer.move('end');
|
|
|
|
|
buffer.moveToOffset(cpLen(buffer.text));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// Ctrl+L (Clear Screen)
|
|
|
|
|
if (key.ctrl && input === 'l') {
|
|
|
|
|
onClearScreen();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// Ctrl+P (History Up)
|
|
|
|
|
if (key.ctrl && input === 'p' && !completion.showSuggestions) {
|
|
|
|
|
inputHistory.navigateUp();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// Ctrl+N (History Down)
|
|
|
|
|
if (key.ctrl && input === 'n' && !completion.showSuggestions) {
|
|
|
|
|
inputHistory.navigateDown();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Core text editing from MultilineTextEditor's useInput
|
|
|
|
|
if (key.ctrl && input === 'k') {
|
|
|
|
|
buffer.killLineRight();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (key.ctrl && input === 'u') {
|
|
|
|
|
buffer.killLineLeft();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const isCtrlX =
|
|
|
|
|
(key.ctrl && (input === 'x' || input === '\x18')) || input === '\x18';
|
|
|
|
|
const isCtrlEFromEditor =
|
|
|
|
|
(key.ctrl && (input === 'e' || input === '\x05')) ||
|
|
|
|
|
input === '\x05' ||
|
|
|
|
|
(!key.ctrl &&
|
|
|
|
|
input === 'e' &&
|
|
|
|
|
input.length === 1 &&
|
|
|
|
|
input.charCodeAt(0) === 5);
|
|
|
|
|
|
|
|
|
|
if (isCtrlX || isCtrlEFromEditor) {
|
|
|
|
|
if (isCtrlEFromEditor && !(key.ctrl && input === 'e')) {
|
|
|
|
|
// Avoid double handling Ctrl+E
|
|
|
|
|
buffer.openInExternalEditor();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isCtrlX) {
|
|
|
|
|
buffer.openInExternalEditor();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
process.env['TEXTBUFFER_DEBUG'] === '1' ||
|
|
|
|
|
process.env['TEXTBUFFER_DEBUG'] === 'true'
|
|
|
|
|
) {
|
|
|
|
|
console.log('[InputPromptCombined] event', { input, key });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Ctrl+Enter for newline, Enter for submit
|
|
|
|
|
if (key.return) {
|
|
|
|
|
if (key.ctrl) {
|
|
|
|
|
// Ctrl+Enter for newline
|
|
|
|
|
buffer.newline();
|
|
|
|
|
} else {
|
|
|
|
|
// Enter for submit
|
|
|
|
|
if (query.trim()) {
|
|
|
|
|
handleSubmitAndClear(query);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Standard arrow navigation within the buffer
|
|
|
|
|
if (key.upArrow && !completion.showSuggestions) {
|
|
|
|
|
if (
|
|
|
|
|
buffer.visualCursor[0] === 0 &&
|
|
|
|
|
buffer.visualScrollRow === 0 &&
|
|
|
|
|
inputHistory.navigateUp
|
|
|
|
|
) {
|
|
|
|
|
inputHistory.navigateUp();
|
|
|
|
|
} else {
|
|
|
|
|
buffer.move('up');
|
|
|
|
|
}
|
|
|
|
|
return;
|
2025-04-19 19:45:42 +01:00
|
|
|
}
|
2025-05-20 16:50:32 -07:00
|
|
|
if (key.downArrow && !completion.showSuggestions) {
|
|
|
|
|
if (
|
|
|
|
|
buffer.visualCursor[0] === buffer.allVisualLines.length - 1 &&
|
|
|
|
|
inputHistory.navigateDown
|
|
|
|
|
) {
|
|
|
|
|
inputHistory.navigateDown();
|
|
|
|
|
} else {
|
|
|
|
|
buffer.move('down');
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Fallback to buffer's default input handling
|
|
|
|
|
buffer.handleInput(input, key as Record<string, boolean>);
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
isActive: focus,
|
2025-04-19 19:45:42 +01:00
|
|
|
},
|
|
|
|
|
);
|
2025-04-18 17:06:16 +01:00
|
|
|
|
2025-05-20 16:50:32 -07:00
|
|
|
const linesToRender = buffer.viewportVisualLines;
|
|
|
|
|
const [cursorVisualRowAbsolute, cursorVisualColAbsolute] =
|
|
|
|
|
buffer.visualCursor;
|
|
|
|
|
const scrollVisualRow = buffer.visualScrollRow;
|
|
|
|
|
|
2025-04-17 18:06:21 -04:00
|
|
|
return (
|
2025-05-20 16:50:32 -07:00
|
|
|
<>
|
|
|
|
|
<Box
|
|
|
|
|
borderStyle="round"
|
|
|
|
|
borderColor={shellModeActive ? Colors.AccentYellow : Colors.AccentBlue}
|
|
|
|
|
paddingX={1}
|
|
|
|
|
>
|
|
|
|
|
<Text
|
|
|
|
|
color={shellModeActive ? Colors.AccentYellow : Colors.AccentPurple}
|
|
|
|
|
>
|
|
|
|
|
{shellModeActive ? '! ' : '> '}
|
|
|
|
|
</Text>
|
|
|
|
|
<Box flexGrow={1} flexDirection="column">
|
|
|
|
|
{buffer.text.length === 0 && placeholder ? (
|
|
|
|
|
<Text color={Colors.SubtleComment}>{placeholder}</Text>
|
|
|
|
|
) : (
|
|
|
|
|
linesToRender.map((lineText, visualIdxInRenderedSet) => {
|
|
|
|
|
const cursorVisualRow = cursorVisualRowAbsolute - scrollVisualRow;
|
|
|
|
|
let display = cpSlice(lineText, 0, effectiveWidth);
|
|
|
|
|
const currentVisualWidth = stringWidth(display);
|
|
|
|
|
if (currentVisualWidth < effectiveWidth) {
|
|
|
|
|
display =
|
|
|
|
|
display + ' '.repeat(effectiveWidth - currentVisualWidth);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (visualIdxInRenderedSet === cursorVisualRow) {
|
|
|
|
|
const relativeVisualColForHighlight = cursorVisualColAbsolute;
|
|
|
|
|
if (relativeVisualColForHighlight >= 0) {
|
|
|
|
|
if (relativeVisualColForHighlight < cpLen(display)) {
|
|
|
|
|
const charToHighlight =
|
|
|
|
|
cpSlice(
|
|
|
|
|
display,
|
|
|
|
|
relativeVisualColForHighlight,
|
|
|
|
|
relativeVisualColForHighlight + 1,
|
|
|
|
|
) || ' ';
|
|
|
|
|
const highlighted = chalk.inverse(charToHighlight);
|
|
|
|
|
display =
|
|
|
|
|
cpSlice(display, 0, relativeVisualColForHighlight) +
|
|
|
|
|
highlighted +
|
|
|
|
|
cpSlice(display, relativeVisualColForHighlight + 1);
|
|
|
|
|
} else if (
|
|
|
|
|
relativeVisualColForHighlight === cpLen(display) &&
|
|
|
|
|
cpLen(display) === effectiveWidth
|
|
|
|
|
) {
|
|
|
|
|
display = display + chalk.inverse(' ');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<Text key={`line-${visualIdxInRenderedSet}`}>{display}</Text>
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
)}
|
|
|
|
|
</Box>
|
2025-04-19 12:38:09 -04:00
|
|
|
</Box>
|
2025-05-20 16:50:32 -07:00
|
|
|
{completion.showSuggestions && (
|
|
|
|
|
<Box>
|
|
|
|
|
<SuggestionsDisplay
|
|
|
|
|
suggestions={completion.suggestions}
|
|
|
|
|
activeIndex={completion.activeSuggestionIndex}
|
|
|
|
|
isLoading={completion.isLoadingSuggestions}
|
|
|
|
|
width={suggestionsWidth}
|
|
|
|
|
scrollOffset={completion.visibleStartIndex}
|
|
|
|
|
userInput={buffer.text}
|
|
|
|
|
/>
|
|
|
|
|
</Box>
|
|
|
|
|
)}
|
|
|
|
|
</>
|
2025-04-17 18:06:21 -04:00
|
|
|
);
|
2025-04-18 18:08:43 -04:00
|
|
|
};
|