mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-29 00:47:01 +00:00
Fix teaching bubble timeout display (#1593)
This commit is contained in:
parent
6a8e87f45f
commit
0207f3cc04
@ -330,10 +330,9 @@ export const QueryCopilotTab: React.FC<QueryCopilotProps> = ({ explorer }: Query
|
|||||||
return [executeQueryBtn, saveQueryBtn];
|
return [executeQueryBtn, saveQueryBtn];
|
||||||
};
|
};
|
||||||
const showTeachingBubble = (): void => {
|
const showTeachingBubble = (): void => {
|
||||||
const shouldShowTeachingBubble = !inputEdited.current && userPrompt.trim() === "";
|
if (!inputEdited.current) {
|
||||||
if (shouldShowTeachingBubble) {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (shouldShowTeachingBubble) {
|
if (!inputEdited.current) {
|
||||||
toggleCopilotTeachingBubbleVisible();
|
toggleCopilotTeachingBubbleVisible();
|
||||||
inputEdited.current = true;
|
inputEdited.current = true;
|
||||||
}
|
}
|
||||||
@ -380,6 +379,7 @@ export const QueryCopilotTab: React.FC<QueryCopilotProps> = ({ explorer }: Query
|
|||||||
}}
|
}}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
|
inputEdited.current = true;
|
||||||
startGenerateQueryProcess();
|
startGenerateQueryProcess();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -450,6 +450,7 @@ export const QueryCopilotTab: React.FC<QueryCopilotProps> = ({ explorer }: Query
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setUserPrompt(history);
|
setUserPrompt(history);
|
||||||
setShowSamplePrompts(false);
|
setShowSamplePrompts(false);
|
||||||
|
inputEdited.current = true;
|
||||||
}}
|
}}
|
||||||
onRenderIcon={() => <Image src={RecentIcon} />}
|
onRenderIcon={() => <Image src={RecentIcon} />}
|
||||||
styles={promptStyles}
|
styles={promptStyles}
|
||||||
@ -479,6 +480,7 @@ export const QueryCopilotTab: React.FC<QueryCopilotProps> = ({ explorer }: Query
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setUserPrompt(prompt.text);
|
setUserPrompt(prompt.text);
|
||||||
setShowSamplePrompts(false);
|
setShowSamplePrompts(false);
|
||||||
|
inputEdited.current = true;
|
||||||
}}
|
}}
|
||||||
onRenderIcon={() => <Image src={HintIcon} />}
|
onRenderIcon={() => <Image src={HintIcon} />}
|
||||||
styles={promptStyles}
|
styles={promptStyles}
|
||||||
|
Loading…
Reference in New Issue
Block a user