-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
properly display popup content #711
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
import type {SVGProps} from 'react' | ||
const SvgExclamation = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} fill="none" {...props}> | ||
<path | ||
fill="#D40000" | ||
d="M8.5 11a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0M7.5 5v4a.5.5 0 0 0 1 0V5a.5.5 0 0 0-1 0" | ||
/> | ||
<path | ||
fill="#D40000" | ||
fillRule="evenodd" | ||
d="M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12m0-1A5 5 0 1 0 8 3a5 5 0 0 0 0 10" | ||
clipRule="evenodd" | ||
/> | ||
</svg> | ||
) | ||
export default SvgExclamation |
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,44 @@ | ||
import {Question} from '~/server-utils/stampy' | ||
import {useOnSiteQuestions as getQuestions} from './useCachedObjects' | ||
import {useEffect, useState} from 'react' | ||
|
||
const topQuestions = [ | ||
'6953', // Do people seriously worry about existential risk from AI? debugger eval code:1:26 | ||
'6194', // Is AI safety about systems becoming malevolent or conscious? debugger eval code:1:26 | ||
'5633', // When do experts think human-level AI will be created? debugger eval code:1:26 | ||
'8163', // Why is AI alignment a hard problem? debugger eval code:1:26 | ||
'6176', // Why can’t we just “put the AI in a box” so that it can’t influence the outside world? debugger eval code:1:26 | ||
'5864', // What are the differences between AGI, transformative AI, and superintelligence? debugger eval code:1:26 | ||
'5864', // What are large language models? debugger eval code:1:26 | ||
'3119', // Why can't we just turn the AI off if it starts to misbehave? debugger eval code:1:26 | ||
'897I', // What is instrumental convergence? debugger eval code:1:26 | ||
'8185', // What is Goodhart's law? debugger eval code:1:26 | ||
'6568', // What is the orthogonality thesis? debugger eval code:1:26 | ||
'7755', // How powerful would a superintelligence become? debugger eval code:1:26 | ||
'8E41', // Will AI be able to think faster than humans? debugger eval code:1:26 | ||
'9B85', // Isn't the real concern misuse? debugger eval code:1:26 | ||
'8V5J', // Are AIs conscious? debugger eval code:1:26 | ||
'8IHO', // What are the differences between a singularity, an intelligence explosion, and a hard takeoff? debugger eval code:1:26 | ||
'6306', // What is an intelligence explosion? debugger eval code:1:26 | ||
'5943', // How might AGI kill people? debugger eval code:1:26 | ||
'7748', // What is a "warning shot"? | ||
] | ||
|
||
const useOnSiteQuestions = () => { | ||
const onSite = getQuestions() | ||
const [selected, setSelected] = useState([] as Question[]) | ||
|
||
const top = onSite.items?.filter((i) => topQuestions.includes(i.pageid)) | ||
const randomQuestions = (n?: number) => | ||
top?.sort(() => 0.5 - Math.random()).slice(0, n || 3) || [] | ||
|
||
useEffect(() => { | ||
if (!selected?.length) { | ||
setSelected(randomQuestions()) | ||
} | ||
// eslint-disable-next-line | ||
}, [onSite.items]) | ||
|
||
return {...onSite, topQuestions: top, selected, randomQuestions} | ||
} | ||
export default useOnSiteQuestions |
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
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
big fan