File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ There are also individual properties to check for each specific AI CLI
177177<!-- snippet: AiCliDetectorProps -->
178178<a id =' snippet-AiCliDetectorProps ' ></a >
179179``` cs
180- var isCopilotCli = AiCliDetector .IsCopilotCli ;
180+ var isCopilot = AiCliDetector .IsCopilot ;
181181var isAider = AiCliDetector .IsAider ;
182182var isClaudeCode = AiCliDetector .IsClaudeCode ;
183183```
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ public void Props()
88
99 #region AiCliDetectorProps
1010
11- var isCopilotCli = AiCliDetector . IsCopilotCli ;
11+ var isCopilot = AiCliDetector . IsCopilot ;
1212 var isAider = AiCliDetector . IsAider ;
1313 var isClaudeCode = AiCliDetector . IsClaudeCode ;
1414
1515 #endregion
1616
17+ Assert . True ( isCopilot ) ;
1718 // ReSharper restore UnusedVariable
1819 }
1920}
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ public static class AiCliDetector
55 static AiCliDetector ( )
66 {
77 var variables = Environment . GetEnvironmentVariables ( ) ;
8-
9- // GitHub Copilot CLI
8+
9+ // GitHub Copilot
1010 // https://docs.github.com/en/copilot/using-github-copilot/using-github-copilot-in-the-command-line
11- IsCopilotCli = variables . Contains ( "GITHUB_COPILOT_CLI " ) ;
11+ IsCopilot = variables . Contains ( "GITHUB_COPILOT_RUNTIME " ) ;
1212
1313 // Aider
1414 // https://aider.chat/docs/config/dotenv.html
@@ -18,12 +18,12 @@ static AiCliDetector()
1818 // https://docs.anthropic.com/en/docs/build-with-claude/claude-cli
1919 IsClaudeCode = variables . Contains ( "CLAUDE_CODE" ) || variables . Contains ( "ANTHROPIC_CLI" ) ;
2020
21- Detected = IsCopilotCli ||
21+ Detected = IsCopilot ||
2222 IsAider ||
2323 IsClaudeCode ;
2424 }
2525
26- public static bool IsCopilotCli { get ; }
26+ public static bool IsCopilot { get ; }
2727
2828 public static bool IsAider { get ; }
2929
You can’t perform that action at this time.
0 commit comments