44 */
55import { DeploymentConfigurationSectionQuery } from '../__generated__/DeploymentConfigurationSectionQuery.graphql' ;
66import type { DeploymentRevisionDetail_revision$key } from '../__generated__/DeploymentRevisionDetail_revision.graphql' ;
7+ import { useWebUINavigate } from '../hooks' ;
78import DeploymentAddRevisionModal from './DeploymentAddRevisionModal' ;
89import DeploymentRevisionDetail from './DeploymentRevisionDetail' ;
910import DeploymentRevisionDetailDrawer from './DeploymentRevisionDetailDrawer' ;
@@ -38,6 +39,7 @@ import {
3839 useFetchKey ,
3940 useInterval ,
4041} from 'backend.ai-ui' ;
42+ import { BotMessageSquareIcon } from 'lucide-react' ;
4143import { parseAsStringLiteral , useQueryState } from 'nuqs' ;
4244import React , { Suspense , useState , useTransition } from 'react' ;
4345import { useTranslation } from 'react-i18next' ;
@@ -261,6 +263,7 @@ const DeploymentConfigurationCards: React.FC<{
261263 'use memo' ;
262264 const { t } = useTranslation ( ) ;
263265 const { token } = theme . useToken ( ) ;
266+ const webuiNavigate = useWebUINavigate ( ) ;
264267
265268 const [ activeRevisionTab , setActiveRevisionTab ] = useQueryState (
266269 'revisionTab' ,
@@ -291,6 +294,7 @@ const DeploymentConfigurationCards: React.FC<{
291294 name
292295 projectId
293296 domainName
297+ status
294298 projectV2 @since(version: "26.4.3") {
295299 basicInfo {
296300 name
@@ -332,6 +336,7 @@ const DeploymentConfigurationCards: React.FC<{
332336 const deployingRevision = deployment ?. deployingRevision ;
333337 const isDeployingDifferentRevision =
334338 ! ! deployingRevision && deployingRevision . id !== currentRevision ?. id ;
339+ const isDeploymentReady = deployment ?. metadata . status === 'READY' ;
335340
336341 // While a different revision is being applied, poll so the UI moves off
337342 // the "applying" state once the deployment finishes rolling out. We don't
@@ -341,6 +346,30 @@ const DeploymentConfigurationCards: React.FC<{
341346
342347 return (
343348 < >
349+ { isDeploymentReady && (
350+ < Alert
351+ type = "success"
352+ showIcon
353+ title = { t ( 'deployment.DeploymentReady' ) }
354+ description = { t ( 'deployment.DeploymentReadyDescription' ) }
355+ action = {
356+ < Button
357+ type = "primary"
358+ icon = { < BotMessageSquareIcon size = { token . fontSizeLG } /> }
359+ onClick = { ( ) => {
360+ webuiNavigate ( {
361+ pathname : '/chat' ,
362+ search : new URLSearchParams ( {
363+ endpointId : deploymentId ,
364+ } ) . toString ( ) ,
365+ } ) ;
366+ } }
367+ >
368+ { t ( 'deployment.StartChat' ) }
369+ </ Button >
370+ }
371+ />
372+ ) }
344373 { hasNoRevision && (
345374 < Alert
346375 type = "info"
0 commit comments