Skip to content

Commit

Permalink
update integration stories
Browse files Browse the repository at this point in the history
  • Loading branch information
steppy452 committed Aug 10, 2024
1 parent e117bf0 commit 7a39525
Showing 1 changed file with 5 additions and 48 deletions.
53 changes: 5 additions & 48 deletions stories/Integration.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ import {
Chat,
Session,
SessionsList,
SessionsGroup,
SessionListItem,
NewSessionButton,
SessionMessages,
SessionGroups,
ChatInput,
SessionMessagePanel,
SessionMessagesHeader,
SessionMessage
SessionMessagesHeader
} from '../src';
import { Input } from 'reablocks';
import { generateText } from 'ai';
Expand Down Expand Up @@ -152,32 +149,12 @@ export const _OpenAI = () => {
>
<SessionsList>
<NewSessionButton />
<SessionGroups>
{groups =>
groups.map(({ heading, sessions }) => (
<SessionsGroup heading={heading} key={heading}>
{sessions.map(s => (
<SessionListItem key={s.id} session={s} />
))}
</SessionsGroup>
))
}
</SessionGroups>
<SessionGroups />
</SessionsList>

<SessionMessagePanel>
<SessionMessagesHeader />
<SessionMessages>
{conversations =>
conversations.map((conversation, index) => (
<SessionMessage
key={conversation.id}
conversation={conversation}
isLast={index === conversations.length - 1}
/>
))
}
</SessionMessages>
<SessionMessages />
<ChatInput />
</SessionMessagePanel>
</Chat>
Expand Down Expand Up @@ -320,32 +297,12 @@ export const VercelAI = () => {
>
<SessionsList>
<NewSessionButton />
<SessionGroups>
{groups =>
groups.map(({ heading, sessions }) => (
<SessionsGroup heading={heading} key={heading}>
{sessions.map(s => (
<SessionListItem key={s.id} session={s} />
))}
</SessionsGroup>
))
}
</SessionGroups>
<SessionGroups />
</SessionsList>

<SessionMessagePanel>
<SessionMessagesHeader />
<SessionMessages>
{conversations =>
conversations.map((conversation, index) => (
<SessionMessage
key={conversation.id}
conversation={conversation}
isLast={index === conversations.length - 1}
/>
))
}
</SessionMessages>
<SessionMessages />
<ChatInput />
</SessionMessagePanel>
</Chat>
Expand Down

0 comments on commit 7a39525

Please sign in to comment.