From 72baedd5f514c109ef6e8cd4987b085048293ebf Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Wed, 25 Dec 2024 11:03:38 +0800 Subject: [PATCH] :zap: Perf: add loadingText params for AI summary --- hugo.toml | 1 + layouts/partials/init/index.html | 2 +- layouts/partials/plugin/post-chat-ai.html | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hugo.toml b/hugo.toml index 817633a6..5413b8d5 100644 --- a/hugo.toml +++ b/hugo.toml @@ -931,6 +931,7 @@ enableEmoji = true wordLimit = 1000 typingAnimate = true beginningText = "" + loadingText = true # FixIt 0.3.10 | NEW Global Feed config for RSS, Atom and JSON feed. [params.feed] diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index 2b92e3d1..ebbdbacd 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.17-33a8861e" -}} +{{- .Scratch.Set "version" "v0.3.17-03b3bfbd" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/partials/plugin/post-chat-ai.html b/layouts/partials/plugin/post-chat-ai.html index e815f36d..ecfb0224 100644 --- a/layouts/partials/plugin/post-chat-ai.html +++ b/layouts/partials/plugin/post-chat-ai.html @@ -51,6 +51,9 @@ {{- with $summaryConfig.beginningText -}} {{- $postSummaryConfig = add $postSummaryConfig (printf "let %v_BeginningText='%v';" $p .) -}} {{- end -}} + {{- with eq $summaryConfig.loadingText false -}} + {{- $postSummaryConfig = add $postSummaryConfig (printf "let %v_loadingText=false;" $p) -}} + {{- end -}} {{- if $chatConfig.enable -}} {{- $postSummaryConfig = add $postSummaryConfig (printf "let %v_recommendation=true;" $p) -}} {{- else -}}