Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OpenAI has a family of large language models that you can use as an alternative
* {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode %}
* Immersive mode in {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.github %}

{% data variables.copilot.copilot_gpt_41 %} is hosted by OpenAI and GitHub's Azure tenant when used in {% data variables.product.prodname_copilot %}. OpenAI makes the [following data commitment](https://openai.com/enterprise-privacy/): _We [OpenAI] do not train our models on your business data by default_. GitHub maintains a [zero data retention agreement](https://platform.openai.com/docs/guides/your-data) with OpenAI.
{% data variables.copilot.copilot_gpt_41 %} is hosted by GitHub's Azure tenant when used in {% data variables.product.prodname_copilot %}.

When using {% data variables.copilot.copilot_gpt_41 %}, input prompts and output completions continue to run through {% data variables.product.prodname_copilot %}'s content filters for public code matching, when applied, along with those for harmful, offensive, or off-topic content.

Expand Down
1 change: 1 addition & 0 deletions data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ search:
clear_search_query: Clear
view_all_search_results: View more results
no_results_found: No results found
no_results_found_announcement: 'Search Docs: No results found'
search_docs_with_query: Search docs for "{{query}}"
privacy_disclaimer: For product and service improvement purposes, the GitHub Docs team will retain questions and answers generated in the Docs search function. Please see the <a href="https://docs.github.com/privacy"><u>GitHub Privacy Statement</u></a> to review how GitHub collects and uses your data.
ai:
Expand Down
1 change: 1 addition & 0 deletions src/fixtures/fixtures/data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ search:
clear_search_query: Clear
view_all_search_results: View more results
no_results_found: No results found
no_results_found_announcement: 'Search Docs: No results found'
search_docs_with_query: Search docs for "{{query}}"
privacy_disclaimer: For product and service improvement purposes, the GitHub Docs team will retain questions and answers generated in the Docs search function. Please see the <a href="https://docs.github.com/privacy"><u>GitHub Privacy Statement</u></a> to review how GitHub collects and uses your data.
ai:
Expand Down
19 changes: 19 additions & 0 deletions src/search/components/input/SearchOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export function SearchOverlay({
const [aiCouldNotAnswer, setAICouldNotAnswer] = useState<boolean>(false)
const [showSpinner, setShowSpinner] = useState(false)
const [scrollPos, setScrollPos] = useState(0)
const [announcement, setAnnouncement] = useState<string>('')

const { hasOpenHeaderNotifications } = useSharedUIContext()

Expand Down Expand Up @@ -188,6 +189,7 @@ export function SearchOverlay({

// Combine options for key navigation
const [combinedOptions, generalOptionsWithViewStatus, aiOptionsWithUserInput] = useMemo(() => {
setAnnouncement('')
let generalOptionsWithViewStatus = [...generalSearchResults]
const aiOptionsWithUserInput = [...userInputOptions, ...filteredAIOptions]
const combinedOptions = [] as Array<{
Expand All @@ -209,6 +211,7 @@ export function SearchOverlay({
} as unknown as GeneralSearchHit)
}
} else if (urlSearchInputQuery.trim() !== '' && !searchLoading) {
setAnnouncement(t('search.overlay.no_results_found_announcement'))
generalOptionsWithViewStatus.push({
title: t('search.overlay.no_results_found'),
isNoResultsFound: true,
Expand Down Expand Up @@ -815,6 +818,22 @@ export function SearchOverlay({
dangerouslySetInnerHTML={{ __html: t('search.overlay.privacy_disclaimer') }}
/>
</footer>
<div
aria-live="assertive"
style={{
position: 'absolute',
width: '1px',
height: '1px',
padding: '0',
margin: '-1px',
overflow: 'hidden',
clip: 'rect(0, 0, 0, 0)',
whiteSpace: 'nowrap',
border: '0',
}}
>
{announcement}
</div>
</Overlay>
</>
)
Expand Down
Loading