> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/automate-protect-and-extend/zh/si-you-ai/chat-sessions.md).

# 交互式聊天会话

本页提供一份指南，介绍如何从 VergeOS UI 中与 AI 助手进行交互式聊天会话。

{% hint style="success" %}
**聊天会话需要已配置的模型和助手；请参见** [**AI 配置指南**](/automate-protect-and-extend/zh/si-you-ai/configuration.md) **以获取设置说明。**
{% endhint %}

## 访问新的聊天会话

* 导航到该助手： **AI > 单击以选择所需的助手**.
* 点击 **新聊天会话** 在左侧菜单中 **-或-** 单击 **'+ New'** 按钮。
* 将显示确认对话框。
  * （可选） *删除当前会话* 可用于移除当前会话的聊天历史（如果有的话）。
  * 选择 **是** 以确认开始新的聊天会话。
* **发送提示词**，使用消息输入框，与会话进行交互。

## 将文件附加到提示词

{% hint style="info" %}
**附加的文件内容会合并到提示词中，并影响总上下文大小。**
{% endhint %}

* 可以附加一个或多个文件，以为您的提示词提供额外上下文。
* **要附加文件：** 单击 **回形针** **图标** ，位于提示输入字段左侧， **浏览并选择** 所需的文件，然后单击 **打开** 按钮。
* **要查看/移除已附加的文件：** 附加文件的数量会直接显示在回形针按钮右侧。您可以单击该数字来查看/修改附加文件列表。
* **附加文件会保留到后续每个会话提示词中**；删除不再相关的文件，以避免不必要地占用上下文大小。

## 交互指标

可按每次提示/响应迭代访问 token 使用指标：只需将鼠标悬停在响应下方的信息图标上。

## 聊天历史

### 保存聊天历史

助手设置允许控制各会话之间聊天历史的默认设置。请参见 [AI 助手管理](/automate-protect-and-extend/zh/si-you-ai/configuration.md#ai-assistant-management).

### 从之前的会话访问历史记录

要查看之前聊天会话的历史记录：单击聊天窗口左上方附近的 *历史记录* 按钮，并选择所需的会话。（聊天会话的名称基于该会话中的第一条提示文本。）

***

**版本兼容性**：此功能适用于 VergeOS 26.0 及更高版本。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verge.io/automate-protect-and-extend/zh/si-you-ai/chat-sessions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
