File tree Expand file tree Collapse file tree
frontend/src/store/modules/product/expert Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ const actions = {
243243 }
244244 } ,
245245
246- hydrateClient ( {
246+ async hydrateClient ( {
247247 dispatch,
248248 state,
249249 rootGetters
@@ -255,10 +255,19 @@ const actions = {
255255 return Promise . resolve ( )
256256 }
257257
258+ // todo this need to be removed when we have https://github.com/FlowFuse/flowfuse/issues/6520 part of
259+ // https://github.com/FlowFuse/flowfuse/issues/6519 as it's a hacky workaround to the expert drawer opening up
260+ // before we have a team loaded
261+ while ( ! rootGetters [ 'account/team' ] ) {
262+ await new Promise ( resolve => setTimeout ( resolve , 1000 ) )
263+ }
264+
258265 return expertApi
259266 . chat ( {
260267 history : state [ state . agentMode ] . context ,
261- context : { } ,
268+ context : {
269+ teamId : rootGetters [ 'account/team' ] . id
270+ } ,
262271 sessionId : state [ state . agentMode ] . sessionId
263272 } )
264273 . then ( ( response ) => {
Original file line number Diff line number Diff line change @@ -55,6 +55,13 @@ const actions = {
5555 commit ( 'SET_SELECTED_CAPABILITIES' , selectedCapabilities )
5656 } ,
5757 async getCapabilities ( { commit, rootGetters, state } ) {
58+ // todo this need to be removed when we have https://github.com/FlowFuse/flowfuse/issues/6520 part of
59+ // https://github.com/FlowFuse/flowfuse/issues/6519 as it's a hacky workaround to the expert drawer opening up
60+ // before we have a team loaded
61+ while ( ! rootGetters [ 'account/team' ] ) {
62+ await new Promise ( resolve => setTimeout ( resolve , 1000 ) )
63+ }
64+
5865 const payload = {
5966 context : {
6067 teamId : rootGetters [ 'account/team' ] . id
You can’t perform that action at this time.
0 commit comments