Skip to content

Commit f2db754

Browse files
committed
fix: update onGenerateAIQuestion type to return a Promise<string> and clean up import usage in MessageQueuePanel
1 parent 7114e38 commit f2db754

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/renderer/src/components/pages/chat/MessageQueuePanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ interface MessageQueuePanelProps {
5959
onProcessNext: () => void
6060
onUpdateConfig: (config: Partial<MessageQueueConfig>) => void
6161
onReorderQueue: (fromIndex: number, toIndex: number) => void
62-
onGenerateAIQuestion?: () => Promise<void>
62+
onGenerateAIQuestion?: () => Promise<string>
6363
onImportPromptList?: (listId: string) => void
6464
}
6565

@@ -135,13 +135,13 @@ export default function MessageQueuePanel({
135135
onImportPromptList?.(listId)
136136
const promptList = settings.promptLists?.find((list) => list.id === listId)
137137
if (promptList) {
138-
const { message } = import('antd/es').then(({ message }) => {
138+
import('antd/es').then(({ message }) => {
139139
message.success(`已导入 ${promptList.prompts.length} 个提示词到队列`)
140140
})
141141
}
142142
} catch (error) {
143143
console.error('导入提示词列表失败:', error)
144-
const { message } = import('antd/es').then(({ message }) => {
144+
import('antd/es').then(({ message }) => {
145145
message.error('导入提示词列表失败')
146146
})
147147
}

src/renderer/src/stores/settingsStore.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ export interface SettingsActions {
3939
addPromptList: (config: PromptListConfig) => void
4040
updatePromptList: (id: string, updates: Partial<PromptListConfig>) => void
4141
deletePromptList: (id: string) => void
42-
setDefaultPromptList: (id: string) => void
4342
getPromptList: (id: string) => PromptListConfig | undefined
44-
getDefaultPromptList: () => PromptListConfig | undefined
4543

4644
// 工具方法
4745
exportSettings: () => Settings

0 commit comments

Comments
 (0)