feat(ai-analysis): 在AI助手展示业务分析结果

This commit is contained in:
2026-07-08 22:22:19 +08:00
parent c724446bbd
commit 6d2999085e
7 changed files with 261 additions and 29 deletions

View File

@@ -0,0 +1,23 @@
import type { FollowUp } from '@ftb/shared';
export function FollowUpActions({ followUps, onAsk }: { followUps: FollowUp[]; onAsk: (prompt: string) => void }) {
if (followUps.length === 0) return null;
return (
<div className="flex flex-wrap gap-2">
{followUps.map((item) => (
<button
key={`${item.type}-${item.label}`}
type="button"
onClick={() => {
if (item.type === 'question') onAsk(item.prompt);
}}
className="rounded-full border border-[#dbe3ef] bg-white/70 px-3 py-2 text-[13px] text-[#334155] shadow-sm transition-colors hover:bg-white disabled:cursor-default disabled:opacity-60"
disabled={item.type !== 'question'}
>
{item.label}
</button>
))}
</div>
);
}