Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
import { mountPage, forbid } from '../../ui-page/harness';
import { ChatGroupSettings } from '../../../src/renderer/features/bots/ChatGroupSettings';
import type { BotGroupSummary } from '../../../src/shared/botGroupChat';
const group = {
id: 'group-avatar-fixture', name: 'Design team', serverBacked: true, supportsMemberAvatar: true,
revision: 1, replyMode: 'all', speakingMode: 'auto', selfActorId: 'me',
members: [
{ actorId: 'me', botId: 'me', actorKind: 'human', isSelf: true, isOwned: true,
name: 'Nana', displayName: 'Nana', role: 'member', groupAvatar: null, avatarUrl: null },
{ actorId: 'peer', botId: 'peer', actorKind: 'human', name: 'Alex', displayName: 'Alex', role: 'owner' },
],
} as BotGroupSummary;
mountPage({
route: '/bots/groups/group-avatar-fixture',
host: {
maker: { chatServer: { ownedBots: async () => ({ ok: true, bots: [] }), manage: forbid('chatServer.manage') } },
profileGetState: forbid('profileGetState'),
profileUpdate: forbid('profileUpdate'),
},
render: ctx => <ChatGroupSettings group={ctx.case === 'human-owner' ? {
...group, members: [
{ ...group.members[0]!, role: 'owner' },
{ ...group.members[1]!, role: 'member' },
{ actorId: 'companion', botId: 'companion', actorKind: 'bot', name: 'Companion', role: 'member', ownerName: 'Nana' },
],
} : group} />,
});