Skip to content

The companion's attach button fails on every file, because hermiq has no attachments endpoint #950

Description

@rubenvdlinde

What happens

The hermiq companion sits on every Nextcloud page. Its message box has a paperclip. You pick a file, and the upload fails with "Could not attach file", because hermiq has no endpoint to receive it.

Why

src/companion.js mounts nextcloud-vue's CnAiCompanion with chatAppId: 'hermiq' (companion.js:283-284). hermiq locks @conduction/nextcloud-vue at 2.55.1.

In 2.55.1, CnAiInput always renders the attach button (no v-if) and uploads with axios.post(attachmentsUrl(this.chatAppId), formData). attachmentsUrl() resolves to /index.php/apps/hermiq/api/chat/attachments (nextcloud-vue src/composables/aiChatConfig.js:94-95, src/components/CnAiCompanion/CnAiInput.vue:151-163, :1005).

hermiq registers no such route. appinfo/routes.php has chat/send, chat/warm, chat/history, chat/stats, chat/health and chat/stream, and no chat/attachments (routes.php:514-545). No controller under lib/Controller handles an upload for chat, and there are no attribute routes.

So the request 404s and the user sees a control that cannot work.

Fix direction

Either build the endpoint the component expects (text-decode and store the file, return { path, name }, and have the send and stream paths read attachments into the turn), or ask nextcloud-vue for a prop that hides the paperclip and pass it from companion.js until the endpoint exists. The first closes the ch-attach gap as well.

Live check

  1. On any Nextcloud page, open the hermiq companion and click the paperclip.
  2. Pick a small text file.
  3. The browser's network tab shows POST /index.php/apps/hermiq/api/chat/attachments with 404, and the input shows "Could not attach file".

Matrix row: ch-attach, which reads "no" with "no attachment affordance". The row only searched src/views/Chat.vue. The affordance does exist, in the companion, and it is broken. This finding is not in the matrix.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageAwaiting triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions