* call jan api * fix lint * ci: add jan server web * chore: add Dockerfile * clean up ui ux and support for reasoning fields, make app spa * add logo * chore: update tag for preview image * chore: update k8s service name * chore: update image tag and image name * fixed test --------- Co-authored-by: Minh141120 <minh.itptit@gmail.com> Co-authored-by: Nguyen Ngoc Minh <91668012+Minh141120@users.noreply.github.com>
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
/**
|
|
* Web Extension Types
|
|
*/
|
|
|
|
import type { AssistantExtension, ConversationalExtension, BaseExtension, AIEngine } from '@janhq/core'
|
|
|
|
type ExtensionConstructorParams = ConstructorParameters<typeof BaseExtension>
|
|
|
|
export interface AssistantWebModule {
|
|
default: new (...args: ExtensionConstructorParams) => AssistantExtension
|
|
}
|
|
|
|
export interface ConversationalWebModule {
|
|
default: new (...args: ExtensionConstructorParams) => ConversationalExtension
|
|
}
|
|
|
|
export interface JanProviderWebModule {
|
|
default: new (...args: ExtensionConstructorParams) => AIEngine
|
|
}
|
|
|
|
export type WebExtensionModule = AssistantWebModule | ConversationalWebModule | JanProviderWebModule
|
|
|
|
export interface WebExtensionRegistry {
|
|
'assistant-web': () => Promise<AssistantWebModule>
|
|
'conversational-web': () => Promise<ConversationalWebModule>
|
|
'jan-provider-web': () => Promise<JanProviderWebModule>
|
|
}
|
|
|
|
export type WebExtensionName = keyof WebExtensionRegistry
|
|
|
|
export type WebExtensionLoader<T extends WebExtensionName> = WebExtensionRegistry[T]
|
|
|
|
export interface IndexedDBConfig {
|
|
dbName: string
|
|
version: number
|
|
stores: {
|
|
name: string
|
|
keyPath: string
|
|
indexes?: { name: string; keyPath: string | string[]; unique?: boolean }[]
|
|
}[]
|
|
} |