Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

417 B
Raw Blame
import { invoke } from '@tauri-apps/api/core'

export interface FetchOptions {
  baseURL?: string
  method?: string
  params?: object
  body?: unknown
}

export function ofetch<T>(path: string, options: FetchOptions = {}): Promise<T> {
  return invoke<T>('remote', {
    method: `${(options.method ?? 'get').toUpperCase()} ${options.baseURL ?? ''}${path}`,
    payload: options.params ?? options.body ?? null,
  })
}