Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
feat: remove ScheduledEmptyContent component and showScheduleConfirma…
…tion property

Signed-off-by: Edward Ly <[email protected]>
  • Loading branch information
edward-ly committed Jun 18, 2025
commit 236aa528ec882d27442540010019a2f4b2905e8c
7 changes: 0 additions & 7 deletions src/assistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export async function openAssistantForm({
isInsideViewer,
inputs: input ? { prompt: input } : inputs,
selectedTaskTypeId,
showScheduleConfirmation: false,
showSyncTaskRunning: false,
actionButtons,
},
Expand Down Expand Up @@ -215,7 +214,6 @@ export async function openAssistantForm({
})
view.$on('background-notify', () => {
cancelTaskPolling()
view.showScheduleConfirmation = true
view.showSyncTaskRunning = false
view.loading = false
setNotifyReady(lastTask.id)
Expand All @@ -236,7 +234,6 @@ export async function openAssistantForm({
})
view.$on('back-to-assistant', () => {
cancelTaskPolling()
view.showScheduleConfirmation = false
view.showSyncTaskRunning = false
view.loading = false
view.outputs = null
Expand Down Expand Up @@ -456,7 +453,6 @@ export async function openAssistantTask(
inputs: task.input,
outputs: task.output ?? {},
selectedTaskTypeId: task.type,
showScheduleConfirmation: false,
actionButtons,
},
}).$mount(modalMountPoint)
Expand All @@ -468,7 +464,6 @@ export async function openAssistantTask(
view.$on('submit', (data) => {
scheduleTask(task.appId, task.identifier ?? '', data.selectedTaskTypeId, data.inputs)
.then((response) => {
view.showScheduleConfirmation = true
console.debug('scheduled task', response.data?.ocs?.data?.task)
})
.catch(error => {
Expand Down Expand Up @@ -580,7 +575,6 @@ export async function openAssistantTask(
})
view.$on('background-notify', () => {
cancelTaskPolling()
view.showScheduleConfirmation = true
view.showSyncTaskRunning = false
setNotifyReady(lastTask.id)
})
Expand All @@ -599,7 +593,6 @@ export async function openAssistantTask(
})
view.$on('back-to-assistant', () => {
cancelTaskPolling()
view.showScheduleConfirmation = false
view.showSyncTaskRunning = false
view.loading = false
view.outputs = null
Expand Down
12 changes: 0 additions & 12 deletions src/components/AssistantTextProcessingModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
@background-notify="$emit('background-notify')"
@cancel="$emit('cancel-task')"
@back="onBackToAssistant" />
<ScheduledEmptyContent
v-else-if="showScheduleConfirmation"
:description="shortInput"
:show-close-button="true"
@close="onCancel"
@back="onBackToAssistant" />
<AssistantTextProcessingForm
v-else
class="form"
Expand Down Expand Up @@ -64,14 +58,12 @@ import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'

import AssistantTextProcessingForm from './AssistantTextProcessingForm.vue'
import RunningEmptyContent from './RunningEmptyContent.vue'
import ScheduledEmptyContent from './ScheduledEmptyContent.vue'

import { emit } from '@nextcloud/event-bus'

export default {
name: 'AssistantTextProcessingModal',
components: {
ScheduledEmptyContent,
RunningEmptyContent,
AssistantTextProcessingForm,
NcModal,
Expand Down Expand Up @@ -118,10 +110,6 @@ export default {
type: [Number, null],
default: null,
},
showScheduleConfirmation: {
type: Boolean,
required: true,
},
actionButtons: {
type: Array,
default: () => [],
Expand Down
93 changes: 0 additions & 93 deletions src/components/ScheduledEmptyContent.vue

This file was deleted.

10 changes: 0 additions & 10 deletions src/views/AssistantPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
@background-notify="onBackgroundNotify"
@cancel="onCancel"
@back="onBackToAssistant" />
<ScheduledEmptyContent
v-else-if="showScheduleConfirmation"
:description="shortInput"
:show-close-button="false"
@back="onBackToAssistant" />
<AssistantTextProcessingForm
v-else
class="form"
Expand All @@ -42,7 +37,6 @@ import NcAppContent from '@nextcloud/vue/dist/Components/NcAppContent.js'

import AssistantTextProcessingForm from '../components/AssistantTextProcessingForm.vue'
import RunningEmptyContent from '../components/RunningEmptyContent.vue'
import ScheduledEmptyContent from '../components/ScheduledEmptyContent.vue'

import { showError } from '@nextcloud/dialogs'
import { loadState } from '@nextcloud/initial-state'
Expand All @@ -59,7 +53,6 @@ export default {
name: 'AssistantPage',

components: {
ScheduledEmptyContent,
RunningEmptyContent,
AssistantTextProcessingForm,
NcContent,
Expand All @@ -74,7 +67,6 @@ export default {
task: loadState('assistant', 'task'),
showSyncTaskRunning: false,
progress: null,
showScheduleConfirmation: false,
loading: false,
}
},
Expand Down Expand Up @@ -104,13 +96,11 @@ export default {
methods: {
onBackgroundNotify() {
cancelTaskPolling()
this.showScheduleConfirmation = true
this.showSyncTaskRunning = false
setNotifyReady(this.task.id)
},
onBackToAssistant() {
this.showSyncTaskRunning = false
this.showScheduleConfirmation = false
this.task.output = null
},
onCancel() {
Expand Down