feat: Added ui to support input params for task creation#222
Open
michael-chou359 wants to merge 4 commits intomainfrom
Open
feat: Added ui to support input params for task creation#222michael-chou359 wants to merge 4 commits intomainfrom
michael-chou359 wants to merge 4 commits intomainfrom
Conversation
declan-scale
reviewed
May 6, 2026
|
|
||
| return ( | ||
| <div className="flex w-full max-w-3xl flex-col gap-2"> | ||
| {process.env.NODE_ENV === 'development' && !taskID && ( |
Collaborator
There was a problem hiding this comment.
Let's allow this in all envs but hide when the chat is disabled
Comment on lines
+181
to
+200
| {!taskID && !isDisabled && ( | ||
| <div className="flex flex-col gap-1"> | ||
| <button | ||
| type="button" | ||
| className="text-muted-foreground hover:text-foreground ml-4 flex items-center gap-1 text-sm transition-colors" | ||
| onClick={() => setIsTaskParamsOpen(v => !v)} | ||
| > | ||
| <span>{isTaskParamsOpen ? '▾' : '▸'}</span> | ||
| Task Parameters | ||
| </button> | ||
| {isTaskParamsOpen && ( | ||
| <DataInput | ||
| prompt={taskParams} | ||
| setPrompt={setTaskParams} | ||
| isDisabled={isDisabled} | ||
| handleSendPrompt={handleSendPrompt} | ||
| codeMirrorViewRef={taskParamsViewRef} | ||
| /> | ||
| )} | ||
| </div> |
There was a problem hiding this comment.
Missing dev-only guard on Task Parameters UI
The PR description says "Also only available in dev environment," but neither the UI panel (line 181) nor the extraTaskParams parse logic (line 126) has a process.env.NODE_ENV === 'development' check. As-is, the Task Parameters accordion and its ability to inject arbitrary JSON into createTask are fully live in production, directly contradicting the stated design constraint.
Prompt To Fix With AI
This is a comment left during a code review.
Path: agentex-ui/components/primary-content/prompt-input.tsx
Line: 181-200
Comment:
**Missing dev-only guard on Task Parameters UI**
The PR description says "Also only available in dev environment," but neither the UI panel (line 181) nor the `extraTaskParams` parse logic (line 126) has a `process.env.NODE_ENV === 'development'` check. As-is, the Task Parameters accordion and its ability to inject arbitrary JSON into `createTask` are fully live in production, directly contradicting the stated design constraint.
How can I resolve this? If you propose a fix, please make it concise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See issue here:
https://linear.app/scale-epd/issue/AGX1-230/default-agentex-gui-support-agents-that-require-parameters-at-task
Added task parameters drop down in the UI

Clicking drops down into a json input

input is passed as additional params to task creation backend call

Task Params only available when task is initialized, the ui disappears with subsequent chat messages.
Greptile Summary
!taskID && !isDisabled), allowing users to inject extra key-value pairs into thecreateTaskAPI call.description/contentso core fields always win over user-supplied JSON.process.env.NODE_ENV === 'development'guard on both the UI panel and the parse logic, making it available in all environments despite the stated dev-only intent.Confidence Score: 4/5
Safe to merge with the dev-only guard added; without it, the feature ships to production contrary to design intent.
One P1 finding: the Task Parameters panel and its extraTaskParams injection are missing a NODE_ENV === 'development' check, exposing the feature in production. No P0 issues present.
agentex-ui/components/primary-content/prompt-input.tsx — needs dev-only environment guard on both the UI block and the extraTaskParams parse path.
Important Files Changed
process.env.NODE_ENV === 'development'guard, making it visible and functional in all environments contrary to the stated design intent.Sequence Diagram
sequenceDiagram participant User participant PromptInput participant handleSendPrompt participant createTaskMutation User->>PromptInput: Expand "Task Parameters" panel User->>PromptInput: Enter JSON in DataInput (taskParams) User->>PromptInput: Enter prompt text User->>PromptInput: Click Send / press Enter PromptInput->>handleSendPrompt: invoke handleSendPrompt->>handleSendPrompt: setPrompt('') — clears main prompt alt taskParams is non-empty handleSendPrompt->>handleSendPrompt: JSON.parse(taskParams) alt Invalid JSON handleSendPrompt-->>User: toast.error('Invalid Task Parameters JSON') note over handleSendPrompt: returns early — prompt already cleared else Valid JSON handleSendPrompt->>createTaskMutation: mutateAsync with extraTaskParams spread createTaskMutation-->>handleSendPrompt: task end else taskParams empty handleSendPrompt->>createTaskMutation: mutateAsync with description and content only createTaskMutation-->>handleSendPrompt: task endComments Outside Diff (1)
agentex-ui/components/primary-content/prompt-input.tsx, line 122-133 (link)setPrompt('')is called on line 122 before theextraTaskParamsJSON parse. If the user's task-params JSON is invalid, the function returns early after showing the toast — but the main prompt text has already been wiped, causing silent data loss.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "added ui to support input params for tas..." | Re-trigger Greptile