From 22d1dfe714d15ca4f4c4fe7cc9f5b4b605b4925a Mon Sep 17 00:00:00 2001 From: harveyshao Date: Thu, 13 Jan 2022 18:04:08 +0800 Subject: [PATCH] opt action.js --- base/mdb/mdb.go | 1 - base/mdb/search.go | 2 +- core/chat/action.go | 3 ++- core/code/go.go | 4 ++-- core/code/inner.go | 5 +++++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/base/mdb/mdb.go b/base/mdb/mdb.go index 3c668090..da138811 100644 --- a/base/mdb/mdb.go +++ b/base/mdb/mdb.go @@ -214,7 +214,6 @@ var Index = &ice.Context{Name: MDB, Help: "数据模块", Commands: map[string]* case HASH: _hash_import(m, arg[0], _domain_chain(m, arg[1]), file) case LIST: - m.Debug("what %v /// %v", arg, file) _list_import(m, arg[0], _domain_chain(m, arg[1]), file) } }}, diff --git a/base/mdb/search.go b/base/mdb/search.go index 64b66441..1a081dab 100644 --- a/base/mdb/search.go +++ b/base/mdb/search.go @@ -19,7 +19,7 @@ func init() { msg := m.Spawn(c) if len(arg) > 1 { msg.OptionCB(SELECT, func(fields []string, value map[string]interface{}) { - m.OptionFields(kit.Select("ctx,cmd,type,name,text", kit.Select(m.OptionFields(), arg, 2))) + m.OptionFields(kit.Select("ctx,cmd,type,name,text", kit.Select(m.OptionFields()))) m.Cmdy(kit.Keys(value[TEXT], value[NAME]), m.CommandKey(), arg[0], arg[1], kit.Select("", arg, 2)) }) } diff --git a/core/chat/action.go b/core/chat/action.go index 1d52a107..ff639c04 100644 --- a/core/chat/action.go +++ b/core/chat/action.go @@ -81,7 +81,8 @@ func _action_share(m *ice.Message, arg ...string) { break // 分享超时 } if arg[0] = msg.Append(mdb.NAME); len(arg) == 1 { - m.Push("title", msg.Append("title")) + m.Push(TITLE, msg.Append(TITLE)) + m.Push(TOPIC, msg.Append(TOPIC)) m.Push(ctx.INDEX, msg.Append(mdb.NAME)) m.Push(ctx.ARGS, msg.Append(mdb.TEXT)) break // 命令列表 diff --git a/core/code/go.go b/core/code/go.go index d0bea071..f6c68a70 100644 --- a/core/code/go.go +++ b/core/code/go.go @@ -117,8 +117,8 @@ func init() { } _go_tags(m, kit.Select(MAIN, arg, 1)) _go_help(m, kit.Select(MAIN, arg, 1)) - _go_find(m, kit.Select(MAIN, arg, 1)) - _go_grep(m, kit.Select(MAIN, arg, 1)) + // _go_find(m, kit.Select(MAIN, arg, 1)) + // _go_grep(m, kit.Select(MAIN, arg, 1)) }}, }, PlugAction())}, }, Configs: map[string]*ice.Config{ diff --git a/core/code/inner.go b/core/code/inner.go index a712cc50..b49ed640 100644 --- a/core/code/inner.go +++ b/core/code/inner.go @@ -81,6 +81,11 @@ func init() { } m.Set(ice.MSG_STATUS) }}, + mdb.SEARCH: {Name: "search", Help: "搜索", Hand: func(m *ice.Message, arg ...string) { + m.Option(cli.CMD_DIR, kit.Path(arg[2])) + m.Option(nfs.DIR_ROOT, arg[2]) + m.Cmdy(mdb.SEARCH, arg[0], arg[1], arg[2]) + }}, mdb.ENGINE: {Name: "engine", Help: "引擎", Hand: func(m *ice.Message, arg ...string) { _inner_exec(m, arg[0], arg[1], arg[2]) }},