Skip to content

Commit e385037

Browse files
Add webscraper preload into imported plugins
1 parent c3a28b6 commit e385037

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

frontend/src/pages/Admin/Agents/Imported/ImportedSkillConfig/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default function ImportedSkillConfig({
9696
useEffect(() => {
9797
setHasChanges(
9898
JSON.stringify(inputs) !==
99-
JSON.stringify(inputsFromArgs(selectedSkill.setup_args))
99+
JSON.stringify(inputsFromArgs(selectedSkill.setup_args))
100100
);
101101
}, [inputs]);
102102

server/utils/agents/imported.js

+3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ const fs = require("fs");
22
const path = require("path");
33
const { safeJsonParse } = require("../http");
44
const { isWithin, normalizePath } = require("../files");
5+
const { CollectorApi } = require("../collectorApi");
56
const pluginsPath =
67
process.env.NODE_ENV === "development"
78
? path.resolve(__dirname, "../../storage/plugins/agent-skills")
89
: path.resolve(process.env.STORAGE_DIR, "plugins", "agent-skills");
10+
const sharedWebScraper = new CollectorApi();
911

1012
class ImportedPlugin {
1113
constructor(config) {
@@ -184,6 +186,7 @@ class ImportedPlugin {
184186
description: this.config.description,
185187
logger: aibitat?.handlerProps?.log || console.log, // Allows plugin to log to the console.
186188
introspect: aibitat?.introspect || console.log, // Allows plugin to display a "thought" the chat window UI.
189+
webScraper: sharedWebScraper,
187190
examples: this.config.examples ?? [],
188191
parameters: {
189192
$schema: "http://json-schema.org/draft-07/schema#",

0 commit comments

Comments
 (0)