Skip to content

feat: prototype Assistant tray prompt and UserModel integration#43

Open
Rello wants to merge 2 commits intomasterfrom
codex/add-nextcloud-ai-assistant-feature
Open

feat: prototype Assistant tray prompt and UserModel integration#43
Rello wants to merge 2 commits intomasterfrom
codex/add-nextcloud-ai-assistant-feature

Conversation

@Rello
Copy link
Owner

@Rello Rello commented Jan 30, 2026

Motivation

  • Provide a small proof-of-concept UI in the tray so users can ask the Nextcloud Assistant from the tray and see the reply inline.
  • Reuse the existing OCS taskprocessing connector to schedule text-processing tasks and poll for results instead of hard-coding a new backend path.
  • Surface request state, responses and errors in the User model so QML can react to backend progress for a prototype flow.

Description

  • Added an OcsAssistantConnector implementation and public API to libsync (src/libsync/ocsassistantconnector.h and src/libsync/ocsassistantconnector.cpp) and wired the sources into src/libsync/CMakeLists.txt to perform the OCS requests (fetchTaskTypes(), fetchTasks(), scheduleTask(), deleteTask()).
  • Extended the tray User model (src/gui/tray/usermodel.h / src/gui/tray/usermodel.cpp) with assistant state properties and invokable methods: assistantQuestion, assistantResponse, assistantError, assistantRequestInProgress, submitAssistantQuestion() and clearAssistantResponse(), plus private state and a poll timer (_assistantPollTimer) for polling task results.
  • Implemented JSON helper/parsing functions (assistantTaskTypeIdFromResponse, assistantTaskIdFromSchedule, assistantOutputFromTask) and slots to handle connector callbacks: slotAssistantTaskTypesFetched(), slotAssistantTasksFetched(), slotAssistantTaskScheduled(), slotAssistantTaskDeleted(), and slotAssistantRequestError(); these schedule tasks, poll results and update the model state.
  • Added a simple tray UI in src/gui/tray/MainWindow.qml (assistantPromptLoader) with a TextField and Button for submitting questions and Labels for showing the assistant response or error, and adjusted layout anchoring so the activity list respects the prompt when visible.

Testing

  • No automated tests were executed for these changes.
  • The changes were committed locally; CI is expected to run project build/tests after the PR is opened.

Codex Task

Signed-off-by: Rello <Rello@users.noreply.github.com>
@github-actions
Copy link

Artifact containing the AppImage: nextcloud-appimage-pr-43.zip

Digest: sha256:5ed12477aa0b9f1d7373fafda0316d1984e428393dc9f1a1235728eb7f8cb7b5

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant