@tbox.cn/app-module-shopping-guide 0.9.11 → 1.0.0-alpha.1
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.
- package/AGENTS.md +1 -1
- package/INTEGRATION.md +1 -1
- package/README.md +2 -2
- package/dist/{chunk-XRXDTTFY.js → chunk-43AO3W7C.js} +12 -7
- package/dist/index.js +1 -1
- package/dist/server/index.d.ts +985 -985
- package/dist/server/index.js +1 -1
- package/package.json +6 -6
- package/skills/shopping-guide/SKILL.md +7 -5
- package/src/server/handler.ts +14 -7
- package/tests/handler.test.ts +21 -0
- package/tests/skill.test.ts +7 -2
package/AGENTS.md
CHANGED
package/INTEGRATION.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# module-shopping-guide ·
|
|
1
|
+
# module-shopping-guide · 门店导览业务组件
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
门店导览域承接组件(`@tbox.cn/app-module-shopping-guide`,moduleId `shopping-guide`)。
|
|
4
4
|
角色三分:机导(商品/商户检索出卡)、券导(营销券联动,跨模块借道 promotion)、
|
|
5
5
|
人导(真人导览预约)。签名形态:2 个模型可见工具 + 4 个 silent preTool 内部编排 +
|
|
6
6
|
11 张卡 + 零写动作(券领取写动作归 module-promotion)。
|
|
@@ -1555,13 +1555,18 @@ function createShoppingGuideHandler() {
|
|
|
1555
1555
|
if (!scope?.mallId) return { cards: [], text: "\u5546\u573A\u4E0A\u4E0B\u6587\u7F3A\u5931\uFF0C\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u54C1\u724C\u5BFC\u89C8" };
|
|
1556
1556
|
const ports = await resolveShoppingGuidePorts(reqCtx, ctx);
|
|
1557
1557
|
const q = toContext(reqCtx);
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1558
|
+
let result;
|
|
1559
|
+
try {
|
|
1560
|
+
result = await ports.shop.searchShops({
|
|
1561
|
+
ctx: q,
|
|
1562
|
+
keyword: "",
|
|
1563
|
+
keywords: [],
|
|
1564
|
+
page: 1,
|
|
1565
|
+
pageSize: BRAND_GUIDE_PAGE_SIZE
|
|
1566
|
+
});
|
|
1567
|
+
} catch {
|
|
1568
|
+
return { cards: [], text: "\u95E8\u5E97\u4FE1\u606F\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5" };
|
|
1569
|
+
}
|
|
1565
1570
|
if (result.items.length === 0) {
|
|
1566
1571
|
return { cards: [], text: "\u95E8\u5E97\u4FE1\u606F\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5" };
|
|
1567
1572
|
}
|