fix(skill): parseIconValue accepts site-absolute paths + restore ckjia-shopping nameZh/nameEn/tags

This commit is contained in:
matevip 2026-05-03 17:14:43 +08:00
parent a1927bbfe4
commit 5f125364e9
2 changed files with 16 additions and 1 deletions

View File

@ -1,10 +1,18 @@
---
name: ckjia-shopping
nameZh: 查价 · 比价购物
nameEn: CKJIA Shopping
version: "1.0.0"
icon: /skill-assets/ckjia-shopping/assets/ckjia_logo_new.png
description: "跨平台比价与购物推荐 / Cross-platform price comparison and shopping recommendation. 淘宝 / 京东 / 天猫 / 拼多多商品聚合搜索拍图识物AI 购物意图识别。Phase 1 ships shopping_recommend + image_recognize; unified_search / price_history / compare_skus 在后续迭代追加。"
description: "跨平台比价与购物推荐 / Cross-platform price comparison. 淘宝 / 京东 / 天猫 / 拼多多商品聚合搜索 + 拍图识物。需要先启用 ckjia-shopping MCP server 并配置 CKJIA_MCP_KEY 才能用。"
category: data
type: mcp
tags:
- shopping
- price
- ecommerce
- 比价
- 购物
dependencies:
tools:
- ckjia_shopping_recommend

View File

@ -79,6 +79,13 @@ export function parseIconValue(value: string | null | undefined): ParsedIcon {
if (v.startsWith('http://') || v.startsWith('https://')) {
return { kind: 'url', url: v }
}
// Site-absolute path (e.g. /skill-assets/<skill>/assets/<file>.png served
// by the WebMvcConfig resource handler) — treat as a URL the browser will
// resolve against the current host, so deployments don't need to hardcode
// their public origin in SKILL.md.
if (v.startsWith('/')) {
return { kind: 'url', url: v }
}
// Anything else falls through as an emoji / text glyph. We don't
// validate "is this really an emoji" — letting the user pick any
// unicode glyph is intentionally flexible.