diff --git a/core/chat/header.go b/core/chat/header.go index 14d251dc..ae6ee0d7 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -123,11 +123,6 @@ func init() { m.Cmd(nfs.COPY, ice.GO_MOD, path.Join(ice.SRC_RELEASE, ice.GO_MOD)) m.Cmdy(code.WEBPACK, mdb.CREATE, m.OptionSimple(mdb.NAME)) }}, - code.DEVPACK: {Name: "devpack", Help: "开发模式", Hand: func(m *ice.Message, arg ...string) { - m.Cmd(nfs.COPY, ice.GO_MOD, path.Join(ice.SRC_DEBUG, ice.GO_MOD)) - m.Cmd(nfs.COPY, ice.GO_SUM, path.Join(ice.SRC_DEBUG, ice.GO_SUM)) - m.Cmdy(code.WEBPACK, mdb.REMOVE) - }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { msg := m.Cmd(aaa.USER, m.Option(ice.MSG_USERNAME)) for _, k := range []string{aaa.LANGUAGE, aaa.BACKGROUND, aaa.AVATAR, aaa.USERNICK} { diff --git a/core/code/vimer.go b/core/code/vimer.go index d1d5e6ee..c5353810 100644 --- a/core/code/vimer.go +++ b/core/code/vimer.go @@ -35,6 +35,12 @@ func init() { m.Cmd(nfs.COPY, path.Join(ice.USR_RELEASE, "conf.go"), path.Join(ice.USR_ICEBERGS, "conf.go")) m.ProcessInner() }}, + DEVPACK: {Name: "devpack", Help: "开发模式", Hand: func(m *ice.Message, arg ...string) { + m.Cmd(nfs.COPY, ice.GO_MOD, path.Join(ice.SRC_DEBUG, ice.GO_MOD)) + m.Cmd(nfs.COPY, ice.GO_SUM, path.Join(ice.SRC_DEBUG, ice.GO_SUM)) + m.Cmdy(WEBPACK, mdb.REMOVE) + m.ProcessHold() + }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Cmdy(INNER, arg) }}, }}) } diff --git a/core/team/plan.go b/core/team/plan.go index 5125fe1c..d99d0277 100644 --- a/core/team/plan.go +++ b/core/team/plan.go @@ -69,6 +69,10 @@ func init() { PLAN: {Name: "plan scale=week,day,week,month,year,long begin_time@date place@province auto insert export import", Help: "计划", Meta: kit.Dict( ice.Display("/plugin/local/team/plan.js"), ), Action: ice.MergeAction(map[string]*ice.Action{ + mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) { + m.Cmdy(TODO, mdb.INPUTS, arg) + m.Cmdy(TASK, mdb.INPUTS, arg) + }}, mdb.PLUGIN: {Name: "plugin extra.ctx extra.cmd extra.arg", Help: "插件", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, arg[0], arg[1], arg[2:]...) }}, diff --git a/core/team/todo.go b/core/team/todo.go new file mode 100644 index 00000000..8023b28e --- /dev/null +++ b/core/team/todo.go @@ -0,0 +1,30 @@ +package team + +import ( + ice "shylinux.com/x/icebergs" + "shylinux.com/x/icebergs/base/cli" + "shylinux.com/x/icebergs/base/mdb" +) + +const TODO = "todo" + +func init() { + Index.Merge(&ice.Context{Commands: map[string]*ice.Command{ + TODO: {Name: "todo hash auto create", Help: "待办", Action: ice.MergeAction(map[string]*ice.Action{ + mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) { + m.Cmdy(mdb.INPUTS, m.PrefixKey(), "", mdb.HASH, arg) + m.Cmdy(TASK, mdb.INPUTS, arg) + }}, + mdb.CREATE: {Name: "create zone name text", Help: "创建"}, + cli.START: {Name: "start type=once,step,week", Help: "启动", Hand: func(m *ice.Message, arg ...string) { + m.Cmd(TASK, mdb.INSERT, m.OptionSimple("zone,type,name,text"), BEGIN_TIME, m.Time()) + m.Cmd(mdb.DELETE, m.PrefixKey(), "", mdb.HASH, m.OptionSimple(mdb.HASH)) + }}, + }, mdb.HashAction(mdb.FIELD, "time,hash,zone,name,text")), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + m.Fields(len(arg), m.Config(mdb.FIELD)) + m.Cmdy(mdb.SELECT, m.PrefixKey(), "", mdb.HASH, mdb.HASH, arg) + m.PushAction(cli.START, mdb.REMOVE) + m.StatusTimeCount() + }}, + }}) +}