diff --git a/shortcuts/base/base_execute_test.go b/shortcuts/base/base_execute_test.go index ce8312b4b..2f8659c32 100644 --- a/shortcuts/base/base_execute_test.go +++ b/shortcuts/base/base_execute_test.go @@ -376,7 +376,7 @@ func TestBaseTableExecuteReadAndDelete(t *testing.T) { if err := runShortcut(t, BaseTableList, []string{"+table-list", "--base-token", "app_x", "--limit", "1"}, factory, stdout); err != nil { t.Fatalf("err=%v", err) } - if got := stdout.String(); !strings.Contains(got, `"total": 2`) || !strings.Contains(got, `"table_name": "Alpha"`) { + if got := stdout.String(); !strings.Contains(got, `"total": 2`) || !strings.Contains(got, `"tables"`) || !strings.Contains(got, `"name": "Alpha"`) || strings.Contains(got, `"items"`) || strings.Contains(got, `"offset"`) || strings.Contains(got, `"limit"`) || strings.Contains(got, `"count"`) || strings.Contains(got, `"table_name": "Alpha"`) { t.Fatalf("stdout=%s", got) } }) diff --git a/shortcuts/base/table_ops.go b/shortcuts/base/table_ops.go index 2343e9aca..9c546b5db 100644 --- a/shortcuts/base/table_ops.go +++ b/shortcuts/base/table_ops.go @@ -68,11 +68,7 @@ func executeTableList(runtime *common.RuntimeContext) error { if total == 0 { total = len(tables) } - items := make([]interface{}, 0, len(tables)) - for _, table := range tables { - items = append(items, map[string]interface{}{"table_id": tableID(table), "table_name": tableNameFromMap(table)}) - } - runtime.Out(map[string]interface{}{"items": items, "offset": offset, "limit": limit, "count": len(items), "total": total}, nil) + runtime.Out(map[string]interface{}{"tables": tables, "total": total}, nil) return nil } diff --git a/shortcuts/base/view_set_sort.go b/shortcuts/base/view_set_sort.go index e5591c790..e60eb7e93 100644 --- a/shortcuts/base/view_set_sort.go +++ b/shortcuts/base/view_set_sort.go @@ -20,10 +20,10 @@ var BaseViewSetSort = common.Shortcut{ baseTokenFlag(true), tableRefFlag(true), viewRefFlag(true), - {Name: "json", Desc: "sort JSON object/array", Required: true}, + {Name: "json", Desc: "sort_config JSON object", Required: true}, }, Tips: []string{ - `Example: --json '[{"field":"fldPriority","desc":true}]'`, + `Example: --json '{"sort_config":[{"field":"fldPriority","desc":true}]}'`, "Agent hint: use the lark-base skill's view-set-sort guide for usage and limits.", }, Validate: func(ctx context.Context, runtime *common.RuntimeContext) error {