Skip to content

AgentContextCard

Retrieved knowledge chunks with source type and open actions.

Demo

AgentContextCardOne public API for H5 and Wevu
Live state
Release readiness workflowAgentContextCard
检索上下文2 chunks
Supplier policy80 chars

Cold-chain certification must be verified before a new supplier can be approved.

PDF
Build report53 chars

H5 and weapp-vite builds both completed successfully.

JSON

Install

bash
pnpm add @varo-ui/ai
pnpm dlx @varo-ui/cli add --target h5 components/agent-ui
pnpm dlx @varo-ui/cli add --target weapp components/agent-ui

Registry installs the UI component into your project, so import it from @/components/agent-ui; @varo-ui/ai provides the event protocol, stream controller, and Markdown primitives—not Vue/Wevu UI components.

Basic Usage

vue
<script setup lang="ts">
import { AgentContextCard } from '@/components/agent-ui'
</script>

<template>
  <AgentContextCard title="检索上下文" :chunks="chunks" />
</template>

Props

PropTypeDefaultDescription
chunksAgentContextChunk[][]Context chunks
titlestringRetrieved contextTitle

Events

EventPayloadDescription
openAgentContextChunkOpen source

Target Notes

TargetImport
H5Named export from @/components/agent-ui
weappDefault export from @/components/agent-ui/AgentContextCard.vue

The public API stays aligned across targets; DOM/WXML, scheduling, and native events are target-owned.