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:
parent
e70d0a0029
commit
212df695f2
@ -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",
|
||||
|
0
skills/unknown/widget-playground/README.md
Normal file
0
skills/unknown/widget-playground/README.md
Normal file
12
skills/unknown/widget-playground/config/en.json
Normal file
12
skills/unknown/widget-playground/config/en.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"$schema": "../../../../schemas/skill-schemas/skill-config.json",
|
||||
"actions": {
|
||||
"run": {
|
||||
"type": "logic",
|
||||
"utterance_samples": ["Show the widget playground"]
|
||||
}
|
||||
},
|
||||
"answers": {
|
||||
"default": ["..."]
|
||||
}
|
||||
}
|
0
skills/unknown/widget-playground/memory/.gitkeep
Normal file
0
skills/unknown/widget-playground/memory/.gitkeep
Normal file
12
skills/unknown/widget-playground/skill.json
Normal file
12
skills/unknown/widget-playground/skill.json
Normal 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"
|
||||
}
|
||||
}
|
15
skills/unknown/widget-playground/src/actions/run.ts
Normal file
15
skills/unknown/widget-playground/src/actions/run.ts
Normal 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 })
|
||||
}
|
0
skills/unknown/widget-playground/src/lib/.gitkeep
Normal file
0
skills/unknown/widget-playground/src/lib/.gitkeep
Normal file
@ -0,0 +1 @@
|
||||
{}
|
0
skills/unknown/widget-playground/test/.gitkeep
Normal file
0
skills/unknown/widget-playground/test/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user