Skip to content

Commit

Permalink
fix: add plugin settings
Browse files Browse the repository at this point in the history
  • Loading branch information
EresDev committed Dec 3, 2024
1 parent d644907 commit b089bc0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
21 changes: 14 additions & 7 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"name": "Peronal Agent Bridge",
"description": "Direct personal commands in comments to respective user's personal agent plugin",
"ubiquity:listeners": [
"issue_comment.created",
"issue_comment.edited"
],
"ubiquity:listeners": ["issue_comment.created", "issue_comment.edited"],
"configuration": {
"default": {},
"default": {
"configurableResponse": "Hello, world!"
},
"type": "object",
"properties": {}
"properties": {
"configurableResponse": {
"type": "string"
},
"customStringsUrl": {
"type": "string"
}
},
"required": ["configurableResponse"]
}
}
}
8 changes: 7 additions & 1 deletion src/types/plugin-inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ export interface PluginInputs<T extends SupportedEventsU = SupportedEventsU, TU
* The kernel will extract those and pass them to the plugin,
* which are built into the context object from setup().
*/
export const pluginSettingsSchema = T.Optional(T.Object({}, { default: {} }));
export const pluginSettingsSchema = T.Object(
{
configurableResponse: T.String(),
customStringsUrl: T.Optional(T.String()),
},
{ default: { configurableResponse: "Hello, world!" } }
);

export const pluginSettingsValidator = new StandardValidator(pluginSettingsSchema);

Expand Down

0 comments on commit b089bc0

Please sign in to comment.