mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(web): remove custom console contract loaders (#38284)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
4fc8f0ddd1
commit
61650d34ce
37 files changed
+967
-422
No files matched your search
@@ -82,6 +82,17 @@ describe('create-app-tracking', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('should map the current backend agent mode into the canonical app mode bucket', () => {
|
||||
expect(buildCreateAppEventPayload({
|
||||
source: 'explore_template_list',
|
||||
appMode: 'agent',
|
||||
}, null, new Date(2026, 3, 13, 9, 8, 8))).toEqual({
|
||||
source: 'explore_template_list',
|
||||
app_mode: 'agent',
|
||||
time: '04-13-09:08:08',
|
||||
})
|
||||
})
|
||||
|
||||
it('should fold legacy non-agent modes into chatflow', () => {
|
||||
expect(buildCreateAppEventPayload({
|
||||
source: 'studio_blank',
|
||||
|
||||
@@ -31,7 +31,7 @@ type CreateAppSource
|
||||
|
||||
export type TrackCreateAppParams = {
|
||||
source: CreateAppSource
|
||||
appMode: AppModeEnum
|
||||
appMode: string
|
||||
templateId?: string
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ const formatCreateAppTime = (date: Date) => {
|
||||
return `${padTimeValue(date.getMonth() + 1)}-${padTimeValue(date.getDate())}-${padTimeValue(date.getHours())}:${padTimeValue(date.getMinutes())}:${padTimeValue(date.getSeconds())}`
|
||||
}
|
||||
|
||||
const mapOriginalCreateAppMode = (appMode: AppModeEnum): OriginalCreateAppMode => {
|
||||
const mapOriginalCreateAppMode = (appMode: string): OriginalCreateAppMode => {
|
||||
if (appMode === AppModeEnum.WORKFLOW)
|
||||
return 'workflow'
|
||||
|
||||
if (appMode === AppModeEnum.AGENT_CHAT)
|
||||
if (appMode === AppModeEnum.AGENT_CHAT || appMode === 'agent')
|
||||
return 'agent'
|
||||
|
||||
return 'chatflow'
|
||||
|
||||
Reference in new issue
Block a user