fix: show teacher introductions as standalone clickable bubbles
This commit is contained in:
@@ -25,7 +25,6 @@ export function Layout() {
|
||||
welcomes: new URLSearchParams(location.search).has('teachers') ? agents.flatMap((agent, index) => dismissed.includes(agent.teacher_id)
|
||||
? [] : [{ agentId: agent.teacher_id, definition: agent.definition, text: agent.definition.description, tone: index }]) : [],
|
||||
dismissWelcome: (id: string) => setDismissed(values => [...values, id]),
|
||||
dismissWelcomes: () => setDismissed(['0', '1']),
|
||||
} as ComponentProps<typeof TeacherCompanion>['companion'];
|
||||
return <div className="flex h-screen">
|
||||
{new URLSearchParams(location.search).has('sidebar') && <aside data-testid="project-sidebar" className="shrink-0 border-r p-4 text-sm" style={{ width: 210, background: '#f1f6fc' }}>我的项目</aside>}
|
||||
|
||||
@@ -33,7 +33,6 @@ export function Layout() {
|
||||
welcome: null, enabled: true, loading: false, checking: false, error: null,
|
||||
welcomes: welcomeMode && !open ? agents.flatMap((agent, index) => dismissed.includes(agent.teacher_id) ? [] : [{ agentId: agent.teacher_id, definition: agent.definition, text: agent.definition.description, tone: index % 3 }]) : [],
|
||||
dismissWelcome: (id: string) => setDismissed(ids => [...new Set([...ids, id])]),
|
||||
dismissWelcomes: () => setDismissed(agents.map(agent => agent.teacher_id)),
|
||||
refreshing, refreshStatus,
|
||||
refresh: async () => {
|
||||
setRefreshing(true);
|
||||
|
||||
Reference in New Issue
Block a user