init: initial commit

This commit is contained in:
Blizzard
2026-04-01 14:09:33 +08:00
commit aef2e152dc
66 changed files with 6540 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {handler} from '../models';
import {service} from '../models';
export function AskDeepSeek(arg1:string,arg2:string):Promise<string>;
export function CreateLibrary(arg1:string,arg2:string):Promise<string>;
export function DeleteLibrary(arg1:string):Promise<string>;
export function GetActiveLibrary():Promise<string>;
export function GetDBStatus():Promise<boolean>;
export function GetProviders():Promise<Array<handler.ProviderPreset>>;
export function GetSettings():Promise<service.SettingsDTO>;
export function ImportCSV():Promise<service.ImportResult>;
export function ListLibraries():Promise<Array<handler.LibraryInfo>>;
export function SaveSettings(arg1:service.SettingsDTO):Promise<string>;
export function SearchExpert(arg1:string):Promise<any>;
export function StopGeneration():Promise<void>;
export function SwitchLibrary(arg1:string):Promise<string>;
export function ToggleTopmost(arg1:boolean):Promise<void>;
+59
View File
@@ -0,0 +1,59 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export function AskDeepSeek(arg1, arg2) {
return window['go']['main']['App']['AskDeepSeek'](arg1, arg2);
}
export function CreateLibrary(arg1, arg2) {
return window['go']['main']['App']['CreateLibrary'](arg1, arg2);
}
export function DeleteLibrary(arg1) {
return window['go']['main']['App']['DeleteLibrary'](arg1);
}
export function GetActiveLibrary() {
return window['go']['main']['App']['GetActiveLibrary']();
}
export function GetDBStatus() {
return window['go']['main']['App']['GetDBStatus']();
}
export function GetProviders() {
return window['go']['main']['App']['GetProviders']();
}
export function GetSettings() {
return window['go']['main']['App']['GetSettings']();
}
export function ImportCSV() {
return window['go']['main']['App']['ImportCSV']();
}
export function ListLibraries() {
return window['go']['main']['App']['ListLibraries']();
}
export function SaveSettings(arg1) {
return window['go']['main']['App']['SaveSettings'](arg1);
}
export function SearchExpert(arg1) {
return window['go']['main']['App']['SearchExpert'](arg1);
}
export function StopGeneration() {
return window['go']['main']['App']['StopGeneration']();
}
export function SwitchLibrary(arg1) {
return window['go']['main']['App']['SwitchLibrary'](arg1);
}
export function ToggleTopmost(arg1) {
return window['go']['main']['App']['ToggleTopmost'](arg1);
}
+88
View File
@@ -0,0 +1,88 @@
export namespace handler {
export class LibraryInfo {
id: number;
name: string;
description: string;
entry_count: number;
is_active: boolean;
static createFrom(source: any = {}) {
return new LibraryInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.description = source["description"];
this.entry_count = source["entry_count"];
this.is_active = source["is_active"];
}
}
export class ProviderPreset {
id: string;
label: string;
base_url: string;
default_model: string;
static createFrom(source: any = {}) {
return new ProviderPreset(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.label = source["label"];
this.base_url = source["base_url"];
this.default_model = source["default_model"];
}
}
}
export namespace service {
export class ImportResult {
imported: number;
skipped: number;
error?: string;
static createFrom(source: any = {}) {
return new ImportResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.imported = source["imported"];
this.skipped = source["skipped"];
this.error = source["error"];
}
}
export class SettingsDTO {
ai_provider: string;
base_url: string;
api_key: string;
model: string;
system_prompt: string;
max_tokens: number;
use_public_key: boolean;
static createFrom(source: any = {}) {
return new SettingsDTO(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.ai_provider = source["ai_provider"];
this.base_url = source["base_url"];
this.api_key = source["api_key"];
this.model = source["model"];
this.system_prompt = source["system_prompt"];
this.max_tokens = source["max_tokens"];
this.use_public_key = source["use_public_key"];
}
}
}