Skip to content

Latest commit

 

History

History
40 lines (36 loc) · 979 Bytes

DOCS.md

File metadata and controls

40 lines (36 loc) · 979 Bytes

Flux Browser JS API Docs

Tab Management

window.tabs.requestSplitTab(url: string): null
window.tabs.requestSplitTab(): null
window.tabs.requestFlipTabs(): null
window.tabs.requestNewGroup(url: string): null
window.tabs.addTabs(tabs: Array<Array<string>>): boolean //array of array of urls
window.tabs.load(group: number, tab: number, url: string): null

File API

window.fs.listDir(path: string, subdir?: boolean) : Array<{path: string, isDir: boolean, dirs: Array<{path: string, isDir: boolean}>}>
window.fs.getFileUrl(): string
window.fs.getFolderUrl(): string

Dialog API

window.dialog.closeDialog()

Ollama API

window.ai.generate(model: string, prompt: string): {
  model: string;
  created_at: string;
  response: string;
  done: boolean;
  context: number[];
  total_duration: number;
  load_duration: number;
  prompt_eval_count: number;
  prompt_eval_duration: number;
  eval_count: number;
  eval_duration: number;
};