Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09a41f3

Browse files
fix: clear prompt after task creation (#20344)
Fix#20255
1 parent16a863e commit09a41f3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎site/src/modules/tasks/TaskPrompt/TaskPrompt.stories.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ export const OnSuccess: Story = {
145145
constsuccessMessage=awaitbody.findByText(/taskcreated/i);
146146
expect(successMessage).toBeInTheDocument();
147147
});
148+
149+
awaitstep("Clears prompt",async()=>{
150+
constprompt=awaitcanvas.findByLabelText(/prompt/i);
151+
expect(prompt).toHaveValue("");
152+
});
148153
},
149154
};
150155

‎site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ const CreateTaskForm: FC<CreateTaskFormProps> = ({ templates, onSuccess }) => {
232232
awaitcreateTaskMutation.mutateAsync({
233233
prompt,
234234
});
235+
setPrompt("");
235236
}catch(error){
236237
constmessage=getErrorMessage(error,"Error creating task");
237238
constdetail=getErrorDetail(error)??"Please try again";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp