File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -178,10 +178,11 @@ There are also individual properties to check for each specific AI CLI
178178<a id =' snippet-AiCliDetectorProps ' ></a >
179179``` cs
180180var isCopilot = AiCliDetector .IsCopilot ;
181+ var isCursor = AiCliDetector .IsCursor ;
181182var isAider = AiCliDetector .IsAider ;
182183var isClaudeCode = AiCliDetector .IsClaudeCode ;
183184```
184- <sup ><a href =' /src/DiffEngine.Tests/AiCliDetectorTest.cs#L9-L15 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-AiCliDetectorProps ' title =' Start of snippet ' >anchor</a ></sup >
185+ <sup ><a href =' /src/DiffEngine.Tests/AiCliDetectorTest.cs#L9-L16 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-AiCliDetectorProps ' title =' Start of snippet ' >anchor</a ></sup >
185186<!-- endSnippet -->
186187
187188
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ public void Props()
99 #region AiCliDetectorProps
1010
1111 var isCopilot = AiCliDetector . IsCopilot ;
12+ var isCursor = AiCliDetector . IsCursor ;
1213 var isAider = AiCliDetector . IsAider ;
1314 var isClaudeCode = AiCliDetector . IsClaudeCode ;
1415
Original file line number Diff line number Diff line change @@ -18,11 +18,18 @@ static AiCliDetector()
1818 // https://docs.anthropic.com/en/docs/build-with-claude/claude-cli
1919 IsClaudeCode = variables . Contains ( "CLAUDECODE" ) || variables . Contains ( "CLAUDE_CODE_ENTRYPOINT" ) ;
2020
21+ // Cursor
22+ // https://cursor.com/docs/agent/terminal
23+ IsCursor = variables . Contains ( "CURSOR_AGENT" ) ;
24+
2125 Detected = IsCopilot ||
2226 IsAider ||
23- IsClaudeCode ;
27+ IsClaudeCode ||
28+ IsCursor ;
2429 }
2530
31+ public static bool IsCursor { get ; set ; }
32+
2633 public static bool IsCopilot { get ; }
2734
2835 public static bool IsAider { get ; }
You can’t perform that action at this time.
0 commit comments