File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 8
8
ButlerAction ,
9
9
getDisplayNameForWorkflowKind ,
10
10
isClaudeCodeActionSource ,
11
+ isCursorActionSource ,
11
12
isDefinedMCPActionSource ,
12
13
isStringActionSource ,
13
14
isUndefinedMCPActionSource ,
84
85
{@html butbotSvg }
85
86
</div >
86
87
</div >
88
+ {:else if isCursorActionSource (action .source )}
89
+ <div class =" action-item__editor-logo" >
90
+ <EditorLogo name =" cursor" />
91
+ <div class =" action-item__editor-source" >
92
+ {@html butbotSvg }
93
+ </div >
94
+ </div >
87
95
{/if }
88
96
<div class =" action-item__content" >
89
97
<div class =" action-item__content__header" >
101
109
<span class ="text-13 text-greyer" title ={new Date (action .createdAt ).toLocaleString ()}>
102
110
{#if isClaudeCodeActionSource (action .source )}
103
111
Claude Hook
112
+ {:else if isCursorActionSource (action .source )}
113
+ Cursor Hook
104
114
{:else }
105
115
MCP call
106
116
{/if }
Original file line number Diff line number Diff line change @@ -30,12 +30,17 @@ type ClaudeCodeActionSource = {
30
30
ClaudeCode : string ;
31
31
} ;
32
32
33
+ type CursorActionSource = {
34
+ ClaudeCode : string ;
35
+ } ;
36
+
33
37
export type ActionSource =
34
38
| 'ButCli'
35
39
| 'GitButler'
36
40
| 'Unknown'
37
41
| MCPActionSource
38
- | ClaudeCodeActionSource ;
42
+ | ClaudeCodeActionSource
43
+ | CursorActionSource ;
39
44
40
45
export function isStringActionSource (
41
46
source : ActionSource
@@ -59,6 +64,10 @@ export function isClaudeCodeActionSource(source: ActionSource): source is Claude
59
64
return typeof source === 'object' && source !== null && 'ClaudeCode' in source ;
60
65
}
61
66
67
+ export function isCursorActionSource ( source : ActionSource ) : source is CursorActionSource {
68
+ return typeof source === 'object' && source !== null && 'Cursor' in source ;
69
+ }
70
+
62
71
/** Represents a snapshot of an automatic action taken by a GitButler automation. */
63
72
export class ButlerAction {
64
73
/** UUID identifier of the action */
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ pub enum Source {
27
27
GitButler ,
28
28
Mcp ( Option < McpClientInfo > ) ,
29
29
ClaudeCode ( String ) ,
30
+ Cursor ( String ) ,
30
31
#[ default]
31
32
Unknown ,
32
33
}
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ pub async fn handle_stop(nightly: bool) -> anyhow::Result<CursorHookOutput> {
216
216
& summary,
217
217
Some ( prompt. clone ( ) ) ,
218
218
ActionHandler :: HandleChangesSimple ,
219
- Source :: ClaudeCode ( input. conversation_id ) ,
219
+ Source :: Cursor ( input. conversation_id ) ,
220
220
Some ( stack_id) ,
221
221
) ?;
222
222
You can’t perform that action at this time.
0 commit comments