Add application selection (#186)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
7af0e714cd
commit
d357d1c857
24 files changed
+266
-48
No files matched your search
@@ -5,8 +5,10 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:need-apply="needApply"
|
||||
:service="service"
|
||||
@select="$store.dispatch('chat/setApplication', $event)"
|
||||
@refresh="$store.dispatch('chat/getApplications')"
|
||||
/>
|
||||
<div :class="{ dialogue: true, empty: messages.length === 0 }">
|
||||
@@ -152,6 +154,9 @@ export default defineComponent({
|
||||
application() {
|
||||
return this.$store.state.chat.application;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.chat.applications;
|
||||
},
|
||||
credential() {
|
||||
return this.$store.state.chat?.credential;
|
||||
},
|
||||
@@ -173,13 +178,6 @@ export default defineComponent({
|
||||
await this.$store.dispatch('chat/setModel', model);
|
||||
}
|
||||
},
|
||||
// async references(val) {
|
||||
// console.log('references changed', val);
|
||||
// const model = await this.getModelByAction();
|
||||
// if (model) {
|
||||
// await this.$store.dispatch('chat/setModel', model);
|
||||
// }
|
||||
// },
|
||||
async isReasonActive(val) {
|
||||
console.log('reason changed', val);
|
||||
const model = await this.getModelByAction();
|
||||
@@ -385,7 +383,10 @@ export default defineComponent({
|
||||
if (this.messages && this.messages.length > 0) {
|
||||
this.messages[this.messages.length - 1].state = IChatMessageState.FAILED;
|
||||
}
|
||||
console.error(error);
|
||||
if (error.name === 'AbortError') {
|
||||
console.error('aborted');
|
||||
return;
|
||||
}
|
||||
if (axios.isCancel(error)) {
|
||||
this.messages[this.messages.length - 1].error = {
|
||||
code: ERROR_CODE_CANCELED
|
||||
@@ -460,6 +461,10 @@ export default defineComponent({
|
||||
if (this.messages && this.messages.length > 0) {
|
||||
this.messages[this.messages.length - 1].state = IChatMessageState.FAILED;
|
||||
}
|
||||
if (error.name === 'AbortError') {
|
||||
console.error('aborted');
|
||||
return;
|
||||
}
|
||||
if (axios.isCancel(error)) {
|
||||
this.messages[this.messages.length - 1].error = {
|
||||
code: ERROR_CODE_CANCELED
|
||||
@@ -469,7 +474,6 @@ export default defineComponent({
|
||||
if (isJSONString(data)) {
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
console.debug('error', data);
|
||||
if (this.messages && this.messages.length > 0) {
|
||||
this.messages[this.messages.length - 1].error = data.error;
|
||||
}
|
||||
@@ -616,6 +620,10 @@ export default defineComponent({
|
||||
if (this.messages && this.messages.length > 0) {
|
||||
this.messages[this.messages.length - 1].state = IChatMessageState.FAILED;
|
||||
}
|
||||
if (error.name === 'AbortError') {
|
||||
console.error('aborted');
|
||||
return;
|
||||
}
|
||||
console.error(error);
|
||||
if (axios.isCancel(error)) {
|
||||
this.messages[this.messages.length - 1].error = {
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('application.field.type')" width="80px">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row?.type === 'Period'" type="success">
|
||||
<el-tag v-if="scope.row?.type === 'Period'" type="success" effect="dark">
|
||||
{{ $t('application.type.period') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="scope.row?.type === 'Usage'" type="primary">
|
||||
<el-tag v-if="scope.row?.type === 'Usage'" effect="dark">
|
||||
{{ $t('application.type.usage') }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
class="mb-4"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('flux/setApplication', $event)"
|
||||
/>
|
||||
<recent-panel class="panel recent" @reach-top="onReachTop" />
|
||||
<!-- <operation-panel class="panel operation" @generate="onGenerate" /> -->
|
||||
@@ -76,6 +78,9 @@ export default defineComponent({
|
||||
application() {
|
||||
return this.$store.state.flux?.application;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.flux?.applications;
|
||||
},
|
||||
tasks() {
|
||||
return this.$store.state.flux?.tasks;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
class="mb-4"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('hailuo/setApplication', $event)"
|
||||
/>
|
||||
<recent-panel class="panel recent" @reach-top="onReachTop" />
|
||||
<!-- <operation-panel class="panel operation" @generate="onGenerate" /> -->
|
||||
@@ -76,6 +78,9 @@ export default defineComponent({
|
||||
application() {
|
||||
return this.$store.state.hailuo.application;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.hailuo.applications;
|
||||
},
|
||||
tasks() {
|
||||
return this.$store.state.hailuo.tasks;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
class="mb-4"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('headshots/setApplication', $event)"
|
||||
/>
|
||||
<recent-panel class="panel recent" @reach-top="onReachTop" />
|
||||
<!-- <operation-panel class="panel operation" @generate="onGenerate" /> -->
|
||||
@@ -76,6 +78,9 @@ export default defineComponent({
|
||||
application() {
|
||||
return this.$store.state.headshots.application;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.headshots.applications;
|
||||
},
|
||||
tasks() {
|
||||
return this.$store.state.headshots.tasks;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
class="mb-4"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('luma/setApplication', $event)"
|
||||
/>
|
||||
<recent-panel class="panel recent" />
|
||||
<!-- <operation-panel class="panel operation" @generate="onGenerate" /> -->
|
||||
@@ -72,6 +74,9 @@ export default defineComponent({
|
||||
},
|
||||
application() {
|
||||
return this.$store.state.luma.application;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.luma.applications;
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('midjourney/setApplication', $event)"
|
||||
/>
|
||||
<task-list @custom="onCustom" @reach-top="onReachTop" />
|
||||
</div>
|
||||
@@ -87,6 +89,9 @@ export default defineComponent({
|
||||
application() {
|
||||
return this.$store.state.midjourney.application;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.midjourney.applications;
|
||||
},
|
||||
finalPrompt(): string {
|
||||
let content = '';
|
||||
if (this.config.references && this.config.references?.length > 0) {
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
class="mb-4"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('pika/setApplication', $event)"
|
||||
/>
|
||||
<recent-panel class="panel recent" @reach-top="onReachTop" />
|
||||
<!-- <operation-panel class="panel operation" @generate="onGenerate" /> -->
|
||||
@@ -76,6 +78,9 @@ export default defineComponent({
|
||||
application() {
|
||||
return this.$store.state.pika.application;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.pika.applications;
|
||||
},
|
||||
tasks() {
|
||||
return this.$store.state.pika.tasks;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
class="mb-4"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('qrart/setApplication', $event)"
|
||||
/>
|
||||
<recent-panel class="panel recent" @reach-top="onReachTop" />
|
||||
</template>
|
||||
@@ -77,6 +79,9 @@ export default defineComponent({
|
||||
},
|
||||
tasks() {
|
||||
return this.$store.state.qrart.tasks;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.qrart.applications;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<application-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
:applications="applications"
|
||||
:service="service"
|
||||
:need-apply="needApply"
|
||||
class="mb-4"
|
||||
@refresh="onGetApplication"
|
||||
@select="$store.dispatch('suno/setApplication', $event)"
|
||||
/>
|
||||
<recent-panel class="panel recent" @reach-top="onReachTop" />
|
||||
</template>
|
||||
@@ -82,6 +84,9 @@ export default defineComponent({
|
||||
},
|
||||
tasks() {
|
||||
return this.$store.state.suno.tasks;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.suno.applications;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in new issue
Block a user