generated from arvinxx/npm-template
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
88 changed files
with
1,051 additions
and
3,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ export default defineConfig({ | |
}, | ||
outputPath: 'docs-dist', | ||
html2sketch: {}, | ||
extraBabelPlugins: ['antd-style'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
import { MetaData } from '@/types/meta'; | ||
|
||
export const DEFAULT_AVATAR = '🤖'; | ||
export const DEFAULT_USER_AVATAR = '😀'; | ||
export const DEFAULT_BACKGROUND_COLOR = 'rgba(0,0,0,0)'; | ||
export const DEFAULT_AGENT_META: MetaData = {}; | ||
export const DEFAULT_INBOX_AVATAR = '🤯'; | ||
export const DEFAULT_USER_AVATAR_URL = | ||
'https://registry.npmmirror.com/@lobehub/assets-logo/1.1.0/files/assets/logo-3d.webp'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import BackBottom from '@/BackBottom'; | ||
import { createStyles } from 'antd-style'; | ||
import { ReactNode, memo, useRef } from 'react'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
import { useOverrideStyles } from '@/ProChat/container/OverrideStyle'; | ||
import ChatList from '../components/ChatList'; | ||
import ChatScrollAnchor from '../components/ScrollAnchor'; | ||
|
||
const useStyles = createStyles( | ||
({ css, responsive, stylish }) => css` | ||
overflow: hidden scroll; | ||
height: 100%; | ||
${responsive.mobile} { | ||
${stylish.noScrollbar} | ||
width: 100vw; | ||
} | ||
`, | ||
); | ||
|
||
interface ConversationProps { | ||
chatInput?: ReactNode; | ||
showTitle?: boolean; | ||
} | ||
|
||
const App = memo<ConversationProps>(({ chatInput, showTitle }) => { | ||
const ref = useRef(null); | ||
const { styles } = useStyles(); | ||
const { styles: override } = useOverrideStyles(); | ||
return ( | ||
<Flexbox className={override.container} flex={1} style={{ position: 'relative' }}> | ||
<div style={{ flex: 1, overflow: 'hidden', position: 'relative' }}> | ||
<div className={styles} ref={ref}> | ||
<ChatList showTitle={showTitle} /> | ||
<ChatScrollAnchor /> | ||
</div> | ||
<BackBottom target={ref} text={'返回底部'} /> | ||
</div> | ||
{chatInput} | ||
</Flexbox> | ||
); | ||
}); | ||
|
||
export default App; |
Oops, something went wrong.