mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-06 02:47:56 +00:00
56 lines
1.3 KiB
TypeScript
56 lines
1.3 KiB
TypeScript
/**
|
|
* Autocomplete system for CLI input.
|
|
*
|
|
* This module provides a generic, extensible autocomplete system that supports
|
|
* multiple trigger patterns (like @ for files, / for commands) through a
|
|
* plugin-like trigger architecture.
|
|
*
|
|
* @example
|
|
* ```tsx
|
|
* import {
|
|
* AutocompleteInput,
|
|
* PickerSelect,
|
|
* useAutocompletePicker,
|
|
* createFileTrigger,
|
|
* createSlashCommandTrigger,
|
|
* } from './autocomplete'
|
|
*
|
|
* const triggers = [
|
|
* createFileTrigger({ onSearch, getResults }),
|
|
* createSlashCommandTrigger({ getCommands }),
|
|
* ]
|
|
*
|
|
* <AutocompleteInput
|
|
* triggers={triggers}
|
|
* onSubmit={handleSubmit}
|
|
* />
|
|
* ```
|
|
*/
|
|
|
|
// Main components
|
|
export { AutocompleteInput, type AutocompleteInputProps, type AutocompleteInputHandle } from "./AutocompleteInput.js"
|
|
export { PickerSelect, type PickerSelectProps } from "./PickerSelect.js"
|
|
|
|
// Hook
|
|
export { useAutocompletePicker } from "./useAutocompletePicker.js"
|
|
|
|
// Types
|
|
export type {
|
|
AutocompleteItem,
|
|
AutocompleteTrigger,
|
|
AutocompletePickerState,
|
|
AutocompletePickerActions,
|
|
TriggerDetectionResult,
|
|
} from "./types.js"
|
|
|
|
// Triggers
|
|
export {
|
|
createFileTrigger,
|
|
toFileResult,
|
|
type FileResult,
|
|
type FileTriggerConfig,
|
|
createSlashCommandTrigger,
|
|
toSlashCommandResult,
|
|
type SlashCommandResult,
|
|
type SlashCommandTriggerConfig,
|
|
} from "./triggers/index.js"
|