2a82df7073
This PR adds the necessary tool to create a demo workspace with : relevant custom objects and fields, mock data and a real dashboard with graph widgets. It is still a bit under-optimized and slow but it works. This PR also adds an AI tool that allows to see what happens in real time, it navigates the app and waits when necessary. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
18 lines
700 B
TypeScript
18 lines
700 B
TypeScript
import { AgentChatComponentInstanceContext } from '@/ai/states/AgentChatComponentInstanceContext';
|
|
import { agentChatMessagesComponentState } from '@/ai/states/agentChatMessagesComponentState';
|
|
import { createAtomComponentSelector } from '@/ui/utilities/state/jotai/utils/createAtomComponentSelector';
|
|
|
|
export const agentChatMessageIdsComponentSelector = createAtomComponentSelector<
|
|
string[]
|
|
>({
|
|
key: 'agentChatMessageIdsComponentSelector',
|
|
componentInstanceContext: AgentChatComponentInstanceContext,
|
|
get:
|
|
({ instanceId }) =>
|
|
({ get }) => {
|
|
const messages = get(agentChatMessagesComponentState, { instanceId });
|
|
|
|
return messages.map((message) => message.id);
|
|
},
|
|
});
|