Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center">
<a href="https://opentiny.design" target="_blank" rel="noopener noreferrer">
<img alt="OpenTiny Logo" src="logo.svg" height="100" style="max-width:100%;">
<img alt="OpenTiny Logo" src="https://raw.githubusercontent.com/opentiny/tiny-robot/HEAD/logo.svg" height="100" style="max-width:100%;">
</a>
</p>

Expand All @@ -22,19 +22,19 @@
- 🔄 **Streaming Support**: Built-in support for streaming AI responses
- 💾 **Storage Strategy**: Flexible storage strategies (LocalStorage, IndexedDB, custom)

English | [简体中文](README_zh.md)
English | [简体中文](https://github.com/opentiny/tiny-robot/blob/HEAD/README.zh-CN.md)

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/opentiny/tiny-robot)

## 📦 Packages

TinyRobot is a monorepo containing the following packages:

| Package | Description | Version |
| ----------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| [`@opentiny/tiny-robot`](./packages/components) | Core component library with all AI interaction components | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot) |
| [`@opentiny/tiny-robot-kit`](./packages/kit) | Utility functions and AI client tools for model interactions | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-kit.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-kit) |
| [`@opentiny/tiny-robot-svgs`](./packages/svgs) | SVG icon library with all component icons | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-svgs.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-svgs) |
| Package | Description | Version |
| --------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `@opentiny/tiny-robot` | Core component library with all AI interaction components | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot) |
| `@opentiny/tiny-robot-kit` | Utility functions and AI client tools for model interactions | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-kit.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-kit) |
| `@opentiny/tiny-robot-svgs` | SVG icon library with all component icons | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-svgs.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-svgs) |

## 🚀 Quick Start

Expand Down Expand Up @@ -171,11 +171,11 @@ pnpm dev

## 📄 License

MIT License - see [LICENSE](./LICENSE) file for details.
MIT License - see [LICENSE](https://github.com/opentiny/tiny-robot/blob/HEAD/LICENSE) file for details.

## 🤝 Contributing

Contributions are welcome! Please read our [Contributing Guide](./CONTRIBUTING.md) to understand the recommended workflow, commit message conventions, and how to submit Issues and Pull Requests.
Contributions are welcome! Please read our [Contributing Guide](https://github.com/opentiny/tiny-robot/blob/HEAD/CONTRIBUTING.md) to understand the recommended workflow, commit message conventions, and how to submit Issues and Pull Requests.

## 📞 Support

Expand Down
18 changes: 9 additions & 9 deletions README_zh.md → README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center">
<a href="https://opentiny.design" target="_blank" rel="noopener noreferrer">
<img alt="OpenTiny Logo" src="logo.svg" height="100" style="max-width:100%;">
<img alt="OpenTiny Logo" src="https://raw.githubusercontent.com/opentiny/tiny-robot/HEAD/logo.svg" height="100" style="max-width:100%;">
</a>
</p>

Expand All @@ -22,19 +22,19 @@
- 🔄 **流式支持**:内置流式 AI 响应支持
- 💾 **存储策略**:灵活的存储策略(LocalStorage、IndexedDB、自定义)

[English](README.md) | 简体中文
[English](https://github.com/opentiny/tiny-robot/blob/HEAD/README.md) | 简体中文

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/opentiny/tiny-robot)

## 📦 包说明

TinyRobot 是一个 monorepo,包含以下包:

| 包 | 说明 | 版本 |
| ----------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [`@opentiny/tiny-robot`](./packages/components) | 核心组件库,包含所有 AI 交互组件 | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot) |
| [`@opentiny/tiny-robot-kit`](./packages/kit) | 工具函数和 AI 客户端工具,用于模型交互 | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-kit.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-kit) |
| [`@opentiny/tiny-robot-svgs`](./packages/svgs) | SVG 图标库,包含所有组件所需的图标 | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-svgs.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-svgs) |
| 包 | 说明 | 版本 |
| --------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `@opentiny/tiny-robot` | 核心组件库,包含所有 AI 交互组件 | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot) |
| `@opentiny/tiny-robot-kit` | 工具函数和 AI 客户端工具,用于模型交互 | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-kit.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-kit) |
| `@opentiny/tiny-robot-svgs` | SVG 图标库,包含所有组件所需的图标 | [![npm](https://img.shields.io/npm/v/@opentiny/tiny-robot-svgs.svg)](https://www.npmjs.com/package/@opentiny/tiny-robot-svgs) |

## 🚀 快速开始

Expand Down Expand Up @@ -171,11 +171,11 @@ pnpm dev

## 📄 许可证

MIT 许可证 - 查看 [LICENSE](./LICENSE) 文件了解详情。
MIT 许可证 - 查看 [LICENSE](https://github.com/opentiny/tiny-robot/blob/HEAD/LICENSE) 文件了解详情。

## 🤝 贡献

欢迎贡献!请阅读[贡献指南](./CONTRIBUTING_zh.md)了解推荐的工作流程、Commit 规范以及如何提交 Issue 和 Pull Request。
欢迎贡献!请阅读[贡献指南](https://github.com/opentiny/tiny-robot/blob/HEAD/CONTRIBUTING_zh.md)了解推荐的工作流程、Commit 规范以及如何提交 Issue 和 Pull Request。

## 📞 支持

Expand Down
2 changes: 2 additions & 0 deletions packages/components/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/README*
/LICENSE
1 change: 0 additions & 1 deletion packages/components/README.md

This file was deleted.

31 changes: 30 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
{
"name": "@opentiny/tiny-robot",
"version": "0.4.0",
"license": "MIT",
"description": "TinyRobot 是一个 AI 对话组件库,提供了丰富的 AI 交互组件,助力开发者快速构建企业级 AI 应用;同时也是一个智能助手,支持普通 AI 问答、也支持集成 MCP Server,让 AI 真正帮人“干活”。",
"homepage": "https://docs.opentiny.design/tiny-robot/",
"repository": {
"type": "git",
"url": "git+https://github.com/opentiny/tiny-robot.git"
},
"bugs": {
"url": "https://github.com/opentiny/tiny-robot/issues"
},
"keywords": [
"vue",
"vue3",
"vue-components",
"component-library",
"ai",
"ai-components",
"chat",
"chat-ui",
"chatbot",
"llm",
"openai",
"assistant",
"streaming",
"conversation",
"tiny-robot",
"opentiny"
],
"publishConfig": {
"access": "public"
},
Expand All @@ -9,7 +37,8 @@
"module": "./dist/index.js",
"sideEffects": false,
"files": [
"dist"
"dist",
"README*"
],
"scripts": {
"dev": "vue-tsc && vite build --watch",
Expand Down
26 changes: 24 additions & 2 deletions packages/components/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
import vue from '@vitejs/plugin-vue'
import vuejsx from '@vitejs/plugin-vue-jsx'
import { readdirSync } from 'fs'
import { readdirSync, copyFileSync, existsSync } from 'fs'
import { resolve } from 'path'
import { defineConfig } from 'vite'
import { defineConfig, Plugin } from 'vite'
import dts from 'vite-plugin-dts'

function copyRootReadmeToComponents(): Plugin {
return {
name: 'copy-root-readme-to-components',
apply: 'build' as const,
closeBundle() {
const rootFiles = ['README.md', 'README.zh-CN.md', 'LICENSE']

for (const file of rootFiles) {
const rootFile = resolve(__dirname, `../../${file}`)
const targetFile = resolve(__dirname, `./${file}`)

if (!existsSync(rootFile)) {
console.warn(`[tiny-robot] Root ${file} not found: ${rootFile}`)
continue
}
copyFileSync(rootFile, targetFile)
}
},
}
}

// 构建入口
const entries = {
index: './src/index.ts',
Expand All @@ -31,6 +52,7 @@ export default defineConfig({
entryRoot: 'src',
tsconfigPath: './tsconfig.json',
}),
copyRootReadmeToComponents(),
],
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
Expand Down
Loading
Loading