Logo
Explore Help
Register Sign In
admin/cc-switch
1
0
Fork 0
You've already forked cc-switch
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
80dd6e9381d4bed7f0fa525ad188731472c28a11
cc-switch/src/lib/api/usage.ts

13 lines
351 B
TypeScript
Raw Normal View History

feat: complete stage 1 infrastructure
2025-10-16 10:00:22 +08:00
import { invoke } from "@tauri-apps/api/core";
import type { UsageResult } from "@/types";
import type { AppType } from "./types";
export const usageApi = {
async query(providerId: string, appType: AppType): Promise<UsageResult> {
return await invoke("query_provider_usage", {
provider_id: providerId,
refactor(api): simplify app type parameter handling to single required parameter Replace the previous dual-parameter approach (app_type/app/appType) with a single required `app: String` parameter across all Tauri commands. This change: - Introduces unified `parse_app()` helper replacing complex `resolve_app_type()` logic - Updates all backend commands in config, mcp, and provider modules - Aligns frontend API calls to use consistent `app` parameter naming - Simplifies MSW test handlers by removing optional parameter handling This improves API clarity and reduces parameter ambiguity while maintaining backward compatibility through error handling.
2025-10-30 11:35:14 +08:00
app: appType,
feat: complete stage 1 infrastructure
2025-10-16 10:00:22 +08:00
});
},
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 272ms Template: 32ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API