Files
yaak-mountain-loop/apps/yaak-client/lib/tauri.ts
T
Gregory Schier b1f1363502 Add in-app micro-feedback prompts for new features
Show a one-time toast asking how a feature is working after its third
successful use, with an optional comment sent anonymously to the Yaak
API (feature key, text, app version, and OS only — nothing identifying,
and nothing is sent unless the user clicks Send).

- New cmd_send_feedback Tauri command posts fire-and-forget via the
  shared API client (localhost in dev)
- Feature keys registry (cookie-editor, response-history, sse-summary,
  git-sync) with per-feature use counting in the key-value store
- "Never ask for feedback" setting to disable prompts entirely
- Toast gains dynamicHeight and hideDismiss props for richer content
- Fix missing vertical padding on xs/2xs multiline inputs
- Fix unused-import and dead-code warnings in yaak-system-appearance
  on non-Linux builds

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 15:06:21 -07:00

66 lines
1.8 KiB
TypeScript

import type { InvokeArgs } from "@tauri-apps/api/core";
import { invoke } from "@tauri-apps/api/core";
type TauriCmd =
| "cmd_call_grpc_request_action"
| "cmd_call_http_authentication_action"
| "cmd_call_http_request_action"
| "cmd_call_websocket_request_action"
| "cmd_call_workspace_action"
| "cmd_call_folder_action"
| "cmd_check_for_updates"
| "cmd_curl_to_request"
| "cmd_decrypt_template"
| "cmd_default_headers"
| "cmd_delete_all_grpc_connections"
| "cmd_delete_all_http_responses"
| "cmd_delete_send_history"
| "cmd_dismiss_notification"
| "cmd_export_data"
| "cmd_format_graphql"
| "cmd_format_json"
| "cmd_get_http_authentication_config"
| "cmd_get_http_authentication_summaries"
| "cmd_get_http_response_events"
| "cmd_get_sse_events"
| "cmd_get_themes"
| "cmd_get_workspace_meta"
| "cmd_git_add_credential"
| "cmd_git_clone"
| "cmd_grpc_go"
| "cmd_grpc_reflect"
| "cmd_grpc_request_actions"
| "cmd_http_request_actions"
| "cmd_websocket_request_actions"
| "cmd_workspace_actions"
| "cmd_folder_actions"
| "cmd_http_request_body"
| "cmd_http_response_body"
| "cmd_import_data"
| "cmd_metadata"
| "cmd_restart"
| "cmd_new_child_window"
| "cmd_new_main_window"
| "cmd_plugin_info"
| "cmd_plugin_init_errors"
| "cmd_reload_plugins"
| "cmd_render_template"
| "cmd_save_response"
| "cmd_secure_template"
| "cmd_send_ephemeral_request"
| "cmd_send_feedback"
| "cmd_send_http_request"
| "cmd_template_function_summaries"
| "cmd_template_function_config"
| "cmd_template_tokens_to_string";
export async function invokeCmd<T>(cmd: TauriCmd, args?: InvokeArgs): Promise<T> {
// console.log('RUN COMMAND', cmd, args);
try {
return await invoke(cmd, args);
} catch (err) {
console.warn("Tauri command error", cmd, err);
throw err;
}
}