@@ -193,65 +193,72 @@ const AppPublisher = ({
193
193
)
194
194
}
195
195
</ div >
196
+ {
197
+ ! ( detail ?. mode === 'workflow' || detail ?. mode === null ) && (
198
+ < div >
199
+ < div className = 'p-4 pt-3 border-t-[0.5px] border-t-black/5' >
200
+ < div className = 'h2 mb-2' >
201
+ 智能体中心
202
+ </ div >
203
+ < div className = "relative rounded-md" >
204
+ < SimpleSelect
205
+ defaultValue = { detail ?. agentTypeId || 'all' }
206
+ className = '!w-[300px]'
207
+ placeholder = "请选择类别"
208
+ disabled = { detail ?. agentStatus === 1 }
209
+ onSelect = {
210
+ ( item : any ) => {
211
+ onSelect ( item . value )
212
+ }
213
+ }
214
+ items = { selects && selects . map ( ( item ) => {
215
+ return {
216
+ value : item . id ,
217
+ name : item . name ,
218
+ }
219
+ } ) }
220
+ />
221
+ </ div >
222
+ < div className = 'flex' >
223
+ < Button
224
+ variant = 'primary'
225
+ className = 'w-full mt-3'
226
+ onClick = { ( ) => {
227
+ onAgentAddAndDelete ( 1 )
228
+ } }
229
+ disabled = { detail ?. agentStatus === 1 }
230
+ >
231
+ {
232
+ t ( 'workflow.common.publish' )
233
+ }
234
+ </ Button >
235
+ < Button
236
+ variant = 'warning'
237
+ className = 'w-full mt-3 ml-7'
238
+ onClick = { ( ) => {
239
+ detail . agentStatus = 1
240
+ onAgentAddAndDelete ( 0 )
241
+ } }
242
+ disabled = { ! detail || detail ?. agentStatus === 0 }
243
+ >
244
+ {
245
+ t ( 'workflow.common.delist' )
246
+ }
247
+ </ Button >
248
+ </ div >
249
+ </ div >
250
+ </ div >
251
+ )
252
+ }
196
253
< div className = 'p-4 pt-3 border-t-[0.5px] border-t-black/5' >
197
- < div className = 'h2 mb-2' >
198
- 智能体中心
199
- </ div >
200
- < div className = "relative rounded-md" >
201
- < SimpleSelect
202
- defaultValue = { detail ?. agentTypeId || 'all' }
203
- className = '!w-[300px]'
204
- placeholder = "请选择类别"
205
- disabled = { detail ?. agentStatus === 1 }
206
- onSelect = {
207
- ( item : any ) => {
208
- onSelect ( item . value )
209
- }
210
- }
211
- items = { selects && selects . map ( ( item ) => {
212
- return {
213
- value : item . id ,
214
- name : item . name ,
215
- }
216
- } ) }
217
- />
218
- </ div >
219
- < div className = 'flex' >
220
- < Button
221
- variant = 'primary'
222
- className = 'w-full mt-3'
223
- onClick = { ( ) => {
224
- onAgentAddAndDelete ( 1 )
225
- } }
226
- disabled = { detail ?. agentStatus === 1 }
227
- >
228
- {
229
- t ( 'workflow.common.publish' )
230
- }
231
- </ Button >
232
- < Button
233
- variant = 'warning'
234
- className = 'w-full mt-3 ml-7'
235
- onClick = { ( ) => {
236
- detail . agentStatus = 1
237
- onAgentAddAndDelete ( 0 )
238
- } }
239
- disabled = { ! detail || detail ?. agentStatus === 0 }
240
- >
241
- {
242
- t ( 'workflow.common.delist' )
243
- }
244
- </ Button >
245
- </ div >
246
- </ div >
247
- < div className = 'p-4 pt-3 border-t-[0.5px] border-t-black/5' >
248
- < SuggestedAction disabled = { ! publishedTime } link = { appURL } icon = { < PlayCircle /> } > { t ( 'workflow.common.runApp' ) } </ SuggestedAction >
254
+ < SuggestedAction disabled = { ! publishedTime } link = { appURL }
255
+ icon = { < PlayCircle /> } > { t ( 'workflow.common.runApp' ) } </ SuggestedAction >
249
256
{ appDetail ?. mode === 'workflow'
250
257
? (
251
258
< SuggestedAction
252
259
disabled = { ! publishedTime }
253
260
link = { `${ appURL } ${ appURL . includes ( '?' ) ? '&' : '?' } mode=batch` }
254
- icon = { < LeftIndent02 className = 'w-4 h-4' /> }
261
+ icon = { < LeftIndent02 className = 'w-4 h-4' /> }
255
262
>
256
263
{ t ( 'workflow.common.batchRunApp' ) }
257
264
</ SuggestedAction >
@@ -263,12 +270,13 @@ const AppPublisher = ({
263
270
handleTrigger ( )
264
271
} }
265
272
disabled = { ! publishedTime }
266
- icon = { < CodeBrowser className = 'w-4 h-4' /> }
273
+ icon = { < CodeBrowser className = 'w-4 h-4' /> }
267
274
>
268
275
{ t ( 'workflow.common.embedIntoSite' ) }
269
276
</ SuggestedAction >
270
277
) }
271
- < SuggestedAction disabled = { ! publishedTime } link = './develop' icon = { < FileText className = 'w-4 h-4' /> } > { t ( 'workflow.common.accessAPIReference' ) } </ SuggestedAction >
278
+ < SuggestedAction disabled = { ! publishedTime } link = './develop' icon = { < FileText
279
+ className = 'w-4 h-4' /> } > { t ( 'workflow.common.accessAPIReference' ) } </ SuggestedAction >
272
280
{ appDetail ?. mode === 'workflow' && (
273
281
< WorkflowToolConfigureButton
274
282
disabled = { ! publishedTime }
@@ -296,7 +304,7 @@ const AppPublisher = ({
296
304
appBaseUrl = { appBaseURL }
297
305
accessToken = { accessToken }
298
306
/>
299
- </ PortalToFollowElem >
307
+ </ PortalToFollowElem >
300
308
)
301
309
}
302
310
0 commit comments