mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-24 04:13:59 +02:00
Load GraphQL schema from file for autocomplete (#462)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Gregory Schier <gschier1990@gmail.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
Gregory Schier
parent
5d1d24870a
commit
b31c066717
@@ -5,7 +5,7 @@ import { basename, resolveResource } from "@tauri-apps/api/path";
|
||||
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import { clear, readText, writeText } from "@tauri-apps/plugin-clipboard-manager";
|
||||
import { open, save } from "@tauri-apps/plugin-dialog";
|
||||
import { readDir, readFile } from "@tauri-apps/plugin-fs";
|
||||
import { readDir, readFile, readTextFile } from "@tauri-apps/plugin-fs";
|
||||
import { openUrl, revealItemInDir } from "@tauri-apps/plugin-opener";
|
||||
import { type as osType } from "@tauri-apps/plugin-os";
|
||||
import type {
|
||||
@@ -137,6 +137,7 @@ export function createTauriPlatform(): Platform {
|
||||
|
||||
files: {
|
||||
readDir: (path) => readDir(path),
|
||||
readText: (path) => readTextFile(path),
|
||||
url: (path) => convertFileSrc(path),
|
||||
basename: (path) => basename(path),
|
||||
resolveResource: (path) => resolveResource(path),
|
||||
|
||||
@@ -141,6 +141,15 @@ export interface PlatformDialog {
|
||||
export interface PlatformFiles {
|
||||
readDir(path: string): Promise<DirEntry[]>;
|
||||
|
||||
/**
|
||||
* The text of a file the user picked, decoded as UTF-8.
|
||||
*
|
||||
* Only for paths the host itself handed us — a dialog result or a drag-drop
|
||||
* payload — never one the page assembled. A host without a filesystem reads
|
||||
* whatever its own handle points at.
|
||||
*/
|
||||
readText(path: string): Promise<string>;
|
||||
|
||||
/** A URL the page can load a file from, for `<img>`, `<video>`, and friends. */
|
||||
url(path: string): string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user