Some checks failed
CI / build-check-test (push) Has been cancelled
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>
24 lines
682 B
TypeScript
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>
|
|
);
|
|
}
|