Files
CatoandClaude 9d5c25a26f feat(chat): run every in-page chat on chatkit's thread and composer (#328)
Seven hand-built chats (/demo, the professional demos, quick-create, /try,
/my-data documents, custom bots and the guided demo) now share one
EmbeddedChat panel: chatkit's ChatThread and Composer with the microphone,
Copy/Listen, Stop, Retry on a failed turn, starters and suggested replies.
Each surface keeps its own prompt, route and persistence through a small
useChatTurns hook.

Also fixes /demo and the /my-data document chat reading the answer from the
wrong level of the jsonSuccess envelope, which showed empty answers.


Claude-Session: https://claude.ai/code/session_019MDtmuMRAXYWNkfowAXVfi

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 18:48:44 +01:00

38 lines
1.0 KiB
TypeScript

'use client';
import type { FC } from 'react';
import type { DemoOutputConfig } from '@/lib/demo/types';
import { BRAND_MESSAGE } from '@/lib/config/colors';
// Disclaimer component shown at bottom of chat
interface DemoDisclaimerProps {
config: DemoOutputConfig;
}
export const DemoDisclaimer: FC<DemoDisclaimerProps> = ({ config }) => {
if (!config.showDisclaimer || !config.disclaimerText) return null;
const colors = BRAND_MESSAGE;
return (
<div className={`${colors.bg} ${colors.border} border rounded-lg p-3 text-xs text-gray-600`}>
<div className="flex items-start gap-2">
<svg
className="w-4 h-4 flex-shrink-0 mt-0.5 text-gray-500"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<p>{config.disclaimerText}</p>
</div>
</div>
);
};