This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { BrowserWindow, screen, WebContents } from "electron"; | |
| import Store from "electron-store"; | |
| import log from "electron-log"; | |
| import { WINDOW_PATH } from "@common/path.js"; | |
| export type WindowState = { | |
| x?: number; | |
| y?: number; | |
| width: number; | |
| height: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| API_ROUTE_ERROR_NAME, | |
| ChatExternalData, | |
| ChatFileAttachmentSchema, | |
| ChatRouteError, | |
| ChatSuggestion, | |
| modelConfigSchema, | |
| PersistMessageContent, | |
| PersistMessageErrorContent, | |
| ProviderDefaultConfig, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Dot = "."; | |
| type PopFirst<K extends string> = K extends `${infer A}${Dot}${infer B}` | |
| ? B | |
| : K; | |
| type PickFirst<K extends string> = K extends `${infer A}${Dot}${infer B}` | |
| ? A | |
| : K; | |
| type Check< | |
| R, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { app } from 'electron'; | |
| import * as path from 'path'; | |
| import * as fs from 'fs'; | |
| export default class SimpleStore<Model extends Object> { | |
| static STORE_NAME = 'persistence.json'; | |
| private readonly storePath: string; | |
| constructor() { |