Tweak plugins

This commit is contained in:
Gregory Schier
2024-10-15 07:45:45 -07:00
parent 61543fb10f
commit 17a429525f
8 changed files with 50 additions and 69 deletions

View File

@@ -3,9 +3,9 @@ import { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/ap
export const plugin: PluginDefinition = {
templateFunctions: [{
name: 'prompt.text',
description: 'Prompt the user for input when sending a request',
args: [
{ type: 'text', name: 'title', label: 'Title' },
{ type: 'text', name: 'label', label: 'Label', optional: true },
{ type: 'text', name: 'defaultValue', label: 'Default Value', optional: true },
{ type: 'text', name: 'placeholder', label: 'Placeholder', optional: true },
],
@@ -14,7 +14,7 @@ export const plugin: PluginDefinition = {
return await ctx.prompt.text({
id: `prompt-${args.values.label}`,
label: args.values.label ?? '',
label: args.values.title ?? '',
title: args.values.title ?? '',
defaultValue: args.values.defaultValue,
placeholder: args.values.placeholder,