-
Notifications
You must be signed in to change notification settings - Fork 18
feat: files "new file" menu generate image action #322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
60a7b76
to
002945e
Compare
Hey, nicely done. I rebased on main, fixed the conflicts and merged the 2 listeners for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Could you use a different listener than TaskSuccessfulListener
like NewFileMenuTaskSuccessfulListener
? It would make it easier to read and the logic is kind of separated anyway.
We don't care about oc_assistant_task_notif
for the new file menu tasks, we always send a notification.
'openfile' => 'false', | ||
], | ||
); | ||
} catch (\Exception $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a failure notification in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I also create another TaskFailedEvent
listener (to not mix logic with existing) to produce task failure notification?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, yes. It would be nicer to have a new type of notification for this case. Something like "The new image generation in FOLDER_RICH_OBJECT has failed" and an action button (label "View task") to open the assistant on the task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The success notification can stay like it is now IMO.
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
… openAssistantTask Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
002945e
to
03696cf
Compare
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@andrey18106 I hope you don't mind, I made the changes i suggested 😁 :
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Resolves: #305
This PR adds new entry "Generate image" to "New file" menu in Files app.
Custom dialog is opened to enter prompt and schedule
core:text2image
task to generate one image.TaskSuccessfulEvent
listener is adjusted to handle this task withcustomId
set tonew-image-file:<folderId>
to store the result and create notification with the target link to new image file.This task also kept visible in the Assistant UI history.
It is possible to disable it with
occ config:app:set assistant disableFilesNewMenuPlugin --value 1
.