|
3 | 3 | * Copyright FINOS FDC3 contributors - see NOTICE file |
4 | 4 | */ |
5 | 5 | import { makeObservable, observable, action, runInAction, toJS } from 'mobx'; |
6 | | -import { ContextType, IntentResolution, Fdc3Listener, AppMetadata, PrivateChannel } from '../utility/Fdc3Api'; |
| 6 | +import { |
| 7 | + ContextType, |
| 8 | + IntentResolution, |
| 9 | + Fdc3Listener, |
| 10 | + AppMetadata, |
| 11 | + PrivateChannel, |
| 12 | + getWorkbenchAgent, |
| 13 | +} from '../utility/Fdc3Api'; |
7 | 14 | import { nanoid } from 'nanoid'; |
8 | 15 | import { intentTypes } from '../fixtures/intentTypes'; |
9 | 16 | import systemLogStore from './SystemLogStore'; |
10 | 17 | import appChannelStore from './AppChannelStore'; |
11 | 18 | import privateChannelStore from './PrivateChannelStore'; |
12 | | -import { Channel, getAgent, IntentResult } from '@finos/fdc3'; |
| 19 | +import { Channel, IntentResult } from '@finos/fdc3'; |
13 | 20 |
|
14 | 21 | type IntentItem = { title: string; value: string }; |
15 | 22 |
|
@@ -40,7 +47,7 @@ class IntentStore { |
40 | 47 | try { |
41 | 48 | const listenerId = nanoid(); |
42 | 49 |
|
43 | | - const agent = await getAgent(); |
| 50 | + const agent = await getWorkbenchAgent(); |
44 | 51 |
|
45 | 52 | const intentListener = await agent.addIntentListener( |
46 | 53 | intent, |
@@ -146,7 +153,7 @@ class IntentStore { |
146 | 153 | } |
147 | 154 |
|
148 | 155 | async raiseIntent(intent: string, context: ContextType, app?: AppMetadata) { |
149 | | - const agent = await getAgent(); |
| 156 | + const agent = await getWorkbenchAgent(); |
150 | 157 |
|
151 | 158 | if (!context) { |
152 | 159 | systemLogStore.addLog({ |
@@ -187,7 +194,7 @@ class IntentStore { |
187 | 194 | } |
188 | 195 |
|
189 | 196 | async raiseIntentForContext(context: ContextType, app?: AppMetadata) { |
190 | | - const agent = await getAgent(); |
| 197 | + const agent = await getWorkbenchAgent(); |
191 | 198 |
|
192 | 199 | if (!context) { |
193 | 200 | systemLogStore.addLog({ |
|
0 commit comments