1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-02-23 23:32:17 +08:00
parent b5a2a234f2
commit f052dcf296
2 changed files with 2 additions and 2 deletions

View File

@ -341,7 +341,7 @@ func init() {
}},
FOR_FLOW: {Name: "forFlow name cmd*='sh etc/miss.sh'", Help: "流程", Icon: "bi bi-terminal", Hand: func(m *ice.Message, arg ...string) {
m.Options(ctx.DISPLAY, PLUGIN_XTERM, cli.CMD_OUTPUT, nfs.NewWriteCloser(func(buf []byte) (int, error) {
PushNoticeGrow(m.Options(ice.MSG_COUNT, "0", ice.LOG_DISABLE, ice.TRUE), strings.ReplaceAll(string(buf), lex.NL, "\r\n"))
PushNoticeGrow(m.Options(ice.MSG_COUNT, "0", ice.LOG_DISABLE, ice.TRUE, "space.noecho", ice.TRUE), strings.ReplaceAll(string(buf), lex.NL, "\r\n"))
return len(buf), nil
}, nil))
DreamEach(m, m.Option(mdb.NAME), "", func(name string) {

View File

@ -193,7 +193,7 @@ func _space_echo(m *ice.Message, source, target []string, c *websocket.Conn) {
}
}
func _space_send(m *ice.Message, name string, arg ...string) (h string) {
withecho := true
withecho := m.Option("space.noecho") != ice.TRUE
kit.If(len(arg) > 0 && arg[0] == TOAST, func() { withecho = false; m.Option(ice.MSG_DEBUG, ice.FALSE) })
wait, done := m.Wait(kit.Select("", m.OptionDefault("space.timeout", "600s"), withecho), func(msg *ice.Message, arg ...string) {
m.Cost(kit.Format("%v->[%v] %v %v", m.Optionv(ice.MSG_SOURCE), name, m.Detailv(), msg.FormatSize())).Copy(msg)