|
24 | 24 | },
|
25 | 25 | {
|
26 | 26 | "cell_type": "code",
|
27 |
| - "execution_count": 1, |
| 27 | + "execution_count": 9, |
28 | 28 | "metadata": {},
|
29 | 29 | "outputs": [
|
30 | 30 | {
|
|
67 | 67 | },
|
68 | 68 | {
|
69 | 69 | "cell_type": "code",
|
70 |
| - "execution_count": 3, |
| 70 | + "execution_count": 10, |
71 | 71 | "metadata": {},
|
72 | 72 | "outputs": [],
|
73 | 73 | "source": [
|
|
91 | 91 | },
|
92 | 92 | {
|
93 | 93 | "cell_type": "code",
|
94 |
| - "execution_count": 5, |
| 94 | + "execution_count": 26, |
95 | 95 | "metadata": {},
|
96 | 96 | "outputs": [
|
97 | 97 | {
|
98 | 98 | "name": "stdout",
|
99 | 99 | "output_type": "stream",
|
100 | 100 | "text": [
|
101 |
| - "Results : [{'connection_id': '73230d9c-403a-457c-8211-34c9cd7acfad', 'created_at': '2020-10-22 03:49:36.705035Z', 'invitation_key': '2cVeFAwPbMHbtbM8A6QNyctgyLFchQtRtJ7P81QLG4ki', 'updated_at': '2020-10-22 03:49:52.677758Z', 'initiator': 'self', 'routing_state': 'none', 'their_label': 'Bob', 'invitation_mode': 'once', 'my_did': 'HepVkkvg1azc6PGbEkrdkD', 'state': 'active', 'their_did': 'BiqPns43A7xJboeC1GqNbu', 'accept': 'manual'}]\n", |
102 |
| - "Connection : {'connection_id': '73230d9c-403a-457c-8211-34c9cd7acfad', 'created_at': '2020-10-22 03:49:36.705035Z', 'invitation_key': '2cVeFAwPbMHbtbM8A6QNyctgyLFchQtRtJ7P81QLG4ki', 'updated_at': '2020-10-22 03:49:52.677758Z', 'initiator': 'self', 'routing_state': 'none', 'their_label': 'Bob', 'invitation_mode': 'once', 'my_did': 'HepVkkvg1azc6PGbEkrdkD', 'state': 'active', 'their_did': 'BiqPns43A7xJboeC1GqNbu', 'accept': 'manual'}\n", |
103 |
| - "Active Connection ID : 73230d9c-403a-457c-8211-34c9cd7acfad\n" |
| 101 | + "Results : [{'connection_id': 'e3fcd9fd-61cd-4c08-a184-9e5aa9601c0e', 'their_label': 'Bob', 'state': 'active', 'their_did': 'GXtAUZQTioTE1mds53Nd6u', 'invitation_mode': 'once', 'created_at': '2020-11-11 23:05:18.072570Z', 'updated_at': '2020-11-11 23:05:38.233456Z', 'initiator': 'external', 'my_did': 'NVYLd8LThRKaFDHURBKf3R', 'invitation_key': 'Gr35rUaqwhfcq6BBsknBCJcr1aug3k339uPRrvjPho2Z', 'request_id': '920642ae-6343-4d89-b821-ad8b8888bce3', 'accept': 'manual', 'routing_state': 'none'}]\n", |
| 102 | + "Connection : {'connection_id': 'e3fcd9fd-61cd-4c08-a184-9e5aa9601c0e', 'their_label': 'Bob', 'state': 'active', 'their_did': 'GXtAUZQTioTE1mds53Nd6u', 'invitation_mode': 'once', 'created_at': '2020-11-11 23:05:18.072570Z', 'updated_at': '2020-11-11 23:05:38.233456Z', 'initiator': 'external', 'my_did': 'NVYLd8LThRKaFDHURBKf3R', 'invitation_key': 'Gr35rUaqwhfcq6BBsknBCJcr1aug3k339uPRrvjPho2Z', 'request_id': '920642ae-6343-4d89-b821-ad8b8888bce3', 'accept': 'manual', 'routing_state': 'none'}\n", |
| 103 | + "Active Connection ID : e3fcd9fd-61cd-4c08-a184-9e5aa9601c0e\n" |
104 | 104 | ]
|
105 | 105 | }
|
106 | 106 | ],
|
|
129 | 129 | },
|
130 | 130 | {
|
131 | 131 | "cell_type": "code",
|
132 |
| - "execution_count": 6, |
| 132 | + "execution_count": 27, |
133 | 133 | "metadata": {},
|
134 | 134 | "outputs": [
|
135 | 135 | {
|
|
138 | 138 | "{}"
|
139 | 139 | ]
|
140 | 140 | },
|
141 |
| - "execution_count": 6, |
| 141 | + "execution_count": 27, |
142 | 142 | "metadata": {},
|
143 | 143 | "output_type": "execute_result"
|
144 | 144 | }
|
|
165 | 165 | },
|
166 | 166 | {
|
167 | 167 | "cell_type": "code",
|
168 |
| - "execution_count": 11, |
| 168 | + "execution_count": 23, |
169 | 169 | "metadata": {},
|
170 |
| - "outputs": [], |
| 170 | + "outputs": [ |
| 171 | + { |
| 172 | + "data": { |
| 173 | + "text/plain": [ |
| 174 | + "{'result': None}" |
| 175 | + ] |
| 176 | + }, |
| 177 | + "execution_count": 23, |
| 178 | + "metadata": {}, |
| 179 | + "output_type": "execute_result" |
| 180 | + } |
| 181 | + ], |
171 | 182 | "source": [
|
172 | 183 | "# retrieve the menu options sent from Bob\n",
|
173 |
| - "menu = await agent_controller.action_menu.get_menu(connection_id)" |
| 184 | + "menu = await agent_controller.action_menu.get_menu(connection_id)\n", |
| 185 | + "menu" |
174 | 186 | ]
|
175 | 187 | },
|
176 | 188 | {
|
177 | 189 | "cell_type": "code",
|
178 |
| - "execution_count": 17, |
| 190 | + "execution_count": 22, |
179 | 191 | "metadata": {},
|
180 | 192 | "outputs": [
|
181 | 193 | {
|
182 |
| - "data": { |
183 |
| - "text/plain": [ |
184 |
| - "[{'name': 'window_prefs',\n", |
185 |
| - " 'title': 'Window Preferences',\n", |
186 |
| - " 'description': 'Window display preferences',\n", |
187 |
| - " 'disabled': False,\n", |
188 |
| - " 'form': {'title': 'Preferences',\n", |
189 |
| - " 'description': 'Window preference settings',\n", |
190 |
| - " 'params': [{'name': 'delay',\n", |
191 |
| - " 'title': 'Delay in seconds',\n", |
192 |
| - " 'type': 'int',\n", |
193 |
| - " 'required': False},\n", |
194 |
| - " {'name': 'visibility',\n", |
195 |
| - " 'title': 'Visibility toggle',\n", |
196 |
| - " 'type': 'boolean',\n", |
197 |
| - " 'required': True}],\n", |
198 |
| - " 'submit-label': 'Send'}}]" |
199 |
| - ] |
200 |
| - }, |
201 |
| - "execution_count": 17, |
202 |
| - "metadata": {}, |
203 |
| - "output_type": "execute_result" |
| 194 | + "ename": "TypeError", |
| 195 | + "evalue": "'NoneType' object is not subscriptable", |
| 196 | + "output_type": "error", |
| 197 | + "traceback": [ |
| 198 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 199 | + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", |
| 200 | + "\u001b[0;32m<ipython-input-22-aa2da0a0ca14>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmenu_options\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmenu\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"result\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"options\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mmenu_options\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
| 201 | + "\u001b[0;31mTypeError\u001b[0m: 'NoneType' object is not subscriptable" |
| 202 | + ] |
204 | 203 | }
|
205 | 204 | ],
|
206 | 205 | "source": [
|
|
210 | 209 | },
|
211 | 210 | {
|
212 | 211 | "cell_type": "code",
|
213 |
| - "execution_count": 19, |
| 212 | + "execution_count": 16, |
214 | 213 | "metadata": {},
|
215 | 214 | "outputs": [
|
216 | 215 | {
|
|
219 | 218 | "{}"
|
220 | 219 | ]
|
221 | 220 | },
|
222 |
| - "execution_count": 19, |
| 221 | + "execution_count": 16, |
223 | 222 | "metadata": {},
|
224 | 223 | "output_type": "execute_result"
|
225 | 224 | }
|
|
238 | 237 | ")"
|
239 | 238 | ]
|
240 | 239 | },
|
| 240 | + { |
| 241 | + "cell_type": "code", |
| 242 | + "execution_count": 20, |
| 243 | + "metadata": { |
| 244 | + "scrolled": true |
| 245 | + }, |
| 246 | + "outputs": [ |
| 247 | + { |
| 248 | + "data": { |
| 249 | + "text/plain": [ |
| 250 | + "{}" |
| 251 | + ] |
| 252 | + }, |
| 253 | + "execution_count": 20, |
| 254 | + "metadata": {}, |
| 255 | + "output_type": "execute_result" |
| 256 | + } |
| 257 | + ], |
| 258 | + "source": [ |
| 259 | + "await agent_controller.action_menu.close_menu(connection_id=connection_id)" |
| 260 | + ] |
| 261 | + }, |
| 262 | + { |
| 263 | + "cell_type": "markdown", |
| 264 | + "metadata": {}, |
| 265 | + "source": [ |
| 266 | + "## 9. Close the active menu\n", |
| 267 | + "\n", |
| 268 | + "Once the requester is done with the action menu, the menu can now be closed." |
| 269 | + ] |
| 270 | + }, |
| 271 | + { |
| 272 | + "cell_type": "code", |
| 273 | + "execution_count": 30, |
| 274 | + "metadata": {}, |
| 275 | + "outputs": [ |
| 276 | + { |
| 277 | + "data": { |
| 278 | + "text/plain": [ |
| 279 | + "{}" |
| 280 | + ] |
| 281 | + }, |
| 282 | + "execution_count": 30, |
| 283 | + "metadata": {}, |
| 284 | + "output_type": "execute_result" |
| 285 | + } |
| 286 | + ], |
| 287 | + "source": [ |
| 288 | + "# close active menu\n", |
| 289 | + "await agent_controller.action_menu.close_menu(connection_id)" |
| 290 | + ] |
| 291 | + }, |
| 292 | + { |
| 293 | + "cell_type": "code", |
| 294 | + "execution_count": 31, |
| 295 | + "metadata": { |
| 296 | + "scrolled": true |
| 297 | + }, |
| 298 | + "outputs": [ |
| 299 | + { |
| 300 | + "data": { |
| 301 | + "text/plain": [ |
| 302 | + "{'result': None}" |
| 303 | + ] |
| 304 | + }, |
| 305 | + "execution_count": 31, |
| 306 | + "metadata": {}, |
| 307 | + "output_type": "execute_result" |
| 308 | + } |
| 309 | + ], |
| 310 | + "source": [ |
| 311 | + "# getting the active menu would return none\n", |
| 312 | + "menu = await agent_controller.action_menu.get_menu(connection_id)\n", |
| 313 | + "menu\n" |
| 314 | + ] |
| 315 | + }, |
241 | 316 | {
|
242 | 317 | "cell_type": "markdown",
|
243 | 318 | "metadata": {},
|
|
0 commit comments