Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ import { parametersSchema } from './schema'
const action: IRawAction = {
name: 'Send Query',
key: 'sendQuery',
description: 'Sends a query to your customised AI Bot',
description: 'Sends a query to one of your bots on AIBots',
arguments: [
{
label: 'Query',
label: 'What do you want to ask your bot?',
placeholder: 'Summarise this form response and flag anything urgent',
key: 'query',
type: 'string' as const,
type: 'multiline' as const,
required: true,
variables: true,
},
Expand Down
3 changes: 2 additions & 1 deletion packages/backend/src/apps/aibots/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const auth: IUserAddedConnectionAuth = {
fields: [
{
key: 'screenName',
label: 'Label',
label: 'Nickname',
description: "It does not need to match your bot's name on AIBots.",
type: 'string' as const,
required: true,
readOnly: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/apps/aibots/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import queue from './queue'
const app: IApp = {
name: 'AIBots',
key: 'aibots',
description: 'Integrate with your customised AI Bot',
description: 'Send a query to one of your bots on AIBots',
iconUrl: '{BASE_URL}/apps/aibots/assets/favicon.svg',
authDocUrl: '',
baseUrl: 'https://aibots.gov.sg',
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/components/InputCreator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export default function InputCreator(props: InputCreatorProps): JSX.Element {
autoFocus={autoFocus}
singleVariableSelection={schema.singleVariableSelection}
noVariablesMessage={noVariablesMessage}
isMultiline={type === 'multiline'}
/>
)
}
Expand Down
8 changes: 7 additions & 1 deletion packages/frontend/src/components/RichTextEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ interface EditorProps {
singleVariableSelection?: boolean
noVariablesMessage?: string
customRteMenuOptions?: TRteMenuOption[]
isMultiline?: boolean
}
const Editor = ({
onChange,
Expand All @@ -120,6 +121,7 @@ const Editor = ({
autoFocus = false,
noVariablesMessage,
customRteMenuOptions,
isMultiline,
}: EditorProps) => {
const { priorExecutionSteps } = useContext(StepExecutionsContext)
const { stepIdToOrder } = useContext(StepsToDisplayContext)
Expand Down Expand Up @@ -213,7 +215,8 @@ const Editor = ({
// To simulate textarea and coordinate with dropdown input size
onCreate: ({ editor }) => {
const editorElement = editor.view.dom as HTMLElement
editorElement.style.minHeight = isRich ? '9rem' : '2.625rem' // Set initial minHeight directly
editorElement.style.minHeight =
isRich || isMultiline ? '9rem' : '2.625rem' // Set initial minHeight directly
editorElement.style.maxHeight = isSingleLine ? '2.625rem' : ''
},
editorProps: {
Expand Down Expand Up @@ -384,6 +387,7 @@ interface RichTextEditorProps {
singleVariableSelection?: boolean
noVariablesMessage?: string
customRteMenuOptions?: TRteMenuOption[]
isMultiline?: boolean
}
const RichTextEditor = ({
required,
Expand All @@ -402,6 +406,7 @@ const RichTextEditor = ({
singleVariableSelection,
noVariablesMessage,
customRteMenuOptions,
isMultiline,
}: RichTextEditorProps) => {
const { readOnly } = useContext(EditorContext)
const { control, getValues } = useFormContext()
Expand Down Expand Up @@ -452,6 +457,7 @@ const RichTextEditor = ({
singleVariableSelection={singleVariableSelection}
noVariablesMessage={noVariablesMessage}
customRteMenuOptions={customRteMenuOptions}
isMultiline={isMultiline}
/>
)}
/>
Expand Down
Loading