Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve AI chat #1199

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/app/components/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,16 @@ const SuggestionComponent = ({ itemTypeId = null, type = null }) => {
Allow me to analyze your pack and help!
</Text>
) : (
<View style={{ maxHeight: 450, width: '100%', borderRadius: 10 }}>
<View
style={{
maxHeight: 450,
width: '100%',
borderRadius: 10,
}}
>
<SuggestionDescription data={suggestions.reasoning} />
<SuggestionList
style={{ maxHeight: 100 }}
suggestion={suggestions.suggestion}
onAddItem={removeItem}
/>
Expand Down
8 changes: 4 additions & 4 deletions packages/app/modules/pack/screens/PackDetailsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import {
import useResponsive from 'app/hooks/useResponsive';
import { FlatList, View } from 'react-native';
import ScoreContainer from '../../../components/ScoreContainer';
// import ChatContainer from '../chat';
import { TextLink } from '@packrat/crosspath';
import { DetailsComponent } from '../../../components/details';
import { ImportItemModal, AddItemModal } from 'app/modules/item';
import { FeedPreview } from 'app/modules/feed';
import LargeCard from 'app/components/card/LargeCard';
import useTheme from 'app/hooks/useTheme';
import ChatModalTrigger from 'app/components/chat';

const SECTION = {
TABLE: 'TABLE',
Expand Down Expand Up @@ -193,7 +193,7 @@ export function PackDetailsScreen() {
</View>
)}
{/* Disable Chat */}
{/* <View
<View
style={{
position: 'absolute',
right: -40,
Expand All @@ -202,13 +202,13 @@ export function PackDetailsScreen() {
alignSelf: 'flex-end',
}}
>
<ChatContainer
<ChatModalTrigger
itemTypeId={currentPackId}
title="Chat"
trigger="Open Chat"
type="pack"
/>
</View> */}
</View>
</Layout>
);
}
19 changes: 19 additions & 0 deletions packages/ui/src/modal/BaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,25 @@ export const BaseModal = ({
</Dialog.Close>
</Dialog.Content>
</Dialog.Portal>

{/* <Adapt when="sm" platform="touch">
<Dialog.Sheet
snapPointsMode="fit"
animation="medium"
zIndex={200000}
modal
dismissOnSnapToBottom
>
<Dialog.Sheet.Frame padding="$4" gap="$4">
<Adapt.Contents />
</Dialog.Sheet.Frame>
<Dialog.Sheet.Overlay
animation="lazy"
enterStyle={{ opacity: 0 }}
exitStyle={{ opacity: 0 }}
/>
</Dialog.Sheet>
</Adapt> */}
</Dialog>
);
};
Expand Down
Loading