@optima-chat/optima-agent 0.4.19 → 0.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,7 +61,14 @@
|
|
|
61
61
|
"Bash(commerce inventory:*)",
|
|
62
62
|
"Bash(commerce merchant:*)",
|
|
63
63
|
"Bash(commerce review:*)",
|
|
64
|
-
"Bash(commerce product-page:*)"
|
|
64
|
+
"Bash(commerce product-page:*)",
|
|
65
|
+
"Bash(bi-cli:*)",
|
|
66
|
+
"Bash(comfy:*)",
|
|
67
|
+
"Bash(scout search:*)",
|
|
68
|
+
"Bash(scout product:*)",
|
|
69
|
+
"Bash(commerce homepage create-collections:*)",
|
|
70
|
+
"Bash(commerce homepage create-featured:*)",
|
|
71
|
+
"Bash(commerce homepage create-collection-products:*)"
|
|
65
72
|
],
|
|
66
73
|
"deny": [],
|
|
67
74
|
"ask": []
|
|
@@ -164,11 +164,12 @@ Homepage
|
|
|
164
164
|
当用户说:
|
|
165
165
|
- "查看首页配置" → `commerce homepage get-config`
|
|
166
166
|
- "查看首页区块" → `commerce homepage list`
|
|
167
|
-
- "
|
|
167
|
+
- "添加轮播图" → `commerce homepage create-banner --title "主Banner" --images '[{"url":"..."}]'`
|
|
168
|
+
- "添加集合入口" → `commerce homepage create-collections --title "精选系列" --slugs "a,b,c"`
|
|
169
|
+
- "添加集合商品" → `commerce homepage create-collection-products --title "新品" --slug new-arrivals`
|
|
170
|
+
- "添加特色推荐" → `commerce homepage create-featured --title "推荐" --target-type collection --target-handle xx --cta "查看" --image-url "..."`
|
|
168
171
|
- "更新轮播图图片" → `commerce homepage update-images --id xx --images '[...]'`
|
|
169
|
-
- "设置集合列表" → `commerce homepage update-collections --id xx --slugs "a,b,c"`
|
|
170
172
|
- "调整区块顺序" → `commerce homepage reorder --moves '[{"section_id":"id1","new_position":0}]'`
|
|
171
|
-
- "使用模板" → `commerce homepage switch-template --template-key minimal`
|
|
172
173
|
- "删除区块" → `commerce homepage delete --id xx --yes`
|
|
173
174
|
|
|
174
175
|
## 命令参考
|
|
@@ -179,9 +180,14 @@ Homepage
|
|
|
179
180
|
- `commerce homepage switch-template --template-key <key>` - 切换模板(minimal|standard)
|
|
180
181
|
- `commerce homepage delete-config --yes` - 删除首页配置
|
|
181
182
|
|
|
182
|
-
###
|
|
183
|
+
### 创建区块(v1.12.0 新命令)
|
|
184
|
+
- `commerce homepage create-banner --title <title> --images <json>` - 创建轮播图
|
|
185
|
+
- `commerce homepage create-collections --title <title> --slugs <slugs>` - 创建集合入口
|
|
186
|
+
- `commerce homepage create-collection-products --title <title> --slug <slug>` - 创建集合商品
|
|
187
|
+
- `commerce homepage create-featured --title <title> --target-type <type> --target-handle <handle> --cta <text> --image-url <url>` - 创建特色推荐
|
|
188
|
+
|
|
189
|
+
### 区块管理
|
|
183
190
|
- `commerce homepage list` - 列出所有区块
|
|
184
|
-
- `commerce homepage create --type <type> --title <title>` - 创建区块
|
|
185
191
|
- `commerce homepage get --id <id>` - 查看区块详情
|
|
186
192
|
- `commerce homepage update --id <id>` - 更新区块
|
|
187
193
|
- `commerce homepage delete --id <id> --yes` - 删除区块
|
|
@@ -205,64 +211,63 @@ commerce homepage list-templates
|
|
|
205
211
|
commerce homepage switch-template --template-key standard --yes
|
|
206
212
|
```
|
|
207
213
|
|
|
208
|
-
###
|
|
214
|
+
### 创建轮播图
|
|
209
215
|
|
|
210
216
|
```bash
|
|
211
|
-
#
|
|
212
|
-
commerce homepage create
|
|
217
|
+
# 创建 banner 并设置图片(一步完成)
|
|
218
|
+
commerce homepage create-banner \
|
|
219
|
+
--title "首页轮播" \
|
|
220
|
+
--images '[{"url":"https://cdn.../img1.jpg","link":"/sale"}]'
|
|
213
221
|
|
|
214
|
-
#
|
|
222
|
+
# 后续更新图片
|
|
215
223
|
commerce homepage update-images \
|
|
216
224
|
--id section_xxx \
|
|
217
|
-
--images '[{"url":"https://cdn.../
|
|
225
|
+
--images '[{"url":"https://cdn.../img2.jpg","alt":"夏日促销","link":"/summer"}]'
|
|
218
226
|
```
|
|
219
227
|
|
|
220
|
-
###
|
|
228
|
+
### 创建集合入口
|
|
221
229
|
|
|
222
230
|
```bash
|
|
223
|
-
#
|
|
224
|
-
commerce
|
|
225
|
-
|
|
226
|
-
# 2. 创建 collections 区块
|
|
227
|
-
commerce homepage create --type collections --title "精选系列"
|
|
228
|
-
|
|
229
|
-
# 3. 设置要展示的集合(逗号分隔,无空格)
|
|
230
|
-
commerce homepage update-collections \
|
|
231
|
-
--id section_xxx \
|
|
231
|
+
# 创建 collections 区块(一步完成)
|
|
232
|
+
commerce homepage create-collections \
|
|
233
|
+
--title "精选系列" \
|
|
232
234
|
--slugs "new-arrivals,best-sellers,summer-sale"
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### 展示某集合的商品
|
|
236
235
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
commerce homepage create \
|
|
240
|
-
--type collection_products \
|
|
241
|
-
--title "新品上市" \
|
|
242
|
-
--settings '{"collection_slug":"new-arrivals","limit":8,"sort_by":"created_at","sort_order":"desc"}'
|
|
236
|
+
# 后续更新集合列表
|
|
237
|
+
commerce homepage update-collections --id section_xxx --slugs "a,b,c"
|
|
243
238
|
```
|
|
244
239
|
|
|
245
|
-
###
|
|
240
|
+
### 创建集合商品展示
|
|
246
241
|
|
|
247
242
|
```bash
|
|
248
|
-
#
|
|
249
|
-
commerce homepage create
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
--id section_xxx \
|
|
254
|
-
--type collection \
|
|
255
|
-
--handle "weekly-picks"
|
|
243
|
+
# 创建 collection_products 区块
|
|
244
|
+
commerce homepage create-collection-products \
|
|
245
|
+
--title "新品上市" \
|
|
246
|
+
--slug new-arrivals \
|
|
247
|
+
--limit 8
|
|
256
248
|
```
|
|
257
249
|
|
|
258
|
-
###
|
|
250
|
+
### 创建特色推荐
|
|
259
251
|
|
|
260
252
|
```bash
|
|
261
|
-
#
|
|
262
|
-
commerce homepage
|
|
263
|
-
--
|
|
264
|
-
--type
|
|
265
|
-
--handle
|
|
253
|
+
# 推荐集合
|
|
254
|
+
commerce homepage create-featured \
|
|
255
|
+
--title "本周推荐" \
|
|
256
|
+
--target-type collection \
|
|
257
|
+
--target-handle weekly-picks \
|
|
258
|
+
--cta "立即查看" \
|
|
259
|
+
--image-url "https://cdn.../featured.jpg"
|
|
260
|
+
|
|
261
|
+
# 推荐商品
|
|
262
|
+
commerce homepage create-featured \
|
|
263
|
+
--title "爆款单品" \
|
|
264
|
+
--target-type product \
|
|
265
|
+
--target-handle ceramic-cup-white \
|
|
266
|
+
--cta "立即购买" \
|
|
267
|
+
--image-url "https://cdn.../product.jpg"
|
|
268
|
+
|
|
269
|
+
# 后续更新目标
|
|
270
|
+
commerce homepage update-target --id section_xxx --type collection --handle "new-picks"
|
|
266
271
|
```
|
|
267
272
|
|
|
268
273
|
## 注意事项
|