-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teacher Tool: Copilot Criteria Support (#9953)
This change adds the front-end support for copilot criteria. In essence, we call into the backend with the Share ID of the project and the question being asked, then the backend forwards that information to DeepPrompt and returns the result to us. The backend changes will not be checked in until we get more feedback and a better sense for funding, so this change has a few workarounds to compensate while still enabling easy demos and experimentation. Notably, there is a new "copilot" flag that can be set to point the copilot backend request to a staging slot. For example, http://localhost:3232/eval?copilot=thsparks sets it to the thsparks staging slot.
- Loading branch information
Showing
22 changed files
with
329 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { classList } from "react-common/components/util"; | ||
import css from "./styling/ThreeDotsLoadingDisplay.module.scss"; | ||
import { Strings } from "../constants"; | ||
|
||
export interface ThreeDotsLoadingDisplayProps { | ||
className?: string; | ||
} | ||
// Three dots that move up and down in a wave pattern. | ||
export const ThreeDotsLoadingDisplay: React.FC<ThreeDotsLoadingDisplayProps> = ({ className }) => { | ||
return ( | ||
<div className={classList(className, css["loading-ellipsis"])} aria-label={Strings.Loading}> | ||
<i className={classList("far fa-circle", css["circle"], css["circle-1"])} aria-hidden={true} /> | ||
<i className={classList("far fa-circle", css["circle"], css["circle-2"])} aria-hidden={true} /> | ||
<i className={classList("far fa-circle", css["circle"], css["circle-3"])} aria-hidden={true} /> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
teachertool/src/components/styling/ThreeDotsLoadingDisplay.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.loading-ellipsis { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1rem; | ||
padding-top: 1rem; | ||
align-items: center; | ||
color: var(--pxt-content-foreground); | ||
|
||
.circle { | ||
font-size: 1rem; | ||
|
||
@keyframes bounce { | ||
0% { | ||
transform: translateY(0); | ||
} | ||
|
||
25% { | ||
transform: translateY(-0.5rem); | ||
} | ||
|
||
50% { | ||
transform: translateY(0); | ||
} | ||
|
||
100% { | ||
transform: translateY(0); | ||
} | ||
} | ||
|
||
animation: bounce 750ms infinite ease-in-out; | ||
} | ||
|
||
.circle-1 { | ||
animation-delay: 0ms; | ||
} | ||
|
||
.circle-2 { | ||
animation-delay: 125ms; | ||
} | ||
|
||
.circle-3 { | ||
animation-delay: 250ms; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.