mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-09 18:29:39 +00:00
feat: make skills invokable as slash commands in the TUI
- Add Skill.content() method to load skill template content from SKILL.md files - Modify Command.list() to include skills as invokable commands - Add 'skill' boolean property to Command.Info schema - Update autocomplete to show skills with (Skill) label in slash commands - Regenerate SDK to include skill property in Command type
This commit is contained in:
@@ -153,4 +153,11 @@ export namespace Skill {
|
||||
export async function all() {
|
||||
return state().then((x) => Object.values(x))
|
||||
}
|
||||
|
||||
export async function content(name: string) {
|
||||
const info = await get(name)
|
||||
if (!info) return undefined
|
||||
const md = await ConfigMarkdown.parse(info.location)
|
||||
return md.content
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user