mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
Chore: frontend infrastructure upgrade (#16420)
Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
@ -3,13 +3,13 @@ import type { IOnCompleted, IOnData, IOnError, IOnFile, IOnMessageEnd, IOnMessag
|
||||
import type { ChatPromptConfig, CompletionPromptConfig } from '@/models/debug'
|
||||
import type { ModelModeType } from '@/types/app'
|
||||
import type { ModelParameterRule } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
||||
export interface AutomaticRes {
|
||||
export type AutomaticRes = {
|
||||
prompt: string
|
||||
variables: string[]
|
||||
opening_statement: string
|
||||
error?: string
|
||||
}
|
||||
export interface CodeGenRes {
|
||||
export type CodeGenRes = {
|
||||
code: string
|
||||
language: string[]
|
||||
error?: string
|
||||
|
||||
@ -24,7 +24,7 @@ function waitUntilTokenRefreshed() {
|
||||
const isRefreshingSignAvailable = function (delta: number) {
|
||||
const nowTime = new Date().getTime()
|
||||
const lastTime = globalThis.localStorage.getItem('last_refresh_time') || '0'
|
||||
return nowTime - parseInt(lastTime) <= delta
|
||||
return nowTime - Number.parseInt(lastTime) <= delta
|
||||
}
|
||||
|
||||
// only one request can send
|
||||
|
||||
Reference in New Issue
Block a user