@xiaohhhh1/canvas-agent 0.4.24 → 0.4.25
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.
|
@@ -120,6 +120,7 @@ export declare class FastMossIntegration {
|
|
|
120
120
|
export declare function fastMossSalesRankUrl(market?: string): string;
|
|
121
121
|
export declare function fastMossRankingUrl(source: FastMossRankingSource, market?: string): string;
|
|
122
122
|
export declare function fastMossVideoLearningRankUrl(market?: string): string;
|
|
123
|
+
export declare function fastMossAiVideoLearningRankUrl(market?: string): string;
|
|
123
124
|
export declare function mergeRankingRecord(target: Map<string, Record<string, unknown>>, row: Record<string, unknown>, source: FastMossRankingSource, position: number): void;
|
|
124
125
|
export declare function selectDetailCandidates(records: Array<Record<string, unknown>>, limit?: number): Record<string, unknown>[];
|
|
125
126
|
export declare function isTransientFastMossNavigation(error: unknown): boolean;
|
|
@@ -15,7 +15,7 @@ const DETAIL_FETCH_CONCURRENCY = 3;
|
|
|
15
15
|
const VIDEO_LEARNING_TARGET = 36;
|
|
16
16
|
const VIDEO_COMMERCE_TARGET = 12;
|
|
17
17
|
const VIDEO_AI_TARGET_PER_DIMENSION = 6;
|
|
18
|
-
const VIDEO_AI_RANKING_PATH = "/zh/
|
|
18
|
+
const VIDEO_AI_RANKING_PATH = "/zh/media-source/top-ai-videos";
|
|
19
19
|
const RANKING_DEFINITIONS = [
|
|
20
20
|
{ source: "new", label: "新品榜", pathname: "/e-commerce/newProducts" },
|
|
21
21
|
{ source: "hot", label: "热推榜", pathname: "/e-commerce/hotlist" },
|
|
@@ -330,9 +330,7 @@ export class FastMossIntegration {
|
|
|
330
330
|
{ dimension: "high-engagement", labels: ["高互动榜单", "High Engagement"] },
|
|
331
331
|
];
|
|
332
332
|
if (sources.length < requestedTarget) {
|
|
333
|
-
|
|
334
|
-
aiUrl.searchParams.set("region", market === "GLOBAL" ? "" : market);
|
|
335
|
-
await this.openVideoLearningPage(aiUrl.toString(), market === "GLOBAL" ? "全球 AI 带货视频榜" : `${market} AI 带货视频榜`);
|
|
333
|
+
await this.openVideoLearningPage(fastMossAiVideoLearningRankUrl(market), market === "GLOBAL" ? "全球 AI 带货视频榜" : `${market} AI 带货视频榜`);
|
|
336
334
|
for (const entry of aiDimensions) {
|
|
337
335
|
if (sources.length >= requestedTarget)
|
|
338
336
|
break;
|
|
@@ -543,6 +541,12 @@ export function fastMossRankingUrl(source, market) {
|
|
|
543
541
|
export function fastMossVideoLearningRankUrl(market) {
|
|
544
542
|
return fastMossRankingUrl("video", normalizeLearningMarket(market));
|
|
545
543
|
}
|
|
544
|
+
export function fastMossAiVideoLearningRankUrl(market) {
|
|
545
|
+
const normalizedMarket = normalizeLearningMarket(market);
|
|
546
|
+
const url = new URL(VIDEO_AI_RANKING_PATH, FASTMOSS_HOME);
|
|
547
|
+
url.searchParams.set("region", normalizedMarket === "GLOBAL" ? "" : normalizedMarket);
|
|
548
|
+
return url.toString();
|
|
549
|
+
}
|
|
546
550
|
export function mergeRankingRecord(target, row, source, position) {
|
|
547
551
|
const key = String(row.product_id || row.title);
|
|
548
552
|
const existing = target.get(key) || {};
|