File tree Expand file tree Collapse file tree 8 files changed +8
-61
lines changed Expand file tree Collapse file tree 8 files changed +8
-61
lines changed Original file line number Diff line number Diff line change 1
1
import { useStore } from '@nanostores/solid'
2
2
import { currentConversationId } from '@/stores/conversation'
3
- import {
4
- scrollController ,
5
- showConfirmModal ,
6
- } from '@/stores/ui'
3
+ import { scrollController } from '@/stores/ui'
7
4
import { clearMessagesByConversationId } from '@/stores/messages'
8
- import { useI18n } from '@/hooks'
9
- import ConfirmModal from '../ui/ConfirmModal'
10
5
11
6
export default ( ) => {
12
7
const $currentConversationId = useStore ( currentConversationId )
13
- const { t } = useI18n ( )
14
8
15
9
const handleClearMessage = ( ) => {
16
10
clearMessagesByConversationId ( $currentConversationId ( ) )
17
11
scrollController ( ) . scrollToBottom ( )
18
- showConfirmModal . set ( false )
19
12
}
20
13
21
14
return (
22
15
< >
23
16
{ $currentConversationId ( ) && (
24
17
< div
25
18
class = "fcc p-2 rounded-md text-xl hv-foreground"
26
- onClick = { ( ) => { showConfirmModal . set ( true ) } }
19
+ onClick = { handleClearMessage }
27
20
>
28
21
< div i-carbon-clean />
29
22
</ div >
30
23
) }
31
- < ConfirmModal title = { t ( 'conversations.confirm.title' ) } description = { t ( 'conversations.confirm.desc' ) } onConfirm = { handleClearMessage } onCancel = { ( ) => { showConfirmModal . set ( false ) } } />
32
24
</ >
33
25
)
34
26
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export default () => {
33
33
< Switch
34
34
fallback = { (
35
35
< Welcome />
36
- ) }
36
+ ) }
37
37
>
38
38
< Match when = { $currentConversationId ( ) && ! currentConversationMessages ( ) . length } >
39
39
< ConversationEmpty conversation = { currentConversation ( ) } />
@@ -52,8 +52,9 @@ export default () => {
52
52
</ Match >
53
53
< Match when = { currentBot ( ) ?. type === 'image_generation' } >
54
54
< Image
55
- // conversationId={$currentConversationId()}
55
+ // conversationId={$currentConversationId()}
56
56
messages = { currentConversationMessages }
57
+ // fetching={isLoading() || !isStreaming()}
57
58
/>
58
59
</ Match >
59
60
</ Switch >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ interface Props {
11
11
direction : 'top' | 'bottom' | 'left' | 'right'
12
12
children : JSXElement
13
13
closeBtnClass ?: string
14
- hiddenCloseIcon ?: boolean
15
14
}
16
15
17
16
export default ( props : Props ) => {
@@ -46,9 +45,9 @@ export default (props: Props) => {
46
45
</ Portal >
47
46
< div { ...api ( ) . containerProps } >
48
47
< div { ...api ( ) . contentProps } class = { `bg-modal transition-transform ease-out max-w-screen max-h-screen overflow-auto border-base shadow-lg ring-0 outline-none ${ containerBaseClass } ` } >
49
- {
50
- ! props . hiddenCloseIcon && < button { ... api ( ) . closeTriggerProps } class = { `absolute p-1 rounded-md top-4 right-4 hv-base hv-foreground ${ props . closeBtnClass || '' } ` } > < div i-carbon-close class = "text-xl" /> </ button >
51
- }
48
+ < button { ... api ( ) . closeTriggerProps } class = { `absolute p-1 rounded-md top-4 right-4 hv-base hv-foreground ${ props . closeBtnClass || '' } ` } >
49
+ < div i-carbon-close class = "text-xl" />
50
+ </ button >
52
51
{ props . children }
53
52
</ div >
54
53
</ div >
Original file line number Diff line number Diff line change @@ -24,13 +24,6 @@ export const en = {
24
24
recent : 'Recents' ,
25
25
noRecent : 'No recents' ,
26
26
untitled : 'Untitled' ,
27
- confirm : {
28
- title : 'Delete all messages in this chat' ,
29
- desc : 'This action cannot be undone.' ,
30
- message : 'Delete this record' ,
31
- btn : 'confirm' ,
32
- cancel : 'cancel' ,
33
- } ,
34
27
} ,
35
28
send : {
36
29
placeholder : 'Enter Something...' ,
Original file line number Diff line number Diff line change @@ -24,13 +24,6 @@ export const zhCN = {
24
24
recent : '最近对话' ,
25
25
noRecent : '暂无最近对话' ,
26
26
untitled : '未命名对话' ,
27
- confirm : {
28
- title : '删除本会话的所有消息' ,
29
- desc : '这将删除本会话的所有消息,且不可恢复' ,
30
- message : '删除这条记录' ,
31
- btn : '确认' ,
32
- cancel : '取消' ,
33
- } ,
34
27
} ,
35
28
send : {
36
29
placeholder : '输入内容...' ,
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ export const showConversationSidebar = atom(false)
5
5
export const showSettingsSidebar = atom ( false )
6
6
export const showConversationEditModal = atom ( false )
7
7
export const showEmojiPickerModal = atom ( false )
8
- export const showConfirmModal = atom ( false )
9
8
10
9
export const isSendBoxFocus = atom ( false )
11
10
export const currentErrorMessage = atom < ErrorMessage | null > ( null )
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ export default defineConfig({
58
58
'hv-foreground' : 'transition-opacity cursor-pointer op-70 hover:op-100' ,
59
59
'input-base' : 'bg-transparent placeholder:op-50 dark:placeholder:op-20 focus:(ring-0 outline-none) resize-none' ,
60
60
'button' : 'mt-4 px-3 py-2 text-xs border border-base rounded-lg hv-base hover:border-base-100' ,
61
- 'emerald-button' : 'mt-4 px-3 py-2 text-xs border rounded-lg text-light-400 border-emerald-600 bg-emerald-600 hover-bg-emerald-700 hover-border-emerald-700' ,
62
61
'max-w-base' : 'max-w-3xl mx-auto' ,
63
62
'text-error' : 'text-red-700 dark:text-red-400/80' ,
64
63
'border-error' : 'border border-red-700 dark:border-red-400/80' ,
You can’t perform that action at this time.
0 commit comments