kind of working finally

This commit is contained in:
testing
2026-04-09 22:57:06 -07:00
parent ba0e75c503
commit 25ab3accfa
78 changed files with 6700 additions and 5000 deletions
Vendored Regular → Executable
+29 -6
View File
@@ -1,14 +1,37 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {config} from '../models';
export function ClearHistory(): Promise<void>;
export function CheckOnline():Promise<boolean>;
export function GetMicrophones(): Promise<Array<{ [key: string]: any }>>;
export function ClearHistory():Promise<void>;
export function GetSettings(): Promise<{ [key: string]: any }>;
export function GetAvailableWhisperModels():Promise<Array<Record<string, string>>>;
export function Greet(arg1: string): Promise<string>;
export function GetConfig():Promise<config.Config>;
export function SaveSettings(arg1: { [key: string]: any }): Promise<string>;
export function GetMicrophones():Promise<Array<Record<string, any>>>;
export function ToggleStartup(arg1: boolean): Promise<string>;
export function GetSettings():Promise<Record<string, any>>;
export function GetWhisperInfo():Promise<Record<string, any>>;
export function Greet(arg1:string):Promise<string>;
export function InstallWhisper(arg1:string):Promise<string>;
export function IsWhisperInstalled():Promise<boolean>;
export function Quit():Promise<void>;
export function SaveSettings(arg1:Record<string, any>):Promise<string>;
export function ShowSettings():Promise<void>;
export function StartRecording():Promise<void>;
export function StopRecording():Promise<void>;
export function ToggleStartup(arg1:boolean):Promise<string>;
export function UninstallWhisper():Promise<string>;
Regular → Executable
+61 -40
View File
@@ -1,50 +1,71 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export function ClearHistory() {
return window['go']['main']['App']['ClearHistory']();
}
export function GetMicrophones() {
return window['go']['main']['App']['GetMicrophones']();
}
export function GetSettings() {
return window['go']['main']['App']['GetSettings']();
}
export function Greet(arg1) {
return window['go']['main']['App']['Greet'](arg1);
}
export function SaveSettings(arg1) {
return window['go']['main']['App']['SaveSettings'](arg1);
}
export function ToggleStartup(arg1) {
return window['go']['main']['App']['ToggleStartup'](arg1);
}
export function CheckOnline() {
return window['go']['main']['App']['CheckOnline']();
return window['go']['main']['App']['CheckOnline']();
}
export function IsWhisperInstalled() {
return window['go']['main']['App']['IsWhisperInstalled']();
}
export function GetWhisperInfo() {
return window['go']['main']['App']['GetWhisperInfo']();
}
export function InstallWhisper(arg1) {
return window['go']['main']['App']['InstallWhisper'](arg1);
}
export function UninstallWhisper() {
return window['go']['main']['App']['UninstallWhisper']();
export function ClearHistory() {
return window['go']['main']['App']['ClearHistory']();
}
export function GetAvailableWhisperModels() {
return window['go']['main']['App']['GetAvailableWhisperModels']();
return window['go']['main']['App']['GetAvailableWhisperModels']();
}
export function GetConfig() {
return window['go']['main']['App']['GetConfig']();
}
export function GetMicrophones() {
return window['go']['main']['App']['GetMicrophones']();
}
export function GetSettings() {
return window['go']['main']['App']['GetSettings']();
}
export function GetWhisperInfo() {
return window['go']['main']['App']['GetWhisperInfo']();
}
export function Greet(arg1) {
return window['go']['main']['App']['Greet'](arg1);
}
export function InstallWhisper(arg1) {
return window['go']['main']['App']['InstallWhisper'](arg1);
}
export function IsWhisperInstalled() {
return window['go']['main']['App']['IsWhisperInstalled']();
}
export function Quit() {
return window['go']['main']['App']['Quit']();
}
export function SaveSettings(arg1) {
return window['go']['main']['App']['SaveSettings'](arg1);
}
export function ShowSettings() {
return window['go']['main']['App']['ShowSettings']();
}
export function StartRecording() {
return window['go']['main']['App']['StartRecording']();
}
export function StopRecording() {
return window['go']['main']['App']['StopRecording']();
}
export function ToggleStartup(arg1) {
return window['go']['main']['App']['ToggleStartup'](arg1);
}
export function UninstallWhisper() {
return window['go']['main']['App']['UninstallWhisper']();
}
+63
View File
@@ -0,0 +1,63 @@
export namespace config {
export class HistoryItem {
text: string;
timestamp: string;
static createFrom(source: any = {}) {
return new HistoryItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.text = source["text"];
this.timestamp = source["timestamp"];
}
}
export class Config {
api_key: string;
shortcut: string;
whisper_model: string;
ai_model: string;
ai_prompt: string;
language: string;
microphone_device?: number;
history: HistoryItem[];
static createFrom(source: any = {}) {
return new Config(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.api_key = source["api_key"];
this.shortcut = source["shortcut"];
this.whisper_model = source["whisper_model"];
this.ai_model = source["ai_model"];
this.ai_prompt = source["ai_prompt"];
this.language = source["language"];
this.microphone_device = source["microphone_device"];
this.history = this.convertValues(source["history"], HistoryItem);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
}