feat: model total credits (#30727)

Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
This commit is contained in:
Coding On Star
2026-01-08 14:11:44 +08:00
committed by GitHub
parent fe0802262c
commit cd1af04dee
46 changed files with 1892 additions and 77 deletions

View File

@ -75,6 +75,9 @@ const buildAppContext = (overrides: Partial<AppContextValue> = {}): AppContextVa
created_at: 0,
role: 'normal',
providers: [],
trial_credits: 200,
trial_credits_used: 0,
next_credit_reset_date: 0,
}
const langGeniusVersionInfo: LangGeniusVersionResponse = {
current_env: '',
@ -96,6 +99,7 @@ const buildAppContext = (overrides: Partial<AppContextValue> = {}): AppContextVa
mutateCurrentWorkspace: vi.fn(),
langGeniusVersionInfo,
isLoadingCurrentWorkspace: false,
isValidatingCurrentWorkspace: false,
}
const useSelector: AppContextValue['useSelector'] = selector => selector({ ...base, useSelector })
return {