Browse Source

github-trending视频模板优化

lkatzey 1 month ago
parent
commit
99e6add505

+ 1 - 1
packages/core/src/stages/parse.ts

@@ -45,7 +45,7 @@ function applyLengthLimits(input: unknown): unknown {  if (!input || typeof inpu
       next.github = {
         ...scene.github,
         highlights: clipToLength(scene.github.highlights, 30),
-        intro: clipToLength(scene.github.intro, 60),
+        intro: clipToLength(scene.github.intro, 300),
         review: clipToLength(scene.github.review, 30),
       };
     }

+ 1 - 1
packages/shared/src/llm/prompts/parse-text.ts

@@ -106,7 +106,7 @@ Order matters: social preview first, star history second.
 
 github.highlights (项目亮点): one short phrase, ≤ 30 Chinese characters, naming the single most distinctive technical capability or signal. Example: "声明式 UI + 虚拟 DOM,生态最大". No filler ("这是一个强大的..."), no marketing adjectives, no language mention unless language IS the value proposition.
 
-github.intro (项目介绍): one sentence, ≤ 60 Chinese characters, stating concretely what the project does, the problem it solves, and one distinguishing mechanism. Pull specifics from the README. Example: "用 Rust 实现的 JavaScript 运行时,启动比 Node 快数倍,原生支持 TypeScript 与 npm 生态".
+github.intro (项目介绍): a DETAILED, multi-sentence project description, up to 300 Chinese characters. Aim for the upper end of the budget — the goal is comprehensive coverage, not brevity. Cover: what the project actually does (concrete capabilities, not category labels), the problem it solves and for whom, 1-2 distinguishing mechanisms or technical choices (e.g. "用 Rust 实现", "采用 CRDT 算法", "基于 MCP 协议"), notable ecosystem signals (contributors, recent activity, adoption) if space allows, and the typical workflow or integration pattern. Pull specifics from the README — names of features, numbers, comparisons — rather than restating the headline. Stay factual; do NOT include a language bullet unless language IS the value proposition.
 
 github.review (点评推荐): one short recommendation, ≤ 30 Chinese characters, naming the target user / scenario or a one-line verdict. Example: "适合追求极致启动速度的 CLI 与服务端场景". Stay neutral — avoid superlatives like "最强" or "神器".
 

+ 1 - 1
packages/shared/src/types/scene.ts

@@ -49,7 +49,7 @@ export type RepoMeta = z.infer<typeof RepoMetaSchema>;
 export const GithubSceneDataSchema = z.object({
   repo: RepoMetaSchema,
   highlights: z.string().max(30),
-  intro: z.string().max(60),
+  intro: z.string().max(300),
   review: z.string().max(30),
 });
 

+ 4 - 4
packages/templates/src/github-trending/index.tsx

@@ -348,8 +348,8 @@ const LandscapeContent: React.FC<ContentProps> = ({
         gap: 20,
       }}>
         <Section title="项目亮点" accent={palette.accent} body={github.highlights} />
-        <Section title="项目介绍" accent={palette.accent} body={github.intro} flex={1.4} />
-        <Section title="点评推荐" accent={palette.accent} body={github.review} />
+        <Section title="项目介绍" accent={palette.accent} body={github.intro} flex={3} />
+        <Section title="建议" accent={palette.accent} body={github.review} />
       </div>
     </div>
   );
@@ -400,8 +400,8 @@ const PortraitContent: React.FC<ContentProps> = ({
         gap: 16,
       }}>
         <Section title="项目亮点" accent={palette.accent} body={github.highlights} />
-        <Section title="项目介绍" accent={palette.accent} body={github.intro} flex={1.4} />
-        <Section title="点评推荐" accent={palette.accent} body={github.review} />
+        <Section title="项目介绍" accent={palette.accent} body={github.intro} flex={3} />
+        <Section title="建议" accent={palette.accent} body={github.review} />
       </div>
     </div>
   );