MCPcopy
hub / github.com/wavetermdev/waveterm / DismissWshFailCommand

Method DismissWshFailCommand

pkg/wshrpc/wshserver/wshserver.go:760–782  ·  view source on GitHub ↗

** * Dismisses the WshFail Command in runtime memory on the backend */

(ctx context.Context, connName string)

Source from the content-addressed store, hash-verified

758 * Dismisses the WshFail Command in runtime memory on the backend
759 */
760func (ws *WshServer) DismissWshFailCommand(ctx context.Context, connName string) error {
761 if strings.HasPrefix(connName, "wsl://") {
762 distroName := strings.TrimPrefix(connName, "wsl://")
763 conn := wslconn.GetWslConn(distroName)
764 if conn == nil {
765 return fmt.Errorf("connection not found: %s", connName)
766 }
767 conn.ClearWshError()
768 conn.FireConnChangeEvent()
769 return nil
770 }
771 opts, err := remote.ParseOpts(connName)
772 if err != nil {
773 return err
774 }
775 conn := conncontroller.GetConn(opts)
776 if conn == nil {
777 return fmt.Errorf("connection %s not found", connName)
778 }
779 conn.ClearWshError()
780 conn.FireConnChangeEvent()
781 return nil
782}
783
784func (ws *WshServer) NotifySystemResumeCommand(ctx context.Context) error {
785 log.Printf("NotifySystemResumeCommand called\n")

Callers

nothing calls this directly

Calls 5

GetWslConnFunction · 0.92
ParseOptsFunction · 0.92
GetConnFunction · 0.92
ClearWshErrorMethod · 0.45
FireConnChangeEventMethod · 0.45

Tested by

no test coverage detected