# @adecore/intelligent-ui 中文文档

规范地址：https://npmcn.com/package/%40adecore/intelligent-ui/

版本：0\.58\.0
npm 元数据更新时间：2026-11-07T17:37:16.276Z
中文译文更新时间：2026-11-05T21:08:38.271Z
软件包许可：FSL-1\.1-MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40adecore/intelligent-ui
原文对照：https://npmcn.com/package/%40adecore/intelligent-ui/?lang=original
项目主页：https://adecore.dev/intelligent-ui/
源码仓库：https://github.com/basmilius/adecore

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：299 kB，69 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：1 个
- 首次发布：2026-10-09T13:29:49.679Z
- 最新版本发布：2026-11-07T17:37:15.941Z
- 近 30 天下载量：20720（2026-10-05 至 2026-11-03，npm 官方下载统计）
- 已发布版本数：148（近 12 个月 148 个）

## 中文简介

一个流式的UI目录,编译器以及没有框架或DOM的有边框的表达式解释器.

## 安装

```sh
npm install @adecore/intelligent-ui
```

也可以使用：`pnpm add @adecore/intelligent-ui`、`yarn add @adecore/intelligent-ui`、`bun add @adecore/intelligent-ui`

## README

# @ adcore/ 智能- ii

[![npm](https://img.shields.io/npm/v/@adecore/intelligent-ui)](https://www.npmjs.com/package/@adecore/intelligent-ui) [![Docs](https://img.shields.io/badge/docs-adecore.dev-blue)](https://adecore.dev/intelligent-ui/)

让一个代理人用一组组件来回答,而不是说出:一个摘要,一个表格,一个核对表,一个人选择的下一步. 软件包持有目录,一个在它流出时从回覆中读出块的编译器,以及用于它们的状态和表达式的有界限的解译器. 没有框架也没有DOM:一个渲染器绘制它返回的东西. 块不能运行代码,加载地址或者在自身之外行动.

**[文档](https://adecore.dev/intelligent-ui/)**

## 安装

```sh
bun add @adecore/intelligent-ui
```

## 使用

```ts
import { compileUi, evaluateUiBlock, uiSessionNote, UiState } from '@adecore/intelligent-ui';

const instructions = uiSessionNote(); // tell the agent the language

const blocks = compileUi(replyText, { id: replyId, final: true });
for (const block of blocks) {
    const state = new UiState(block);
    render(evaluateUiBlock(block, state).nodes);
}
```

`@adecore/agents` 编译聊天会话的块,以及 `@adecore/agents-react` 用实时数据、链接和选择来绘制它们.

## 文档

| 页次 | 它包含什么 |
| --- | --- |
| [开始](https://adecore.dev/intelligent-ui/getting-started) | 说明、汇编、电线和渲染 |
| [安保模式](https://adecore.dev/intelligent-ui/guide/security) | 一个街区能做什么,不能做什么 |
| [语法](https://adecore.dev/intelligent-ui/language/syntax) | 代理员写的语言 |
| [构成部分](https://adecore.dev/intelligent-ui/components/status) | 每个部件及其道具 |
| [实时查询](https://adecore.dev/intelligent-ui/host/queries) | 一个主机为块读取的数据 |

## 许可证

FSL-1.1-MIT,见 [自由主义](https://npmcn.com/package/%40adecore/intelligent-ui/LICENSE)。 。 。 .

## 常见问题

### @adecore/intelligent-ui 是什么？

一个流式的UI目录,编译器以及没有框架或DOM的有边框的表达式解释器\.

### 如何安装 @adecore/intelligent-ui？

在项目目录运行 npm install @adecore/intelligent-ui，或使用 pnpm add / yarn add / bun add。

### @adecore/intelligent-ui 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @adecore/intelligent-ui 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @adecore/intelligent-ui 可以商用吗？

@adecore/intelligent-ui 使用 FSL-1\.1-MIT 许可。声明的许可为 FSL-1\.1-MIT，请阅读许可原文确认使用条件。以上为概括，不构成法律意见，请以许可原文为准。

### @adecore/intelligent-ui 的下载量有多少？

根据 npm 官方下载统计，@adecore/intelligent-ui 在 2026/10/05 – 2026/11/03 这 30 天内被下载 20,720 次，日均约 691 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @adecore/intelligent-ui 还在维护吗？

最新版本 0\.58\.0 发布于 2026/11/08（今天）；至今共发布 148 个版本，其中过去 12 个月发布了 148 个；首次发布于 2026/10/09。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

