Skip to content

Conversation

julien-nc
Copy link
Member

This will be helpful to make file actions (in the Files app).

The OCA.Assistant.openAssistantForm function now accepts inputs like

{ input: { fileId: 123 } }

or

{ input: { filePath: '/path/to/file.txt' } }

and the parsed file content will be inserted in the input field on the fly.

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc added enhancement New feature or request 3. to review labels Dec 3, 2024
@kyteinsky
Copy link
Contributor

let's update the docs with an example too (https://github.com/nextcloud/assistant/blob/main/docs/developer/web-integration.md)

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc requested a review from kyteinsky December 4, 2024 10:49
@julien-nc
Copy link
Member Author

Dev docs are adjusted. They were a bit out of date as well.

identifier: 'my custom identifier',
inputs: { prompt: 'give me a short summary of a simple settings section about GitHub' },
customId: 'my custom identifier',
input: { input: 'give me a short summary of a simple settings section about GitHub' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inputs first key here, typo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the enh/noid/initial-text-input-file-id branch from c388010 to abb8fb0 Compare December 4, 2024 10:56
@julien-nc julien-nc requested a review from kyteinsky December 4, 2024 10:57
status: 3, // 0: unknown, 1: scheduled, 2: running, 3: sucessful, 4: failed
taskType: 'OCP\\TextProcessing\\FreePromptTaskType',
timestamp: 1711545305,
output: { output: 'blabla' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and outputs perhaps? I didn't see the code.

Copy link
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 🎉
and neat feature!

@julien-nc julien-nc merged commit bd20b56 into main Dec 4, 2024
11 checks passed
@julien-nc julien-nc mentioned this pull request Jan 7, 2025
@jancborchardt jancborchardt deleted the enh/noid/initial-text-input-file-id branch February 25, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants