Skip to main content

DebugPanel

Debug panel component, used to view events and status during development.

Basic Usage

<script setup lang="ts">
import {PilotKit, DebugPanel} from '@bdky/aaas-pilot-kit-vue3-widget';
import '@bdky/aaas-pilot-kit-vue3-widget/styles.css';

const isDev = import.meta.env.DEV;
</script>

<template>
<PilotKit v-bind="props">
<DebugPanel
:show="isDev"
position="bottom-right"
/>
</PilotKit>
</template>

Features

DebugPanel can display following information:

  • Event logs: Various events triggered by SDK (ready, asrMessage, conversationChange, etc.)
  • Status changes: States such as isReady, isMuted, isRendering, etc.
  • Performance metrics: TTFT (Time To First Token) and other performance data

Props

PropertyTypeDefaultDescription
showbooleanfalseWhether to show panel
position'top-left' | 'top-right' | 'bottom-left' | 'bottom-right''bottom-right'Panel position
classstring-Custom class name
styleCSSProperties-Custom style
featuresobjectSee belowEnabled features
maxLogsnumber100Maximum number of logs

features Configuration

<template>
<DebugPanel
show
:features="{
events: true, // Show event logs
performance: true, // Show performance metrics
state: true // Show status changes (every 5 seconds)
}"
/>
</template>
PropertyTypeDefaultDescription
eventsbooleantrueWhether to show event logs
performancebooleantrueWhether to show performance metrics
statebooleantrueWhether to show status changes

Log Types

Logs in the panel are color-coded by type:

TypeColorDescription
eventBlueSDK events
stateGreenStatus changes
performanceYellowPerformance metrics

Interactive Features

  • Clear button: Clear all logs
  • Collapse/Expand: Click ▼/▲ button to toggle panel size

Style Customization

Class NameDescription
.apk-debug-panelRoot container
.apk-debug-panel--expandedExpanded state
.apk-debug-panel--collapsedCollapsed state
.apk-debug-panel--top-leftTop-left position
.apk-debug-panel--top-rightTop-right position
.apk-debug-panel--bottom-leftBottom-left position
.apk-debug-panel--bottom-rightBottom-right position
.apk-debug-panel__headerHeader area
.apk-debug-panel__titleTitle
.apk-debug-panel__actionsAction button area
.apk-debug-panel__buttonButton
.apk-debug-panel__contentContent area
.apk-debug-panel__logSingle log entry
.apk-debug-panel__log--eventEvent log
.apk-debug-panel__log--stateStatus log
.apk-debug-panel__log--performancePerformance log
.apk-debug-panel__log-timeTimestamp
.apk-debug-panel__log-typeType label
.apk-debug-panel__log-messageMessage content
.apk-debug-panel__log-dataData details
.apk-debug-panel__emptyEmpty state

Usage Recommendations

Only use in development environment

DebugPanel continuously listens to events and status, which may affect performance. It's recommended to only enable in development environment:

<script setup lang="ts">
const isDev = import.meta.env.DEV;
</script>

<template>
<DebugPanel :show="isDev" />
</template>

Monitored Events

DebugPanel automatically monitors following events:

EventDescription
@readySDK ready
@asrStartASR started
@asrMessageASR recognition result
@renderStartStarted broadcasting
@inactivityUser inactivity
@busySystem busy
@interruptBroadcasting interrupted
@conversationChangeConversation changed
@isRenderingChangeBroadcasting status changed
@replyStartReply started
@ttftFirst token latency metric