feat: hoppscotch-common & platform additions for ai experiments (#4222)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
10
packages/hoppscotch-common/src/platform/experiments.ts
Normal file
10
packages/hoppscotch-common/src/platform/experiments.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as E from "fp-ts/Either"
|
||||
|
||||
export type ExperimentsPlatformDef = {
|
||||
aiExperiments?: {
|
||||
enableAIExperiments: boolean
|
||||
generateRequestName: (
|
||||
requestInfo: string
|
||||
) => Promise<E.Either<string, string>>
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import { ServiceClassInstance } from "dioc"
|
||||
import { IOPlatformDef } from "./io"
|
||||
import { SpotlightPlatformDef } from "./spotlight"
|
||||
import { InfraPlatformDef } from "./infra"
|
||||
import { ExperimentsPlatformDef } from "./experiments"
|
||||
import { Ref } from "vue"
|
||||
|
||||
export type PlatformDef = {
|
||||
@@ -60,6 +61,7 @@ export type PlatformDef = {
|
||||
duplicateCollectionDisabledInPersonalWorkspace?: boolean
|
||||
}
|
||||
infra?: InfraPlatformDef
|
||||
experiments?: ExperimentsPlatformDef
|
||||
}
|
||||
|
||||
export let platform: PlatformDef
|
||||
|
||||
Reference in New Issue
Block a user