Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
/**
* Default App Service - Generic implementation with minimal returns
*/
import type { AppService, FactoryResetOptions, LogEntry } from './types'
export class DefaultAppService implements AppService {
async factoryReset(options?: FactoryResetOptions): Promise<void> {
console.log('factoryReset called with options:', options)
// No-op
}
async readLogs(): Promise<LogEntry[]> {
return []
}
parseLogLine(line: string): LogEntry {
return {
timestamp: Date.now(),
level: 'info',
target: 'default',
message: line ?? '',
}
}
async getJanDataFolder(): Promise<string | undefined> {
return undefined
}
async relocateJanDataFolder(path: string): Promise<void> {
console.log('relocateJanDataFolder called with path:', path)
// No-op - not implemented in default service
}
async getServerStatus(): Promise<boolean> {
return false
}
async setServerRunInBackground(enabled: boolean): Promise<void> {
// No-op - tray/background behavior only exists in the desktop app
void enabled
}
async setCloseToTray(enabled: boolean): Promise<void> {
// No-op - the tray only exists in the desktop app
void enabled
}
async readYaml<T = unknown>(path: string): Promise<T> {
console.log('readYaml called with path:', path)
throw new Error('readYaml not implemented in default app service')
}
}