# 主题摘要与 AI 要点按钮

**URL:** https://meta.discourse.org/t/topic-excerpts-ai-gists-button/394885
**Category:** Theme component
**Tags:** ai, topic-list-excerpts
**Created:** [2026年二月1日 16:04 UTC](https://meta.discourse.org/t/topic-excerpts-ai-gists-button/394885 "2026-02-01T16:04:48Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2026年二月1日 16:04 UTC](https://meta.discourse.org/t/topic-excerpts-ai-gists-button/394885/1 "2026-02-01T16:04:48Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **摘要** | 结合“主题列表摘要”和“AI 摘要要点”按钮 |
| 🛠 | **代码仓库** | [https://github.com/Lillinator/topic-excerpts-gists-button](https://github.com/Lillinator/topic-excerpts-gists-button) |
| ❓ | **安装指南** | [如何安装主题或主题组件](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |

安装此主题组件

> 💡 注意 - 此主题组件假设您至少已安装 [主题列表摘要](https://meta.discourse.org/t/topic-list-excerpts/151520) 组件。启用 [AI 摘要要点](https://meta.discourse.org/t/summarize-gists/340269) 是可选的，但此组件旨在与两者配合使用。

## 👩🏻‍💻 概述

此主题组件将 Discourse AI 摘要要点按钮与主题列表摘要按钮相结合，通过单按钮解决方案让用户更方便地在三种主题列表视图选项之间切换。

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/c/2/3c25b4ef168bc3ee1409e2a7007aa3d76b9bed5c.png)

它也可以在不使用 AI 摘要的情况下使用，仅用于默认的紧凑视图和摘要视图，从而提供更好的用户体验，因为主题列表摘要切换按钮在移动设备大小的视口中默认会消失。

该组件还包括一个用于主题列表摘要的新按钮图标、一个用于显示或隐藏主按钮标签的切换开关，以及编辑标签文本的选项。

* * *

## ⚙ 设置

| 设置 | 描述 |
| --- | --- |
| `显示标签` | 在桌面和平板视口尺寸中启用或禁用按钮标签。下拉选项在桌面端始终显示标签。移动端始终仅显示图标。 |

## 📸 截图

#### 默认管理员设置

管理员可以选择在桌面端显示文本标签，以及编辑按钮标签字符串。

 ![Component admin page](https://global.discourse-cdn.com/meta/original/4X/3/6/c/36cbaa8135c2159cfa8ed041d7c8480e71bb8a84.jpeg)

#### 用户体验

使用默认文本标签并选择紧凑视图。

 ![ux example - compact](https://global.discourse-cdn.com/meta/original/4X/9/a/b/9abf196eb7c37b4955a4299c7ad386478a2b8989.jpeg)

选择主题列表摘要。

 ![ux - topic lists exerpts](https://global.discourse-cdn.com/meta/original/4X/1/5/c/15cd79e90915c1d20c4cf2cd22b70e4c0450a510.jpeg)

禁用 `Show_labels` 并选择 AI 主题摘要要点（桌面端下拉按钮仍显示标签）。

 ![ux - summary gists](https://global.discourse-cdn.com/meta/original/4X/c/4/5/c45a2ab84b271205b1725e972aef370507c2fcf6.jpeg)

#### 没有 AI？没问题！

关闭 AI 摘要要点（禁用 `AI_summary_gists_enabled`，或未配置 Discourse AI），仅使用主题列表摘要。此外，还使用了一些缩短的按钮标签（见设置中的文本字符串）。

 ![ux - no gists only excerpts](https://global.discourse-cdn.com/meta/original/4X/f/7/5/f75fd84afeacf6bbb120f4ca2e6519a1608f5e6f.jpeg)

#### 移动端

按钮默认为仅图标，菜单行为与要点按钮相同，从屏幕底部弹出。

 ![mobile ux - button](https://global.discourse-cdn.com/meta/original/4X/e/4/2/e4278310a69654c2e382b9d944d716dd62d102ef.jpeg)

 ![mobile ux - button menu](https://global.discourse-cdn.com/meta/original/4X/8/8/2/88214d13eb46f2e600258b47a897eb72516d10ba.jpeg)

* * *

## 💼 用例与功能

- 为用户提供更直观的用户体验，以便在紧凑视图、AI 摘要要点和主题摘要之间进行选择，而不是在不同位置使用两个按钮。
- 改善移动端的主题摘要体验，因为按钮始终可见。
- 可以在未启用 AI 摘要的情况下使用；如果 Discourse AI 设置 `AI_summary_gists_enabled` 被禁用（或未配置 AI），则按钮上不会显示要点选项。

* * *

## 💡 可能的未来待办事项

- 排除特定类别或用户组？
- 将类别和标签徽章移至主题摘要卡片底部？

* * *

### 🎵 注意

- 这是与 @Moin 的合作项目，她创建了主题列表摘要图标。
- 此组件不适用于 Horizon 摘要。

* * *
 **[查看我的其他 Discourse 作品](https://meta.discourse.org/filter?q=category%3Acustomization%20created-by%3ALilly%20order%3Acreated)**

---

_[View the full topic](https://meta.discourse.org/t/topic-excerpts-ai-gists-button/394885)._
