Files
sproutclaw/.pi/agent/extensions/webui/frontend/src/components/chat/ThinkingBlock.tsx
root cf5edd6394
Some checks failed
CI / build-check-test (push) Has been cancelled
feat(sproutclaw): modularize webui, extensions, and agent config layout
Restructure local extensions into per-feature directories, split WebUI
into backend modules with slash commands and systemd support, and track
prompts/skills under .pi/agent for portable Gitea deployment.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 16:57:08 +08:00

24 lines
682 B
TypeScript

import { deriveThinkingSummary } from "../../utils/toolCall";
import styles from "./ThinkingBlock.module.css";
interface ThinkingBlockProps {
content: string;
streaming?: boolean;
}
export function ThinkingBlock({ content, streaming }: ThinkingBlockProps) {
const summary = deriveThinkingSummary(content);
return (
<details className={styles.block}>
<summary className={styles.summary}>
<span className={styles.summaryLabel}></span>
<span className={styles.summaryText}>{summary}</span>
</summary>
<div className={styles.detail}>
<div className={`${styles.body} ${streaming ? styles.streaming : ""}`}>{content}</div>
</div>
</details>
);
}