Skip to content
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

Fix missing destructured param when calling openAssistantTask #120

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/assistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export function handleNotification(event) {
async function showAssistantTaskResult(taskId) {
getTask(taskId).then(response => {
console.debug('showing results for task', response.data?.ocs?.data?.task)
openAssistantTask(response.data?.ocs?.data?.task)
openAssistantTask(response.data?.ocs?.data?.task, {})
}).catch(error => {
if (error.response?.status === 401) {
showError(t('assistant', 'Please log in to view the task result'))
Expand All @@ -315,7 +315,7 @@ async function showAssistantTaskResult(taskId) {
* @param {Array} params.actionButtons List of extra buttons to show in the assistant result form
* @return {Promise<void>}
*/
export async function openAssistantTask(task, { isInsideViewer = undefined, actionButtons = undefined }) {
export async function openAssistantTask(task, { isInsideViewer = undefined, actionButtons = undefined } = {}) {
const { default: Vue } = await import(/* webpackChunkName: "vue-lazy" */'vue')
Vue.mixin({ methods: { t, n } })
const { showError } = await import(/* webpackChunkName: "dialogs-lazy" */'@nextcloud/dialogs')
Expand Down
Loading