nextcloud / assistant

✨ Nextcloud Assistant
GNU Affero General Public License v3.0
23 stars 4 forks source link

Add task history #43

Closed julien-nc closed 6 months ago

julien-nc commented 6 months ago

Add task history as a list that can be toggled at the bottom of the assistant. The list only contains tasks of the currently selected type. With the context menu, tasks can be deleted, canceled (when status is scheduled) and repeated (try again if they were successful). Clicking on a task item loads it in the form (inputs + output) so it can be viewed, edited and launched again. The task list is visible in the main assistant modal, the one when opening a task result from a notification and in the dedicated assistant page showing a task result.

image

@nimishavijay @jancborchardt I will deploy this on tech-preview soon. Any first feedback?

julien-nc commented 6 months ago

@nimishavijay @jancborchardt This is now available on tech-preview. On this instance, most task types are handled by the OpenAI provider behind the scene.

nimishavijay commented 6 months ago

Super nice feature! :) glad to know we are working towards a nice full fledged AI assistant :)

Placement and button:

Task list

So along the same lines, each task in the list can be of the format

[Task name in bold] [Input in --color-main-text]             [relative time]
[Output in --color-text-maxcontrast] 

Nice-to-haves:

julien-nc commented 6 months ago

@nimishavijay Thanks a lot for the feedback!

I'm thinking rather than toggling this in a rather small modal, we could possibly replace the content of the modal itself?

But then I think it's harder to switch task types when looking at the history. The history only contains tasks of the currently select task type. So while looking at the history, one would need to click the back button, change the task type and click the "Previous tasks" button. What do you think?

The button itself can go on the bottom left

The problem there is that there might be more buttons than the submit, copy and retry ones. It is possible to "integrate" the assistant in other apps so they can open it and "inject" buttons for custom actions: image

We could have the task history button on the left and all the other one wrapping on the right. Something like: image What do you think?

We can make the title and subline more descriptive by including the type of task

The task list is restricted to the current selected task type so all tasks have the same type. Would you say this needs to change and we should have all tasks in the list?

I also see that we are using the normal size modal which is pretty small, esp. on large screens, what do you think about using a large sized modal? :)

:+1:

in the button, "Task history" --> "Previous tasks"

:+1:

Use the history MDI icon

If the button stays togglable then the chevron might be more explicit.

I'll make the rest of your suggested changes soon.