From 051d49a9d56806c89acec321a127684c66fe3f67 Mon Sep 17 00:00:00 2001 From: Sam Browning <106113886+sabrowning1@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:02:13 -0400 Subject: [PATCH 1/2] [Megabranch, DO NOT MERGE] Create Copilot Extensions builder docs, update user-focused Extensions docs (#51954) Co-authored-by: Jules Porter Co-authored-by: Jules <19994093+jules-p@users.noreply.github.com> Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com> Co-authored-by: Jason Etcovitch Co-authored-by: Jess Hosman <1183847+jhosman@users.noreply.github.com> Co-authored-by: Dimitrios Philliou Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com> Co-authored-by: hubwriter --- .../about-building-copilot-extensions.md | 74 +++++++++ .../about-copilot-agents.md | 23 +++ ...opilot-agent-to-communicate-with-github.md | 47 ++++++ ...o-communicate-with-the-copilot-platform.md | 154 ++++++++++++++++++ .../index.md | 15 ++ .../using-a-demo-agent.md | 50 ++++++ .../using-copilots-llm-for-your-agent.md | 50 ++++++ .../copilot-extensions-glossary.md | 70 ++++++++ ...-your-github-app-for-your-copilot-agent.md | 46 ++++++ ...our-server-to-deploy-your-copilot-agent.md | 53 ++++++ ...a-github-app-for-your-copilot-extension.md | 45 +++++ .../creating-a-copilot-extension/index.md | 13 ++ .../building-copilot-extensions/index.md | 16 ++ ...-availability-of-your-copilot-extension.md | 56 +++++++ .../setting-up-copilot-extensions.md | 59 +++++++ content/copilot/index.md | 1 + ...github-copilot-in-your-personal-account.md | 8 +- ...-of-github-copilot-in-your-organization.md | 12 +- ...egrate-external-tools-with-copilot-chat.md | 42 ++++- .../copilot/copilot-extensions/beta-note.md | 2 +- .../copilot-extensions-intro.md | 2 +- .../extension-specific-onboarding-steps.md | 1 + .../gated-features/copilot-extensions.md | 6 +- .../user-settings/access_settings.md | 2 +- .../user-settings/edit_marketplace_listing.md | 2 +- data/variables/copilot.yml | 3 + data/variables/product.yml | 4 + 27 files changed, 831 insertions(+), 25 deletions(-) create mode 100644 content/copilot/building-copilot-extensions/about-building-copilot-extensions.md create mode 100644 content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/about-copilot-agents.md create mode 100644 content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github.md create mode 100644 content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform.md create mode 100644 content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/index.md create mode 100644 content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-a-demo-agent.md create mode 100644 content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-copilots-llm-for-your-agent.md create mode 100644 content/copilot/building-copilot-extensions/copilot-extensions-glossary.md create mode 100644 content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-github-app-for-your-copilot-agent.md create mode 100644 content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent.md create mode 100644 content/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension.md create mode 100644 content/copilot/building-copilot-extensions/creating-a-copilot-extension/index.md create mode 100644 content/copilot/building-copilot-extensions/index.md create mode 100644 content/copilot/building-copilot-extensions/managing-the-availability-of-your-copilot-extension.md create mode 100644 content/copilot/building-copilot-extensions/setting-up-copilot-extensions.md create mode 100644 data/reusables/copilot/copilot-extensions/extension-specific-onboarding-steps.md diff --git a/content/copilot/building-copilot-extensions/about-building-copilot-extensions.md b/content/copilot/building-copilot-extensions/about-building-copilot-extensions.md new file mode 100644 index 000000000000..82b327ca518c --- /dev/null +++ b/content/copilot/building-copilot-extensions/about-building-copilot-extensions.md @@ -0,0 +1,74 @@ +--- +title: About building Copilot Extensions +intro: 'Learn about the development process for {% data variables.product.prodname_copilot_extension_short %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: About building Extensions +type: overview +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +## About {% data variables.product.prodname_copilot_extensions_short %} + +{% data variables.product.prodname_copilot_extensions_short %} are integrations that expand the functionality of {% data variables.product.prodname_copilot_chat_short %}. {% data variables.product.prodname_copilot_extensions_short %} allow developers to integrate external tools, services, and custom behaviours into the {% data variables.product.prodname_copilot_chat_short %} experience across all supported IDEs and {% data variables.product.company_short %}. + +{% data variables.product.prodname_copilot_extensions_short %} are built as {% data variables.product.prodname_github_apps %} with additional capabilities, including: +* Read-access to your {% data variables.product.prodname_copilot_chat_short %} history +* Sending responses to users in the {% data variables.product.prodname_copilot_chat_short %} window +* Execution of {% data variables.product.company_short %} (first party) or functions on external services (third party) + +## Visibility of {% data variables.product.prodname_copilot_extensions_short %} + +{% data variables.product.prodname_copilot_extensions_short %} can be private, public and shareable, or public and listed on the {% data variables.product.prodname_marketplace %}. Which visibility option you choose will depend on your use case and the audience you are targeting. + +* Private extensions are often preferred by large enterprises or companies that: + * Want more customization and controls over data access + * Need to integrate with a large volume of internal documents and databases + * Have strict security policies making it difficult to authorize permissions for third-parties +* Public extensions are suitable for: + * Open-source projects + * Collaborative development and use across organizations within an enterprise + * Sharing your tool and getting feedback before publishing to the {% data variables.product.prodname_marketplace %} +* {% data variables.product.prodname_marketplace %} extensions are ideal for third-parties that want to: + * Offer their service to a broader audience + * Integrate their tool into the developer workflow on {% data variables.product.company_short %} and the IDE + * Leverage the {% data variables.product.company_short %} ecosystem to raise awareness for their product + +## Use cases + +You can use {% data variables.product.prodname_copilot_extensions_short %} to extend the capabilities of {% data variables.product.prodname_copilot_chat_short %} in a variety of ways. For example, you could use them for: + +* **Docs querying**: A {% data variables.product.prodname_copilot_extension_short %} could allow {% data variables.product.prodname_copilot_chat_short %} to query a third-party documentation service to find information about a specific topic. +* **AI-assisted coding**: A {% data variables.product.prodname_copilot_extension_short %} could use a third-party AI model to provide code suggestions. +* **Data retrieval**: A {% data variables.product.prodname_copilot_extension_short %} could allow {% data variables.product.prodname_copilot_chat_short %} to query a third-party data service to retrieve information about a specific topic. +* **Action execution**: A {% data variables.product.prodname_copilot_extension_short %} could allow {% data variables.product.prodname_copilot_chat_short %} to execute a specific action, such as posting to a message board or updating a tracking item in an external system. + +## Extensions toolkit, code samples and SDK + +{% data variables.product.company_short %} provides a comprehensive toolkit for extension builders, with code samples, a CLI debugging tool, quickstart SDKs, and a user feedback repository. For more information, see the [copilot-extensions](https://github.com/orgs/copilot-extensions/) organization on {% data variables.product.company_short %}. + +Before creating your own {% data variables.product.prodname_copilot_extension_short %} from scratch, you may want to explore an existing {% data variables.product.prodname_copilot_agent_short %}, and integrate it with a {% data variables.product.prodname_github_app %} to see how it works. {% data variables.product.company_short %} provides a few example {% data variables.product.prodname_copilot_agents_short %}, that you can clone and use as the basis for your own {% data variables.product.prodname_copilot_extension_short %}, including: + +* **Blackbeard**: A simple {% data variables.product.prodname_copilot_agent_short %} that responds to requests like a pirate, using {% data variables.product.prodname_copilot_short %}'s LLM API and special system prompts. It is a good starting point for learning how to build a {% data variables.product.prodname_copilot_extension_short %}. For more information, see the [Blackbeard {% data variables.product.prodname_copilot_extension_short %}](https://github.com/copilot-extensions/blackbeard-extension). +* **{% data variables.product.prodname_github_models %}**: A more complex {% data variables.product.prodname_copilot_agent_short %} that let's you ask about and interact with various LLMs listed on the {% data variables.product.prodname_marketplace %} from within {% data variables.product.prodname_copilot_chat_short %}. For more information, see the [{% data variables.product.prodname_github_models %} {% data variables.product.prodname_copilot_extension_short %}](https://github.com/copilot-extensions/github-models-extension). +* **Function calling**: an example agent written in Go that demonstrates function calling and confirmation dialogues. For more information, see the [Function calling extension](https://github.com/copilot-extensions/function-calling-extension). +* **RAG extension**: an example agent written in Go that demonstrates a simple implementation of retrieval augmented generation. For more information, see the [RAG extension](https://github.com/copilot-extensions/rag-extension). +* **Preview SDK**: An SDK that simplifies the process of building {% data variables.product.prodname_copilot_extensions_short %} by handling request verification, response formatting, and API interactions. It allows builders to focus on their extension's core functionality rather than boilerplate, by streamlining the integration of tools, APIs, and data sources into {% data variables.product.prodname_copilot_chat_short %}. For more information, see the [Preview SDK](https://github.com/copilot-extensions/preview-sdk.js). + +## About {% data variables.product.prodname_vscode %} Chat extensions + +{% data variables.product.prodname_copilot_extensions %} are generally built as {% data variables.product.prodname_github_apps %}. However, there is also an option to build a {% data variables.product.prodname_vscode %} Chat extension that integrates with {% data variables.product.prodname_copilot_chat_short %} and provides a similar end user experience. {% data variables.product.prodname_vscode %} Chat extensions are a good option for developers looking to customize their copilot experience with functionalities specific to {% data variables.product.prodname_vscode %}. + +There are some key differences from {% data variables.product.prodname_github_app %} {% data variables.product.prodname_copilot_extensions_short %}: +* {% data variables.product.prodname_vscode %} Specific: Unlike {% data variables.product.prodname_github_app %} {% data variables.product.prodname_copilot_extensions_short %}, which work across all supported IDEs and {% data variables.product.company_short %}, {% data variables.product.prodname_vscode %} Chat extensions only work within the {% data variables.product.prodname_vscode %} environment. +* Capabilities: They have more access to {% data variables.product.prodname_vscode %}'s features and APIs, allowing for more editor-specific interactions, such as accessing local workspace data and manipulating {% data variables.product.prodname_vscode %}'s interface. +* Publishing: They can be published to the {% data variables.product.prodname_vscode %} Marketplace. They cannot be published on the {% data variables.product.prodname_marketplace %}. + +For more information, see [{% data variables.product.prodname_vscode %} Chat extensions](https://code.visualstudio.com/api/extension-guides/chat) in the Visual Studio Code documentation. + +## Further reading + +* For a glossary of terms used in the context of {% data variables.product.prodname_copilot_extensions_short %}, see [Copilot Extensions Glossary](/copilot/building-copilot-extensions/copilot-extensions-glossary) diff --git a/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/about-copilot-agents.md b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/about-copilot-agents.md new file mode 100644 index 000000000000..07d0125d1ec8 --- /dev/null +++ b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/about-copilot-agents.md @@ -0,0 +1,23 @@ +--- +title: About Copilot agents +intro: 'Learn what {% data variables.product.prodname_copilot_agents %} are and how they can enhance your {% data variables.product.prodname_copilot_chat %} experience.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: About Copilot agents +type: overview +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +{% data variables.product.prodname_copilot_agents_short %} are custom tools embedded in {% data variables.product.prodname_copilot_extensions_short %}. They integrate with {% data variables.product.prodname_copilot_chat_short %} to provide additional functionalities tailored to specific needs. {% data variables.product.prodname_copilot_agents_short %} can perform various tasks such as querying documentation, retrieving data, executing specific actions, or providing AI-assisted coding suggestions. They enhance the capabilities of {% data variables.product.prodname_copilot %} by allowing developers to build and integrate custom features directly into the {% data variables.product.prodname_copilot_chat_short %} interface. + +To use a {% data variables.product.prodname_copilot_agent_short %} in {% data variables.product.prodname_copilot_chat_short %}, it must be associated with a {% data variables.product.prodname_github_app %}. This combination of a {% data variables.product.prodname_github_app %} and a {% data variables.product.prodname_copilot_agent_short %} is what we refer to as a {% data variables.product.prodname_copilot_extension %}. For more information on {% data variables.product.prodname_copilot_extensions_short %}, see "[AUTOTITLE](/copilot/building-copilot-extensions/about-building-copilot-extensions)." + +Any {% data variables.product.company_short %} user can create a {% data variables.product.prodname_copilot_extension_short %} by building a {% data variables.product.prodname_copilot_agent_short %} and associating it with a {% data variables.product.prodname_github_app %}. For more information on creating a {% data variables.product.prodname_copilot_extension_short %}, see "[AUTOTITLE](/copilot/building-copilot-extensions/setting-up-copilot-extensions)." + +## Further reading + +* "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform)" +* "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github)" diff --git a/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github.md b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github.md new file mode 100644 index 000000000000..3a74cb9328ac --- /dev/null +++ b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github.md @@ -0,0 +1,47 @@ +--- +title: Configuring your Copilot agent to communicate with GitHub +intro: 'Learn how to verify payloads and get resources from {% data variables.product.github %} with your {% data variables.product.prodname_copilot_agent_short %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Communicate with GitHub +type: reference +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +## Prerequisites + +Before you configure your {% data variables.product.prodname_copilot_agent_short %} to communicate with {% data variables.product.github %}, you should understand how your {% data variables.product.prodname_copilot_agent_short %} communicates with the {% data variables.product.prodname_copilot_short %} platform. See "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform)." + +## Verifying that payloads are coming from {% data variables.product.github %} + +Before your {% data variables.product.prodname_copilot_agent_short %} begins processing a request, you should verify that the request came from {% data variables.product.github %}, and that it is intended for your agent. All agent requests contain the `Github-Public-Key-Identifier` and `Github-Public-Key-Signature` headers. To verify the signature for a particular request, compare the signature in the `Github-Public-Key-Signature` header with a signed copy of the request body using the current public key listed at https://api.github.com/meta/public_keys/copilot_api. + +For more details and examples of signature verification in specific languages, see the [`github-technology-partners/signature-verification`](https://github.com/github-technology-partners/signature-verification) repository. + +## Fetching resources from the {% data variables.product.github %} API + +Requests to your {% data variables.product.prodname_copilot_agent_short %} will receive an `X-Github-Token` header. This header contains an API token that can be used to fetch resources from the {% data variables.product.github %} API on behalf of the user interacting with your agent. The permissions of this token are the overlap of the user's own permissions and the permissions granted to your {% data variables.product.prodname_github_app %} installation. + +For an example of how you might use `X-Github-Token`, see the following code sample: + +```typescript +async function whoami(req) { + const response = await fetch( + // The {% data variables.product.github %} API endpoint for the authenticated user + "https://api.github.com/user", + { + headers: { + "Authorization": `Bearer ${req.headers.get("x-github-token")}` + } + } + ) + + const user = await response.json() + return user +} +``` + +To learn more about working with {% data variables.product.github %}'s API and explore official software development kits (SDKs), see the [`octokit`](https://github.com/octokit) organization. diff --git a/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform.md b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform.md new file mode 100644 index 000000000000..9f032f9950f4 --- /dev/null +++ b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform.md @@ -0,0 +1,154 @@ +--- +title: Configuring your Copilot agent to communicate with the Copilot platform +intro: 'Learn how to interact with the {% data variables.product.prodname_copilot_short %} platform by sending and receiving server-sent events with your {% data variables.product.prodname_copilot_agent_short %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Communicate with Copilot platform +type: reference +layout: inline +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +{% data variables.product.prodname_copilot_agents_short %} communicate with the {% data variables.product.prodname_copilot_short %} platform in the form of server-sent events (SSEs). Rather than waiting for the {% data variables.product.prodname_copilot_short %} platform to request an update from your agent, or vice versa, you can use SSEs to send and receive updates to and from the platform in real time. + +To learn more about SSEs, see [Server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) in the mdn documentation. + +## Sending server-sent events + +Your agent should only send one SSE for each interaction with the {% data variables.product.prodname_copilot_short %} platform. There are four predefined SSEs your agent can send: + +* [`copilot_confirmation`](#copilot_confirmation) +* [`copilot_errors`](#copilot_errors) +* [`copilot_references`](#copilot_references) +* [Default SSE](#default-sse) + +### `copilot_confirmation` + +The `copilot_confirmation` SSE sends the user a prompt to confirm an action. This SSE is sent through an event type and data field. See the following code for an example of a `copilot_confirmation` SSE: + +```typescript annotate +// +event: copilot_confirmation +data: { + // Currently, `action` is the only supported value for `type` in `copilot_confirmation`. + "type": "action", + // Title of the confirmation dialog shown to the user. + "title": "Turn off feature flag", + // Confirmation message shown to the user. + "message": "Are you sure you wish to turn off the `copilot` feature flag?", + // Optional field for the agent to include any data needed to uniquely identify this confirmation and take action once the decision is received from the client. + "confirmation": { + "id": "id-123", + "other": "identifier-as-needed", + } +} +``` + +After the user accepts or dismisses the confirmation, the agent receives a message similar to the following example: + +```typescript annotate +// +{ + "copilot_confirmations": [ + { + // A string containing the state of the confirmation. This value is either `accepted` or `dismissed`. + "state": "accepted", + // An array of strings containing data identifying the relevant action. + "confirmation": { + "id": "id-123", + "other": "identifier-as-needed", + } + } + ] +} +``` + +Based on the values in this message, the agent can then complete or cancel the appropriate action. + +### `copilot_errors` + +The `copilot_errors` SSE sends the {% data variables.product.prodname_copilot_short %} platform a list of encountered errors. This SSE is sent through an event type and data field. See the following code for an example of a `copilot_errors` SSE: + +```typescript annotate +// +event: copilot_errors +data: [{ + // A string that specifies the error's type. `type` can have a value of `reference`, `function` or `agent`. + "type": "function", + // A string controlled by the agent describing the nature of an error. + "code": "recentchanges", + // A string that specifies the error message shown to the user. + "message": "The repository does not exist", + // A string that serves as a unique identifier to link the error with other resources such as references or function calls. + "identifier": "github/hello-world" +}] +``` + +### `copilot_references` + +> [!NOTE] The `copilot_references` SSE is not yet available when using {% data variables.product.prodname_copilot_chat_dotcom_short %}. + +The `copilot_references` SSE sends the user a list of references used to generate a response. This SSE is sent through an event type and data field. See the following code for an example of a `copilot_references` SSE: + +```typescript annotate +// +event: copilot_references +data: [{ + // A string that specifies the type of the reference. + "type": "blackbeard.story", + // A string that specifies the ID of the reference. + "id": "snippet", + // An optional field where the agent can include any data needed to uniquely identify this reference. + "data": { + "file": "story.go", + "start": "0", + "end": "13", + "content": "func main()...writeStory()..." + }, + // An optional boolean that indicates if the reference was passed implicitly or explicitly. + "is_implicit": false, + // An optional field for the agent to include any metadata to display in the user's environment. If any of the below required fields are missing, then the reference will not be rendered in the UI. + "metadata": { + "display_name": "Lines 1-13 from story.go", + "display_icon": "icon", + "display_url": "http://blackbeard.com/story/1", + + } +}] +``` + +### Default SSE + +The default SSE sends the user a general chat message. This SSE is unnamed and sent solely through a data field. See the following code for an example of a default SSE: + +```text +data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-3.5-turbo-0125", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]} +``` + +## Receiving server-sent events + +Just as your agent sends SSEs to the {% data variables.product.prodname_copilot_short %} platform, it also receives the `resp_message` SSE from the platform. This SSE contains a list of messages from the user, as well as optional data related to each of the SSE events the agent can send. See the following code sample for an example curl request to your agent containing a message: + +```bash +curl --request POST \ + --url $AGENT_URL \ + --header 'Accept: application/json' \ + --header 'Content-Type: application/json' \ + --header "X-GitHub-Token: $RUNTIME_GENERATED_TOKEN" \ + --data '{ + "messages": [ + { + "role": "user", + "content": "What is a closure in javascript?", + "copilot_references": [] + } + ] + }' +``` + +## Next steps + +Now that you understand how your {% data variables.product.prodname_copilot_agent_short %} communicates with the {% data variables.product.prodname_copilot_short %} platform, you can learn how to integrate your agent with the {% data variables.product.github %} API. See "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github)." diff --git a/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/index.md b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/index.md new file mode 100644 index 000000000000..572f92ae46a3 --- /dev/null +++ b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/index.md @@ -0,0 +1,15 @@ +--- +title: Building a Copilot agent for your Copilot Extension +shortTitle: Build a Copilot agent +intro: 'Learn how to build a custom {% data variables.product.prodname_copilot_agent_short %} that determines the functionality of your {% data variables.product.prodname_copilot_extension_short %}.' +versions: + feature: copilot +topics: + - Copilot +children: + - /about-copilot-agents + - /using-a-demo-agent + - /configuring-your-copilot-agent-to-communicate-with-the-copilot-platform + - /configuring-your-copilot-agent-to-communicate-with-github + - /using-copilots-llm-for-your-agent +--- diff --git a/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-a-demo-agent.md b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-a-demo-agent.md new file mode 100644 index 000000000000..8ac587db68fc --- /dev/null +++ b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-a-demo-agent.md @@ -0,0 +1,50 @@ +--- +title: Using a demo agent +intro: 'Learn about how you can use a demo agent to explore how {% data variables.product.prodname_copilot_extensions_short %} work.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Using a demo agent +type: how_to +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +## About demo agents + +If you're not ready to build your own {% data variables.product.prodname_copilot_agent_short %} from scratch, you can clone and use a demo agent to experiment with {% data variables.product.prodname_copilot_extensions %}. You can use the demo agent as a basis for your own agent, or you can use it to familiarize yourself with the {% data variables.product.prodname_copilot_extensions_short %} development and deployment process. + +{% data variables.product.company_short %} provides a few different demo agents that you can use. You can find them in the [copilot-extensions](https://github.com/copilot-extensions) organization. + +This article provides instructions for running the Blackbeard demo agent on your local machine, but should be similar for other demo agents. + +1. Clone the repository. Run the following command in your terminal (Mac or Linux) or Git Bash (Windows): + + ```shell copy + git clone https://github.com/copilot-extensions/blackbeard-extension.git + ``` + +1. Open the agent repository locally by running the following command in your terminal (Mac or Linux) or Git Bash (Windows): + + ```shell copy + cd blackbeard-extension + ``` + +1. To install the necessary dependencies, run the following command in your terminal (Mac or Linux) or Git Bash (Windows): + + ```shell copy + npm install + ``` + +1. To start your server, run the following command in your terminal (Mac or Linux) or Git Bash (Windows): + + ```shell copy + npm start + ``` + + > [!NOTE] Keep the terminal window open while you are using your agent. + +## Next steps + +* [AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent) diff --git a/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-copilots-llm-for-your-agent.md b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-copilots-llm-for-your-agent.md new file mode 100644 index 000000000000..a108d0c4e019 --- /dev/null +++ b/content/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-copilots-llm-for-your-agent.md @@ -0,0 +1,50 @@ +--- +title: Using Copilot's LLM for your agent +intro: 'Learn how to use {% data variables.product.prodname_copilot_short %}''s LLM for your agent.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Use Copilot's LLM +type: reference +allowTitleToDifferFromFilename: true +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +## About {% data variables.product.prodname_copilot_short %}'s Language Learning Model (LLM) + +{% data variables.product.prodname_copilot_short %}'s Language Learning Model (LLM) is a powerful, large-scale language model that is trained on a diverse range of data sources, including code, documentation, and other text. {% data variables.product.prodname_copilot_short %}'s LLM underpins the functionality for {% data variables.product.prodname_copilot %}, and is used to power all of {% data variables.product.prodname_copilot_short %}'s features, including code generation, documentation generation, and code completion. + +You have the option to use {% data variables.product.prodname_copilot_short %}'s LLM to power your agent, which can be useful if you want your agent to be able to generate completions for user messages, but you don't want to manage your own LLM. + +> [!NOTE] Third-party agents have strict rate limits for using {% data variables.product.prodname_copilot_short %}'s LLM. If your third-party agent will need to generate a large number of completions, you should consider using your own LLM or an API like OpenAI. + +## Using {% data variables.product.prodname_copilot_short %}'s LLM for your agent + +You can call {% data variables.product.prodname_copilot_short %}'s LLM deployment at `{% data variables.copilot.chat_completions_api %}` with a POST request. The request and responses should be in the same format as the OpenAI API. + +To authenticate, use the same `X-Github-Token` header sent to your agent. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github#fetching-resources-from-the-github-api)." + +Here is an example of how {% data variables.product.prodname_copilot_short %}'s LLM deployment is used by the Blackbeard extension to generate completions for a user message: + +```javascript + // Use Copilot's LLM to generate a response to the user's + // messages, with our extra system messages attached. + const copilotLLMResponse = await fetch( + "https://api.githubcopilot.com/chat/completions", + { + method: "POST", + headers: { + authorization: `Bearer ${tokenForUser}`, + "content-type": "application/json", + }, + body: JSON.stringify({ + messages, + stream: true, + }), + } + ); +``` + +To see this example in its full context, see the [Blackbeard extension](https://github.com/copilot-extensions/blackbeard-extension). diff --git a/content/copilot/building-copilot-extensions/copilot-extensions-glossary.md b/content/copilot/building-copilot-extensions/copilot-extensions-glossary.md new file mode 100644 index 000000000000..a6a909c561b9 --- /dev/null +++ b/content/copilot/building-copilot-extensions/copilot-extensions-glossary.md @@ -0,0 +1,70 @@ +--- +title: Copilot Extensions Glossary +intro: 'Understand the terminology used in {% data variables.product.prodname_copilot_extensions_short %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Extensions Glossary +type: reference +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +The following terms are used in the context of {% data variables.product.prodname_copilot_extensions_short %}, and are defined here for clarity. + +#### Agent + +A concrete implementation of an AI assistant that can receive user queries and return a stream of response tokens. The combination of an agent + {% data variables.product.prodname_github_app %} is what we refer to as a {% data variables.product.prodname_copilot_extension_short %}. + +#### {% data variables.product.prodname_copilot_chat_short %} + +The conversational interface within {% data variables.product.prodname_copilot %} where users can interact with the AI assistant and extensions. + +#### {% data variables.product.prodname_copilot_extension_short %} + +A {% data variables.product.prodname_github_app %} with additional access to the {% data variables.product.prodname_copilot_chat_short %} window and Copilot API, allowing for extended functionality in {% data variables.product.company_short %}'s {% data variables.product.prodname_copilot_chat_short %}. This is how we will refer to extensions from the perspective of an extension user. + +#### {% data variables.product.prodname_copilot_short %} Extensibility Platform + +The system that handles authentication and proxies requests between clients and agent plugins. + +#### {% data variables.product.prodname_github_app %} + +The foundation for a {% data variables.product.prodname_copilot_extension_short %} that provides the necessary infrastructure, permissions, and context from {% data variables.product.company_short %}, such as user, repo and organization metadata. + +##### {% data variables.product.prodname_marketplace %} + +The platform where {% data variables.product.company_short %} approved {% data variables.product.prodname_copilot_extensions_short %} can be listed publicly and discovered by users. + +#### Listed/Published Extension + +An extension that appears on the {% data variables.product.prodname_marketplace %}. These extensions must be reviewed and approved by {% data variables.product.company_short %}. + +#### Private Extension + +An extension that is only visible and usable by the organization or individual user that created it. + +##### Public Extension + +An extension that is visible and installable by any {% data variables.product.company_short %} user or organization. + +#### Skill + +A piece of code that retrieves context or executes an action in response to a user’s prompt (e.g., "findIssueByID(id: number)"). + +#### Tool/Function Calling + +A capability of {% data variables.product.prodname_copilot_short %}'s LLM (as well as Open AI’s) that allows them to invoke specific tools or functions. Extension builders can define available tools with parameters, enabling the LLM to select and call appropriate tools to fulfill a user’s request. “Functions” are a subset of “tools” and the “function calling” term will eventually be deprecated. + +#### Unlisted Extension + +An extension that is not published on the {% data variables.product.prodname_marketplace %}. Builders may develop and distribute public unlisted extensions without requiring review or approval from {% data variables.product.company_short %}. {% data variables.product.company_short %} does not guarantee the security or quality of unlisted extensions. + +#### Verified Creator + +A status required for organizations to publish extensions on the {% data variables.product.prodname_marketplace %}. + +#### {% data variables.product.prodname_vscode %} Chat Extensions + +{% data variables.product.prodname_vscode %} Chat Extensions extend {% data variables.product.prodname_copilot_chat_short %} functionality for a similar end-user experience, but they’re built as a {% data variables.product.prodname_vscode %} Extension rather than a {% data variables.product.prodname_github_app %}. diff --git a/content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-github-app-for-your-copilot-agent.md b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-github-app-for-your-copilot-agent.md new file mode 100644 index 000000000000..f6c0009ea19a --- /dev/null +++ b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-github-app-for-your-copilot-agent.md @@ -0,0 +1,46 @@ +--- +title: Configuring your GitHub App for your Copilot agent +intro: 'Learn how to configure your {% data variables.product.prodname_github_app %} so that it is associated with your {% data variables.product.prodname_copilot_agent_short %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Configure App for agent +type: how_to +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +Once you have configured your server and created your {% data variables.product.prodname_github_app %}, you need to configure your {% data variables.product.prodname_github_app %} for use with your {% data variables.product.prodname_copilot_short %} agent. + +## Prerequisites + +* You have configured your server to deploy your {% data variables.product.prodname_copilot_agent_short %}, and you have your hostname (aka forwarding endpoint). For more information, see [AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent). +* You have created a {% data variables.product.prodname_github_app %} for your {% data variables.product.prodname_copilot_short %} agent. For more information, see [AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension). + +## Configuring your {% data variables.product.prodname_github_app %} + +{% data reusables.apps.settings-step %} +{% data reusables.user-settings.developer_settings %} +{% data reusables.user-settings.github_apps %} +1. To the right of the {% data variables.product.prodname_github_app %} you want to configure for your {% data variables.product.prodname_copilot_extension_short %}, click **Edit**. +1. In the "Identifying and authorizing users" section, under "Callback URL," enter your server's hostname, then click **Save changes**. + + > [!NOTE] Your server's hostname is the forwarding endpoint that you copied from your terminal when you configured your server. For more information, see [AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent). + > + > If you are using an ephemeral domain in ngrok, you will need to update this URL every time you restart your ngrok server. + +1. In the left sidebar, click **{% data variables.product.prodname_copilot_short %}**. +1. Under "URL," enter your server's hostname (aka forwarding endpoint) that you copied from your terminal, then click **Save changes**. + + > [!NOTE] If you are using an ephemeral domain in ngrok, you will need to update this URL every time you restart your ngrok server. + +1. Your pre-authorization URL is a link on your website that starts the authorization process for your extension. Users will be redirected to this URL when they decide to authorize your extension. If you are using a pre-authorization URL, under "Pre-authorization URL," enter the URL, then click **Save changes**. +1. In the left sidebar, click **Permissions and events**. +1. Expand the "Account permissions" section. +1. In the dropdown menu, to the right of {% data variables.product.prodname_copilot_chat %}, select **Read only**, then click **Save changes**. +1. In your {% data variables.product.prodname_github_app %} settings, in the left sidebar, click **Install App**, then, next to the account you want to install your app on, click **Install**. +{% data reusables.copilot.go-to-copilot-page %} +1. Invoke your extension by typing `@EXTENSION-NAME`, replacing any spaces in the extension name with `-`, then press `Enter`. +1. If this is your first time using the extension, you will be prompted to authenticate. Follow the steps on screen to authenticate your extension. +1. Ask your extension a question in the chat window. For example, `What is the software development lifecycle?`. diff --git a/content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent.md b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent.md new file mode 100644 index 000000000000..19b6706c08b1 --- /dev/null +++ b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent.md @@ -0,0 +1,53 @@ +--- +title: Configuring your server to deploy your Copilot agent +intro: 'Learn how to deploy your {% data variables.product.prodname_copilot_short %} agent to a server that is accessible to the internet.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Deploy your agent +type: how_to +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +Your {% data variables.product.prodname_copilot_agent_short %} must be hosted on a server that is accessible to the internet. This guide will help you set up a server to run your {% data variables.product.prodname_copilot_agent_short %}. In this guide, we will use [ngrok](https://ngrok.com/) to create a tunnel to your local server, but you could also use a service like [localtunnel](https://localtunnel.github.io/www/) or [serveo](https://serveo.net/). + +Alternatively, if you are a {% data variables.product.prodname_codespaces %} user, you can use the built-in {% data variables.product.prodname_codespaces %} port forwarding. For more information, see "[AUTOTITLE](/codespaces/developing-in-a-codespace/forwarding-ports-in-your-codespace)." + +## Prerequisites + +* You have created a {% data variables.product.prodname_copilot_agent_short %}. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension)." Alternatively, you can use a demo agent. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-a-demo-agent)." + +## Configuring your server + +1. Visit the [ngrok setup & installation page](https://dashboard.ngrok.com/get-started/setup/). +1. If you do not yet have an account, follow the instructions on screen to sign up. +1. Under "Agents," ensure the correct operating system is selected. +1. Under "Installation," follow the instructions for your operating system to download and install ngrok. +1. Under "Deploy your app online," selection **Ephemeral domain** or **Static domain**. +1. Run the command provided in your terminal, replacing the port number with the port your agent is configured to run on. For example: + + * For an ephemeral domain: + + ```shell copy + ngrok http http://localhost:3000 + ``` + + * For a static domain: + + ```shell copy + ngrok http --domain=YOUR-STATIC-DOMAIN.ngrok-free.app 3000 + ``` + + > [!NOTE] The Blackbeard demo extension is configured to run on port 3000 by default. + +1. In your terminal, next to "Forwarding," copy the URL that ngrok has assigned to your server. You will need this forwarding endpoint when you are configuring your {% data variables.product.prodname_github_app %}. + + > [!NOTE] Do not copy the `-> http://localhost:XXXX` part of the URL. + > + > Keep the terminal window open while you are using your agent. + +## Next steps + +* [AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension) diff --git a/content/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension.md b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension.md new file mode 100644 index 000000000000..50495c6c4273 --- /dev/null +++ b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension.md @@ -0,0 +1,45 @@ +--- +title: Creating a GitHub App for your Copilot Extension +intro: 'Learn how to create a {% data variables.product.prodname_github_app %} for your {% data variables.product.prodname_copilot_extension_short %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Create GitHub App +type: how_to +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +A {% data variables.product.prodname_copilot_extension_short %} is a {% data variables.product.prodname_github_app %} that is associated with a {% data variables.product.prodname_copilot_agent_short %}. The {% data variables.product.prodname_github_app %} you associate your {% data variables.product.prodname_copilot_agent_short %} with is used to authenticate the {% data variables.product.prodname_copilot_agent_short %} with {% data variables.product.prodname_dotcom %} and to authorize the {% data variables.product.prodname_copilot_agent_short %} to access the {% data variables.product.prodname_copilot_chat_short %} API. Each {% data variables.product.prodname_copilot_agent_short %} must be associated with a unique {% data variables.product.prodname_github_app %}. + +## Prerequisites + +* You have created a {% data variables.product.prodname_copilot_agent_short %}. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension)." Alternatively, you can use a demo agent. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-a-demo-agent)." +* You have configured your server to deploy your {% data variables.product.prodname_copilot_agent_short %}, and you have your hostname (aka forwarding endpoint). For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent)." + +## Creating a {% data variables.product.prodname_github_app %} + +{% data reusables.apps.settings-step %} +{% data reusables.user-settings.developer_settings %} +{% data reusables.user-settings.github_apps %} +1. Click **New {% data variables.product.prodname_github_app %}**. +1. Under "{% data variables.product.prodname_github_app %} name," enter a name for your app. + + > [!NOTE] The name cannot be longer than 34 characters. + > + >Your app's name will be shown in the user interface when your app takes an action. Uppercase letters will be converted to lowercase, with spaces replaced by `-`, and accents ignored. For example, `My APp Näme` would display as `my-app-name`. + > + > The name must be unique across {% data variables.product.company_short %}. You cannot use the same name as an existing {% data variables.product.company_short %} account, unless it is your own user or organization name. + +1. Optionally, under "Description," type a description of your app. Users and organizations will see this description when they install your app. +1. Under "Homepage URL," enter a URL for your app. You can use: + * Your app's website URL. + * The URL of the organization or user that owns the app. + * The URL of the repository where your app's code is stored, if it is a public repository. +1. Under "Webhook," deselect **Active**. +1. Click **Create {% data variables.product.prodname_github_app %}**. + +## Next steps + +* [AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-github-app-for-your-copilot-agent) diff --git a/content/copilot/building-copilot-extensions/creating-a-copilot-extension/index.md b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/index.md new file mode 100644 index 000000000000..ecfd38840d4d --- /dev/null +++ b/content/copilot/building-copilot-extensions/creating-a-copilot-extension/index.md @@ -0,0 +1,13 @@ +--- +title: Creating a Copilot Extension +shortTitle: Create a Copilot Extension +intro: 'Learn how to integrate your {% data variables.product.prodname_copilot_agent_short %} with a {% data variables.product.prodname_github_app %} to create your {% data variables.product.prodname_copilot_extension_short %}.' +versions: + feature: copilot +topics: + - Copilot +children: + - /configuring-your-server-to-deploy-your-copilot-agent + - /creating-a-github-app-for-your-copilot-extension + - /configuring-your-github-app-for-your-copilot-agent +--- diff --git a/content/copilot/building-copilot-extensions/index.md b/content/copilot/building-copilot-extensions/index.md new file mode 100644 index 000000000000..b1cfa1542758 --- /dev/null +++ b/content/copilot/building-copilot-extensions/index.md @@ -0,0 +1,16 @@ +--- +title: Building Copilot Extensions +shortTitle: Build Copilot Extensions +intro: 'Learn how to integrate external tools with {% data variables.product.prodname_copilot_short %}.' +versions: + feature: copilot +topics: + - Copilot +children: + - /about-building-copilot-extensions + - /setting-up-copilot-extensions + - /building-a-copilot-agent-for-your-copilot-extension + - /creating-a-copilot-extension + - /managing-the-availability-of-your-copilot-extension + - /copilot-extensions-glossary +--- diff --git a/content/copilot/building-copilot-extensions/managing-the-availability-of-your-copilot-extension.md b/content/copilot/building-copilot-extensions/managing-the-availability-of-your-copilot-extension.md new file mode 100644 index 000000000000..bc523f60ac3e --- /dev/null +++ b/content/copilot/building-copilot-extensions/managing-the-availability-of-your-copilot-extension.md @@ -0,0 +1,56 @@ +--- +title: Managing the availability of your Copilot Extension +intro: 'After you build your {% data variables.product.prodname_copilot_extension_short %}, you can change it''s visibility or publish it on the {% data variables.product.prodname_marketplace %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Manage Extension availability +type: how_to +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +When you build a {% data variables.product.prodname_copilot_extension_short %}, you have two options for the visibility of your {% data variables.product.prodname_github_app %}: + +* **Public**: Any user or organization account with the link to your app's installation page can install it. Making your app public automatically creates a public installation page, but does not list the app on the {% data variables.product.prodname_marketplace %}. +* **Private**: Only the user or organization account that created the app can install it. + +If you make your app public, you can choose to publish it on the {% data variables.product.prodname_marketplace %}. To list your {% data variables.product.prodname_copilot_extension_short %} on the {% data variables.product.prodname_marketplace %}, you must meet the following requirements: + +* You must publish your app from an organization that is a verified publisher on the {% data variables.product.prodname_marketplace %}. + * If your organization is not yet verified, see "[AUTOTITLE](/apps/github-marketplace/github-marketplace-overview/applying-for-publisher-verification-for-your-organization)." + * If you need to transfer ownership of your app from your personal account to your organization account, see "[AUTOTITLE](/apps/maintaining-github-apps/transferring-ownership-of-a-github-app)." +* Your app must meet the requirements for all listings on the {% data variables.product.prodname_marketplace %}. See "[AUTOTITLE](/apps/github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app#requirements-for-all-github-marketplace-listings)." + +## Changing the visibility of your {% data variables.product.prodname_copilot_extension_short %} + +{% data reusables.profile.access_org %} +{% data reusables.organizations.org-list %} +1. At the bottom of the sidebar, select {% octicon "code" aria-hidden="true" %} **Developer settings**, then click **{% data variables.product.prodname_github_apps %}**. +1. In the "{% data variables.product.prodname_github_apps %}" section, next to the name of your {% data variables.product.prodname_copilot_extension_short %}, click **Edit**. +1. In the sidebar, click **Advanced**. At the bottom of the "Danger Zone" section, you will see one of two options: + * **Make public**: If you see the **Make public** option, your {% data variables.product.prodname_github_app %} is currently private, and can only be installed by the organization or user that created the app. You can click **Make public** to allow any other account with the link to your app's installation page to install your {% data variables.product.prodname_copilot_extension_short %}, or leave your settings as they are to keep your app private. + * **Make private**: If you see the **Make private** option, your {% data variables.product.prodname_github_app %} is currently public, and can be installed by any account with the link to your app's installation page. You can click **Make private** to only allow the organization or user that created the app to install it, or leave your settings as they are to keep your app public. +1. Optionally, if your {% data variables.product.prodname_github_app %} is public, you can share the link to the installation page for your {% data variables.product.prodname_copilot_extension_short %}. In the sidebar, click **Public page** in the sidebar, then copy the link for your listing. + +## Listing your {% data variables.product.prodname_copilot_extension_short %} on the {% data variables.product.prodname_marketplace %} + +Once your public app is owned by a verified publisher, you can apply to list it on the {% data variables.product.prodname_marketplace %}. + +{% data reusables.profile.access_org %} +{% data reusables.organizations.org-list %} +1. At the bottom of the sidebar, select {% octicon "code" aria-hidden="true" %} **Developer settings**, then click **{% data variables.product.prodname_github_apps %}**. +1. Select the app you'd like to add to {% data variables.product.prodname_marketplace %}. +1. On the app settings landing page, scroll down to the Marketplace section, then click **List in Marketplace**. The Marketplace section is only visible if your app is public. +1. Once you've created a new draft listing, you'll see an overview of the sections that you'll need to visit before your {% data variables.product.prodname_marketplace %} listing will be complete. Complete the required sections. + 1. When naming your listing for your {% data variables.product.prodname_copilot_extension_short %}, use any of the following naming conventions: + * `YOUR-PRODUCT-NAME` (example: "{% data variables.product.prodname_copilot_short %}") + * `YOUR-COMPANY-NAME` (example: "{% data variables.product.github %}") + * `YOUR-COMPANY-AND-PRODUCT-NAMES` (example: "{% data variables.product.prodname_copilot %}") + * `YOUR-COMPANY-OR-PRODUCT-NAME for {% data variables.product.prodname_copilot %}` (example: "Docker for {% data variables.product.prodname_copilot %}") + 1. When choosing the slug users will type to invoke your {% data variables.product.prodname_copilot_extension_short %}, use the name of your listing, substituting dashes for spaces. If that slug is taken, try appending `-app`. +1. In the sidebar, click **Overview**, then read and accept the {% data variables.product.prodname_marketplace %} Developer Agreement. +1. To submit your listing, click **Submit for review**. After you submit your app for review, an onboarding expert will contact you with additional information about the onboarding process. + +> [!NOTE] {% data variables.product.github %} reviews all {% data variables.product.prodname_copilot_extension_short %} submissions to ensure they meet our standards for quality, performance, reliability, and security. We may deny submissions at our discretion, but we will provide reasons for any rejections. You are welcome to address any issues and resubmit your extension for review. diff --git a/content/copilot/building-copilot-extensions/setting-up-copilot-extensions.md b/content/copilot/building-copilot-extensions/setting-up-copilot-extensions.md new file mode 100644 index 000000000000..7583c6c7ca4b --- /dev/null +++ b/content/copilot/building-copilot-extensions/setting-up-copilot-extensions.md @@ -0,0 +1,59 @@ +--- +title: Setting up Copilot Extensions +intro: 'Follow these steps to start building {% data variables.product.prodname_copilot_extensions_short %}.' +versions: + feature: copilot-extensions +topics: + - Copilot +shortTitle: Set up Copilot Extensions +--- + +{% data reusables.copilot.copilot-extensions.beta-note %} + +## 1. Learn about {% data variables.product.prodname_copilot_agents_short %} + +{% data variables.product.prodname_copilot_agents_short %} contain the custom code for your {% data variables.product.prodname_copilot_extension_short %}, and integrate with a {% data variables.product.prodname_github_app %} to form the {% data variables.product.prodname_copilot_extension_short %} itself. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/about-copilot-agents)." + +To successfully build a {% data variables.product.prodname_copilot_agent_short %}, you need to understand how the agent communicates with: + +* The {% data variables.product.prodname_copilot_short %} platform using server-sent events. See "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform)." +* The {% data variables.product.github %} API. See "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github)." + +## 2. Review example {% data variables.product.prodname_copilot_agents_short %} and the {% data variables.product.prodname_copilot_extensions_short %} SDK + +To see the previous concepts in practice and learn about agent implementations, review the following example agents and software development kit (SDK), all of which are available in the [`copilot-extensions`](https://github.com/copilot-extensions) organization: + +* [Blackbeard](https://github.com/copilot-extensions/blackbeard-extension) (best starting point): A simple agent that responds to requests like a pirate using {% data variables.product.prodname_copilot_short %}'s large language model (LLM) API and special system prompts. +* [{% data variables.product.prodname_github_models %}](https://github.com/copilot-extensions/github-models-extension): A more complex agent that lets you ask about and interact with various LLMs listed on the {% data variables.product.prodname_marketplace %} through {% data variables.product.prodname_copilot_chat_short %}. The {% data variables.product.prodname_github_models %} agent makes use of function calling. +* [Function Calling](https://github.com/copilot-extensions/function-calling-extension): An example agent written in Go that demonstrates function calling and confirmation dialogs. +* [RAG Extension](https://github.com/copilot-extensions/rag-extension): An example agent written in Go that demonstrates a simple implementation of retrieval augmented generation. +* [Preview SDK](https://github.com/copilot-extensions/preview-sdk.js/tree/main): An SDK that streamlines the development of {% data variables.product.prodname_copilot_extensions_short %} by handling request verification, payload parsing, and response formatting automatically. This SDK allows extension builders to focus more on creating core functionality and less on boilerplate code. + +## 3. Build a {% data variables.product.prodname_copilot_agent_short %} + +Using the reference material from the previous steps, plan and build your {% data variables.product.prodname_copilot_agent_short %}. You can choose to implement any of the following options: + +* To avoid building and managing your own LLM deployment, your agent can call the Copilot LLM deployment. See "[AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/using-copilots-llm-for-your-agent)." +* To quickly interpret user input and choose from a variety of predefined functions to execute, you can implement function calling in your agent. To learn more, see [How to use function calling with Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) in the Azure OpenAI documentation and [Function calling](https://platform.openai.com/docs/guides/function-calling) in the OpenAI documentation. + +## 4. Deploy your {% data variables.product.prodname_copilot_agent_short %} + +To make your {% data variables.product.prodname_copilot_agent_short %} accessible to the {% data variables.product.prodname_copilot_short %} platform and {% data variables.product.github %}, you need to deploy it to a server that is reachable by HTTP request. See "[AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent)." + +## 5. Create a {% data variables.product.prodname_github_app %} and integrate it with your {% data variables.product.prodname_copilot_agent_short %} + +To create a {% data variables.product.prodname_copilot_extension_short %}, you need to create and configure a {% data variables.product.prodname_github_app %}, then integrate it with your {% data variables.product.prodname_copilot_agent_short %}. See "[AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension)" and "[AUTOTITLE](/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-github-app-for-your-copilot-agent)." + +## 6. Choose the availability of your {% data variables.product.prodname_copilot_extension_short %} + +Choose one of two visibility levels for your {% data variables.product.prodname_copilot_extension_short %}: +* **Public**: Any user or organization account with the installation page link for the extension can install it. +* **Private**: Only the user or organization account that created the extension can install it. + +If you make your {% data variables.product.prodname_copilot_extension_short %} public, you can then choose to list it on the {% data variables.product.prodname_marketplace %}. + +To learn how to change the visibility of your {% data variables.product.prodname_copilot_extension_short %} and list it on the {% data variables.product.prodname_marketplace %}, see "[AUTOTITLE](/copilot/building-copilot-extensions/managing-the-availability-of-your-copilot-extension)." + +## Next steps + +To learn how to use your {% data variables.product.prodname_copilot_extension_short %}, see "[AUTOTITLE](/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat)." diff --git a/content/copilot/index.md b/content/copilot/index.md index 8bc11fb26242..bec90bd7255b 100644 --- a/content/copilot/index.md +++ b/content/copilot/index.md @@ -28,6 +28,7 @@ children: - /setting-up-github-copilot - /using-github-copilot - /managing-copilot + - /building-copilot-extensions - /troubleshooting-github-copilot - /responsible-use-of-github-copilot-features topics: diff --git a/content/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/extending-the-capabilities-of-github-copilot-in-your-personal-account.md b/content/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/extending-the-capabilities-of-github-copilot-in-your-personal-account.md index 7045d65b9e36..11ced12cef4d 100644 --- a/content/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/extending-the-capabilities-of-github-copilot-in-your-personal-account.md +++ b/content/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/extending-the-capabilities-of-github-copilot-in-your-personal-account.md @@ -18,19 +18,19 @@ redirect_from: {% data reusables.copilot.copilot-extensions.copilot-extensions-on-marketplace %} -Anyone can install {% data variables.product.prodname_copilot_extensions_short %} for their personal account, but you must meet the following criteria to use a {% data variables.product.prodname_copilot_extension_short %} you install: - -* You are enrolled in the limited public beta for {% data variables.product.prodname_copilot_extensions_short %}. -* You have an active {% data variables.product.prodname_copilot_individuals_short %} subscription. +Anyone can install {% data variables.product.prodname_copilot_extensions_short %} for their personal account, but you must have an active {% data variables.product.prodname_copilot_individuals_short %} subscription to use a {% data variables.product.prodname_copilot_extension_short %} you install. > [!NOTE] If you have access to {% data variables.product.prodname_copilot_short %} through a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription, {% data variables.product.prodname_copilot_extensions_short %} are installed by organization owners at the organization level, and you do not need to install the extension on your personal account. To start using {% data variables.product.prodname_copilot_extensions_short %} installed in your organization, see "[AUTOTITLE](/copilot/github-copilot-chat/github-copilot-extensions/using-github-copilot-extensions)." +You can also create your own custom {% data variables.product.prodname_copilot_extensions_short %} for your personal account. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/about-building-copilot-extensions)." + ## Installing {% data variables.product.prodname_copilot_extensions %} for your personal account 1. Open [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace?type=apps&copilot_app=true). 1. In the left sidebar, click {% octicon "copilot" aria-hidden="true" %} **{% data variables.product.prodname_copilot_short %}**. 1. In the list of {% data variables.product.prodname_copilot_extensions_short %}, locate an app you'd like to install. 1. To install the {% data variables.product.prodname_copilot_extension_short %} on your personal account, see "[AUTOTITLE](/apps/using-github-apps/installing-a-github-app-from-github-marketplace-for-your-personal-account#installing-a-github-app-in-your-personal-account)." +{% data reusables.copilot.copilot-extensions.extension-specific-onboarding-steps %} ## Next steps diff --git a/content/copilot/managing-copilot/managing-github-copilot-in-your-organization/customizing-copilot-for-your-organization/extending-the-capabilities-of-github-copilot-in-your-organization.md b/content/copilot/managing-copilot/managing-github-copilot-in-your-organization/customizing-copilot-for-your-organization/extending-the-capabilities-of-github-copilot-in-your-organization.md index c3e670dfbc69..e7dec300f0e9 100644 --- a/content/copilot/managing-copilot/managing-github-copilot-in-your-organization/customizing-copilot-for-your-organization/extending-the-capabilities-of-github-copilot-in-your-organization.md +++ b/content/copilot/managing-copilot/managing-github-copilot-in-your-organization/customizing-copilot-for-your-organization/extending-the-capabilities-of-github-copilot-in-your-organization.md @@ -21,14 +21,15 @@ redirect_from: {% data reusables.copilot.copilot-extensions.copilot-extensions-on-marketplace %} -Before you install any {% data variables.product.prodname_copilot_extensions_short %} in your organization, you should set a usage policy for {% data variables.product.prodname_copilot_extensions_short %} at the {% ifversion ghec %}enterprise or {% endif %}organization level. See "[AUTOTITLE](/copilot/github-copilot-chat/github-copilot-extensions/managing-github-copilot-extensions)." +Any organization owner can install {% data variables.product.prodname_copilot_extensions_short %} for their organization, but your organization must have an active {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription. -Any organization owner can install {% data variables.product.prodname_copilot_extensions_short %} for their organization, but your organization must meet the following criteria to use an installed {% data variables.product.prodname_copilot_extension_short %}: +> [!NOTE] Anyone can install a {% data variables.product.prodname_copilot_extension_short %} on their personal account. However, if they get access to {% data variables.product.prodname_copilot_short %} through a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription, they will only be able to use the extension if it is installed at the organization level. -* Your organization is enrolled in the limited public beta for {% data variables.product.prodname_copilot_extensions_short %}. -* Your organization has an active {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription. +You can also create your own custom {% data variables.product.prodname_copilot_extensions_short %} for your organization. For more information, see "[AUTOTITLE](/copilot/building-copilot-extensions/about-building-copilot-extensions)." -> [!NOTE] Anyone can install a {% data variables.product.prodname_copilot_extension_short %} on their personal account. However, if they get access to {% data variables.product.prodname_copilot_short %} through a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription, they will only be able to use the extension if it is installed at the organization level. +## Prerequisites + +Before you install any {% data variables.product.prodname_copilot_extensions_short %} in your organization, you should set a usage policy for {% data variables.product.prodname_copilot_extensions_short %} at the {% ifversion ghec %}enterprise or {% endif %}organization level. See "[AUTOTITLE](/copilot/github-copilot-chat/github-copilot-extensions/managing-github-copilot-extensions)." ## Installing {% data variables.product.prodname_copilot_extensions %} for your organization @@ -36,6 +37,7 @@ Any organization owner can install {% data variables.product.prodname_copilot_ex 1. In the left sidebar, click {% octicon "copilot" aria-hidden="true" %} **{% data variables.product.prodname_copilot_short %}**. 1. In the list of {% data variables.product.prodname_copilot_extensions_short %}, locate an app you'd like to install. 1. To install the {% data variables.product.prodname_copilot_extension_short %} on an organization with a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription, see "[AUTOTITLE](/apps/using-github-apps/installing-a-github-app-from-github-marketplace-for-your-organizations)." +{% data reusables.copilot.copilot-extensions.extension-specific-onboarding-steps %} ## Next steps diff --git a/content/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat.md b/content/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat.md index 772b9642c920..4ca949addcc0 100644 --- a/content/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat.md +++ b/content/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat.md @@ -1,6 +1,6 @@ --- title: Using extensions to integrate external tools with Copilot Chat -intro: 'You can use {% data variables.product.prodname_copilot_extensions %} to interact with external tools in {% data variables.product.prodname_copilot_chat %}.' +intro: 'You can use {% data variables.product.prodname_copilot_extensions_short %} to interact with external tools in {% data variables.product.prodname_copilot_chat %}.' product: '{% data reusables.gated-features.copilot-extensions %}' versions: feature: copilot-extensions @@ -20,9 +20,13 @@ redirect_from: {% data reusables.copilot.copilot-extensions.copilot-extensions-intro %} -> [!NOTE] {% data variables.product.prodname_copilot_extensions %} are not the same as _the {% data variables.product.prodname_copilot %} extension_, which you install in an external application to access {% data variables.product.prodname_copilot_short %} within that application. For more information on _the {% data variables.product.prodname_copilot %} extension_, see "[AUTOTITLE](/copilot/using-github-copilot/getting-started-with-github-copilot)." +> [!NOTE] {% data variables.product.prodname_copilot_extensions %} are not the same as _the {% data variables.product.prodname_copilot %} extension_, which you install in your IDE to use default {% data variables.product.prodname_copilot_short %} functionality like code completions and {% data variables.product.prodname_copilot_chat %}. For more information on _the {% data variables.product.prodname_copilot %} extension_, see "[AUTOTITLE](/copilot/using-github-copilot/getting-started-with-github-copilot)." -After you install a {% data variables.product.prodname_copilot_extension_short %} from {% data variables.product.prodname_marketplace %}, you can interact with that extension in a {% data variables.product.prodname_copilot_chat_short %} conversation, asking questions and authorizing actions that combine the capabilities of the external tool and {% data variables.product.prodname_dotcom %}. For example, if you install the Sentry extension for {% data variables.product.prodname_copilot %}, you can use the extension to get information about Sentry issues, then create and assign related tracking issues on {% data variables.product.prodname_dotcom %}. +You can get started with {% data variables.product.prodname_copilot_extensions_short %} in one of two ways: +* Build your own {% data variables.product.prodname_copilot_extension_short %}. See "[AUTOTITLE](/copilot/building-copilot-extensions/about-building-copilot-extensions)." +* Install a {% data variables.product.prodname_copilot_extension_short %} from {% data variables.product.prodname_marketplace %}. + +You can interact with your custom-built or installed extension in a {% data variables.product.prodname_copilot_chat_short %} conversation, asking questions and performing actions that combine the capabilities of the external tool and {% data variables.product.prodname_dotcom %}. For example, if you install the Sentry extension for {% data variables.product.prodname_copilot %}, you can use the extension to get information about Sentry issues, then create and assign related tracking issues on {% data variables.product.prodname_dotcom %}. {% data variables.product.prodname_copilot_extensions_short %} provide several benefits, including: @@ -34,11 +38,7 @@ After you install a {% data variables.product.prodname_copilot_extension_short % {% data reusables.copilot.copilot-extensions.compatible-chat-interfaces %} -## About using {% data variables.product.prodname_copilot_extensions %} - -{% data variables.product.prodname_copilot_extensions_short %} work the same way across all {% data variables.product.prodname_copilot_chat_short %} interfaces where {% data variables.product.prodname_copilot_extensions_short %} are available. {% data variables.product.prodname_copilot_extensions_short %} are available in: - -{% data reusables.copilot.copilot-extensions.compatible-chat-interfaces %} +## Prerequisites **If you have a {% data variables.product.prodname_copilot_individuals_short %} subscription**, you need to install a {% data variables.product.prodname_copilot_extension_short %} before you can use the extension in {% data variables.product.prodname_copilot_chat_short %}. See "[AUTOTITLE](/copilot/github-copilot-chat/github-copilot-extensions/installing-github-copilot-extensions-for-your-personal-account)." @@ -46,6 +46,19 @@ After you install a {% data variables.product.prodname_copilot_extension_short % 1. An organization owner or enterprise owner needs to enable the {% data variables.product.prodname_copilot_extensions_short %} policy for your organization or enterprise. See "[AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#setting-a-policy-for-github-copilot-extensions-in-your-organization)" and "[AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#configuring-policies-for-github-copilot)" in the {% data variables.product.prodname_ghe_cloud %} documentation. 1. An organization owner needs to install {% data variables.product.prodname_copilot_extensions_short %} for your organization. See "[AUTOTITLE](/copilot/github-copilot-chat/github-copilot-extensions/installing-github-copilot-extensions-for-your-organization)." +### Supported clients and IDEs + +| Clients and IDEs | {% data variables.product.prodname_copilot_extensions_short %} support | +|------------------------------------|:---------:| +| {% data variables.product.prodname_vscode %} | {% octicon "check" aria-label="Supported" %} | +| {% data variables.product.prodname_vs %} | {% octicon "check" aria-label="Supported" %} | +| {% data variables.product.prodname_dotcom_the_website %} | {% octicon "check" aria-label="Supported" %} | +| {% data variables.product.prodname_mobile %} | {% octicon "x" aria-label="Unsupported" %} | +| JetBrains | {% octicon "x" aria-label="Unsupported" %} | +| Vim/Neovim | {% octicon "x" aria-label="Unsupported" %} | +| CLI | {% octicon "x" aria-label="Unsupported" %} | +| Xcode | {% octicon "x" aria-label="Unsupported" %} | + ## Using {% data variables.product.prodname_copilot_extensions %} 1. To start using a {% data variables.product.prodname_copilot_extension_short %}, open any of the following {% data variables.product.prodname_copilot_chat_short %} interfaces: @@ -72,3 +85,16 @@ After you install a {% data variables.product.prodname_copilot_extension_short % * Interactions with one {% data variables.product.prodname_copilot_extension_short %} will never be shared with another {% data variables.product.prodname_copilot_extension_short %}. To interact with different {% data variables.product.prodname_copilot_extensions_short %} in an IDE, change the `@EXTENSION-NAME` at the beginning of each sentence. Interactions with different extensions will appear in the same {% data variables.product.prodname_copilot_chat_short %} window, but the conversations themselves are automatically separated. {% ifversion ghec %} To interact with different {% data variables.product.prodname_copilot_extensions_short %} on {% data variables.product.prodname_dotcom_the_website %}, you need to start a new conversation for each extension by clicking {% octicon "plus" aria-label="New conversation" %} at the top of the {% data variables.product.prodname_copilot_chat_short %} window.{% endif %} + +## Additional resources + +For questions and issues related to {% data variables.product.prodname_copilot_extensions %}, please use the following resources: + +* **General issues for users and builders**: Visit the [{% data variables.product.github %} Support Portal](https://support.github.com/). +* **Feature requests or feedback**: Use the [{% data variables.product.github %} Community Discussion Thread](https://gh.io/community-feedback). +* **{% data variables.product.github %} Technology Partners**: Email the partnerships team directly for assistance. +* **{% data variables.product.prodname_vscode_shortname %} Chat Extensions builders and users**: See [Chat extensions](https://code.visualstudio.com/api/extension-guides/chat) in the {% data variables.product.prodname_vscode %} documentation. + +> [!NOTE] {% data variables.product.github %} Support cannot answer questions regarding {% data variables.product.prodname_vscode_shortname %} Chat Extensibility, as this platform is owned and maintained by the {% data variables.product.prodname_vscode_shortname %} product team. + +To learn more about building {% data variables.product.prodname_copilot_extensions_short %}, see "[AUTOTITLE](/copilot/building-copilot-extensions/about-building-copilot-extensions)." diff --git a/data/reusables/copilot/copilot-extensions/beta-note.md b/data/reusables/copilot/copilot-extensions/beta-note.md index 7181c8c835bf..a312a98fc6d9 100644 --- a/data/reusables/copilot/copilot-extensions/beta-note.md +++ b/data/reusables/copilot/copilot-extensions/beta-note.md @@ -1 +1 @@ -> [!NOTE] {% data variables.product.prodname_copilot_extensions %} are in limited public beta and subject to change. To request access to {% data variables.product.prodname_copilot_extensions_short %}, join the [waitlist](https://gh.io/join-copilot-extensions). +> [!NOTE] {% data variables.product.prodname_copilot_extensions %} is in public beta and subject to change. diff --git a/data/reusables/copilot/copilot-extensions/copilot-extensions-intro.md b/data/reusables/copilot/copilot-extensions/copilot-extensions-intro.md index 82a9738e7eac..657664cdd0a9 100644 --- a/data/reusables/copilot/copilot-extensions/copilot-extensions-intro.md +++ b/data/reusables/copilot/copilot-extensions/copilot-extensions-intro.md @@ -1 +1 @@ -{% data variables.product.prodname_copilot_extensions %} are **a type of {% data variables.product.prodname_github_app %} that integrates the power of external tools into {% data variables.product.prodname_copilot_chat %}**. {% data variables.product.prodname_copilot_extensions_short %} are developed by {% data variables.copilot.copilot_partners %}, a group of external tools selected by {% data variables.product.company_short %} for their utility when integrated into {% data variables.product.prodname_copilot_chat_short %}. To become a {% data variables.copilot.copilot_partner %}, you can apply to the [{% data variables.copilot.copilot_partner_program %}](https://github.com/features/preview/copilot-partner-program). +{% data variables.product.prodname_copilot_extensions %} are **a type of {% data variables.product.prodname_github_app %} that integrates the power of external tools into {% data variables.product.prodname_copilot_chat %}**. {% data variables.product.prodname_copilot_extensions_short %} can be developed by anyone, for private or public use, and can be shared with others through the {% data variables.product.prodname_marketplace %}. diff --git a/data/reusables/copilot/copilot-extensions/extension-specific-onboarding-steps.md b/data/reusables/copilot/copilot-extensions/extension-specific-onboarding-steps.md new file mode 100644 index 000000000000..a00f1d65f301 --- /dev/null +++ b/data/reusables/copilot/copilot-extensions/extension-specific-onboarding-steps.md @@ -0,0 +1 @@ +1. After installing a {% data variables.product.prodname_copilot_extension_short %}, you need to complete the authentication and onboarding steps unique to that extension. Visit the extension's marketplace listing page or the developer's documentation to complete the necessary steps. diff --git a/data/reusables/gated-features/copilot-extensions.md b/data/reusables/gated-features/copilot-extensions.md index 9094f6b816f0..d48ca49d26fc 100644 --- a/data/reusables/gated-features/copilot-extensions.md +++ b/data/reusables/gated-features/copilot-extensions.md @@ -1,5 +1,3 @@ -To use {% data variables.product.prodname_copilot_extensions_short %}, you must be enrolled in the limited public beta. +Anyone with a {% data variables.product.prodname_copilot_for_individuals %} subscription can use {% data variables.product.prodname_copilot_extensions_short %}. -All enrolled users with a {% data variables.product.prodname_copilot_for_individuals %} subscription can use {% data variables.product.prodname_copilot_extensions_short %}. - -For enrolled organizations or enterprises with a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription, organization owners and enterprise administrators can grant access to {% data variables.product.prodname_copilot_extensions_short %}. +For organizations or enterprises with a {% data variables.product.prodname_copilot_business_short %} or {% data variables.product.prodname_copilot_enterprise_short %} subscription, organization owners and enterprise administrators can grant access to {% data variables.product.prodname_copilot_extensions_short %}. diff --git a/data/reusables/user-settings/access_settings.md b/data/reusables/user-settings/access_settings.md index 1d02b5f449b5..4d5342aa9278 100644 --- a/data/reusables/user-settings/access_settings.md +++ b/data/reusables/user-settings/access_settings.md @@ -1 +1 @@ -1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom %}, click your profile photo, then click **Settings**. +1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom %}, click your profile photo, then click {% octicon "gear" aria-hidden="true" %} **Settings**. diff --git a/data/reusables/user-settings/edit_marketplace_listing.md b/data/reusables/user-settings/edit_marketplace_listing.md index 0352c5d010a8..47f7af623533 100644 --- a/data/reusables/user-settings/edit_marketplace_listing.md +++ b/data/reusables/user-settings/edit_marketplace_listing.md @@ -1 +1 @@ -1. On the app settings landing page, scroll down to the Marketplace section and click **List in Marketplace**. If you already have a Marketplace draft listing, click **Edit Marketplace listing**. The Marketplace section is only visible if you allowed your app to be installed by any user or organization when registering the app. For more information, see the list of [Marketplace requirements](/apps/publishing-apps-to-github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app). +1. On the app settings landing page, scroll down to the Marketplace section and click **List in Marketplace**. If you already have a Marketplace draft listing, click **Edit Marketplace listing**. The Marketplace section is only visible if you allowed your app to be installed by any user or organization when registering the app. For more information, see the list of [Marketplace requirements](/apps/publishing-apps-to-github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app). diff --git a/data/variables/copilot.yml b/data/variables/copilot.yml index b03f0f086a99..f972744913fd 100644 --- a/data/variables/copilot.yml +++ b/data/variables/copilot.yml @@ -19,3 +19,6 @@ max-chat-indexed-repos: '50' copilot_partners: 'Copilot Partners' copilot_partner: 'Copilot Partner' copilot_partner_program: 'Copilot Partner Program' + +## Copilot URLs +chat_completions_api: 'https://api.githubcopilot.com/chat/completions' diff --git a/data/variables/product.yml b/data/variables/product.yml index 750406b3ed7a..1b7e219f5402 100644 --- a/data/variables/product.yml +++ b/data/variables/product.yml @@ -279,6 +279,10 @@ prodname_copilot_extensions: 'GitHub Copilot Extensions' prodname_copilot_extension: 'GitHub Copilot Extension' prodname_copilot_extensions_short: 'Copilot Extensions' prodname_copilot_extension_short: 'Copilot Extension' +prodname_copilot_agent: 'GitHub Copilot agent' +prodname_copilot_agent_short: 'Copilot agent' +prodname_copilot_agents: 'GitHub Copilot agents' +prodname_copilot_agents_short: 'Copilot agents' prodname_copilot_cli: 'GitHub Copilot in the CLI' prodname_copilot_cli_short: 'Copilot in the CLI' prodname_copilot_for_prs: 'Copilot pull request summaries' From f224787b94de90c2380a917d511767a356b288eb Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Mon, 9 Sep 2024 10:31:32 -0700 Subject: [PATCH 2/2] A11y: Add focus state to pagination current page (#52237) --- .../components/SearchResults.module.scss | 8 ++++ src/search/components/SearchResults.tsx | 48 ++++++++++--------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/src/search/components/SearchResults.module.scss b/src/search/components/SearchResults.module.scss index 62b9b09aff16..9456e0063392 100644 --- a/src/search/components/SearchResults.module.scss +++ b/src/search/components/SearchResults.module.scss @@ -6,3 +6,11 @@ word-wrap: break-word; } + +.paginationFocus + a[aria-current]:not([rel]):not(:disabled):not(:focus-visible):focus, +.paginationFocus a[aria-current]:not([rel]):not(:disabled):focus-visible { + outline: 2px solid var(--fgColor-accent, var(--color-accent-fg)); + outline-offset: -2px; + box-shadow: 0 0 0 4px inset; +} diff --git a/src/search/components/SearchResults.tsx b/src/search/components/SearchResults.tsx index 34f51cdf0dbe..e862c6a1bf1c 100644 --- a/src/search/components/SearchResults.tsx +++ b/src/search/components/SearchResults.tsx @@ -143,29 +143,31 @@ function ResultsPagination({ page, totalPages }: { page: number; totalPages: num } return ( - - { - event.preventDefault() +
+ + { + event.preventDefault() - const [asPathRoot, asPathQuery = ''] = router.asPath.split('#')[0].split('?') - const params = new URLSearchParams(asPathQuery) - if (page !== 1) { - params.set('page', `${page}`) - } else { - params.delete('page') - } - let asPath = `/${router.locale}${asPathRoot}` - if (params.toString()) { - asPath += `?${params}` - } - setAsPath(asPath) - router.push(asPath) - }} - /> - + const [asPathRoot, asPathQuery = ''] = router.asPath.split('#')[0].split('?') + const params = new URLSearchParams(asPathQuery) + if (page !== 1) { + params.set('page', `${page}`) + } else { + params.delete('page') + } + let asPath = `/${router.locale}${asPathRoot}` + if (params.toString()) { + asPath += `?${params}` + } + setAsPath(asPath) + router.push(asPath) + }} + /> + +
) }