Fix duplicate image generation toast on tool call.

8462cbaebb9d74ae3db7d534571fa0f15f2ce960

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +2 -3Ignore whitespace
public/locales/zh-cn.json+1 -1
@@ -2219,7 +2219,7 @@
2219 "sd_res_1280x720": "1280x720 (16:9,720p,横向壁纸)",2219 "sd_res_1280x720": "1280x720 (16:9,720p,横向壁纸)",
2220 "sd_res_720x1280": "720x1280 (9:16,720p,纵向壁纸)",2220 "sd_res_720x1280": "720x1280 (9:16,720p,纵向壁纸)",
2221 "<Enter Model ID above>": "<在上方输入模型 ID>",2221 "<Enter Model ID above>": "<在上方输入模型 ID>",
2222 "Generating image": "正在生成图像",2222 "Generating an image": "正在生成图像",
2223 "Delete the workflow? This action is irreversible.": "删除工作流?此操作无法被撤销。",2223 "Delete the workflow? This action is irreversible.": "删除工作流?此操作无法被撤销。",
2224 "Enter new workflow name:": "输入新工作流名称:",2224 "Enter new workflow name:": "输入新工作流名称:",
2225 "A workflow with that name already exists": "已存在同名工作流",2225 "A workflow with that name already exists": "已存在同名工作流",
public/scripts/extensions/stable-diffusion/index.js+1 -2
@@ -2871,7 +2871,7 @@ function ensureSelectionExists(setting, selector) {
2871function updateGenerationIndicator() {2871function updateGenerationIndicator() {
2872 if (activeGenerations > 0) {2872 if (activeGenerations > 0) {
2873 const countText = activeGenerations > 1 ? ` (${activeGenerations})` : '';2873 const countText = activeGenerations > 1 ? ` (${activeGenerations})` : '';
2874 const toastText = `<i class="fa-solid fa-spinner fa-spin"></i> ${t`Generating image`}${countText}...`;2874 const toastText = `<i class="fa-solid fa-spinner fa-spin"></i> ${t`Generating an image`}${countText}...`;
28752875
2876 // Show persistent toast if not already showing2876 // Show persistent toast if not already showing
2877 if (!generationToast) {2877 if (!generationToast) {
@@ -5344,7 +5344,6 @@ function registerFunctionTool() {
5344 const url = await generatePicture(initiators.tool, {}, args.prompt);5344 const url = await generatePicture(initiators.tool, {}, args.prompt);
5345 return encodeURI(url);5345 return encodeURI(url);
5346 },5346 },
5347 formatMessage: () => 'Generating an image...',
5348 });5347 });
5349}5348}
53505349