Skip to content

Commit e852cf9

Browse files
committed
Fix agent input
1 parent 4d923c7 commit e852cf9

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

llmstack/client/src/components/apps/AppConfigEditor.jsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export function AppConfigEditor({
2424
setInputFields,
2525
config,
2626
setConfig,
27+
isAgent,
2728
}) {
2829
return (
2930
<AppStepCard
@@ -58,7 +59,7 @@ export function AppConfigEditor({
5859
setActiveStep={setActiveStep}
5960
>
6061
<CardContent style={{ maxHeight: 400, overflow: "auto" }}>
61-
<Accordion defaultExpanded={true}>
62+
<Accordion defaultExpanded={!isAgent}>
6263
<AccordionSummary
6364
expandIcon={<ExpandMoreIcon />}
6465
aria-controls="input-content"
@@ -69,9 +70,21 @@ export function AppConfigEditor({
6970
</AccordionSummary>
7071
<AccordionDetails>
7172
<AppInputSchemaEditor
72-
fields={inputFields}
73+
fields={
74+
isAgent
75+
? [
76+
{
77+
name: "task",
78+
title: "Task",
79+
description: "What do you want the agent to perform?",
80+
type: "string",
81+
required: true,
82+
},
83+
]
84+
: inputFields
85+
}
7386
setFields={setInputFields}
74-
readOnly={appType?.slug === "slack"}
87+
readOnly={isAgent}
7588
/>
7689
</AccordionDetails>
7790
</Accordion>

llmstack/client/src/components/apps/AppEditor.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export function AppEditor(props) {
9494
processors={processors}
9595
setProcessors={setProcessors}
9696
outputSchemas={outputSchemas}
97+
isAgent={app.app_type_slug === "agent"}
9798
/>
9899
</Stack>
99100
{processors.map((processor, index) => (

llmstack/client/src/pages/AppEdit.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,16 @@ export default function AppEditPage(props) {
250250
config: app?.data?.config,
251251
app_type: app?.type?.id,
252252
type_slug: app?.type?.slug,
253-
input_fields: appInputFields,
253+
input_fields:
254+
app?.type?.slug === "agent"
255+
? {
256+
name: "task",
257+
title: "Task",
258+
description: "What do you want the agent to perform?",
259+
type: "string",
260+
required: true,
261+
}
262+
: appInputFields,
254263
output_template:
255264
app?.type?.slug === "agent" ? "{{agent}}" : appOutputTemplate,
256265
web_config: app?.web_config || {},

0 commit comments

Comments
 (0)