返回顶部
t

tools-ui工具UI组件

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results," agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.5
安全检测
已通过
1,807
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

tools-ui

工具UI组件

来自ui.inference.sh的工具生命周期组件。

工具UI组件

快速开始

bash
npx shadcn@latest add https://ui.inference.sh/r/tools.json

工具状态

状态描述
pending工具调用已请求,等待执行
running
工具正在执行中 | | approval | 执行前需要人工审批 | | success | 工具执行成功 | | error | 工具执行失败 |

组件

工具调用显示

tsx
import { ToolCall } from @/registry/blocks/tools/tool-call

name=search_web
args={{ query: 最新AI新闻 }}
status=running
/>

工具结果

tsx
import { ToolResult } from @/registry/blocks/tools/tool-result

name=search_web
result={{ results: [...] }}
status=success
/>

工具审批

tsx
import { ToolApproval } from @/registry/blocks/tools/tool-approval

name=send_email
args={{ to: user@example.com, subject: 你好 }}
onApprove={() => executeTool()}
onDeny={() => cancelTool()}
/>

完整示例

tsx
import { ToolCall, ToolResult, ToolApproval } from @/registry/blocks/tools

function ToolDisplay({ tool }) {
if (tool.status === approval) {
return (
name={tool.name}
args={tool.args}
onApprove={tool.approve}
onDeny={tool.deny}
/>
)
}

if (tool.result) {
return (
name={tool.name}
result={tool.result}
status={tool.status}
/>
)
}

return (
name={tool.name}
args={tool.args}
status={tool.status}
/>
)
}

样式化工具卡片

tsx
name=read_file
args={{ path: /src/index.ts }}
status=running
className=border-blue-500
/>

工具图标

工具会根据其名称自动获取图标:

模式图标
search、find搜索
read、get
文件 |
| write、create | 铅笔 |
| delete、remove | 垃圾桶 |
| send、email | 邮件 |
| 默认 | 扳手 |

与Agent组件配合使用

Agent组件会自动处理工具生命周期:

tsx
import { Agent } from @/registry/blocks/agent/agent

proxyUrl=/api/inference/proxy
config={{
core_app: { ref: openrouter/claude-sonnet-45@0fkg6xwb },
tools: [
{
name: search_web,
description: 搜索网络,
parameters: { query: { type: string } },
requiresApproval: true, // 启用审批流程
},
],
}}
/>

相关技能

bash

完整Agent组件(推荐)


npx skills add inference-sh/skills@agent-ui

聊天UI模块

npx skills add inference-sh/skills@chat-ui

工具结果小部件

npx skills add inference-sh/skills@widgets-ui

文档

组件文档:ui.inference.sh/blocks/tools

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 tools-ui-1776352281 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 tools-ui-1776352281 技能

通过命令行安装

skillhub install tools-ui-1776352281

下载

⬇ 下载 tools-ui v0.1.5(免费)

文件大小: 2.1 KB | 发布时间: 2026-4-17 13:52

v0.1.5 最新 2026-4-17 13:52
- Added initial SKILL.md with detailed documentation for tool lifecycle UI components for React/Next.js.
- Includes usage instructions, supported states (pending, running, approval, success, error), and code examples for ToolCall, ToolResult, and ToolApproval components.
- Describes automatic icon chooser, tool card styling, and integration with Agent component for automated tool workflows.
- Lists related skills and links to further documentation and resources.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部