mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 05:00:46 +00:00
Add autocomplete for slash commands
This commit is contained in:
parent
f237082c37
commit
cc838fad44
4 changed files with 62 additions and 17 deletions
|
|
@ -26,7 +26,7 @@ import { ConsoleOutput } from './components/ConsolePatcher.js';
|
|||
import { HistoryItemDisplay } from './components/HistoryItemDisplay.js';
|
||||
import { useCompletion } from './hooks/useCompletion.js';
|
||||
import { SuggestionsDisplay } from './components/SuggestionsDisplay.js';
|
||||
import { isAtCommand } from './utils/commandUtils.js';
|
||||
import { isAtCommand, isSlashCommand } from './utils/commandUtils.js';
|
||||
|
||||
interface AppProps {
|
||||
config: Config;
|
||||
|
|
@ -96,7 +96,8 @@ export const App = ({ config, settings, cliVersion }: AppProps) => {
|
|||
const completion = useCompletion(
|
||||
query,
|
||||
config.getTargetDir(),
|
||||
isInputActive && isAtCommand(query),
|
||||
isInputActive && (isAtCommand(query) || isSlashCommand(query)),
|
||||
slashCommands,
|
||||
);
|
||||
|
||||
// --- Render Logic ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue