feat(ai-analysis): 在AI助手展示业务分析结果
This commit is contained in:
23
apps/web/components/analysis/FollowUpActions.tsx
Normal file
23
apps/web/components/analysis/FollowUpActions.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user