1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-28 12:43:35 +03:00

feat(skill/widget-playground): tmp skill to develop widgets

This commit is contained in:
louistiti 2023-06-04 15:51:35 +08:00
parent e70d0a0029
commit 212df695f2
No known key found for this signature in database
GPG Key ID: 92CD6A2E497E1669
9 changed files with 45 additions and 0 deletions

View File

@ -68,6 +68,11 @@
"route": "/api/action/social_communication/mbti/quiz",
"params": []
},
{
"method": "GET",
"route": "/api/action/unknown/widget-playground/run",
"params": []
},
{
"method": "GET",
"route": "/api/action/utilities/have_i_been_pwned/run",

View File

@ -0,0 +1,12 @@
{
"$schema": "../../../../schemas/skill-schemas/skill-config.json",
"actions": {
"run": {
"type": "logic",
"utterance_samples": ["Show the widget playground"]
}
},
"answers": {
"default": ["..."]
}
}

View File

@ -0,0 +1,12 @@
{
"$schema": "../../../schemas/skill-schemas/skill.json",
"name": "Widget Playground",
"bridge": "nodejs",
"version": "1.0.0",
"description": "Used to develop widgets. Will be deleted afterwards.",
"author": {
"name": "Louis Grenard",
"email": "louis@getleon.ai",
"url": "https://github.com/louistiti"
}
}

View File

@ -0,0 +1,15 @@
import type { ActionFunction } from '@sdk/types'
import { leon } from '@sdk/leon'
export const run: ActionFunction = async function () {
/**
* Random number
*/
const text = new Text({
text: '42',
size: 'xxl'
})
await leon.answer({ widget: text })
}

View File

@ -0,0 +1 @@
{}