Skip to content

gene9831/tiny-robot

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

265 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TinyRobot

OpenTiny Logo

npm version License: MIT

TinyRobot is an AI component library built for Vue 3, following the OpenTiny Design system. It provides rich AI interaction components to help developers quickly build enterprise-level AI applications.

โœจ Features

  • ๐Ÿค– Rich AI Components: Comprehensive set of AI interaction components including chat bubbles, message input, conversation management, and more
  • ๐ŸŽจ OpenTiny Design: Follows OpenTiny Design system for consistent UI/UX
  • ๐Ÿš€ Out of the Box: Get started in minutes with minimal configuration
  • ๐ŸŽฏ TypeScript Support: Full TypeScript support with complete type definitions
  • ๐ŸŒˆ Theme Customization: Flexible theme system supporting multiple themes and custom styles
  • ๐Ÿ“ฆ Tree Shaking: Optimized for tree shaking, import only what you need
  • ๐Ÿ”„ Streaming Support: Built-in support for streaming AI responses
  • ๐Ÿ’พ Storage Strategy: Flexible storage strategies (LocalStorage, IndexedDB, custom)

English | ็ฎ€ไฝ“ไธญๆ–‡

Ask DeepWiki

๐Ÿ“ฆ Packages

TinyRobot is a monorepo containing the following packages:

Package Description Version
@opentiny/tiny-robot Core component library with all AI interaction components npm
@opentiny/tiny-robot-kit Utility functions and AI client tools for model interactions npm
@opentiny/tiny-robot-svgs SVG icon library with all component icons npm

๐Ÿš€ Quick Start

Prerequisites

  • Node.js >= 20.13.0
  • Vue >= 3.2.0
  • Package manager: npm, yarn, or pnpm

Installation

Core package โ€” @opentiny/tiny-robot is the main package.

# Using pnpm (recommended)
pnpm add @opentiny/tiny-robot

# Using npm
npm install @opentiny/tiny-robot

# Using yarn
yarn add @opentiny/tiny-robot

Optional packages:

  • @opentiny/tiny-robot-kit โ€” Only needed if you use AI model request or data-processing features. Add it when required:

    pnpm add @opentiny/tiny-robot-kit
  • @opentiny/tiny-robot-svgs โ€” Optional. Install separately only if you need to use the SVG icon library standalone or with custom icons:

    pnpm add @opentiny/tiny-robot-svgs

Basic Usage

1. Import Styles

In your main.js or main.ts:

import { createApp } from 'vue'
import App from './App.vue'
import '@opentiny/tiny-robot/dist/style.css'

const app = createApp(App)
app.mount('#app')

2. Use Components

<template>
  <div class="chat-container">
    <tr-bubble role="ai" content="Hello! I'm TinyRobot, an AI component library for Vue 3." placement="start" />
    <tr-bubble role="user" content="That's great! How can I get started?" placement="end" />
  </div>
</template>

<script setup>
import { TrBubble } from '@opentiny/tiny-robot'
</script>

๐Ÿ“š Documentation

๐Ÿ—๏ธ Project Structure

tiny-robot/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ components/          # Core component library
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ bubble/      # Chat bubble components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ sender/      # Message input component
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ container/   # Container component
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ history/     # Conversation history
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ attachments/ # File attachments
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...          # Other components
โ”‚   โ”‚   โ””โ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ kit/                 # Utility functions and AI tools
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ providers/   # AI provider implementations
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ vue/         # Vue composables
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ message/ # useMessage composable
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ conversation/ # useConversation composable
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ storage/     # Storage utilities
โ”‚   โ”‚   โ””โ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ svgs/                # SVG icon library
โ”‚   โ”œโ”€โ”€ playground/          # Development playground
โ”‚   โ””โ”€โ”€ test/                # Test suite
โ”œโ”€โ”€ docs/                    # Documentation site
โ”‚   โ”œโ”€โ”€ src/                 # Documentation source
โ”‚   โ””โ”€โ”€ demos/               # Component demos
โ”œโ”€โ”€ scripts/                 # Build and utility scripts
โ””โ”€โ”€ package.json

๐Ÿ› ๏ธ Development

Setup

# Install dependencies
pnpm install

# Start development server (playground + docs)
pnpm dev

Development Workflow

  1. Start Development Server:

    • Run pnpm dev in the project root directory
    • This starts both the playground and documentation site
    • After modifying components in packages/components/src/, changes will be automatically reflected in the documentation page
  2. Documentation:

    • Documentation source: docs/src/
    • Component demos: docs/demos/
  3. Testing:

    • Run pnpm test to execute tests

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ž Support

๐Ÿ™ Acknowledgments

Built with โค๏ธ by the OpenTiny team.


Note: This project is part of the OpenTiny ecosystem.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 57.6%
  • Vue 38.4%
  • CSS 2.0%
  • Less 1.6%
  • JavaScript 0.3%
  • HTML 0.1%