feat(discord): added discord block/tools (#347)

* feat(tools): added discord oauth, block, and tools

* added docs

* remove extraneous comments/logs

* added tooltips for disabled subblocks, acknowledged PR comments

* added tools and blocks for new repo structure

* added docs

* added more type safety, fixed some styling

* updated docs

* fixed style of dropdown in tool-input

* acknowledged PR comments
This commit is contained in:
Waleed Latif
2025-05-11 18:32:04 -07:00
committed by GitHub
parent 0fc0f683a6
commit 3580241d93
35 changed files with 2046 additions and 156 deletions

View File

@@ -261,7 +261,7 @@ function extractInputs(content: string): Record<string, any> {
const inputs: Record<string, any> = {}
// Find all input property definitions
const propMatches = inputsContent.match(/(\w+)\s*:\s*{[^}]*}/g)
const propMatches = inputsContent.match(/(\w+)\s*:\s*{[\s\S]*?}/g)
if (!propMatches) {
// Try an alternative approach for the whole inputs section
const inputLines = inputsContent.split('\n')
@@ -287,8 +287,9 @@ function extractInputs(content: string): Record<string, any> {
if (!propMatch) return
const propName = propMatch[1]
const typeMatch = propText.match(/type\s*:\s*['"]?([^'"}, ]+)['"]?/)
const requiredMatch = propText.match(/required\s*:\s*(true|false)/)
const typeMatch = propText.match(/type\s*:\s*['"]?([^'"}, ]+)['"]?/s)
const requiredMatch = propText.match(/required\s*:\s*(true|false)/s)
const descriptionMatch = propText.match(/description\s*:\s*['"]([^'"]+)['"]/s)
inputs[propName] = {
type: typeMatch ? typeMatch[1] : 'any',