SYMBOL INDEX (2328 symbols across 321 files) FILE: api/auth.js function handler (line 1) | function handler(req, res) { FILE: middleware.js function middleware (line 13) | function middleware(request) { function generateAuthPage (line 60) | function generateAuthPage(isChinese = true) { FILE: packages/core/src/constants/error-codes.ts constant EVALUATION_ERROR_CODES (line 11) | const EVALUATION_ERROR_CODES = { constant LLM_ERROR_CODES (line 20) | const LLM_ERROR_CODES = { constant HISTORY_ERROR_CODES (line 37) | const HISTORY_ERROR_CODES = { constant COMPARE_ERROR_CODES (line 46) | const COMPARE_ERROR_CODES = { constant STORAGE_ERROR_CODES (line 52) | const STORAGE_ERROR_CODES = { constant MODEL_ERROR_CODES (line 61) | const MODEL_ERROR_CODES = { constant TEMPLATE_ERROR_CODES (line 67) | const TEMPLATE_ERROR_CODES = { constant CONTEXT_ERROR_CODES (line 76) | const CONTEXT_ERROR_CODES = { constant PROMPT_ERROR_CODES (line 87) | const PROMPT_ERROR_CODES = { constant VARIABLE_EXTRACTION_ERROR_CODES (line 95) | const VARIABLE_EXTRACTION_ERROR_CODES = { constant VARIABLE_VALUE_GENERATION_ERROR_CODES (line 103) | const VARIABLE_VALUE_GENERATION_ERROR_CODES = { constant FAVORITE_ERROR_CODES (line 111) | const FAVORITE_ERROR_CODES = { constant IMAGE_ERROR_CODES (line 125) | const IMAGE_ERROR_CODES = { constant IMPORT_EXPORT_ERROR_CODES (line 158) | const IMPORT_EXPORT_ERROR_CODES = { constant DATA_ERROR_CODES (line 165) | const DATA_ERROR_CODES = { constant CORE_ERROR_CODES (line 174) | const CORE_ERROR_CODES = { constant ERROR_CODES (line 179) | const ERROR_CODES = { type ErrorCode (line 198) | type ErrorCode = type ErrorParams (line 219) | type ErrorParams = Record< FILE: packages/core/src/constants/storage-keys.ts constant CORE_SERVICE_KEYS (line 9) | const CORE_SERVICE_KEYS = { constant UI_SETTINGS_KEYS (line 17) | const UI_SETTINGS_KEYS = { constant TEMPLATE_SELECTION_KEYS (line 30) | const TEMPLATE_SELECTION_KEYS = { constant IMAGE_MODE_KEYS (line 41) | const IMAGE_MODE_KEYS = { constant FUNCTION_MODEL_KEYS (line 52) | const FUNCTION_MODEL_KEYS = { function getModeModelKey (line 64) | function getModeModelKey( constant ALL_STORAGE_KEYS (line 73) | const ALL_STORAGE_KEYS = { constant ALL_STORAGE_KEYS_ARRAY (line 82) | const ALL_STORAGE_KEYS_ARRAY = Object.values(ALL_STORAGE_KEYS); type CoreServiceKey (line 85) | type CoreServiceKey = type UISettingsKey (line 87) | type UISettingsKey = type TemplateSelectionKey (line 89) | type TemplateSelectionKey = type ImageModeKey (line 91) | type ImageModeKey = type FunctionModelKey (line 93) | type FunctionModelKey = type StorageKey (line 95) | type StorageKey = FILE: packages/core/src/interfaces/import-export.ts type IImportExportable (line 13) | interface IImportExportable { class ImportExportError (line 43) | class ImportExportError extends Error { method constructor (line 47) | constructor( FILE: packages/core/src/services/adapters/abstract-registry.ts method constructor (line 19) | constructor() { method getProviderTypeDescription (line 49) | protected getProviderTypeDescription(): string { method createUnknownProviderError (line 56) | protected createUnknownProviderError(providerId: string): Error { method createDynamicModelUnsupportedError (line 63) | protected createDynamicModelUnsupportedError(provider: TProvider): Error { method preloadStaticModels (line 70) | protected preloadStaticModels(): void { method getAdapter (line 87) | public getAdapter(providerId: string): TAdapter { method getAllProviders (line 101) | public getAllProviders(): TProvider[] { method getStaticModels (line 123) | public getStaticModels(providerId: string): TModel[] { method getDynamicModels (line 147) | public async getDynamicModels( method getModels (line 176) | public async getModels( method getAllStaticModels (line 215) | public getAllStaticModels(): Array<{ provider: TProvider; model: TModel ... method supportsDynamicModels (line 235) | public supportsDynamicModels(providerId: string): boolean { method validateProviderModel (line 252) | public validateProviderModel(providerId: string, modelId: string): boole... method clearCache (line 266) | public clearCache(): void { FILE: packages/core/src/services/compare/errors.ts class CompareError (line 8) | class CompareError extends Error { method constructor (line 12) | constructor(code: string, message?: string, params?: ErrorParams) { class CompareValidationError (line 24) | class CompareValidationError extends CompareError { method constructor (line 25) | constructor(message: string) { class CompareCalculationError (line 34) | class CompareCalculationError extends CompareError { method constructor (line 35) | constructor(message: string) { FILE: packages/core/src/services/compare/service.ts constant DEFAULT_OPTIONS (line 14) | const DEFAULT_OPTIONS: CompareOptions = { class CompareService (line 23) | class CompareService implements ICompareService { method compareTexts (line 27) | compareTexts( method validateInput (line 64) | private validateInput(original: string, optimized: string): void { method performTextComparison (line 76) | private performTextComparison( method convertDiffResultToFragments (line 116) | private convertDiffResultToFragments( method findTextPosition (line 159) | private findTextPosition(searchText: string, sourceText: string): numb... method mergeConsecutiveFragments (line 167) | private mergeConsecutiveFragments(fragments: TextFragment[]): TextFrag... method generateSummary (line 194) | private generateSummary(fragments: TextFragment[]) { function createCompareService (line 223) | function createCompareService(): ICompareService { FILE: packages/core/src/services/compare/types.ts type ChangeType (line 4) | enum ChangeType { type TextFragment (line 13) | interface TextFragment { type CompareResult (line 22) | interface CompareResult { type CompareOptions (line 34) | interface CompareOptions { type ICompareService (line 46) | interface ICompareService { FILE: packages/core/src/services/context/constants.ts constant CONTEXT_STORE_KEY (line 8) | const CONTEXT_STORE_KEY = 'ctx:store' as const; constant DEFAULT_CONTEXT_MODE (line 11) | const DEFAULT_CONTEXT_MODE: ContextMode = 'system' as const; constant PREDEFINED_VARIABLES (line 15) | const PREDEFINED_VARIABLES = [ type PredefinedVariable (line 25) | type PredefinedVariable = typeof PREDEFINED_VARIABLES[number]; constant DEFAULT_CONTEXT_CONFIG (line 28) | const DEFAULT_CONTEXT_CONFIG = { constant CONTEXT_STORE_VERSION (line 35) | const CONTEXT_STORE_VERSION = '1.0.0' as const; constant CONTEXT_UI_LABELS (line 38) | const CONTEXT_UI_LABELS = { FILE: packages/core/src/services/context/electron-proxy.ts type ElectronAPI (line 12) | interface ElectronAPI { class ElectronContextRepoProxy (line 39) | class ElectronContextRepoProxy implements ContextRepo { method api (line 40) | private get api() { method list (line 48) | async list(): Promise { method getCurrentId (line 52) | async getCurrentId(): Promise { method setCurrentId (line 56) | async setCurrentId(id: string): Promise { method get (line 60) | async get(id: string): Promise { method create (line 65) | async create(meta?: { title?: string; mode?: import('./types').Context... method duplicate (line 69) | async duplicate(id: string, options?: { mode?: import('./types').Conte... method rename (line 73) | async rename(id: string, title: string): Promise { method save (line 77) | async save(ctx: ContextPackage): Promise { method update (line 81) | async update(id: string, patch: Partial): Promise { method remove (line 85) | async remove(id: string): Promise { method exportAll (line 90) | async exportAll(): Promise { method importAll (line 94) | async importAll(bundle: ContextBundle, mode: ImportMode): Promise { method importData (line 103) | async importData(data: any): Promise { method getDataType (line 110) | async getDataType(): Promise { method validateData (line 114) | async validateData(data: any): Promise { FILE: packages/core/src/services/context/repo.ts function generateId (line 34) | function generateId(): string { function getCurrentISOTime (line 41) | function getCurrentISOTime(): string { function getMonotonicISO (line 48) | function getMonotonicISO(previous?: string): string { function isPredefinedVariable (line 60) | function isPredefinedVariable(name: string): boolean { function sanitizeVariables (line 69) | function sanitizeVariables(variables: Record): [Record { method updateStoreDoc (line 187) | private async updateStoreDoc( method list (line 234) | async list(): Promise { method getCurrentId (line 244) | async getCurrentId(): Promise { method setCurrentId (line 249) | async setCurrentId(id: string): Promise { method get (line 259) | async get(id: string): Promise { method create (line 270) | async create(meta?: { title?: string; mode?: import('./types').Context... method duplicate (line 297) | async duplicate(id: string, options?: { mode?: import('./types').Conte... method rename (line 323) | async rename(id: string, title: string): Promise { method save (line 336) | async save(ctx: ContextPackage): Promise { method update (line 357) | async update(id: string, patch: Partial): Promise { method remove (line 397) | async remove(id: string): Promise { method exportAll (line 427) | async exportAll(): Promise { method importAll (line 438) | async importAll(bundle: ContextBundle, mode: ImportMode): Promise { method importData (line 589) | async importData(data: any): Promise { method getDataType (line 597) | async getDataType(): Promise { method validateData (line 601) | async validateData(data: any): Promise { function createContextRepo (line 616) | function createContextRepo(storage: IStorageProvider): ContextRepo { FILE: packages/core/src/services/context/types.ts type ContextMode (line 20) | type ContextMode = 'system' | 'user'; type ContextPackage (line 26) | interface ContextPackage { type ContextStoreDoc (line 57) | interface ContextStoreDoc { type ContextListItem (line 70) | interface ContextListItem { type ContextBundle (line 83) | interface ContextBundle { type ImportMode (line 97) | type ImportMode = 'replace' | 'append' | 'merge'; type ImportResult (line 102) | interface ImportResult { type ContextRepo (line 117) | interface ContextRepo extends IImportExportable { class ContextError (line 211) | class ContextError extends Error { method constructor (line 215) | constructor(code: string, message?: string, params?: ErrorParams) { FILE: packages/core/src/services/data/electron-proxy.ts class ElectronDataManagerProxy (line 9) | class ElectronDataManagerProxy implements IDataManager { method constructor (line 12) | constructor() { method exportAllData (line 23) | async exportAllData(): Promise { method importAllData (line 27) | async importAllData(dataString: string): Promise { FILE: packages/core/src/services/data/errors.ts class DataError (line 3) | class DataError extends Error { method constructor (line 7) | constructor(code: string, message?: string, params?: ErrorParams) { class DataInvalidJsonError (line 15) | class DataInvalidJsonError extends DataError { method constructor (line 16) | constructor(details?: string) { class DataInvalidFormatError (line 22) | class DataInvalidFormatError extends DataError { method constructor (line 23) | constructor(details: string) { class DataImportPartialFailedError (line 29) | class DataImportPartialFailedError extends DataError { method constructor (line 30) | constructor(count: number, details: string) { class DataExportFailedError (line 36) | class DataExportFailedError extends DataError { method constructor (line 37) | constructor(details: string) { FILE: packages/core/src/services/data/manager.ts type IDataManager (line 28) | interface IDataManager { class DataManager (line 42) | class DataManager implements IDataManager { method constructor (line 49) | constructor( method exportAllData (line 63) | async exportAllData(): Promise { method importAllData (line 89) | async importAllData(dataString: string): Promise { function createDataManager (line 159) | function createDataManager( FILE: packages/core/src/services/data/types.ts type ExportData (line 8) | interface ExportData { type IDataManager (line 17) | interface IDataManager { FILE: packages/core/src/services/evaluation/errors.ts class EvaluationError (line 12) | class EvaluationError extends Error { method constructor (line 16) | constructor( class EvaluationValidationError (line 33) | class EvaluationValidationError extends EvaluationError { method constructor (line 34) | constructor(message: string) { class EvaluationModelError (line 44) | class EvaluationModelError extends EvaluationError { method constructor (line 45) | constructor(modelKey: string) { class EvaluationTemplateError (line 55) | class EvaluationTemplateError extends EvaluationError { method constructor (line 56) | constructor(templateId: string) { class EvaluationParseError (line 66) | class EvaluationParseError extends EvaluationError { method constructor (line 67) | constructor(message: string) { class EvaluationExecutionError (line 77) | class EvaluationExecutionError extends EvaluationError { method constructor (line 78) | constructor(message: string, public readonly cause?: Error) { FILE: packages/core/src/services/evaluation/service.ts class EvaluationService (line 38) | class EvaluationService implements IEvaluationService { method constructor (line 39) | constructor( method evaluate (line 48) | async evaluate(request: EvaluationRequest): Promise { method evaluateStream (line 77) | async evaluateStream( method validateRequest (line 147) | private validateRequest(request: EvaluationRequest): void { method validateModel (line 231) | private async validateModel(modelKey: string): Promise { method getEvaluationTemplate (line 241) | private async getEvaluationTemplate(type: EvaluationType, mode: Evalua... method getTemplateId (line 261) | private getTemplateId(type: EvaluationType, mode: EvaluationModeConfig... method buildTemplateContext (line 268) | private buildTemplateContext(request: EvaluationRequest): TemplateCont... method validateContentBlock (line 309) | private validateContentBlock( method validateTestCase (line 324) | private validateTestCase(testCase: EvaluationTestCase | undefined, lab... method validateSnapshot (line 331) | private validateSnapshot(snapshot: EvaluationSnapshot | undefined, lab... method normalizeContentBlock (line 355) | private normalizeContentBlock(block?: EvaluationContentBlock): Record<... method buildTargetContext (line 372) | private buildTargetContext(target: { method normalizeTestCase (line 400) | private normalizeTestCase(testCase: EvaluationTestCase): Record(method: string, ...args: any[]): Promise... method addFavorite (line 93) | async addFavorite(favorite: Omit { method updateFavorite (line 113) | async updateFavorite(id: string, updates: Partial): Pr... method deleteFavorite (line 117) | async deleteFavorite(id: string): Promise { method deleteFavorites (line 121) | async deleteFavorites(ids: string[]): Promise { method incrementUseCount (line 125) | async incrementUseCount(id: string): Promise { method getCategories (line 129) | async getCategories(): Promise { method addCategory (line 133) | async addCategory(category: Omit... method updateCategory (line 137) | async updateCategory(id: string, updates: Partial): ... method deleteCategory (line 141) | async deleteCategory(id: string): Promise { method getStats (line 145) | async getStats(): Promise { method searchFavorites (line 149) | async searchFavorites(keyword: string, options?: { method exportFavorites (line 156) | async exportFavorites(ids?: string[]): Promise { method importFavorites (line 160) | async importFavorites(data: string, options?: { method getAllTags (line 171) | async getAllTags(): Promise> { method addTag (line 175) | async addTag(tag: string): Promise { method renameTag (line 179) | async renameTag(oldTag: string, newTag: string): Promise { method mergeTags (line 183) | async mergeTags(sourceTags: string[], targetTag: string): Promise { method reorderCategories (line 191) | async reorderCategories(categoryIds: string[]): Promise { method getCategoryUsage (line 195) | async getCategoryUsage(categoryId: string): Promise { method ensureDefaultCategories (line 199) | async ensureDefaultCategories(defaultCategories: Array<{ FILE: packages/core/src/services/favorite/errors.ts class FavoriteError (line 7) | class FavoriteError extends Error { method constructor (line 11) | constructor(code: string, message?: string, params?: ErrorParams) { class FavoriteNotFoundError (line 19) | class FavoriteNotFoundError extends FavoriteError { method constructor (line 20) | constructor(id: string) { class FavoriteAlreadyExistsError (line 26) | class FavoriteAlreadyExistsError extends FavoriteError { method constructor (line 27) | constructor(content?: string) { class FavoriteCategoryNotFoundError (line 43) | class FavoriteCategoryNotFoundError extends FavoriteError { method constructor (line 44) | constructor(id: string) { class FavoriteValidationError (line 50) | class FavoriteValidationError extends FavoriteError { method constructor (line 51) | constructor(details: string) { class FavoriteStorageError (line 57) | class FavoriteStorageError extends FavoriteError { method constructor (line 58) | constructor(details: string, public cause?: Error) { class FavoriteTagError (line 67) | class FavoriteTagError extends FavoriteError { method constructor (line 68) | constructor(code: string, details?: string, params?: ErrorParams) { class FavoriteTagAlreadyExistsError (line 77) | class FavoriteTagAlreadyExistsError extends FavoriteTagError { method constructor (line 78) | constructor(tag: string) { class FavoriteTagNotFoundError (line 87) | class FavoriteTagNotFoundError extends FavoriteTagError { method constructor (line 88) | constructor(tag: string) { class FavoriteMigrationError (line 97) | class FavoriteMigrationError extends FavoriteError { method constructor (line 98) | constructor(message: string, public cause?: Error) { class FavoriteImportExportError (line 107) | class FavoriteImportExportError extends FavoriteError { method constructor (line 108) | constructor(message: string, public cause?: Error, public details?: st... FILE: packages/core/src/services/favorite/manager.ts class FavoriteManager (line 24) | class FavoriteManager implements IFavoriteManager { method constructor (line 42) | constructor(private storageProvider: IStorageProvider) { method initialize (line 51) | private async initialize(): Promise { method ensureInitialized (line 76) | private async ensureInitialized(): Promise { method migrateLegacyData (line 90) | private async migrateLegacyData(): Promise { method ensureDefaultCategories (line 147) | async ensureDefaultCategories( method addFavorite (line 186) | async addFavorite(favorite: Omit { method updateFavorite (line 344) | async updateFavorite(id: string, updates: Partial): Pr... method deleteFavorite (line 374) | async deleteFavorite(id: string): Promise { method deleteFavorites (line 398) | async deleteFavorites(ids: string[]): Promise { method incrementUseCount (line 420) | async incrementUseCount(id: string): Promise { method getCategories (line 429) | async getCategories(): Promise { method addCategory (line 441) | async addCategory(category: Omit... method updateCategory (line 479) | async updateCategory(id: string, updates: Partial): ... method deleteCategory (line 511) | async deleteCategory(id: string): Promise { method getStats (line 548) | async getStats(): Promise { method updateStats (line 563) | private async updateStats(): Promise { method searchFavorites (line 601) | async searchFavorites(keyword: string, options?: { method getAllIndependentTags (line 618) | private async getAllIndependentTags(): Promise { method exportFavorites (line 629) | async exportFavorites(ids?: string[]): Promise { method computeTagCounts (line 665) | private async computeTagCounts(): Promise> { method getAllTags (line 691) | async getAllTags(): Promise> { method addTag (line 710) | async addTag(tag: string): Promise { method renameTag (line 757) | async renameTag(oldTag: string, newTag: string): Promise { method mergeTags (line 828) | async mergeTags(sourceTags: string[], targetTag: string): Promise { method reorderCategories (line 934) | async reorderCategories(categoryIds: string[]): Promise { method getCategoryUsage (line 976) | async getCategoryUsage(categoryId: string): Promise { method importFavorites (line 986) | async importFavorites(data: string, options?: { FILE: packages/core/src/services/favorite/type-converter.ts class TagTypeConverter (line 7) | class TagTypeConverter { method compareNames (line 13) | private static compareNames(a: string, b: string): number { method toTagStatistics (line 26) | static toTagStatistics(apiData: Array<{ tag: string; count: number }>)... method fromTagStatistics (line 39) | static fromTagStatistics(stats: TagStatistics[]): Array<{ tag: string;... method toAutoCompleteOptions (line 51) | static toAutoCompleteOptions(apiData: Array<{ tag: string; count: numb... method toStringArray (line 68) | static toStringArray(apiData: Array<{ tag: string; count: number }>): ... method sortByCount (line 77) | static sortByCount(tags: T[]): T[] { method sortByName (line 86) | static sortByName(tags: TagStatistics[]): TagStatistics[] { method sortByCountThenName (line 95) | static sortByCountThenName(tags: TagStatistics[]): TagStatistics[] { method compareTagNames (line 107) | static compareTagNames(a: string, b: string): number { FILE: packages/core/src/services/favorite/type-mapper.ts type FunctionModeMapping (line 7) | interface FunctionModeMapping { class TypeMapper (line 20) | class TypeMapper { method mapFromRecordType (line 26) | static mapFromRecordType(recordType: PromptRecordType): FunctionModeMa... method validateMapping (line 100) | static validateMapping(mapping: Partial): boolean { method inferRecordTypes (line 148) | static inferRecordTypes(mapping: FunctionModeMapping): PromptRecordTyp... FILE: packages/core/src/services/favorite/types.ts type FavoritePrompt (line 4) | interface FavoritePrompt { type FavoriteCategory (line 60) | interface FavoriteCategory { type FavoriteStats (line 80) | interface FavoriteStats { type FavoriteTag (line 101) | interface FavoriteTag { type TagStatistics (line 112) | interface TagStatistics { type IFavoriteManager (line 124) | interface IFavoriteManager { FILE: packages/core/src/services/history/electron-proxy.ts class ElectronHistoryManagerProxy (line 9) | class ElectronHistoryManagerProxy implements IHistoryManager { method electronAPI (line 10) | private get electronAPI() { method addRecord (line 17) | async addRecord(record: PromptRecord): Promise { method getRecords (line 23) | async getRecords(): Promise { method getRecord (line 27) | async getRecord(id: string): Promise { method deleteRecord (line 36) | async deleteRecord(id: string): Promise { method getIterationChain (line 40) | async getIterationChain(recordId: string): Promise { method clearHistory (line 44) | async clearHistory(): Promise { method getAllChains (line 48) | async getAllChains(): Promise { method getChain (line 52) | async getChain(chainId: string): Promise { method createNewChain (line 56) | async createNewChain(record: Omit { method exportData (line 84) | async exportData(): Promise { method importData (line 91) | async importData(data: any): Promise { method getDataType (line 100) | async getDataType(): Promise { method validateData (line 107) | async validateData(data: any): Promise { FILE: packages/core/src/services/history/errors.ts class HistoryError (line 8) | class HistoryError extends Error { method constructor (line 12) | constructor(code: string, params?: ErrorParams, message?: string) { class HistoryNotFoundError (line 24) | class HistoryNotFoundError extends HistoryError { method constructor (line 25) | constructor(id: string) { class HistoryChainError (line 35) | class HistoryChainError extends HistoryError { method constructor (line 36) | constructor(message: string) { class RecordNotFoundError (line 46) | class RecordNotFoundError extends HistoryError { method constructor (line 47) | constructor( class HistoryStorageError (line 66) | class HistoryStorageError extends HistoryError { method constructor (line 67) | constructor( class RecordValidationError (line 81) | class RecordValidationError extends HistoryError { method constructor (line 82) | constructor( FILE: packages/core/src/services/history/manager.ts class HistoryManager (line 14) | class HistoryManager implements IHistoryManager { method constructor (line 20) | constructor(storageProvider: IStorageProvider, modelManager: IModelMan... method getModelNameByKey (line 30) | private async getModelNameByKey(modelKey: string): Promise { method getRecords (line 93) | async getRecords(): Promise { method getRecord (line 112) | async getRecord(id: string): Promise { method deleteRecord (line 127) | async deleteRecord(id: string): Promise { method getIterationChain (line 151) | async getIterationChain(recordId: string): Promise { method clearHistory (line 170) | async clearHistory(): Promise { method saveToStorage (line 182) | private async saveToStorage(records: PromptRecord[]): Promise { method validateRecord (line 190) | private validateRecord(record: PromptRecord): void { method createNewChain (line 210) | async createNewChain(params: Omit { method getAllChains (line 323) | async getAllChains(): Promise { method deleteChain (line 368) | async deleteChain(chainId: string): Promise { method exportData (line 384) | async exportData(): Promise { method importData (line 400) | async importData(data: any): Promise { method getDataType (line 435) | async getDataType(): Promise { method validateData (line 442) | async validateData(data: any): Promise { function createHistoryManager (line 469) | function createHistoryManager( FILE: packages/core/src/services/history/types.ts type PromptRecordType (line 6) | type PromptRecordType = type PromptRecord (line 23) | interface PromptRecord { type PromptRecordChain (line 72) | interface PromptRecordChain { type IHistoryManager (line 84) | interface IHistoryManager extends IImportExportable { FILE: packages/core/src/services/image-model/defaults.ts constant IMAGE_PROVIDER_ENV_KEYS (line 9) | const IMAGE_PROVIDER_ENV_KEYS = { constant IMAGE_CONFIG_IDS (line 23) | const IMAGE_CONFIG_IDS: Record = { constant IMAGE_BASE_URL_ENV_KEYS (line 36) | const IMAGE_BASE_URL_ENV_KEYS: Record = { function getDefaultImageModels (line 50) | function getDefaultImageModels(registry?: IImageAdapterRegistry): Record... function getBuiltinImageConfigIds (line 106) | function getBuiltinImageConfigIds(): string[] { FILE: packages/core/src/services/image-model/manager.ts class ImageModelManagerError (line 14) | class ImageModelManagerError extends BaseError { method constructor (line 15) | constructor(code: string, message?: string, params?: ErrorParams) { class ImageModelManager (line 24) | class ImageModelManager implements IImageModelManager { method constructor (line 30) | constructor(storageProvider: IStorageProvider, registry: IImageAdapter... method ensureInitialized (line 36) | public async ensureInitialized(): Promise { method isInitialized (line 43) | public async isInitialized(): Promise { method init (line 48) | private async init(): Promise { method addConfig (line 114) | async addConfig(config: ImageModelConfig): Promise { method updateConfig (line 141) | async updateConfig(id: string, updates: Partial): Pr... method deleteConfig (line 175) | async deleteConfig(id: string): Promise { method getConfig (line 197) | async getConfig(id: string): Promise { method getAllConfigs (line 221) | async getAllConfigs(): Promise { method getEnabledConfigs (line 252) | async getEnabledConfigs(): Promise { method exportData (line 259) | async exportData(): Promise { method importData (line 272) | async importData(data: any): Promise { method getDataType (line 309) | async getDataType(): Promise { method validateData (line 313) | async validateData(data: any): Promise { method migrateConfig (line 334) | private migrateConfig(config: ImageModelConfig): ImageModelConfig { method ensureSelfContained (line 352) | private ensureSelfContained(config: ImageModelConfig): ImageModelConfig { method shouldAutoEnableBuiltinModel (line 446) | private shouldAutoEnableBuiltinModel( method validateConfig (line 477) | private validateConfig(config: ImageModelConfig): void { function createImageModelManager (line 548) | function createImageModelManager( FILE: packages/core/src/services/image/adapters/abstract-adapter.ts method buildDefaultModel (line 37) | public buildDefaultModel(modelId: string): ImageModel { method generate (line 56) | public async generate( method normalizeBaseUrl (line 73) | protected normalizeBaseUrl(base: string): string { method resolveBaseUrl (line 79) | protected resolveBaseUrl(config: ImageModelConfig, _isStream: boolean = ... method resolveEndpointUrl (line 89) | protected resolveEndpointUrl( method getModelById (line 102) | protected getModelById(modelId: string): ImageModel | undefined { method getModelsAsync (line 107) | public async getModelsAsync(_connectionConfig: Record): Pro... method validateRequest (line 117) | protected validateRequest(request: ImageRequest, config: ImageModelConfi... method validateConfig (line 130) | protected validateConfig(config: ImageModelConfig): void { method validateConnectionConfig (line 146) | protected validateConnectionConfig(connectionConfig: Record... FILE: packages/core/src/services/image/adapters/dashscope.ts class DashScopeImageAdapter (line 22) | class DashScopeImageAdapter extends AbstractImageProviderAdapter { method normalizeBaseUrl (line 23) | protected normalizeBaseUrl(base: string): string { method getProvider (line 34) | getProvider(): ImageProvider { method getModels (line 55) | getModels(): ImageModel[] { method getQwenImageParameterDefinitions (line 95) | private getQwenImageParameterDefinitions(): ImageParameterDefinition[] { method getQwenImageEditParameterDefinitions (line 140) | private getQwenImageEditParameterDefinitions(): ImageParameterDefiniti... method getTestImageRequest (line 174) | protected getTestImageRequest(testType: 'text2image' | 'image2image'):... method getParameterDefinitions (line 187) | protected getParameterDefinitions(modelId: string): readonly ImagePara... method getDefaultParameterValues (line 194) | protected getDefaultParameterValues(modelId: string): Record): Pr... method getTestImageRequest (line 115) | protected getTestImageRequest(testType: 'text2image' | 'image2image'):... method getParameterDefinitions (line 137) | protected getParameterDefinitions(_modelId: string): readonly any[] { method getDefaultParameterValues (line 142) | protected getDefaultParameterValues(_modelId: string): Record): Pr... method getTestImageRequest (line 103) | protected getTestImageRequest(testType: 'text2image' | 'image2image'):... method getParameterDefinitions (line 114) | protected getParameterDefinitions(_modelId: string): readonly ImagePar... method getDefaultParameterValues (line 128) | protected getDefaultParameterValues(_modelId: string): Record): Pr... method getTestImageRequest (line 127) | protected getTestImageRequest(testType: 'text2image' | 'image2image'):... method getParameterDefinitions (line 149) | protected getParameterDefinitions(_modelId: string): readonly ImagePar... method getDefaultParameterValues (line 154) | protected getDefaultParameterValues(_modelId: string): Record): Promise { method generateText2Image (line 56) | async generateText2Image(request: Text2ImageRequest): Promise { method validateText2ImageRequest (line 71) | async validateText2ImageRequest(request: Text2ImageRequest): Promise { method getDynamicModels (line 86) | async getDynamicModels(providerId: string, connectionConfig: Record { method isInitialized (line 106) | async isInitialized(): Promise { method addConfig (line 111) | async addConfig(config: ImageModelConfig): Promise { method updateConfig (line 116) | async updateConfig(id: string, updates: Partial): Pr... method deleteConfig (line 121) | async deleteConfig(id: string): Promise { method getConfig (line 125) | async getConfig(id: string): Promise { method getAllConfigs (line 129) | async getAllConfigs(): Promise { method getEnabledConfigs (line 133) | async getEnabledConfigs(): Promise { method exportData (line 138) | async exportData(): Promise { method importData (line 142) | async importData(data: any): Promise { method getDataType (line 147) | async getDataType(): Promise { method validateData (line 151) | async validateData(data: any): Promise { FILE: packages/core/src/services/image/errors.ts class ImageError (line 4) | class ImageError extends BaseError { method constructor (line 5) | constructor(code: string, message?: string, params?: ErrorParams) { FILE: packages/core/src/services/image/service.ts function isRecord (line 19) | function isRecord(value: unknown): value is Record { class ImageService (line 23) | class ImageService implements IImageService { method constructor (line 27) | constructor(imageModelManager: IImageModelManager, registry?: IImageAd... method validateRequest (line 32) | async validateRequest(request: ImageRequest): Promise { method validateText2ImageRequest (line 46) | async validateText2ImageRequest(request: Text2ImageRequest): Promise { method generateInternal (line 186) | private async generateInternal(request: ImageRequest): Promise { method getDynamicModels (line 286) | async getDynamicModels(providerId: string, connectionConfig: Record) { method saveImage (line 142) | async saveImage(data: FullImageData): Promise { method getImage (line 178) | async getImage(id: string): Promise { method getMetadata (line 204) | async getMetadata(id: string): Promise { method deleteImage (line 221) | async deleteImage(id: string): Promise { method deleteImages (line 232) | async deleteImages(ids: string[]): Promise { method clearAll (line 242) | async clearAll(): Promise { method cleanupOldImages (line 253) | async cleanupOldImages(): Promise { method enforceQuota (line 281) | async enforceQuota(): Promise { method getStorageStats (line 328) | async getStorageStats(): Promise<{ method listAllMetadata (line 363) | async listAllMetadata(): Promise { method listAllIds (line 374) | async listAllIds(): Promise { method getConfig (line 381) | getConfig(): ImageStorageConfig { method updateConfig (line 389) | async updateConfig(config: Partial): Promise { method close (line 405) | async close(): Promise { method autoCleanupIfNeeded (line 413) | private async autoCleanupIfNeeded(): Promise { method getOldestImages (line 435) | private async getOldestImages(count: number): Promise { method getOldestMetadata (line 447) | private async getOldestMetadata(): Promise { function createImageStorageService (line 460) | function createImageStorageService( FILE: packages/core/src/services/image/types.ts type ImageParameterDefinition (line 10) | interface ImageParameterDefinition extends UnifiedParameterDefinition { type ImageProvider (line 22) | interface ImageProvider extends BaseProvider { type ImageModel (line 27) | interface ImageModel { type ImageModelConfig (line 42) | interface ImageModelConfig { type ImageInputRef (line 73) | interface ImageInputRef { type ImageRequest (line 78) | interface ImageRequest { type Text2ImageRequest (line 91) | type Text2ImageRequest = Omit & { inputImage... type Image2ImageRequest (line 96) | type Image2ImageRequest = Omit & { inputImag... type ImageResultItem (line 98) | interface ImageResultItem { type ImageResult (line 104) | interface ImageResult { type ImageProgressHandlers (line 117) | interface ImageProgressHandlers { type IImageModelManager (line 126) | interface IImageModelManager extends IImportExportable { type IImageProviderAdapter (line 142) | interface IImageProviderAdapter { type IImageAdapterRegistry (line 159) | interface IImageAdapterRegistry { type IImageService (line 187) | interface IImageService { type ImageMetadata (line 214) | interface ImageMetadata { type ImageRef (line 234) | interface ImageRef { type FullImageData (line 246) | interface FullImageData { type ImageStorageConfig (line 254) | interface ImageStorageConfig { type IImageStorageService (line 266) | interface IImageStorageService { function isImageRef (line 301) | function isImageRef(item: ImageResultItem): item is ImageRef { function createImageRef (line 308) | function createImageRef(id: string): ImageRef { FILE: packages/core/src/services/llm/adapters/abstract-adapter.ts method sendMessage (line 81) | public async sendMessage( method sendMessageStream (line 96) | public async sendMessageStream( method sendMessageStreamWithTools (line 112) | public async sendMessageStreamWithTools( method validateMessages (line 133) | protected validateMessages(messages: Message[]): void { method processThinkTags (line 166) | protected processThinkTags(content: string): { content: string; reasonin... method processStreamContentWithThinkTags (line 198) | protected processStreamContentWithThinkTags( method getModelById (line 310) | protected getModelById(modelId: string): TextModel | undefined { method buildDefaultModel (line 320) | public buildDefaultModel(modelId: string): TextModel { FILE: packages/core/src/services/llm/adapters/anthropic-adapter.ts constant DEFAULT_MAX_TOKENS (line 18) | const DEFAULT_MAX_TOKENS = 8192 class AnthropicAdapter (line 32) | class AnthropicAdapter extends AbstractTextProviderAdapter { method getProvider (line 38) | public getProvider(): TextProvider { method getModels (line 62) | public getModels(): TextModel[] { method getModelsAsync (line 101) | public async getModelsAsync(config: TextModelConfig): Promise, modelI... method doSendMessageStream (line 757) | protected async doSendMessageStream( method sendMessageStreamWithTools (line 845) | public async sendMessageStreamWithTools( FILE: packages/core/src/services/llm/adapters/openrouter-adapter.ts type ModelOverride (line 4) | interface ModelOverride { constant OPENROUTER_STATIC_MODELS (line 12) | const OPENROUTER_STATIC_MODELS: ModelOverride[] = [ class OpenRouterAdapter (line 25) | class OpenRouterAdapter extends OpenAIAdapter { method getProvider (line 26) | public getProvider(): TextProvider { method getModels (line 46) | public getModels(): TextModel[] { FILE: packages/core/src/services/llm/adapters/registry.ts class TextAdapterRegistry (line 26) | class TextAdapterRegistry method createUnknownProviderError (line 35) | protected createUnknownProviderError(providerId: string): Error { method createDynamicModelUnsupportedError (line 41) | protected createDynamicModelUnsupportedError(provider: TextProvider): ... method initializeAdapters (line 50) | protected initializeAdapters(): void { method getProviderFromAdapter (line 83) | protected getProviderFromAdapter(adapter: ITextProviderAdapter): TextP... method getModelsFromAdapter (line 90) | protected getModelsFromAdapter(adapter: ITextProviderAdapter): TextMod... method getModelsAsyncFromAdapter (line 97) | protected async getModelsAsyncFromAdapter( method getProviderTypeDescription (line 113) | protected getProviderTypeDescription(): string { FILE: packages/core/src/services/llm/adapters/siliconflow-adapter.ts type ModelOverride (line 4) | interface ModelOverride { constant SILICONFLOW_STATIC_MODELS (line 12) | const SILICONFLOW_STATIC_MODELS: ModelOverride[] = [ class SiliconflowAdapter (line 25) | class SiliconflowAdapter extends OpenAIAdapter { method getProvider (line 26) | public getProvider(): TextProvider { method getModels (line 46) | public getModels(): TextModel[] { FILE: packages/core/src/services/llm/adapters/zhipu-adapter.ts type ModelOverride (line 4) | interface ModelOverride { constant ZHIPU_STATIC_MODELS (line 12) | const ZHIPU_STATIC_MODELS: ModelOverride[] = [ class ZhipuAdapter (line 35) | class ZhipuAdapter extends OpenAIAdapter { method getProvider (line 36) | public getProvider(): TextProvider { method getModels (line 56) | public getModels(): TextModel[] { FILE: packages/core/src/services/llm/electron-proxy.ts class ElectronLLMProxy (line 9) | class ElectronLLMProxy implements ILLMService { method constructor (line 12) | constructor() { method testConnection (line 20) | async testConnection(provider: string): Promise { method sendMessage (line 24) | async sendMessage(messages: Message[], provider: string): Promise { method fetchModelList (line 236) | async fetchModelList( method prepareRuntimeConfig (line 281) | private prepareRuntimeConfig(modelConfig: TextModelConfig): TextModelC... method buildEffectiveModelConfig (line 305) | private async buildEffectiveModelConfig( function createLLMService (line 386) | function createLLMService(modelManager: ModelManager): ILLMService { type LegacyLike (line 401) | type LegacyLike = Partial & {} function isTextConfigLike (line 406) | function isTextConfigLike(config?: Partial | Partial | Partial<... FILE: packages/core/src/services/llm/types.ts type ConnectionSchema (line 10) | interface ConnectionSchema { type TextProvider (line 23) | interface TextProvider { type ParameterDefinition (line 48) | type ParameterDefinition = UnifiedParameterDefinition; type TextModel (line 54) | interface TextModel { type TextModelConfig (line 83) | type TextModelConfig = ModelTextModelConfig type ToolCall (line 88) | interface ToolCall { type FunctionDefinition (line 97) | interface FunctionDefinition { type ToolDefinition (line 103) | interface ToolDefinition { type MessageRole (line 110) | type MessageRole = 'system' | 'user' | 'assistant' | 'tool'; type Message (line 115) | interface Message { type LLMResponse (line 126) | interface LLMResponse { type StreamHandlers (line 141) | interface StreamHandlers { type ModelInfo (line 161) | interface ModelInfo { type ModelOption (line 169) | interface ModelOption { type ILLMService (line 177) | interface ILLMService { type ITextProviderAdapter (line 245) | interface ITextProviderAdapter { type ITextAdapterRegistry (line 315) | interface ITextAdapterRegistry { FILE: packages/core/src/services/model/advancedParameterDefinitions.ts type AdvancedParameterDefinition (line 17) | interface AdvancedParameterDefinition { FILE: packages/core/src/services/model/converter.ts function convertLegacyToTextModelConfigWithRegistry (line 17) | async function convertLegacyToTextModelConfigWithRegistry( function convertLegacyToTextModelConfig (line 122) | function convertLegacyToTextModelConfig( function createProviderMeta (line 182) | function createProviderMeta(providerId: string, legacy: ModelConfig): Te... function createModelMeta (line 299) | function createModelMeta(modelId: string, providerId: string, legacy: Mo... function createParameterDefinitions (line 347) | function createParameterDefinitions(providerId: string): readonly any[] { function isLegacyConfig (line 402) | function isLegacyConfig(config: any): config is ModelConfig { function isTextModelConfig (line 420) | function isTextModelConfig(config: any): config is TextModelConfig { FILE: packages/core/src/services/model/defaults.ts constant PROVIDER_ENV_KEYS (line 11) | const PROVIDER_ENV_KEYS = { function getBuiltinModelIds (line 28) | function getBuiltinModelIds(): string[] { function getDefaultTextModels (line 41) | function getDefaultTextModels(registry?: ITextAdapterRegistry): Record { method getEnvVar (line 57) | getEnvVar(key: string): string { method isInitialized (line 68) | isInitialized(): boolean { method generateDefaultModels (line 80) | generateDefaultModels(): Record { function isElectronRenderer (line 88) | function isElectronRenderer(): boolean { FILE: packages/core/src/services/model/electron-proxy.ts class ElectronModelManagerProxy (line 10) | class ElectronModelManagerProxy implements IModelManager { method constructor (line 13) | constructor() { method ensureInitialized (line 24) | async ensureInitialized(): Promise { method isInitialized (line 30) | async isInitialized(): Promise { method getAllModels (line 36) | async getAllModels(): Promise { method getModel (line 40) | async getModel(key: string): Promise { method addModel (line 45) | async addModel(key: string, config: TextModelConfig): Promise { method updateModel (line 51) | async updateModel(key: string, config: Partial): Prom... method deleteModel (line 57) | async deleteModel(key: string): Promise { method enableModel (line 61) | async enableModel(key: string): Promise { method disableModel (line 65) | async disableModel(key: string): Promise { method getEnabledModels (line 69) | async getEnabledModels(): Promise { method exportData (line 78) | async exportData(): Promise { method importData (line 85) | async importData(data: any): Promise { method getDataType (line 94) | async getDataType(): Promise { method validateData (line 101) | async validateData(data: any): Promise { FILE: packages/core/src/services/model/errors.ts class ModelError (line 6) | class ModelError extends Error { method constructor (line 10) | constructor(code: string, message?: string, params?: ErrorParams) { class ModelValidationError (line 21) | class ModelValidationError extends ModelError { method constructor (line 22) | constructor( FILE: packages/core/src/services/model/manager.ts class ModelManager (line 22) | class ModelManager implements IModelManager { method constructor (line 28) | constructor(storageProvider: IStorageProvider, registry?: ITextAdapter... method getRegistry (line 42) | private async getRegistry(): Promise { method ensureInitialized (line 60) | public async ensureInitialized(): Promise { method isInitialized (line 67) | public async isInitialized(): Promise { method init (line 75) | private async init(): Promise { method getDefaultModels (line 199) | private getDefaultModels(): Record { method migrateConfig (line 217) | private migrateConfig(config: TextModelConfig): TextModelConfig { method patchProviderMeta (line 245) | private patchProviderMeta(config: TextModelConfig): TextModelConfig { method getModelsFromStorage (line 298) | private async getModelsFromStorage(): Promise> { method getAllModels (line 313) | async getAllModels(): Promise { method getModel (line 357) | async getModel(key: string): Promise { method addModel (line 401) | async addModel(key: string, config: TextModelConfig): Promise { method updateModel (line 432) | async updateModel(key: string, config: Partial): Prom... method deleteModel (line 511) | async deleteModel(key: string): Promise { method enableModel (line 531) | async enableModel(key: string): Promise { method disableModel (line 572) | async disableModel(key: string): Promise { method shouldAutoEnableBuiltinModel (line 611) | private shouldAutoEnableBuiltinModel( method validateTextModelConfig (line 645) | private validateTextModelConfig(config: TextModelConfig): void { method getEnabledModels (line 704) | async getEnabledModels(): Promise { method exportData (line 715) | async exportData(): Promise { method importData (line 731) | async importData(data: any): Promise { method getDataType (line 805) | async getDataType(): Promise { method validateData (line 812) | async validateData(data: any): Promise { method validateSingleTextModel (line 830) | private validateSingleTextModel(item: any): boolean { method validateSingleModel (line 847) | private validateSingleModel(item: any): boolean { function createModelManager (line 864) | function createModelManager(storageProvider: IStorageProvider): ModelMan... FILE: packages/core/src/services/model/model-utils.ts function getStaticModelKeys (line 9) | function getStaticModelKeys(): string[] { function generateCustomModelName (line 19) | function generateCustomModelName(suffix: string): string { function generateTextModelConfig (line 36) | function generateTextModelConfig(envConfig: ValidatedCustomModelEnvConfi... function generateDynamicModels (line 104) | function generateDynamicModels(): Record { FILE: packages/core/src/services/model/parameter-schema.ts constant DANGEROUS_PARAM_KEY_PATTERNS (line 10) | const DANGEROUS_PARAM_KEY_PATTERNS = [ type UnifiedParameterValueType (line 35) | type UnifiedParameterValueType = 'string' | 'number' | 'integer' | 'bool... type UnifiedParameterDefinition (line 40) | interface UnifiedParameterDefinition { function isValueEmpty (line 87) | function isValueEmpty(value: unknown): boolean { function normalizeDefaultValue (line 107) | function normalizeDefaultValue(value: T): T | undefined { function isSafeCustomKey (line 121) | function isSafeCustomKey(key: string): boolean { FILE: packages/core/src/services/model/parameter-utils.ts function parseCustomValue (line 16) | function parseCustomValue(value: string): unknown { type SplitOverridesResult (line 53) | interface SplitOverridesResult { function splitOverridesBySchema (line 58) | function splitOverridesBySchema( type MergeOverridesOptions (line 82) | interface MergeOverridesOptions { function mergeOverrides (line 90) | function mergeOverrides({ type ParameterValidationError (line 142) | interface ParameterValidationError { type ParameterValidationWarning (line 150) | interface ParameterValidationWarning { type ValidateOverridesOptions (line 156) | interface ValidateOverridesOptions { type ParameterValidationResult (line 163) | interface ParameterValidationResult { function validateOverrides (line 168) | function validateOverrides({ function shouldEmitValue (line 239) | function shouldEmitValue(def: UnifiedParameterDefinition, value: unknown... function validateValueAgainstDefinition (line 258) | function validateValueAgainstDefinition( function validateType (line 351) | function validateType(value: unknown, expectedType: UnifiedParameterValu... function buildExpectedRange (line 365) | function buildExpectedRange(def: UnifiedParameterDefinition): string | u... FILE: packages/core/src/services/model/types.ts type TextProvider (line 14) | interface TextProvider extends BaseProvider { type TextModel (line 21) | interface TextModel { type ParameterDefinition (line 38) | type ParameterDefinition = UnifiedParameterDefinition; type TextModelConfig (line 43) | interface TextModelConfig { type StoredTextModelConfig (line 66) | interface StoredTextModelConfig { type ModelConfig (line 84) | interface ModelConfig { type IModelManager (line 97) | interface IModelManager extends IImportExportable { FILE: packages/core/src/services/model/validation.ts type LLMValidationResult (line 9) | interface LLMValidationResult { type ValidationError (line 15) | interface ValidationError { type ValidationWarning (line 23) | interface ValidationWarning { function validateLLMParams (line 33) | function validateLLMParams( function getSupportedParameters (line 67) | function getSupportedParameters(provider: string): AdvancedParameterDefi... function mapAdvancedDefinitionToUnified (line 73) | function mapAdvancedDefinitionToUnified(def: AdvancedParameterDefinition... function mapValidationError (line 94) | function mapValidationError(error: ParameterValidationError): Validation... function mapValidationWarning (line 104) | function mapValidationWarning(warning: ParameterValidationWarning): Vali... FILE: packages/core/src/services/preference/electron-proxy.ts class ElectronPreferenceServiceProxy (line 11) | class ElectronPreferenceServiceProxy implements IPreferenceService { method ensureApiAvailable (line 12) | private ensureApiAvailable() { method get (line 22) | async get(key: string, defaultValue: T): Promise { method set (line 27) | async set(key: string, value: T): Promise { method delete (line 34) | async delete(key: string): Promise { method keys (line 39) | async keys(): Promise { method clear (line 44) | async clear(): Promise { method getAll (line 49) | async getAll(): Promise> { method exportData (line 59) | async exportData(): Promise> { method importData (line 67) | async importData(data: any): Promise { method getDataType (line 77) | async getDataType(): Promise { method validateData (line 85) | async validateData(data: any): Promise { FILE: packages/core/src/services/preference/service.ts constant UI_SETTINGS_KEYS (line 9) | const UI_SETTINGS_KEYS = [ constant LEGACY_KEY_MAPPING (line 26) | const LEGACY_KEY_MAPPING: Record = { class PreferenceService (line 71) | class PreferenceService implements IPreferenceService { method constructor (line 76) | constructor(storageProvider: IStorageProvider) { method get (line 86) | async get(key: string, defaultValue: T): Promise { method set (line 115) | async set(key: string, value: T): Promise { method delete (line 140) | async delete(key: string): Promise { method keys (line 163) | async keys(): Promise { method clear (line 172) | async clear(): Promise { method getAll (line 193) | async getAll(): Promise> { method exportData (line 232) | async exportData(): Promise> { method importData (line 248) | async importData(data: any): Promise { method getDataType (line 305) | async getDataType(): Promise { method validateData (line 312) | async validateData(data: any): Promise { method getPrefKey (line 332) | private getPrefKey(key: string): string { function createPreferenceService (line 342) | function createPreferenceService( FILE: packages/core/src/services/preference/types.ts type IPreferenceService (line 3) | interface IPreferenceService extends IImportExportable { FILE: packages/core/src/services/prompt/electron-proxy.ts function isRunningInElectron (line 13) | function isRunningInElectron(): boolean { class ElectronPromptServiceProxy (line 21) | class ElectronPromptServiceProxy implements IPromptService { method api (line 22) | private get api() { method optimizePrompt (line 31) | async optimizePrompt(request: OptimizationRequest): Promise { method optimizeMessage (line 37) | async optimizeMessage(request: MessageOptimizationRequest): Promise { method getIterationChain (line 72) | async getIterationChain(recordId: string): Promise { method optimizePromptStream (line 78) | async optimizePromptStream(request: OptimizationRequest, callbacks: St... method optimizeMessageStream (line 84) | async optimizeMessageStream(request: MessageOptimizationRequest, callb... method iteratePromptStream (line 90) | async iteratePromptStream( method testPromptStream (line 108) | async testPromptStream( method testCustomConversationStream (line 117) | async testCustomConversationStream( FILE: packages/core/src/services/prompt/errors.ts type PromptErrorParams (line 6) | type PromptErrorParams = ErrorParams; class PromptError (line 14) | class PromptError extends Error { method constructor (line 18) | constructor(code: string, message?: string, params?: PromptErrorParams) { class OptimizationError (line 29) | class OptimizationError extends PromptError { method constructor (line 30) | constructor(originalPrompt: string, details?: string) { class IterationError (line 42) | class IterationError extends PromptError { method constructor (line 43) | constructor(originalPrompt: string, iterateInput: string, details?: st... class TestError (line 57) | class TestError extends PromptError { method constructor (line 58) | constructor(prompt: string, testInput: string, details?: string) { class ServiceDependencyError (line 72) | class ServiceDependencyError extends PromptError { method constructor (line 73) | constructor(serviceName: string, details?: string) { FILE: packages/core/src/services/prompt/factory.ts function createPromptService (line 15) | function createPromptService( FILE: packages/core/src/services/prompt/service.ts constant DEFAULT_TEMPLATES (line 25) | const DEFAULT_TEMPLATES = { class PromptService (line 34) | class PromptService implements IPromptService { method constructor (line 35) | constructor( method checkDependencies (line 47) | private checkDependencies() { method validateInput (line 71) | private validateInput(prompt: string, modelKey: string) { method validateResponse (line 84) | private validateResponse(response: string, prompt: string) { method validateMessageOptimizationRequest (line 93) | private validateMessageOptimizationRequest(request: MessageOptimizatio... method optimizePrompt (line 130) | async optimizePrompt(request: OptimizationRequest): Promise { method optimizeMessage (line 209) | async optimizeMessage(request: MessageOptimizationRequest): Promise { method getIterationChain (line 469) | async getIterationChain(recordId: string): Promise { method testPromptStream (line 476) | async testPromptStream( method optimizePromptStream (line 526) | async optimizePromptStream( method optimizeMessageStream (line 630) | async optimizeMessageStream( method iteratePromptStream (line 743) | async iteratePromptStream( method validateOptimizationRequest (line 869) | private validateOptimizationRequest(request: OptimizationRequest) { method getDefaultTemplateId (line 881) | private async getDefaultTemplateId( method testCustomConversationStream (line 986) | async testCustomConversationStream( FILE: packages/core/src/services/prompt/types.ts type ToolCall (line 7) | interface ToolCall { type FunctionDefinition (line 16) | interface FunctionDefinition { type ToolDefinition (line 22) | interface ToolDefinition { type ConversationMessage (line 30) | interface ConversationMessage { type OptimizationMode (line 61) | type OptimizationMode = "system" | "user"; type FunctionMode (line 66) | type FunctionMode = "basic" | "pro" | "image"; type BasicSubMode (line 72) | type BasicSubMode = "system" | "user"; type ProSubMode (line 73) | type ProSubMode = "multi" | "variable"; type ImageSubMode (line 74) | type ImageSubMode = "text2image" | "image2image"; type OptimizationRequest (line 79) | interface OptimizationRequest { type MessageOptimizationRequest (line 98) | interface MessageOptimizationRequest { type CustomConversationRequest (line 118) | interface CustomConversationRequest { type IPromptService (line 130) | interface IPromptService { FILE: packages/core/src/services/shared/types.ts type ConnectionSchema (line 10) | interface ConnectionSchema { type BaseProvider (line 23) | interface BaseProvider { type BaseModel (line 52) | interface BaseModel { FILE: packages/core/src/services/storage/adapter.ts class StorageAdapter (line 8) | class StorageAdapter implements IStorageProvider { method constructor (line 11) | constructor(private readonly baseProvider: IStorageProvider) {} method getItem (line 14) | async getItem(key: string): Promise { method setItem (line 18) | async setItem(key: string, value: string): Promise { method removeItem (line 22) | async removeItem(key: string): Promise { method clearAll (line 26) | async clearAll(): Promise { method updateData (line 33) | async updateData( method batchUpdate (line 62) | async batchUpdate(operations: Array<{ method getCapabilities (line 85) | getCapabilities() { method acquireLock (line 103) | private async acquireLock(key: string): Promise<() => void> { FILE: packages/core/src/services/storage/dexieStorageProvider.ts type StorageRecord (line 8) | interface StorageRecord { function getDatabaseName (line 21) | function getDatabaseName(): string { class PromptOptimizerDB (line 37) | class PromptOptimizerDB extends Dexie { method constructor (line 40) | constructor() { class DexieStorageProvider (line 59) | class DexieStorageProvider implements IStorageProvider { method constructor (line 66) | constructor() { method initialize (line 78) | private async initialize(): Promise { method resetMigrationState (line 85) | static resetMigrationState(): void { method getItem (line 93) | async getItem(key: string): Promise { method setItem (line 108) | async setItem(key: string, value: string): Promise { method removeItem (line 126) | async removeItem(key: string): Promise { method clearAll (line 140) | async clearAll(): Promise { method atomicUpdate (line 155) | async atomicUpdate( method updateData (line 181) | async updateData( method isError (line 192) | private isError(error: unknown): error is Error { method _performAtomicUpdateWithRetry (line 199) | private async _performAtomicUpdateWithRetry( method _performSimpleUpdate (line 245) | private async _performSimpleUpdate( method _performAtomicUpdate (line 274) | private async _performAtomicUpdate( method batchUpdate (line 321) | async batchUpdate(operations: Array<{ method getStorageInfo (line 364) | async getStorageInfo(): Promise<{ method exportAll (line 402) | async exportAll(): Promise> { method importAll (line 423) | async importAll(data: Record): Promise { method close (line 443) | async close(): Promise { FILE: packages/core/src/services/storage/errors.ts type StorageOperation (line 6) | type StorageOperation = 'read' | 'write' | 'delete' | 'clear' | 'config' constant STORAGE_OPERATION_TO_CODE (line 8) | const STORAGE_OPERATION_TO_CODE: Record< class StorageError (line 19) | class StorageError extends Error { method constructor (line 23) | constructor( FILE: packages/core/src/services/storage/factory.ts type StorageType (line 7) | type StorageType = 'localStorage' | 'dexie' | 'memory' | 'file'; class StorageFactory (line 12) | class StorageFactory { method create (line 21) | static create(type: StorageType): IStorageProvider { method reset (line 61) | static reset(): void { method getSupportedTypes (line 73) | static getSupportedTypes(): StorageType[] { method isSupported (line 100) | static isSupported(type: StorageType): boolean { FILE: packages/core/src/services/storage/fileStorageProvider.ts class FileStorageProvider (line 18) | class FileStorageProvider implements IStorageProvider { method constructor (line 37) | constructor(userDataPath: string) { method ensureInitialized (line 50) | private async ensureInitialized(): Promise { method initialize (line 68) | private async initialize(): Promise { method loadFromFileWithRecovery (line 84) | private async loadFromFileWithRecovery(): Promise { method tryLoadFromFile (line 146) | private async tryLoadFromFile(filePath: string, fileType: string): Pro... method fileExists (line 194) | private async fileExists(filePath: string): Promise { method createBackup (line 206) | private async createBackup(): Promise { method saveToFile (line 222) | private async saveToFile(): Promise { method saveToFileWithoutBackup (line 246) | private async saveToFileWithoutBackup(): Promise { method atomicWrite (line 266) | private async atomicWrite(data: string): Promise { method validateJSON (line 298) | private validateJSON(data: string): boolean { method scheduleWrite (line 310) | private scheduleWrite(): void { method flush (line 339) | async flush(): Promise { method acquireWriteLock (line 390) | private async acquireWriteLock(operation: () => Promise): Promis... method getItem (line 409) | async getItem(key: string): Promise { method setItem (line 414) | async setItem(key: string, value: string): Promise { method removeItem (line 420) | async removeItem(key: string): Promise { method clearAll (line 426) | async clearAll(): Promise { method updateData (line 439) | async updateData(key: string, modifier: (currentValue: T | null) =>... method performAtomicUpdate (line 475) | private async performAtomicUpdate(key: string, modifier: (currentVa... method getLatestData (line 495) | private async getLatestData(key: string): Promise { method validateValue (line 519) | private validateValue(value: T): void { method batchUpdate (line 527) | async batchUpdate(operations: Array<{ method getCapabilities (line 550) | getCapabilities() { FILE: packages/core/src/services/storage/localStorageProvider.ts class AsyncLock (line 7) | class AsyncLock { method acquire (line 10) | async acquire(key: string): Promise<() => void> { class LocalStorageProvider (line 39) | class LocalStorageProvider implements IStorageProvider { method getItem (line 42) | public async getItem(key: string): Promise { method setItem (line 54) | public async setItem(key: string, value: string): Promise { method removeItem (line 65) | public async removeItem(key: string): Promise { method clearAll (line 76) | public async clearAll(): Promise { method updateData (line 93) | public async updateData( method getCapabilities (line 129) | public getCapabilities() { method batchUpdate (line 141) | public async batchUpdate(operations: Array<{ FILE: packages/core/src/services/storage/memoryStorageProvider.ts class MemoryStorageProvider (line 8) | class MemoryStorageProvider implements IStorageProvider { method getItem (line 16) | async getItem(key: string): Promise { method setItem (line 26) | async setItem(key: string, value: string): Promise { method removeItem (line 34) | async removeItem(key: string): Promise { method clearAll (line 41) | async clearAll(): Promise { method updateData (line 50) | async updateData(key: string, modifier: (currentValue: T | null) =>... method batchUpdate (line 61) | async batchUpdate(operations: Array<{ method getCapabilities (line 79) | getCapabilities() { method size (line 91) | get size(): number { method has (line 100) | has(key: string): boolean { method getAllKeys (line 108) | getAllKeys(): string[] { FILE: packages/core/src/services/storage/types.ts type IStorageProvider (line 1) | interface IStorageProvider { FILE: packages/core/src/services/template/default-templates/evaluation/builders.ts type Language (line 3) | type Language = 'zh' | 'en'; type TemplateIdentity (line 5) | interface TemplateIdentity { type SubjectConfig (line 13) | interface SubjectConfig { FILE: packages/core/src/services/template/default-templates/index.ts constant ALL_TEMPLATES (line 118) | const ALL_TEMPLATES = { FILE: packages/core/src/services/template/electron-language-proxy.ts class ElectronTemplateLanguageServiceProxy (line 8) | class ElectronTemplateLanguageServiceProxy implements ITemplateLanguageS... method constructor (line 11) | constructor() { method initialize (line 19) | async initialize(): Promise { method getCurrentLanguage (line 24) | async getCurrentLanguage(): Promise { method setLanguage (line 28) | async setLanguage(language: BuiltinTemplateLanguage): Promise { method toggleLanguage (line 32) | async toggleLanguage(): Promise { method isValidLanguage (line 39) | async isValidLanguage(language: string): Promise { method getSupportedLanguages (line 44) | async getSupportedLanguages(): Promise { method getLanguageDisplayName (line 48) | getLanguageDisplayName(language: BuiltinTemplateLanguage): string { method isInitialized (line 59) | isInitialized(): boolean { FILE: packages/core/src/services/template/electron-proxy.ts type ElectronAPI (line 7) | interface ElectronAPI { class ElectronTemplateManagerProxy (line 38) | class ElectronTemplateManagerProxy implements ITemplateManager { method constructor (line 41) | constructor() { method getTemplate (line 50) | async getTemplate(id: string): Promise