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 @@ -71,9 +71,7 @@ When {% data variables.product.prodname_copilot_short %} works on coding tasks,

This allowance of free premium requests is shared with other {% data variables.product.prodname_copilot_short %} features, such as {% data variables.copilot.copilot_chat_short %}.

When you use {% data variables.copilot.copilot_coding_agent %}, {% data variables.product.prodname_copilot_short %} will make multiple premium requests to complete a single task. Each time {% data variables.product.prodname_copilot_short %} calls the underlying model service, it counts as one premium request.

On average, {% data variables.copilot.copilot_coding_agent %} uses 30-50 premium requests each time it is invoked. The exact number of premium requests will vary depending on the task’s complexity and the number of required steps. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/monitoring-usage-and-entitlements/avoiding-unexpected-copilot-costs).
When you use {% data variables.copilot.copilot_coding_agent %}, {% data variables.product.prodname_copilot_short %} will use one premium request per session. A session begins when you ask {% data variables.product.prodname_copilot_short %} to create a pull request or make one or more changes to an existing pull request.

For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/concepts/about-copilot-coding-agent).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The following {% data variables.product.prodname_copilot_short %} features can u
| Feature | Premium request consumption |
| ------- | ----------- |
| [{% data variables.copilot.copilot_chat_short %}](/copilot/using-github-copilot/copilot-chat) | {% data variables.copilot.copilot_chat_short %} uses **one premium request** per user prompt, multiplied by the model's rate. |
| [{% data variables.copilot.copilot_coding_agent %}](/copilot/concepts/about-copilot-coding-agent) | {% data variables.copilot.copilot_coding_agent %} will make multiple premium requests to complete a single task. On average, {% data variables.copilot.copilot_coding_agent %} uses **30-50 premium requests** each time it is invoked. The exact number of premium requests will vary depending on the task’s complexity and the number of required steps. {% data variables.copilot.copilot_coding_agent %} uses a fixed multiplier of 1 for the premium requests it uses. |
| [{% data variables.copilot.copilot_coding_agent %}](/copilot/concepts/about-copilot-coding-agent) | {% data variables.copilot.copilot_coding_agent %} uses **one premium request** per session. A session begins when you ask {% data variables.product.prodname_copilot_short %} to create a pull request or make one or more changes to an existing pull request. |
| [Agent mode in {% data variables.copilot.copilot_chat_short %}](/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-your-ide#copilot-edits) | Agent mode uses **one premium request** per user prompt, multiplied by the model's rate. |
| [{% data variables.product.prodname_copilot_short %} code review](/copilot/using-github-copilot/code-review/using-copilot-code-review) | When you assign {% data variables.product.prodname_copilot_short %} as a reviewer for a pull request, **one premium request** is used each time {% data variables.product.prodname_copilot_short %} posts comments to the pull request. |
| [{% data variables.copilot.copilot_extensions_short %}](/copilot/building-copilot-extensions/about-building-copilot-extensions) | {% data variables.copilot.copilot_extensions_short %} uses **one premium request** per user prompt, multiplied by the model's rate. |
Expand Down
38 changes: 25 additions & 13 deletions src/frame/tests/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,42 @@ describe('pages module', () => {
const englishPages = chain(pages)
.filter(['languageCode', 'en'])
.filter('redirect_from')
.map((pages) => pick(pages, ['redirect_from', 'applicableVersions']))
.map((pages) => pick(pages, ['redirect_from', 'applicableVersions', 'fullPath']))
.value()

// Map from redirect path to Set of file paths
const redirectToFiles = new Map()
const versionedRedirects = []

englishPages.forEach((page) => {
page.redirect_from.forEach((redirect) => {
page.applicableVersions.forEach((version) => {
versionedRedirects.push(removeFPTFromPath(path.posix.join('/', version, redirect)))
const versioned = removeFPTFromPath(path.posix.join('/', version, redirect))
versionedRedirects.push({ path: versioned, file: page.fullPath })
if (!redirectToFiles.has(versioned)) {
redirectToFiles.set(versioned, new Set())
}
redirectToFiles.get(versioned).add(page.fullPath)
})
})
})

const duplicates = versionedRedirects.reduce((acc, el, i, arr) => {
if (arr.indexOf(el) !== i && acc.indexOf(el) < 0) acc.push(el)
return acc
}, [])

const message = `Found ${duplicates.length} duplicate redirect_from ${
duplicates.length === 1 ? 'path' : 'paths'
}.
Ensure that you don't define the same path more than once in the redirect_from property in a single file and across all English files.
You may also receive this error if you have defined the same children property more than once.\n
${duplicates.join('\n')}`
// Only consider as duplicate if more than one unique file defines the same redirect
const duplicates = Array.from(redirectToFiles.entries())
.filter(([_, files]) => files.size > 1)
.map(([path]) => path)

// Build a detailed message with sources for each duplicate
const message =
`Found ${duplicates.length} duplicate redirect_from path${duplicates.length === 1 ? '' : 's'}.
Ensure that you don't define the same path more than once in the redirect_from property in a single file and across all English files.
You may also receive this error if you have defined the same children property more than once.\n` +
duplicates
.map((dup) => {
const files = Array.from(redirectToFiles.get(dup) || [])
return `${dup}\n Defined in:\n ${files.join('\n ')}`
})
.join('\n\n')
expect(duplicates.length, message).toBe(0)
})

Expand Down
Loading
Loading