Files
mintlify[bot] eed7384340 Documentation quality check: fix labels, flags, and coverage gaps (#7212)
* docs: fix editor button label, CLI groups flag, BYOK coverage, and draft PR setting

* docs: mirror PR changes into es, fr, zh and fix overlong translated descriptions

* docs: clarify branch publishing and draft PR review steps

* Apply batched suggestions from code review

Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>

---------

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
2026-09-08 15:53:51 -07:00

140 lines
5.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "编辑器的 AI 与发布设置"
sidebarTitle: "设置"
description: "配置编辑器外观、AI 说明和发布默认值,以控制编辑器的显示方式,以及它提交和合并更改的方式。"
keywords: ["editor", "settings", "ai", "instructions", "publishing", "pull request", "merge", "appearance", "preferences"]
---
编辑器的[设置页面](https://app.mintlify.com/settings/deployment/editor)控制外观、发布行为和智能体行为。
- **Appearance**:关于编辑器外观和行为的个人偏好,仅对你生效。
- **Publishing**:整个 deployment 范围内的默认设置,决定编辑器如何提交更改和打开 pull request对所有发布者生效。更改这些设置需要具备更新 deployment 的权限。如果这些控件对你处于禁用状态,请联系管理员。
- **Chat**:编辑器 AI 智能体的持久说明。
- **Danger zone**:无法撤销的操作。
<div id="appearance">
## Appearance
</div>
外观设置是个人偏好,只会为你改变编辑器,不会影响团队成员或你已发布的站点。
- **Fit editor to full width**:让编辑区域横向铺满,而不使用默认的 768px 栏宽。
- **Show breadcrumbs**:在编辑区域上方显示该页面在站点导航中的位置。
- **Open live preview in new tab**:预览时在新的浏览器标签页中打开渲染后的页面,而不使用分栏预览。
- **Show all files**:在侧边栏中显示全部文件,包括 dotfile、代码、PDF以及其他默认隐藏的文件。你也可以按 <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>.</kbd>macOS或 <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>.</kbd>Windows进行切换。
<div id="pr-instructions">
## PR 说明
</div>
PR 说明会在 AI 生成 pull request 标题和描述时提供指导。只要编辑器代表你打开 pull request这些说明就会生效包括 **Create pull request** 和 **Merge and publish** 流程。
使用 PR 说明来统一审阅者看到的内容,例如:
- 必需的分区,如 **Summary** 和 **Changes**。
- 链接到跟踪系统的描述模板。
- 对标题的语气或长度要求。
示例:
```text
Title: imperative mood, under 70 characters, no trailing period.
Description: include a "## Summary" section (one sentence) and a
"## Changes" section as a bulleted list. Link any referenced page
using its relative path.
```
说明的长度上限为 20,000 个字符。
<div id="main-branch-autocommits">
## main 分支自动提交
</div>
main 分支自动提交会在你停止输入后不久,自动把更改推送到 main 分支。如果启用该设置,编辑器会**完全隐藏分支和发布环节**。
<Warning>
启用 main 分支自动提交后,没有待处理状态,也没有审阅机会。你停止输入后不久,每次编辑都会进入已发布的站点。
</Warning>
<div id="create-draft-pull-requests-by-default">
## 默认创建草稿 pull request
</div>
启用该设置后,从编辑器创建的 pull request 会以草稿形式打开。作者在完成编辑后将其标记为可供审阅。该设置默认启用。
如果你希望从编辑器创建的 pull request 一打开就处于可供审阅状态,请关闭该设置。
<div id="pr-merge-method">
## PR 合并方式
</div>
选择点击 **Merge and publish** 时编辑器合并 pull request 的方式:
- **Merge**:创建一个保留完整分支历史的合并 commit。这是默认选项。
- **Squash**:把分支上的所有 commit 合并为 deployment branch 上的单个 commit。
- **Rebase**:把分支上的每个 commit 依次重放到 deployment branch 上,不创建合并 commit。
如果你通过 API 或 Git 提供方的界面显式指定了合并方式,则以该选择为准。
<Tip>
让合并方式与 Git 提供方的分支保护设置保持一致。如果 deployment branch 只允许 squash merge请选择 **Squash**,以免从编辑器合并时失败。
</Tip>
<div id="ai-instructions">
## AI 说明
</div>
AI 说明是编辑器随你的请求一并发送给 AI 的持久性指导。用它来固化你不想每次重复的风格和语气规则,例如语态、术语或格式约定。
你的说明适用于:
- 对选中内容执行的 **Edit with AI** 操作,例如改写、扩写或修正。
- 从编辑器发起的智能体会话。
每位成员都维护自己的说明,与其用户账户绑定。说明的长度上限为 20,000 个字符。
当你发现自己在提示中反复给出相同的指导时,就可以添加 AI 说明,例如:
- 要求使用第二人称或句子式大小写标题。
- 指定特定的产品名称或术语。
- 禁止营销语言或填充性表述。
- 要求使用特定组件,例如始终用 `<Note>` 表示提示。
保持说明简短且具体。AI 会在每次请求时遵循这些说明,因此含糊或相互矛盾的规则会降低效果。
示例:
```text
- Use second person ("you") and active voice.
- Use sentence case for all headings.
- Refer to the product as "Acme"—never "Acme Inc." or "the platform".
- Wrap notes and warnings in <Note> or <Warning> components.
- Do not add introductory filler like "In this guide" or "Let's explore".
```
清空该字段即可移除你的说明。
<div id="reset-editor">
## 重置编辑器
</div>
**Reset editor** 会强制编辑器丢弃本地状态,并与 Git 仓库重新同步。如果编辑器与仓库持续不同步,例如文件树为空或出现 `Unable to find docs.json` 之类的错误,请重置编辑器。即使该文件确实存在于 deployment branch 上、站点也能正常构建,仍可能出现这种情况。
<Warning>
重置编辑器会丢弃所有尚未提交到 Git 的未发布更改。如果有想保留的待处理编辑,请先发布它们。
</Warning>