N/A

ReasoningDisclosure

Show app-owned AI reasoning text in a compact collapsible disclosure.

Reading the latest message...
Checking available tools and context...
Drafting a concise response.

Installation

pnpm dlx shadcn-vue@latest add "https://ui.stackhacker.io/r/reasoning-disclosure.json"

Usage

<script setup lang="ts">
import { ReasoningDisclosure } from '@/components/reasoning-disclosure'

const reasoning = ref('Compare the user request with the current chat state.')
const isStreaming = ref(false)
</script>

<template>
  <ReasoningDisclosure :text="reasoning" :is-streaming="isStreaming" />
</template>

App-Owned Reasoning

ReasoningDisclosure renders reasoning text that your app already has. Your app owns model output, streaming state, message schemas, persistence, and whether reasoning should be shown.

The component performs light text cleanup for simple markdown markers. It is not a full markdown renderer.

Examples

Default

Reading the latest message...
Checking available tools and context...
Drafting a concise response.

API Reference

Props

PropTypeDefaultDescription
textstringReasoning text supplied by the consuming app.
isStreamingbooleanfalseOpens the disclosure and shows the streaming label while reasoning is streaming.
streamingLabelstring'Thinking...'Label shown while streaming.
completeLabelstring'Thoughts'Label shown after streaming is complete.
defaultOpenbooleanfalseInitial open state when not streaming.
classstringAdditional CSS classes.