diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 7cb7b7d01b8f..1048f56e5f13 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: "It looks as if this pull request has been inactive for 30 days. We want to check in with you to see if you plan to continue working on it. If you do, please add a comment to let us know. If we don't hear from you, we will close this pull request after 14 days." + stale-pr-message: "It looks as if this pull request has been inactive for 30 days. We want to check in with you to see if you plan to continue working on it. If you do, please add a comment to let us know. If we don't hear from you, we will close this pull request after 14 days. If the PR has been reviewed by a writer and you think it's ready to merge, drop into [#docs-content](https://github-grid.enterprise.slack.com/archives/C0E9DK082) and ask us to merge it." days-before-stale: 30 days-before-close: 14 stale-pr-label: 'stale' diff --git a/content/copilot/concepts/agents/code-review.md b/content/copilot/concepts/agents/code-review.md index 9fc9efc2888c..09b56a7f5aca 100644 --- a/content/copilot/concepts/agents/code-review.md +++ b/content/copilot/concepts/agents/code-review.md @@ -31,6 +31,7 @@ This article provides an overview of {% data variables.copilot.copilot_code-revi * {% data variables.product.prodname_vscode_shortname %} * {% data variables.product.prodname_vs %} * Xcode +* JetBrains IDEs {% data variables.copilot.copilot_code-review_short %} is—with one exception—a premium feature, available with the {% data variables.copilot.copilot_pro_short %}, {% data variables.copilot.copilot_pro_plus_short %}, {% data variables.copilot.copilot_business_short %}, and {% data variables.copilot.copilot_enterprise_short %} plans. diff --git a/content/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review.md b/content/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review.md index e859715e1b5c..78596f5e32c1 100644 --- a/content/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review.md +++ b/content/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review.md @@ -209,3 +209,31 @@ These instructions explain how to use {% data variables.copilot.copilot_code-rev 1. Click another file in the **Reviewed Changes** list in the chat window, to see the review comments for another file. {% endxcode %} + +{% jetbrains %} + +## Prerequisites + +* **Access to {% data variables.product.prodname_copilot_short %}**. {% data reusables.copilot.subscription-prerequisite %} + +* **Compatible JetBrains IDE**. To use {% data variables.product.prodname_copilot %} in JetBrains, you must have a compatible JetBrains IDE installed. {% data variables.product.prodname_copilot %} is compatible with the following IDEs: + + {% data reusables.copilot.jetbrains-compatible-ides %} + +{% data reusables.copilot.jetbrains-plugin-prerequisites %} + +## Using {% data variables.copilot.copilot_code-review_short %} + +These instructions explain how to use {% data variables.copilot.copilot_code-review_short %} in JetBrains IDEs. To see instructions for other popular coding environments, click the appropriate tab at the top of the page. + +1. In a JetBrains IDE, make some changes to one or more files. +1. Open the "Commit" tool window on the left-hand side. +1. Above the commit message input field, click **Copilot: Review Code Changes**. This button appears as a magnifying glass icon with a sparkle. +1. {% data variables.product.prodname_copilot_short %} will begin reviewing your changes. +1. {% data variables.product.prodname_copilot_short %} displays comments in your code with a summary of each potential issue. You can: + + * Review and make changes based on the suggestions. + * Dismiss a comment by clicking **Discard**. +1. If there is more than one comment, use the up and down arrows, at the top right of the popup, to navigate between comments. + +{% endjetbrains %} diff --git a/content/copilot/reference/ai-models/model-comparison.md b/content/copilot/reference/ai-models/model-comparison.md index b5359df96e38..5fb2a69fc3eb 100644 --- a/content/copilot/reference/ai-models/model-comparison.md +++ b/content/copilot/reference/ai-models/model-comparison.md @@ -27,33 +27,35 @@ contentType: reference Use this table to find a suitable model quickly, see more detail in the sections below. -| Model | Task area | Excels at (primary use case) | Additional capabilities | Further reading | -|-------------------------------------------------------|-----------|-------------------------------|-----------------------|------------------| -| {% data variables.copilot.copilot_gpt_41 %} | General-purpose coding and writing | Fast, accurate code completions and explanations | Agent mode, vision | [{% data variables.copilot.copilot_gpt_41 %} model card](https://openai.com/index/gpt-4-1/)| -| {% data variables.copilot.copilot_gpt_5_mini %} | Deep reasoning and debugging | Well-defined tasks and precise prompts | Reasoning, vision | Not available | -| {% data variables.copilot.copilot_gpt_5 %} | Deep reasoning and debugging | Multi-step problem solving and architecture-level code analysis | Reasoning | [{% data variables.copilot.copilot_gpt_5 %} model card](https://cdn.openai.com/pdf/8124a3ce-ab78-4f06-96eb-49ea29ffb52f/gpt5-system-card-aug7.pdf) | -| {% data variables.copilot.copilot_o3 %} | Deep reasoning and debugging | Multi-step problem solving and architecture-level code analysis | Reasoning | [{% data variables.copilot.copilot_o3 %} model card](https://openai.com/index/o3-o4-mini-system-card/) | -| {% data variables.copilot.copilot_o4_mini %} | Fast help with simple or repetitive tasks | Fast, reliable answers to lightweight coding questions | Lower latency | [{% data variables.copilot.copilot_o4_mini %} model card](https://openai.com/index/o3-o4-mini-system-card/) | -| {% data variables.copilot.copilot_claude_opus_41 %} | Deep reasoning and debugging | Complex problem-solving challenges, sophisticated reasoning | Reasoning, vision | [{% data variables.copilot.copilot_claude_opus_41 %} model card](https://assets.anthropic.com/m/4c024b86c698d3d4/original/Claude-4-1-System-Card.pdf) | -| {% data variables.copilot.copilot_claude_opus %} | Deep reasoning and debugging | Complex problem-solving challenges, sophisticated reasoning | Reasoning, vision | [{% data variables.copilot.copilot_claude_opus %} model card](https://www-cdn.anthropic.com/6be99a52cb68eb70eb9572b4cafad13df32ed995.pdf) | -| {% data variables.copilot.copilot_claude_sonnet_35 %} | Fast help with simple or repetitive tasks | Quick responses for code, syntax, and documentation | Agent mode, vision | [{% data variables.copilot.copilot_claude_sonnet_35 %} model card](https://www-cdn.anthropic.com/fed9cc193a14b84131812372d8d5857f8f304c52/Model_Card_Claude_3_Addendum.pdf) | -| {% data variables.copilot.copilot_claude_sonnet_37 %} | Deep reasoning and debugging | Structured reasoning across large, complex codebases | Agent mode, vision | [{% data variables.copilot.copilot_claude_sonnet_37 %} model card](https://assets.anthropic.com/m/785e231869ea8b3b/original/claude-3-7-sonnet-system-card.pdf) | -| {% data variables.copilot.copilot_claude_sonnet_40 %} | Deep reasoning and debugging | Performance and practicality, perfectly balanced for coding workflows | Agent mode, vision | [{% data variables.copilot.copilot_claude_sonnet_40 %} model card](https://www-cdn.anthropic.com/6be99a52cb68eb70eb9572b4cafad13df32ed995.pdf) | -| {% data variables.copilot.copilot_gemini_25_pro %} | Deep reasoning and debugging | Complex code generation, debugging, and research workflows | Reasoning, vision | [{% data variables.copilot.copilot_gemini_25_pro %} model card](https://storage.googleapis.com/model-cards/documents/gemini-2.5-pro.pdf) | -| {% data variables.copilot.copilot_gemini_flash %} | Working with visuals (diagrams, screenshots) | Real-time responses and visual reasoning for UI and diagram-based tasks | Vision | [{% data variables.copilot.copilot_gemini_flash %} model card](https://storage.googleapis.com/model-cards/documents/gemini-2-flash.pdf) | -| {% data variables.copilot.copilot_grok_code %} | General-purpose coding and writing | Fast, accurate code completions and explanations | Agent mode | [{% data variables.copilot.copilot_grok_code %} model card](https://data.x.ai/2025-08-20-grok-4-model-card.pdf)| +| Model | Task area | Excels at (primary use case) | Additional capabilities | Further reading | +|-------------------------------------------------------|-----------|-------------------------------|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| {% data variables.copilot.copilot_gpt_41 %} | General-purpose coding and writing | Fast, accurate code completions and explanations | Agent mode, vision | [{% data variables.copilot.copilot_gpt_41 %} model card](https://openai.com/index/gpt-4-1/) | +| {% data variables.copilot.copilot_gpt_5_codex %} | General-purpose coding and writing | Fast, accurate code completions and explanations | Agent mode | [{% data variables.copilot.copilot_gpt_5_codex %} model card](https://cdn.openai.com/pdf/97cc5669-7a25-4e63-b15f-5fd5bdc4d149/gpt-5-codex-system-card.pdf) | +| {% data variables.copilot.copilot_gpt_5_mini %} | Deep reasoning and debugging | Well-defined tasks and precise prompts | Reasoning, vision | Not available | +| {% data variables.copilot.copilot_gpt_5 %} | Deep reasoning and debugging | Multi-step problem solving and architecture-level code analysis | Reasoning | [{% data variables.copilot.copilot_gpt_5 %} model card](https://cdn.openai.com/pdf/8124a3ce-ab78-4f06-96eb-49ea29ffb52f/gpt5-system-card-aug7.pdf) | +| {% data variables.copilot.copilot_o3 %} | Deep reasoning and debugging | Multi-step problem solving and architecture-level code analysis | Reasoning | [{% data variables.copilot.copilot_o3 %} model card](https://openai.com/index/o3-o4-mini-system-card/) | +| {% data variables.copilot.copilot_o4_mini %} | Fast help with simple or repetitive tasks | Fast, reliable answers to lightweight coding questions | Lower latency | [{% data variables.copilot.copilot_o4_mini %} model card](https://openai.com/index/o3-o4-mini-system-card/) | +| {% data variables.copilot.copilot_claude_opus_41 %} | Deep reasoning and debugging | Complex problem-solving challenges, sophisticated reasoning | Reasoning, vision | [{% data variables.copilot.copilot_claude_opus_41 %} model card](https://assets.anthropic.com/m/4c024b86c698d3d4/original/Claude-4-1-System-Card.pdf) | +| {% data variables.copilot.copilot_claude_opus %} | Deep reasoning and debugging | Complex problem-solving challenges, sophisticated reasoning | Reasoning, vision | [{% data variables.copilot.copilot_claude_opus %} model card](https://www-cdn.anthropic.com/6be99a52cb68eb70eb9572b4cafad13df32ed995.pdf) | +| {% data variables.copilot.copilot_claude_sonnet_35 %} | Fast help with simple or repetitive tasks | Quick responses for code, syntax, and documentation | Agent mode, vision | [{% data variables.copilot.copilot_claude_sonnet_35 %} model card](https://www-cdn.anthropic.com/fed9cc193a14b84131812372d8d5857f8f304c52/Model_Card_Claude_3_Addendum.pdf) | +| {% data variables.copilot.copilot_claude_sonnet_37 %} | Deep reasoning and debugging | Structured reasoning across large, complex codebases | Agent mode, vision | [{% data variables.copilot.copilot_claude_sonnet_37 %} model card](https://assets.anthropic.com/m/785e231869ea8b3b/original/claude-3-7-sonnet-system-card.pdf) | +| {% data variables.copilot.copilot_claude_sonnet_40 %} | Deep reasoning and debugging | Performance and practicality, perfectly balanced for coding workflows | Agent mode, vision | [{% data variables.copilot.copilot_claude_sonnet_40 %} model card](https://www-cdn.anthropic.com/6be99a52cb68eb70eb9572b4cafad13df32ed995.pdf) | +| {% data variables.copilot.copilot_gemini_25_pro %} | Deep reasoning and debugging | Complex code generation, debugging, and research workflows | Reasoning, vision | [{% data variables.copilot.copilot_gemini_25_pro %} model card](https://storage.googleapis.com/model-cards/documents/gemini-2.5-pro.pdf) | +| {% data variables.copilot.copilot_gemini_flash %} | Working with visuals (diagrams, screenshots) | Real-time responses and visual reasoning for UI and diagram-based tasks | Vision | [{% data variables.copilot.copilot_gemini_flash %} model card](https://storage.googleapis.com/model-cards/documents/gemini-2-flash.pdf) | +| {% data variables.copilot.copilot_grok_code %} | General-purpose coding and writing | Fast, accurate code completions and explanations | Agent mode | [{% data variables.copilot.copilot_grok_code %} model card](https://data.x.ai/2025-08-20-grok-4-model-card.pdf) | ## Task: General-purpose coding and writing Use these models for common development tasks that require a balance of quality, speed, and cost efficiency. These models are a good default when you don't have specific requirements. -| Model | Why it's a good fit | -|-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------| -| {% data variables.copilot.copilot_gpt_41 %} | Reliable default for most coding and writing tasks. Fast, accurate, and works well across languages and frameworks. | -| {% data variables.copilot.copilot_claude_sonnet_37 %} | Produces clear, structured output. Follows formatting instructions and maintains consistent style. | -| {% data variables.copilot.copilot_gemini_flash %} | Fast and cost-effective. Well suited for quick questions, short code snippets, and lightweight writing tasks. | -| {% data variables.copilot.copilot_o4_mini %} | Optimized for speed and cost efficiency. Ideal for real-time suggestions with low usage overhead. | -| {% data variables.copilot.copilot_grok_code %} | Specialized for coding tasks. Performs well on code generation, and debugging across multiple languages. | +| Model | Why it's a good fit | +|-------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| +| {% data variables.copilot.copilot_gpt_41 %} | Reliable default for most coding and writing tasks. Fast, accurate, and works well across languages and frameworks. | +| {% data variables.copilot.copilot_gpt_5_codex %} | Delivers higher-quality code on complex engineering tasks like features, tests, debugging, refactors, and reviews without lengthy instructions. | +| {% data variables.copilot.copilot_claude_sonnet_37 %} | Produces clear, structured output. Follows formatting instructions and maintains consistent style. | +| {% data variables.copilot.copilot_gemini_flash %} | Fast and cost-effective. Well suited for quick questions, short code snippets, and lightweight writing tasks. | +| {% data variables.copilot.copilot_o4_mini %} | Optimized for speed and cost efficiency. Ideal for real-time suggestions with low usage overhead. | +| {% data variables.copilot.copilot_grok_code %} | Specialized for coding tasks. Performs well on code generation, and debugging across multiple languages. | ### When to use these models diff --git a/content/copilot/reference/ai-models/model-hosting.md b/content/copilot/reference/ai-models/model-hosting.md index 52c95a870eb9..5dd2b19c9959 100644 --- a/content/copilot/reference/ai-models/model-hosting.md +++ b/content/copilot/reference/ai-models/model-hosting.md @@ -19,6 +19,7 @@ contentType: reference Used for: * {% data variables.copilot.copilot_gpt_41 %} +* {% data variables.copilot.copilot_gpt_5_codex %} (supported in {% data variables.product.prodname_vscode %} v1.104.1 or higher) * {% data variables.copilot.copilot_gpt_5_mini %} * {% data variables.copilot.copilot_gpt_5 %} * {% data variables.copilot.copilot_o3 %} @@ -26,7 +27,7 @@ Used for: {% data variables.copilot.copilot_gpt_41 %} is hosted by {% data variables.product.github %}'s Azure tenant when used in {% data variables.product.prodname_copilot %}. -{% data variables.copilot.copilot_gpt_5 %}, {% data variables.copilot.copilot_gpt_5_mini %}, {% data variables.copilot.copilot_o3 %} and {% data variables.copilot.copilot_o4_mini %} models are hosted by OpenAI and {% data variables.product.github %}'s Azure tenant. OpenAI makes the [following data commitment](https://openai.com/enterprise-privacy/): _We [OpenAI] do not train our models on your business data by default_. {% data variables.product.github %} maintains a [zero data retention agreement](https://platform.openai.com/docs/guides/your-data) with OpenAI. +{% data variables.copilot.copilot_gpt_5_codex %}, {% data variables.copilot.copilot_gpt_5 %}, {% data variables.copilot.copilot_gpt_5_mini %}, {% data variables.copilot.copilot_o3 %} and {% data variables.copilot.copilot_o4_mini %} models are hosted by OpenAI and {% data variables.product.github %}'s Azure tenant. OpenAI makes the [following data commitment](https://openai.com/enterprise-privacy/): _We [OpenAI] do not train our models on your business data by default_. {% data variables.product.github %} maintains a [zero data retention agreement](https://platform.openai.com/docs/guides/your-data) with OpenAI. When using OpenAI's models, input requests and output responses continue to run through {% data variables.product.prodname_copilot %}'s content filters for public code matching, when applied, along with those for harmful or offensive content. diff --git a/content/copilot/reference/ai-models/supported-models.md b/content/copilot/reference/ai-models/supported-models.md index 9dafde59d10d..abbcbd6a600f 100644 --- a/content/copilot/reference/ai-models/supported-models.md +++ b/content/copilot/reference/ai-models/supported-models.md @@ -39,22 +39,23 @@ This table lists the AI models available in {% data variables.product.prodname_c {% rowheaders %} -| Model name | Provider | Release status | Agent mode | Ask mode | Edit mode | -|----------------------------------------------------------------|-----------|---------------------------------------------------------|---------------------------------------------|----------------------|---------------| -| {% data variables.copilot.copilot_gpt_41 %} | OpenAI | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gpt_5_mini %} | OpenAI | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gpt_5 %} | OpenAI | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_o3 %} | OpenAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_o4_mini %} | OpenAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_opus_41 %} | Anthropic | {% data variables.release-phases.public_preview_caps %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_opus %} | Anthropic | GA | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_sonnet_35 %} | Anthropic | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_sonnet_37 %} | Anthropic | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_sonnet_37 %} Thinking | Anthropic | GA | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_sonnet_40 %} | Anthropic | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gemini_25_pro %} | Google | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gemini_flash %} | Google | GA | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_grok_code %} | xAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| Model name | Provider | Release status | Agent mode | Ask mode | Edit mode | +|----------------------------------------------------------------|-----------|----------------------------------------------------------|---------------------------------------------|----------------------|---------------| +| {% data variables.copilot.copilot_gpt_41 %} | OpenAI | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gpt_5_codex %} | OpenAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gpt_5_mini %} | OpenAI | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gpt_5 %} | OpenAI | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_o3 %} | OpenAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_o4_mini %} | OpenAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_opus_41 %} | Anthropic | {% data variables.release-phases.public_preview_caps %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_opus %} | Anthropic | GA | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_sonnet_35 %} | Anthropic | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_sonnet_37 %} | Anthropic | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_sonnet_37 %} Thinking | Anthropic | GA | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_sonnet_40 %} | Anthropic | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gemini_25_pro %} | Google | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gemini_flash %} | Google | GA | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_grok_code %} | xAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% endrowheaders %} @@ -62,13 +63,16 @@ This table lists the AI models available in {% data variables.product.prodname_c The following table shows which models are available in each client. -> [!NOTE] {% data reusables.copilot.auto-model-selection %} +> [!NOTE] +> * {% data reusables.copilot.auto-model-selection %} +> * {% data reusables.copilot.gpt-5-codex-vscode-support %} {% rowheaders %} | Model | {% data variables.product.prodname_dotcom_the_website %} | {% data variables.product.prodname_vscode %} | {% data variables.product.prodname_vs %} | Eclipse | Xcode | JetBrains IDEs | |----------------------------------------------------------------|----------------------------------------------------------|---------|---------------------------------------------|---------------------------------------------|---------------------------------------------|---------------------------------------------| | {% data variables.copilot.copilot_gpt_41 %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gpt_5_codex %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | | {% data variables.copilot.copilot_gpt_5_mini %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | | {% data variables.copilot.copilot_gpt_5 %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | | {% data variables.copilot.copilot_o3 %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | diff --git a/content/copilot/responsible-use/copilot-spaces.md b/content/copilot/responsible-use/copilot-spaces.md new file mode 100644 index 000000000000..ea5ddf08934f --- /dev/null +++ b/content/copilot/responsible-use/copilot-spaces.md @@ -0,0 +1,110 @@ +--- +title: Responsible use of GitHub Copilot Spaces +shortTitle: Copilot Spaces +intro: 'Learn how to use GitHub Copilot Spaces responsibly by understanding its purposes, capabilities, and limitations.' +versions: + feature: copilot +topics: + - Copilot +contentType: rai +--- + +## About GitHub Copilot Spaces + +Copilot Spaces let you organize the context that Copilot Chat uses to answer your questions. Spaces can include repositories, code, pull requests, issues, free-text content like transcripts or notes, images, and file uploads. You can ask Copilot questions grounded in that context, or share the space with your team to support collaboration and knowledge sharing. Spaces can also be accessed directly from the IDE via the remote GitHub MCP server. + +### Input processing + +When you submit a question in a space, Copilot Chat augments your request with relevant context from that space. Included context can be: + +* Files and repositories you’ve added +* Issues, pull requests, and documentation +* Notes or transcripts you supply + +The input prompt from the user is pre-processed by the Copilot Chat system, combined with additional contextual information (for example, the current date and time), and sent to a large language model. User input can take the form of code snippets or plain language. + +The large language model will take the prompt, gather additional context (for example repository data stored on GitHub or search results from Bing), and provide a response based on the prompt. English is the preferred language for submitted prompts. + +### Language model analysis + +The pre-processed prompt is then passed through the Copilot Chat language model, which is a neural network that has been trained on a large body of text data. The language model analyzes the input prompt. + +### Response generation + +The language model generates a response based on its analysis of the input prompt and the context provided to it. The language model can gather additional context (for example repository data stored on GitHub or search results from Bing), and provide a response based on the prompt. + +### Output formatting + +The response generated by Copilot Chat is formatted and presented to the user. Copilot may use syntax highlighting, indentation, and other formatting features to add clarity to the generated response. Depending upon the type of question from the user, links to context that the model used when generating a response, such as source code files, issues, Bing search results, or documentation, may also be provided. + +Copilot Chat is intended to provide you with the most relevant answer to your question. However, it may not always provide the answer you are looking for. Users of Copilot Chat are responsible for reviewing and validating responses generated by the system to ensure they are accurate and appropriate. Additionally, as part of our product development process, we undertake red teaming to understand and improve the safety of Copilot Chat. Input prompts and output completions are run through content filters. The content filtering system detects and prevents the output on specific categories of content including harmful, offensive, or off-topic content. For more information on improving the performance of Copilot Chat, see [Improving performance for Copilot Chat](/copilot/responsible-use/chat-in-github#improving-performance-for-copilot-chat). + +## Use cases for Spaces + +### Developing a new feature + +Spaces let you bundle relevant code, product specs, and design notes so Copilot can quickly explain the current implementation, highlight gaps, and draft new code or next steps. This helps you save time, stay aligned with requirements, and produce higher-quality feature work. + +### Defining the logic for a small, frequent task + +For repetitive tasks like adding telemetry or event handling, Spaces make it easy to document the process once and reuse it. By grounding Copilot in flowcharts, examples, or schemas, you ensure consistent patterns, reusable templates, and efficient execution across your team. + +### Sharing knowledge with teammates + +Spaces can act as living guides for common project questions (e.g. how authentication or search works) by collecting the latest code and documentation in one place. Copilot then uses that context to explain systems, answer questions, and onboard teammates quickly with best practices. + +## Improving performance for Spaces + +Spaces can be used in a wide variety of development and collaboration workflows, from generating code to sharing knowledge across a team. To improve performance and get more relevant responses, there are several best practices you can adopt. For details on system constraints, see [Limitations of GitHub Copilot Spaces](#limitations-of-github-copilot-spaces). + +### Be selective with context + +Adding only the most relevant files, repositories, and notes helps Copilot stay focused. Overloading a space with unnecessary content can dilute the quality of responses and make it harder to get precise results. + +### Keep context updated + +As your project evolves, refresh the files, issues, or documentation in your space. Out-of-date context may cause Copilot to generate inaccurate or incomplete answers. + +### Use instructions alongside sources + +Combining natural language instructions with curated sources helps Copilot better understand your intent. Instructions provide guidance, while sources ground the output in real project context. + +### Anchor chat in a space + + Starting your conversations from within a space ensures continuity and relevance. This keeps Copilot’s responses aligned with the specific context you’ve already set up, instead of resetting with each new chat. + +### Verify Space’s output + +Spaces ground Copilot’s responses in the context you provide, but the system may still make mistakes. These mistakes could be misunderstandings of your intent or simple errors in the generated response. Always review Copilot’s output carefully to confirm it behaves as intended, and ensure it meets your team’s quality and security standards before using it in production. + +## Limitations of GitHub Copilot Spaces + +### Interpretation of user intent + +Spaces help ground Copilot Chat’s responses in curated context, but the system may still misunderstand your intent. Always review Copilot’s output to confirm it reflects your goals before using it in your project. + +### Context limits + +Spaces have defined size limits, and Copilot Chat only processes a portion of the content you include. This means not every file, document, or note in a Space will be used in a response. Being selective about what you add helps ensure that Copilot works with the most relevant context. + +### Limited scope + +Spaces that contain only a repository cannot currently be accessed in the IDE via the GitHub MCP server. To use Spaces in the IDE, you’ll need to include additional context such as files, issues, or documentation. + +Spaces is backed by Copilot Chat, and therefore has been trained on a large body of code but still has a limited scope and may not be able to handle more complex code structures or obscure programming languages. For each language, the quality of suggestions you receive may depend on the volume and diversity of training data for that language. For example, JavaScript is well-represented in public repositories and is one of GitHub Copilot's best supported languages. Languages with less representation in public repositories may be more challenging for Copilot Chat to provide assistance with. Additionally, Copilot Chat can only suggest code based on the context of the code being written, so it may not be able to identify larger design or architectural issues. + +### Inaccurate responses + +Even when grounded in a Space, Copilot Chat may generate responses that are inaccurate, incomplete, or outdated. This applies to all types of outputs, including code, summaries, or issue drafts. Always validate results against your own project requirements. + +### Security limitations + +Copilot Chat generates code based on the context of the code being written, which can potentially expose sensitive information or vulnerabilities if not used carefully. You should be careful when using Copilot Chat to generate code for security-sensitive applications and always review and test the generated code thoroughly. + +### Legal and regulatory considerations + +Users need to evaluate potential specific legal and regulatory obligations when using any AI services and solutions, which may not be appropriate for use in every industry or scenario. Additionally, AI services or solutions are not designed for and may not be used in ways prohibited in applicable terms of service and relevant codes of conduct. + +### Offensive content + +Spaces utilizes Copilot Chat which has built-in protections against harmful, hateful, or offensive content. Please report any examples of offensive content to copilot-safety@github.com. diff --git a/content/copilot/responsible-use/index.md b/content/copilot/responsible-use/index.md index a9ba0b455f41..b2e79665396c 100644 --- a/content/copilot/responsible-use/index.md +++ b/content/copilot/responsible-use/index.md @@ -20,6 +20,7 @@ children: - /code-review - /copilot-coding-agent - /spark + - /copilot-spaces redirect_from: - /copilot/responsible-use-of-github-copilot-features contentType: rai diff --git a/data/reusables/actions/supported-github-runners.md b/data/reusables/actions/supported-github-runners.md index 4709fd2132f6..cf52673aa66e 100644 --- a/data/reusables/actions/supported-github-runners.md +++ b/data/reusables/actions/supported-github-runners.md @@ -66,7 +66,8 @@ For public repositories, jobs using the workflow labels shown in the table below 14 GB Intel - macos-13 + macos-13, + macos-15-intel @@ -133,7 +134,8 @@ For {% ifversion ghec %}internal and{% endif %} private repositories, jobs using 14 GB Intel - macos-13 + macos-13, + macos-15-intel diff --git a/data/reusables/copilot/available-models-per-plan.md b/data/reusables/copilot/available-models-per-plan.md index c6cd9820fc5a..a0955e5a2948 100644 --- a/data/reusables/copilot/available-models-per-plan.md +++ b/data/reusables/copilot/available-models-per-plan.md @@ -1,20 +1,21 @@ {% rowheaders %} -| Available models in chat | {% data variables.copilot.copilot_free_short %} | {% data variables.copilot.copilot_pro_short %} | {% data variables.copilot.copilot_pro_plus_short %} | {% data variables.copilot.copilot_business_short %} | {% data variables.copilot.copilot_enterprise_short %} | -|--------------------------------------------------------------|-------------------------------------------------|--------------------------------------------------|------------------------------------------------------|-------------------------------------------------------|----------------------------------------------------------| -| {% data variables.copilot.copilot_gpt_41 %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gpt_5_mini %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gpt_5 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_o3 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_o4_mini %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_opus_41 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_opus %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_sonnet_35 %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_sonnet_37 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| Available models in chat | {% data variables.copilot.copilot_free_short %} | {% data variables.copilot.copilot_pro_short %} | {% data variables.copilot.copilot_pro_plus_short %} | {% data variables.copilot.copilot_business_short %} | {% data variables.copilot.copilot_enterprise_short %} | +|----------------------------------------------------------------|-------------------------------------------------|--------------------------------------------------|------------------------------------------------------|-------------------------------------------------------|----------------------------------------------------------| +| {% data variables.copilot.copilot_gpt_41 %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gpt_5_codex %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gpt_5_mini %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gpt_5 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_o3 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_o4_mini %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_opus_41 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_opus %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_sonnet_35 %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_sonnet_37 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | | {% data variables.copilot.copilot_claude_sonnet_37 %} Thinking | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_claude_sonnet_40 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gemini_25_pro %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_gemini_flash %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | -| {% data variables.copilot.copilot_grok_code %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_claude_sonnet_40 %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gemini_25_pro %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_gemini_flash %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | +| {% data variables.copilot.copilot_grok_code %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% endrowheaders %} diff --git a/data/reusables/copilot/gpt-5-codex-vscode-support.md b/data/reusables/copilot/gpt-5-codex-vscode-support.md new file mode 100644 index 000000000000..c09e75405d4d --- /dev/null +++ b/data/reusables/copilot/gpt-5-codex-vscode-support.md @@ -0,0 +1 @@ +{% data variables.copilot.copilot_gpt_5_codex %} is supported in {% data variables.product.prodname_vscode %} v1.104.1 or higher. diff --git a/data/reusables/copilot/model-multipliers.md b/data/reusables/copilot/model-multipliers.md index 8103622e4662..5bcb0f937f1b 100644 --- a/data/reusables/copilot/model-multipliers.md +++ b/data/reusables/copilot/model-multipliers.md @@ -3,7 +3,8 @@ | Model | Multiplier for **paid plans** | Multiplier for **{% data variables.copilot.copilot_free_short %}** | |----------------------------------------------------------------|-------------------------------|--------------------------------------------------------------------| | {% data variables.copilot.copilot_gpt_41 %} | 0 | 1 | -| {% data variables.copilot.copilot_gpt_5_mini %} | 0 | 1 | +| {% data variables.copilot.copilot_gpt_5_codex %} | 1 | Not applicable | +| {% data variables.copilot.copilot_gpt_5_mini %} | 0 | 1 | | {% data variables.copilot.copilot_gpt_5 %} | 1 | Not applicable | | {% data variables.copilot.copilot_gpt_4o %} | 0 | 1 | | {% data variables.copilot.copilot_o3 %} | 1 | Not applicable | diff --git a/data/variables/copilot.yml b/data/variables/copilot.yml index dd1a4be3bc2c..04011df2c648 100644 --- a/data/variables/copilot.yml +++ b/data/variables/copilot.yml @@ -117,6 +117,7 @@ copilot_gpt_41: 'GPT-4.1' copilot_gpt_4o: 'GPT-4o' copilot_gpt_5: 'GPT-5' copilot_gpt_5_mini: 'GPT-5 mini' +copilot_gpt_5_codex: 'GPT-5-Codex' # OpenAI 'o' series: copilot_o3: 'o3' copilot_o4_mini: 'o4-mini' diff --git a/next.config.js b/next.config.js index 97b82d7e656b..3a5a2073570a 100644 --- a/next.config.js +++ b/next.config.js @@ -2,7 +2,7 @@ import fs from 'fs' import path from 'path' import frontmatter from '@gr2m/gray-matter' -import { getLogLevelNumber } from '#src/observability/logger/lib/log-levels.js' +import { getLogLevelNumber } from './src/observability/logger/lib/log-levels.js' // Replace imports with hardcoded values const ROOT = process.env.ROOT || '.' diff --git a/package.json b/package.json index 76b3997457ef..b53e8f248c69 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,6 @@ "url": "https://github.com/github/docs" }, "type": "module", - "imports": { - "#src/*": { - "default": "./src/*" - } - }, "exports": "./src/frame/server.ts", "scripts": { "add-content-type": "tsx src/content-render/scripts/add-content-type.ts", diff --git a/src/content-render/scripts/add-content-type.ts b/src/content-render/scripts/add-content-type.ts index 88fc414a0a1f..4e52f67b3900 100644 --- a/src/content-render/scripts/add-content-type.ts +++ b/src/content-render/scripts/add-content-type.ts @@ -8,7 +8,7 @@ import path from 'path' import { program } from 'commander' import frontmatter from '@/frame/lib/read-frontmatter' import walkFiles from '@/workflows/walk-files' -import { contentTypesEnum } from '#src/frame/lib/frontmatter.js' +import { contentTypesEnum } from '@/frame/lib/frontmatter' import type { MarkdownFrontmatter } from '@/types' const RESPONSIBLE_USE_STRING = 'responsible-use' diff --git a/src/content-render/tests/table-accessibility-labels.js b/src/content-render/tests/table-accessibility-labels.js index 552e8c4341af..c65cdfb1a7ae 100644 --- a/src/content-render/tests/table-accessibility-labels.js +++ b/src/content-render/tests/table-accessibility-labels.js @@ -1,7 +1,7 @@ import cheerio from 'cheerio' import { describe, expect, test } from 'vitest' -import { renderContent } from '#src/content-render/index' +import { renderContent } from '@/content-render/index' import { EOL } from 'os' // Use platform-specific line endings for realistic tests when templates have diff --git a/src/landings/components/journey/JourneyLanding.tsx b/src/landings/components/journey/JourneyLanding.tsx index 7eb489fe0e7f..2dc85368e7ac 100644 --- a/src/landings/components/journey/JourneyLanding.tsx +++ b/src/landings/components/journey/JourneyLanding.tsx @@ -1,16 +1,105 @@ import { DefaultLayout } from '@/frame/components/DefaultLayout' import { useLandingContext } from '@/landings/context/LandingContext' import { LandingHero } from '@/landings/components/shared/LandingHero' +import { JourneyLearningTracks } from './JourneyLearningTracks' + +export type JourneyLearningTrack = { + id: string + title: string + description: string + trackName: string + trackProduct: string + guides?: Array<{ + href: string + title: string + }> +} export const JourneyLanding = () => { const { title, intro, heroImage, introLinks } = useLandingContext() + // Temp until we hookup real data + const stubLearningTracks: JourneyLearningTrack[] = [ + { + id: 'admin:get_started_with_your_enterprise_account', + title: 'Get started with your enterprise account', + description: + 'Set up your enterprise account and configure initial settings for your organization.', + trackName: 'get_started_with_your_enterprise_account', + trackProduct: 'admin', + guides: [ + { + href: '/admin/overview/about-enterprise-accounts?learn=get_started_with_your_enterprise_account&learnProduct=admin', + title: 'About enterprise accounts', + }, + { + href: '/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise?learn=get_started_with_your_enterprise_account&learnProduct=admin', + title: 'Inviting people to manage your enterprise', + }, + { + href: '/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies?learn=get_started_with_your_enterprise_account&learnProduct=admin', + title: 'About enterprise policies', + }, + ], + }, + { + id: 'admin:adopting_github_actions_for_your_enterprise_ghec', + title: 'Adopt GitHub Actions for your enterprise', + description: + 'Learn how to plan and implement a rollout of GitHub Actions in your enterprise.', + trackName: 'adopting_github_actions_for_your_enterprise_ghec', + trackProduct: 'admin', + guides: [ + { + href: '/admin/managing-github-actions-for-your-enterprise/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises?learn=adopting_github_actions_for_your_enterprise_ghec&learnProduct=admin', + title: 'About GitHub Actions for enterprises', + }, + { + href: '/actions/get-started/understand-github-actions?learn=adopting_github_actions_for_your_enterprise_ghec&learnProduct=admin', + title: 'Understanding GitHub Actions', + }, + { + href: '/admin/managing-github-actions-for-your-enterprise/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise?learn=adopting_github_actions_for_your_enterprise_ghec&learnProduct=admin', + title: 'Introducing GitHub Actions to your enterprise', + }, + { + href: '/admin/managing-github-actions-for-your-enterprise/getting-started-with-github-actions-for-your-enterprise/migrating-your-enterprise-to-github-actions?learn=adopting_github_actions_for_your_enterprise_ghec&learnProduct=admin', + title: 'Migrating your enterprise to GitHub Actions', + }, + ], + }, + { + id: 'actions:continuous-integration', + title: 'Continuous integration with GitHub Actions', + description: + 'Set up automated testing and building for your projects using GitHub Actions workflows.', + trackName: 'continuous-integration', + trackProduct: 'actions', + guides: [ + { + href: '/actions/automating-builds-and-tests/about-continuous-integration?learn=continuous-integration&learnProduct=actions', + title: 'About continuous integration', + }, + { + href: '/actions/automating-builds-and-tests/building-and-testing-nodejs?learn=continuous-integration&learnProduct=actions', + title: 'Building and testing Node.js', + }, + { + href: '/actions/automating-builds-and-tests/building-and-testing-python?learn=continuous-integration&learnProduct=actions', + title: 'Building and testing Python', + }, + ], + }, + ] + return (
-
TODO
+
+ +
) diff --git a/src/landings/components/journey/JourneyLearningTracks.module.css b/src/landings/components/journey/JourneyLearningTracks.module.css new file mode 100644 index 000000000000..b0dc03bfa595 --- /dev/null +++ b/src/landings/components/journey/JourneyLearningTracks.module.css @@ -0,0 +1,213 @@ +.learningTracks { + border: 1px solid var(--borderColor-default, var(--color-border-default, #d1d9e0)); + border-radius: 12px; + padding: 1.5rem; + padding-bottom: .75rem; + margin-bottom: 1rem; + margin-left: 1rem; + box-shadow: + 0px 1px 3px 0px rgba(31, 35, 40, 0.08), + 0px 1px 0px 0px rgba(31, 35, 40, 0.06); + position: relative; + z-index: 1; + background-color: var(--bgColor-default, var(--color-canvas-default, #ffffff)); +} + +.trackHeader { + margin: 0 0 0.5rem 0; + padding-right: 3rem; + color: var(--fgColor-default, var(--color-fg-default, #1f2328)); + display: flex; + align-items: center; + gap: 0.5rem; +} + +.anchorLink { + color: var(--fgColor-default, var(--color-fg-default, #1f2328)); + text-decoration: none; +} + +.trackDescription { + margin: 0 0 1rem 0; + color: var(--fgColor-muted, var(--color-fg-muted, #656d76)); +} + +.expandButton { + top: 0; + right: 0; +} + +.trackGuides { + margin-top: 1rem; + margin-bottom: 1rem; + padding-left: 0; + list-style: none; + counter-reset: guide-counter; +} + +.trackGuides li { + margin-bottom: 0.75rem; + padding-left: 2.5rem; + position: relative; + counter-increment: guide-counter; +} + +.trackGuides li::before { + content: counter(guide-counter); + position: absolute; + left: 0; + top: -0.125rem; + width: 1.5rem; + height: 1.5rem; + background-color: transparent; + border: 1px solid var(--borderColor-default, var(--color-border-default, #d0d7de)); + color: var(--fgColor-muted, var(--color-fg-muted, #656d76)); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.70rem; + font-weight: 600; + line-height: 1; +} + +.guideLink { + color: var(--fgColor-accent, var(--color-accent-fg, #0969da)); + text-decoration: none; +} + +/* Hide only the timeline line that extends below the last badge, preserve everything else */ +.timelineContainer :global(.Timeline-Item:last-child::before) { + background: linear-gradient(to bottom, var(--borderColor-default, #d1d9e0) 0%, var(--borderColor-default, #d1d9e0) 30%, transparent 30%, transparent 100%) !important; +} + +.timelineBadge { + background-color: var(--color-canvas-subtle, #f6f8fa) !important; + border: 1px solid var(--borderColor-default, var(--color-border-default, #d1d9e0)) !important; +} + +/* Fix entire timeline component overlapping header */ +.timelineContainer { + z-index: 0 !important; + position: relative; +} + +.timelineContainer :global(.Timeline) { + z-index: 0 !important; +} + +.timelineThinLine :global(.Timeline-Item::before) { + width: 1px !important; +} + +/* Mobile-first: custom stacked layout */ +.mobileLayout { + display: block; + position: relative; + z-index: 0; +} + +.mobileItem { + margin-bottom: 2rem; + text-align: center; /* Only for centering the badge */ + position: relative; +} + +.mobileBadge { + width: 2rem; + height: 2rem; + background-color: var(--color-canvas-subtle, #f6f8fa); + color: var(--fgColor-muted, var(--color-fg-muted)); + border: 1px solid var(--borderColor-default, var(--color-border-default, #d1d9e0)); + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; + font-weight: 600; + margin-bottom: 0.5rem; + position: relative; + z-index: 2; +} + +/* Add connecting line from badge downward */ +.mobileBadge::after { + content: ''; + position: absolute; + left: 50%; + top: 100%; + width: 1px; + height: 2.5rem; + background-color: var(--borderColor-default, var(--color-border-default, #d1d9e0)); + transform: translateX(-50%); + z-index: 1; +} + +/* Add connecting line above badge (except first item) */ +.mobileItem:not(:first-child) .mobileBadge::before { + content: ''; + position: absolute; + left: 50%; + bottom: 100%; + width: 1px; + height: 2.5rem; + background-color: var(--borderColor-default, var(--color-border-default, #d1d9e0)); + transform: translateX(-50%); + z-index: 1; +} + +.mobileConnector { + width: 1px; + height: 1rem; + background-color: var(--borderColor-default, var(--color-border-default, #d1d9e0)); + margin: 0 auto; +} + +.mobileConnector:last-child { + display: none; /* Hide connector after last item */ +} + +.mobileItem .mobileTile { + border: 1px solid var(--borderColor-default, var(--color-border-default, #d1d9e0)); + border-radius: 12px; + padding: 1rem; + margin-top: 0.5rem; + text-align: left; + box-shadow: + 0px 1px 3px 0px rgba(31, 35, 40, 0.08), + 0px 1px 0px 0px rgba(31, 35, 40, 0.06); + position: relative; + z-index: 3; + background-color: var(--bgColor-default, var(--color-canvas-default, #ffffff)); +} + +/* Desktop: show Timeline component */ +@media (min-width: 768px) { + .mobileLayout { + display: none; + } + + .timelineContainer { + display: block; + } +} + +/* Mobile: hide Timeline component */ +@media (max-width: 767px) { + .timelineContainer { + display: none; + } +} + +/* Mobile: stack h3 and Token vertically when mobile layout is active */ +@media (max-width: 767px) { + .trackHeader { + flex-direction: column; + align-items: flex-start; + gap: 0.5rem; + margin-bottom: 1.5rem; + } + + .trackHeader h3 { + margin-bottom: .50rem; + } +} \ No newline at end of file diff --git a/src/landings/components/journey/JourneyLearningTracks.tsx b/src/landings/components/journey/JourneyLearningTracks.tsx new file mode 100644 index 000000000000..87397ec49d30 --- /dev/null +++ b/src/landings/components/journey/JourneyLearningTracks.tsx @@ -0,0 +1,85 @@ +/* filepath: /workspaces/docs-internal/src/landings/components/journey/JourneyLearningTracks.tsx */ +import { ChevronDownIcon, ChevronUpIcon } from '@primer/octicons-react' +import { Button, Details, Timeline, Token, useDetails } from '@primer/react' +import type { JourneyLearningTrack } from './JourneyLanding' +import styles from './JourneyLearningTracks.module.css' + +type JourneyLearningTracksProps = { + tracks: JourneyLearningTrack[] +} + +export const JourneyLearningTracks = ({ tracks }: JourneyLearningTracksProps) => { + if (!tracks || tracks.length === 0) { + return null + } + + const renderTrackContent = (track: JourneyLearningTrack, trackIndex: number) => { + const { getDetailsProps, open } = useDetails({}) + + return ( + <> +
+

{track.title}

+ +
+

{track.description}

+
+ +
    + {(track.guides || []).map((guide) => ( +
  1. + + {guide.title} + +
  2. + ))} +
+
+ + ) + } + + return ( + <> + {/* Desktop: Timeline component */} +
+ + {tracks.map((track, trackIndex) => { + return ( + + {trackIndex + 1} + +
{renderTrackContent(track, trackIndex)}
+
+
+ ) + })} +
+
+ + {/* Mobile: Custom stacked layout */} +
+ {tracks.map((track, trackIndex) => ( +
+
{trackIndex + 1}
+
+
{renderTrackContent(track, trackIndex)}
+
+ {trackIndex < tracks.length - 1 &&
} +
+ ))} +
+ + ) +}