跪拜 Guibai
← All articles
Vue.js · GitHub

TinyRobot v1.0 Ships a Complete Vue 3 AI Chat Suite with Tool Approval Built In

By OpenTiny社区 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

This gives Vue 3 teams a head start on assembling AI assistants without reinventing chat UI, streaming, and session management, and it puts a safety valve on agent tool calls—users approve destructive or data-modifying actions before they run.

Summary

TinyRobot v1.0 from the OpenTiny community bundles a complete AI chat experience into a set of Vue 3 packages. The new TrChat kit wraps the entire chat page—conversation list, streaming messages, input bar, and floating-window mode—so developers can drop a working assistant into an app with one component, or keep their own logic and use only the UI pieces. Three integration paths cover using the built-in runtime, adapting an app's existing conversation logic, or reusing a Kit-managed conversation.

New capabilities focus on control and extensibility. A model selector lets users browse, search, and switch models in one panel, with settings like web search or reasoning intensity mapped to service-specific request parameters via presets. The extension panel unifies MCP servers, Skills, and custom business tools under a single management interface. Tool-call confirmation, new in v1.0, lets applications pause a tool call and ask the user to allow or deny it, with the pending state persisted so confirmation survives a page refresh.

Other additions include a message outline for long conversations, a floating-window layout for side-by-side work, an `input-prefix` slot for labeling multi-line input tasks, and a CLI that generates a chat module into an existing Vue 3 + Vite project. The release also deprecates `McpServerPicker` and `Container` in favor of the new managers.

Takeaways
— TinyRobot v1.0 is released by the OpenTiny community as an open-source Vue 3 AI component library and application kit.
— The new TrChat suite (`@opentiny/tiny-robot-chat`) provides a complete chat page with conversation, streaming, and input handling, plus a standalone `TrChatUI` for apps that keep their own logic.
— Three integration modes: `TrChat` + `useChatRuntime` for the built-in logic, `TrChatUI` for app-supplied data and submission, and `TrChat` + `useChatRuntimeFromConversation` to reuse an existing Kit conversation.
— A model selector (`TrModelSelector`) supports grouping, searching, and switching models, with feature settings like web search and reasoning intensity mapped to service-specific request parameters via presets.
— The extension panel (`TrExtensionManager`) unifies MCP services, Skills, and custom business tools, managed through tabs with install state and search.
— Tool-call confirmation pauses execution before a call runs; users can allow or deny, and the pending state is persisted so confirmation survives a refresh.
— Chat pages can be opened as floating windows that drag and resize alongside business content.
— A message outline navigates long conversations, generated from user messages and shown when the viewport is at least 768px wide.
— Sender gained an `input-prefix` slot to label multi-line input tasks, keeping the draft when switching tasks.
— The CLI's `add chat` now generates a `src/tiny-robot-chat/` directory; `McpServerPicker` and `Container` are deprecated in favor of `ExtensionManager` and `Layout`.
— Kit added `maxToolRounds` to cap tool-call batches per user turn; one batch can hold multiple tool calls.
— Quick start works with pnpm and requires Vue 3.3+ and Node.js 22.12+; sample keys are provided for Alibaba Bailian and DeepSeek.
Conclusions

Tool-call approval is a meaningful safety pattern for agent apps: it moves the human into the loop exactly when an action touches business data, rather than trusting the model blindly.

The package split into Chat, Components, Kit, and CLI makes the library adoptable at different levels—from a full drop-in page down to a single composable—which lowers the barrier to entry for teams with existing chat logic.

The model selector's feature mapping via presets and `mapFeatureValues` shows a practical approach to the messy reality of different model providers exposing different knobs under different names.

Concepts & terms
MCP (Model Context Protocol)
An open protocol for connecting AI assistants to external tools and data sources. In TinyRobot, MCP servers are configured under `mcpServers` and surfaced in the extension panel, with the library handling install state, start/stop, and tool discovery.
Streamable HTTP
A transport mode for MCP servers that uses standard HTTP requests and supports streaming responses. TinyRobot requires tool services to support this protocol and be reachable from the browser.
Runtime (in TrChat)
An abstraction introduced in TinyRobot v1.0 that provides the chat interface with session, message, and input state plus operations like send, cancel, and switch conversation. It decouples the UI from the conversation logic, letting apps either use the built-in implementation or adapt one from their own code.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗