add cancel action to pipeline to stop without transcribing
This commit is contained in:
@@ -28,6 +28,7 @@ func init() {
|
||||
rootCmd.AddCommand(
|
||||
serveCmd(),
|
||||
toggleCmd(),
|
||||
cancelCmd(),
|
||||
statusCmd(),
|
||||
versionCmd(),
|
||||
stopCmd(),
|
||||
@@ -109,6 +110,21 @@ func stopCmd() *cobra.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func cancelCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "cancel",
|
||||
Short: "Cancel current operation",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
resp, err := bus.SendCommand('c')
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to cancel operation: %w", err)
|
||||
}
|
||||
fmt.Print(resp)
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func configureCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "configure",
|
||||
|
||||
Reference in New Issue
Block a user