From ab79f69e68a0549cf3da537dc31d3e7b2bd722f9 Mon Sep 17 00:00:00 2001 From: everestmcarthur <280397636+everestmcarthur@users.noreply.github.com> Date: Sat, 1 Aug 2026 21:35:08 -0400 Subject: [PATCH] Key Inspector: add showToast to Eval scope --- plugins/key-inspector/src/lib/evalTool.ts | 3 +++ plugins/key-inspector/src/ui/Settings.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/key-inspector/src/lib/evalTool.ts b/plugins/key-inspector/src/lib/evalTool.ts index df89742..009b97b 100644 --- a/plugins/key-inspector/src/lib/evalTool.ts +++ b/plugins/key-inspector/src/lib/evalTool.ts @@ -2,6 +2,7 @@ import { findByProps, findByName, findByTypeName, findByStoreName, findByPropsAl import { React, ReactNative, FluxDispatcher } from "@vendetta/metro/common"; import { instead, before, after } from "@vendetta/patcher"; import { getAssetIDByName } from "@vendetta/ui/assets"; +import { showToast } from "@vendetta/ui/toasts"; import { rawFind, rawFindByTypeName, rawFindByProps, rawFindByName, rawFindByStoreName } from "@shared/lib/rawFind"; declare const window: any; @@ -86,6 +87,7 @@ export async function runEval(rawCode: string): Promise { "before", "after", "getAssetIDByName", + "showToast", "React", "ReactNative", "FluxDispatcher", @@ -110,6 +112,7 @@ export async function runEval(rawCode: string): Promise { before, after, getAssetIDByName, + showToast, React, ReactNative, FluxDispatcher, diff --git a/plugins/key-inspector/src/ui/Settings.tsx b/plugins/key-inspector/src/ui/Settings.tsx index f58dcfc..3ef28f8 100644 --- a/plugins/key-inspector/src/ui/Settings.tsx +++ b/plugins/key-inspector/src/ui/Settings.tsx @@ -89,7 +89,7 @@ function EvalSection() { outside the sandbox. In scope: findByProps/findByName/ findByTypeName/findByStoreName/findByPropsAll/findByNameAll/find, the raw* passive variants (rawFind/rawFindByTypeName/rawFindByProps/rawFindByName/ - rawFindByStoreName), instead/before/after, getAssetIDByName, React, ReactNative, + rawFindByStoreName), instead/before/after, getAssetIDByName, showToast, React, ReactNative, FluxDispatcher, and window. Nothing runs until you tap the button.