feat: Convert all app files to JS
This commit is contained in:
3
packages/backend/src/apps/helix/actions/index.js
Normal file
3
packages/backend/src/apps/helix/actions/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import newChat from './new-chat/index.js';
|
||||
|
||||
export default [newChat];
|
||||
@@ -1,3 +0,0 @@
|
||||
import newChat from './new-chat';
|
||||
|
||||
export default [newChat];
|
||||
@@ -1,5 +1,5 @@
|
||||
import FormData from 'form-data';
|
||||
import defineAction from '../../../../helpers/define-action';
|
||||
import defineAction from '../../../../helpers/define-action.js';
|
||||
|
||||
export default defineAction({
|
||||
name: 'New chat',
|
||||
@@ -9,7 +9,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'Input',
|
||||
key: 'input',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
required: true,
|
||||
description: 'Prompt to start the chat with.',
|
||||
variables: true,
|
||||
@@ -18,7 +18,7 @@ export default defineAction({
|
||||
|
||||
async run($) {
|
||||
const formData = new FormData();
|
||||
formData.append('input', $.step.parameters.input as string);
|
||||
formData.append('input', $.step.parameters.input);
|
||||
formData.append('mode', 'inference');
|
||||
formData.append('type', 'text');
|
||||
|
||||
Reference in New Issue
Block a user