mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-22 06:10:37 +08:00
feat: 新增语言偏好Tab
This commit is contained in:
@@ -18,6 +18,7 @@ import type {
|
||||
ClusterGraphOptions,
|
||||
RelationshipStats,
|
||||
} from '../../../src/types/analysis'
|
||||
import type { LanguagePreferenceResult } from '../../../src/types/languagePreference'
|
||||
import type { FileParseInfo, ConflictCheckResult, MergeParams, MergeResult } from '../../../src/types/format'
|
||||
|
||||
// Chat Analysis API
|
||||
@@ -253,6 +254,18 @@ export const chatApi = {
|
||||
return ipcRenderer.invoke('chat:getCatchphraseAnalysis', sessionId, filter)
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取语言偏好分析数据(私聊专用)
|
||||
*/
|
||||
getLanguagePreferenceAnalysis: (
|
||||
sessionId: string,
|
||||
locale: string,
|
||||
filter?: { startTs?: number; endTs?: number },
|
||||
dictType?: string
|
||||
): Promise<LanguagePreferenceResult> => {
|
||||
return ipcRenderer.invoke('chat:getLanguagePreferenceAnalysis', sessionId, locale, filter, dictType)
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取 @ 互动分析数据
|
||||
*/
|
||||
|
||||
Vendored
+7
@@ -17,6 +17,7 @@ import type {
|
||||
RelationshipStats,
|
||||
} from '../../src/types/analysis'
|
||||
import type { FileParseInfo, ConflictCheckResult, MergeParams, MergeResult } from '../../src/types/format'
|
||||
import type { LanguagePreferenceResult } from '../../src/types/languagePreference'
|
||||
import type { TableSchema, SQLResult } from '../../src/components/analysis/SQLLab/types'
|
||||
|
||||
interface TimeFilter {
|
||||
@@ -127,6 +128,12 @@ interface ChatApi {
|
||||
getSupportedFormats: () => Promise<Array<{ id: string; name: string; platform: string; extensions: string[] }>>
|
||||
onImportProgress: (callback: (progress: ImportProgress) => void) => () => void
|
||||
getCatchphraseAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<CatchphraseAnalysis>
|
||||
getLanguagePreferenceAnalysis: (
|
||||
sessionId: string,
|
||||
locale: string,
|
||||
filter?: TimeFilter,
|
||||
dictType?: string
|
||||
) => Promise<LanguagePreferenceResult>
|
||||
getMentionAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<MentionAnalysis>
|
||||
getMentionGraph: (sessionId: string, filter?: TimeFilter) => Promise<MentionGraphData>
|
||||
getClusterGraph: (sessionId: string, filter?: TimeFilter, options?: ClusterGraphOptions) => Promise<ClusterGraphData>
|
||||
|
||||
Reference in New Issue
Block a user