mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 23:16:56 +00:00
Update QueryCopilotPromptbar.tsx
This commit is contained in:
parent
8599f1d98c
commit
f6ebb20ff1
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user