@@ -23,6 +23,7 @@ import {
2323 waitForPort ,
2424} from '../../operations/dev' ;
2525import { getGatewayEnvVars } from '../../operations/dev/gateway-env.js' ;
26+ import { getMemoryEnvVars } from '../../operations/dev/memory-env.js' ;
2627import { formatMcpToolList } from '../../operations/dev/utils' ;
2728import { spawn } from 'child_process' ;
2829import { useCallback , useEffect , useMemo , useRef , useState } from 'react' ;
@@ -60,6 +61,7 @@ export function useDevServer(options: {
6061 const [ configRoot , setConfigRoot ] = useState < string | undefined > ( undefined ) ;
6162 const [ envVars , setEnvVars ] = useState < Record < string , string > > ( { } ) ;
6263 const [ configLoaded , setConfigLoaded ] = useState ( false ) ;
64+ const [ hasUndeployedMemory , setHasUndeployedMemory ] = useState ( false ) ;
6365 const [ targetPort ] = useState ( options . port ) ;
6466 const [ actualPort , setActualPort ] = useState ( targetPort ) ;
6567 const actualPortRef = useRef ( targetPort ) ;
@@ -105,9 +107,17 @@ export function useDevServer(options: {
105107 if ( root ) {
106108 const vars = await readEnvFile ( root ) ;
107109 const gatewayEnvVars = await getGatewayEnvVars ( ) ;
108- // Gateway env vars go first, .env.local overrides take precedence
109- const mergedEnvVars = { ...gatewayEnvVars , ...vars } ;
110+ const memoryEnvVars = await getMemoryEnvVars ( ) ;
111+ // Deployed-state env vars go first, .env.local overrides take precedence
112+ const mergedEnvVars = { ...gatewayEnvVars , ...memoryEnvVars , ...vars } ;
110113 setEnvVars ( mergedEnvVars ) ;
114+
115+ // Show warning only when some configured memories aren't deployed yet
116+ const configuredMemories = cfg ?. memories ?? [ ] ;
117+ if ( configuredMemories . length > 0 ) {
118+ const deployedCount = Object . keys ( memoryEnvVars ) . length ;
119+ setHasUndeployedMemory ( deployedCount < configuredMemories . length ) ;
120+ }
111121 }
112122
113123 setConfigLoaded ( true ) ;
@@ -529,7 +539,7 @@ export function useDevServer(options: {
529539 restart,
530540 stop,
531541 logFilePath : loggerRef . current ?. getRelativeLogPath ( ) ,
532- hasMemory : ( project ?. memories ?. length ?? 0 ) > 0 ,
542+ hasUndeployedMemory ,
533543 hasVpc : project ?. runtimes . find ( a => a . name === config ?. agentName ) ?. networkMode === 'VPC' ,
534544 protocol,
535545 mcpTools,
0 commit comments