@@ -62,7 +62,7 @@ func TapCommand(req TapRequest) *CommandResponse {
6262 }
6363
6464 err = targetDevice .StartAgent (devices.StartAgentConfig {
65- Registry : GetRegistry (),
65+ Hook : GetShutdownHook (),
6666 })
6767 if err != nil {
6868 return NewErrorResponse (fmt .Errorf ("failed to start agent on device %s: %v" , targetDevice .ID (), err ))
@@ -90,7 +90,7 @@ func LongPressCommand(req LongPressRequest) *CommandResponse {
9090 }
9191
9292 err = targetDevice .StartAgent (devices.StartAgentConfig {
93- Registry : GetRegistry (),
93+ Hook : GetShutdownHook (),
9494 })
9595 if err != nil {
9696 return NewErrorResponse (fmt .Errorf ("failed to start agent on device %s: %v" , targetDevice .ID (), err ))
@@ -118,7 +118,7 @@ func TextCommand(req TextRequest) *CommandResponse {
118118 }
119119
120120 err = targetDevice .StartAgent (devices.StartAgentConfig {
121- Registry : GetRegistry (),
121+ Hook : GetShutdownHook (),
122122 })
123123 if err != nil {
124124 return NewErrorResponse (fmt .Errorf ("failed to start agent on device %s: %v" , targetDevice .ID (), err ))
@@ -146,7 +146,7 @@ func ButtonCommand(req ButtonRequest) *CommandResponse {
146146 }
147147
148148 err = targetDevice .StartAgent (devices.StartAgentConfig {
149- Registry : GetRegistry (),
149+ Hook : GetShutdownHook (),
150150 })
151151 if err != nil {
152152 return NewErrorResponse (fmt .Errorf ("failed to start agent on device %s: %v" , targetDevice .ID (), err ))
@@ -174,7 +174,7 @@ func GestureCommand(req GestureRequest) *CommandResponse {
174174 }
175175
176176 err = targetDevice .StartAgent (devices.StartAgentConfig {
177- Registry : GetRegistry (),
177+ Hook : GetShutdownHook (),
178178 })
179179 if err != nil {
180180 return NewErrorResponse (fmt .Errorf ("failed to start agent on device %s: %v" , targetDevice .ID (), err ))
@@ -213,7 +213,7 @@ func SwipeCommand(req SwipeRequest) *CommandResponse {
213213 }
214214
215215 err = targetDevice .StartAgent (devices.StartAgentConfig {
216- Registry : GetRegistry (),
216+ Hook : GetShutdownHook (),
217217 })
218218 if err != nil {
219219 return NewErrorResponse (fmt .Errorf ("failed to start agent on device %s: %v" , targetDevice .ID (), err ))
0 commit comments