Move response filters into Rust (#755)

This commit is contained in:
Gregory Schier authored and GitHub committed 2026-10-15 06:22:23 -07:00
1 parent 19908b1902
commit 9b3715024d
42 files changed
+15538 -399

No files matched your search

@@ -15,6 +15,8 @@ import type {
BootRequest,
DeleteKeyValueResponse,
DeleteModelResponse,
FilterLanguage,
FilterResponse,
FindHttpResponsesResponse,
Folder,
FormInput,
@@ -657,6 +659,14 @@ export class PluginInstance {
);
};
const filterText = (language: FilterLanguage, text: string, query: string) =>
this.#sendForReply<FilterResponse>(context, {
type: "filter_text_request",
language,
text,
query,
});
const _windowInfo = async () => {
if (context.label == null) {
throw new Error("Can't get window context without an active window");
@@ -1003,6 +1013,10 @@ export class PluginInstance {
return result.data as any;
},
},
filter: {
jsonPath: (text: string, query: string) => filterText("jsonpath", text, query),
xPath: (text: string, query: string) => filterText("xpath", text, query),
},
store: {
get: async <T>(key: string) => {
const payload = { type: "get_key_value_request", key } as const;