Update QueryCopilotPromptbar.tsx

This commit is contained in:
MokireddySampath 2024-01-30 00:24:05 +05:30 committed by GitHub
parent 8599f1d98c
commit f6ebb20ff1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,18 +325,15 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
const handlekeydown: React.KeyboardEventHandler = (e) => {
const { key } = e;
let nexIndexCount = 0;
const nexIndexCount = 0;
if (key === "ArrowDown") {
nexIndexCount = (focusedindex + 1) % suggestionsnhistory.length;
console.log(nexIndexCount);
}
if (key === "ArrowUp") {
nexIndexCount = (focusedindex + suggestionsnhistory.length - 1) % suggestionsnhistory.length;
console.log(nexIndexCount);
}
if (key === "Enter") {
e.preventDefault();
console.log(focusedindex);
handleSelection(focusedindex);
}
setFocusedindex(nexIndexCount);
@ -358,7 +355,6 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
const handlepromptset = (prompttext: string) => {
inputEdited.current = true;
setUserPrompt(prompttext);
console.log("prompt", userPrompt);
};
return (