CopilotKit: CopilotChatのメニューにアクションを追加する
CopilotChat (実質、CopilotChatView) の Slots を使う
https://docs.copilotkit.ai/reference/v2/components/CopilotChatView#slots
code:ts
<CopilotChat
agentId={configuredAgentName}
threadId={activeThreadId}
input={{
toolsMenu: [
{
label: '本を選択',
action: () => {
bookSelectDialog.open()
},
},
],
}}
/>
https://scrapbox.io/files/699a90663583dfb074dd0248.png
input の Slots では以下のいずれかを渡せる
Component
className
その部品の props
tamago324.icon 今回はこれ