Skip to content

Commit

Permalink
Small bits
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Oct 18, 2023
1 parent 302c674 commit f934bad
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 2 additions & 4 deletions src/apps/chat/components/applayout/ChatDrawerItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ export function ChatDrawerItems(props: {
const [grouping] = React.useState<ListGrouping>('off');

// external state
const conversationIDs = useChatStore(state => state.conversations.map(
conversation => conversation.id,
), shallow);
const { topNewConversationId, maxChatMessages, setActiveConversationId, createConversation, deleteConversation } = useChatStore(state => ({
const { conversationIDs, topNewConversationId, maxChatMessages, setActiveConversationId, createConversation, deleteConversation } = useChatStore(state => ({
conversationIDs: state.conversations.map(conversation => conversation.id),
topNewConversationId: state.conversations.length ? state.conversations[0].messages.length === 0 ? state.conversations[0].id : null : null,
maxChatMessages: state.conversations.reduce((longest, conversation) => Math.max(longest, conversation.messages.length), 0),
setActiveConversationId: state.setActiveConversationId,
Expand Down
4 changes: 2 additions & 2 deletions src/apps/chat/components/applayout/useLLMDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function useChatLLMDropdown() {
return { chatLLMId, chatLLMDropdown };
}

export function useTempLLMDropdown(props: { initialLlmId: DLLMId | null }) {
/*export function useTempLLMDropdown(props: { initialLlmId: DLLMId | null }) {
// local state
const [llmId, setLlmId] = React.useState<DLLMId | null>(props.initialLlmId);
Expand All @@ -91,4 +91,4 @@ export function useTempLLMDropdown(props: { initialLlmId: DLLMId | null }) {
);
return { llmId, chatLLMDropdown };
}
}*/
12 changes: 7 additions & 5 deletions src/common/components/InlineError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import * as React from 'react';
import { Alert, Typography } from '@mui/joy';

export function InlineError(props: { error: React.JSX.Element | null | any, severity?: 'warning' | 'danger' }) {
return <Alert variant='soft' color={props.severity || 'warning'} sx={{ mt: 1 }}>
<Typography level='body-sm' color={props.severity || 'warning'}>
{props.error?.message || props.error || 'Unknown error'}
</Typography>
</Alert>;
return (
<Alert variant='soft' color={props.severity || 'warning'} sx={{ mt: 1 }}>
<Typography level='body-sm' color={props.severity || 'warning'}>
{props.error?.message || props.error || 'Unknown error'}
</Typography>
</Alert>
);
}
3 changes: 2 additions & 1 deletion src/common/state/store-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,6 @@ export const useUIPreferencesStore = create<UIPreferencesStore>()(
}),
{
name: 'app-ui',
}),
},
),
);
3 changes: 2 additions & 1 deletion src/modules/prodia/store-prodia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ export const useProdiaStore = create<ProdiaStore>()(
}),
{
name: 'app-module-prodia',
}),
},
),
);

1 comment on commit f934bad

@vercel
Copy link

@vercel vercel bot commented on f934bad Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

big-agi – ./

big-agi-git-main-enricoros.vercel.app
big-agi-enricoros.vercel.app
get.big-agi.com

Please sign in to comment.