Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IoT & Dialogue functionality #187

Merged
merged 495 commits into from
Aug 31, 2023
Merged
Changes from 1 commit
Commits
Show all changes
495 commits
Select commit Hold shift + click to select a range
dab6b7b
Moved DSM to Query, large refactoring, needs code cleanup
sultur Jul 6, 2022
a2fc3f4
toggle_play_pause -> toggle_pause & toggle_play
johannkarlsson Jul 7, 2022
00ce0c4
Moved resources to separate file, fixed type hints, other minor refac…
sultur Jul 7, 2022
b3ab17b
setting initial resource in _initialize_resource_graph
KariSt1 Jul 7, 2022
757eec8
Fixed merge conflict
KariSt1 Jul 7, 2022
4efec71
changed name of activate_dialogue and fixed theater imports
sultur Jul 7, 2022
e513c7b
complete grammar to test
hrolfurinn Jul 7, 2022
63703f6
Removed callbacks from theater module
KariSt1 Jul 7, 2022
4b1d7b4
Merge branch 'sonos' into grammar2
hrolfurinn Jul 7, 2022
8f6e6ee
Added TODO to add specific prompt handling in dsm
KariSt1 Jul 7, 2022
822f6ec
refactoring dialogue.py
sultur Jul 7, 2022
29a7827
Fixed datetime bug and removed assert
sultur Jul 7, 2022
49b8396
Added type hints and reset self._dsm before each module
sultur Jul 7, 2022
ef990a8
Renaming methods and constants, added comments
sultur Jul 7, 2022
e4ac0c3
Removing callbacks from fruitseller
KariSt1 Jul 7, 2022
97805f3
Merge branch 'dialogues' of github.com:sultur/Greynir into dialogues
KariSt1 Jul 7, 2022
cb7ad61
Hotfix, only initialize dsm when processor matches nonterminals
sultur Jul 7, 2022
2e1a5ba
Merge branch 'dialogues' of github.com:sultur/Greynir into dialogues
sultur Jul 7, 2022
8b93fc6
Added hotword activation function call in fruitseller
sultur Jul 7, 2022
0b64874
Fixed hotword bug?
sultur Jul 7, 2022
2d06a75
added set_answer into dsm and used that to move some specific prompts…
KariSt1 Jul 7, 2022
776b977
Merge branch 'dialogues' of github.com:sultur/Greynir into dialogues
KariSt1 Jul 7, 2022
91f1274
Some improvements
sultur Jul 7, 2022
3f29806
Changed dsm declarations in a few non-terminal funcs to the new way t…
KariSt1 Jul 7, 2022
76c421c
Fixed hotword nonterminal bug and removed > instead of | in grammar
sultur Jul 7, 2022
35b6118
Merge branch 'dialogues' of github.com:sultur/Greynir into dialogues
sultur Jul 7, 2022
b48bc9d
re-added try-except
sultur Jul 7, 2022
f655f46
Fixed options non terminal funcs to accept specific queries like hvað…
KariSt1 Jul 7, 2022
6ef78c1
grammar complete for initial command set
hrolfurinn Jul 7, 2022
a947620
Merge pull request #44 from sultur/grammar2
hrolfurinn Jul 7, 2022
6f2f69a
SmartThings connect process probably useless :(
johannkarlsson Jul 7, 2022
2a99a74
Merge branch 'sonos' of https://github.com/sultur/Greynir into sonos
johannkarlsson Jul 7, 2022
ddc37d3
Removed commented out code in answering funcs in theater
KariSt1 Jul 8, 2022
9bff57b
sentence refactor iot_speakers
hrolfurinn Jul 8, 2022
845174c
Created _add_available_rows_to_result since the functionality was bei…
KariSt1 Jul 8, 2022
c1eb833
added simple price and length queries to theater
sultur Jul 8, 2022
7208c82
merged, added to grammar
sultur Jul 8, 2022
5fc4cc4
Sonos store last radio url
johannkarlsson Jul 8, 2022
4d93495
Fixed chosen row not being accepted if it was correct
KariSt1 Jul 8, 2022
d73dc29
Added fast forward and rewind grammar
hrolfurinn Jul 8, 2022
6e75068
Merge branch 'grammar3' of github.com:sultur/Greynir into grammar3
hrolfurinn Jul 8, 2022
deb0ec8
Next prev song in iot_speakers
johannkarlsson Jul 8, 2022
eaa2e45
minor fixes
hrolfurinn Jul 8, 2022
afec05c
Next and prev song functionality in sonos client
johannkarlsson Jul 8, 2022
215ee98
Merge branch 'grammar3' of https://github.com/sultur/Greynir into gra…
johannkarlsson Jul 8, 2022
69aa7d7
moved banwords into sentence again
hrolfurinn Jul 8, 2022
8b2088e
Added timed_out functionality for dialogues
KariSt1 Jul 8, 2022
fcf5a54
client data for dialogue resets after dialogue timing out
KariSt1 Jul 11, 2022
649b403
Expiration time can now be added to toml files, default is 30 minutes
KariSt1 Jul 11, 2022
077ccbc
Merge branch 'sonos' into grammar3
johannkarlsson Jul 11, 2022
0e7dbd3
Removed max_items from theater.toml and ListResource
KariSt1 Jul 11, 2022
e655d8d
Merge pull request #45 from sultur/grammar3
johannkarlsson Jul 11, 2022
f18487d
Removed timed_out TODOs
KariSt1 Jul 11, 2022
ff592b7
Spotify connect process saving to DB and refresh token
johannkarlsson Jul 11, 2022
a677b21
Initial banned nonterminal functionality, should be made better
KariSt1 Jul 13, 2022
5985e2d
changed adding non_terminals to update
KariSt1 Jul 13, 2022
a61d55e
Basic spotify functionality for playing a song working
johannkarlsson Jul 14, 2022
45cb543
Merge pull request #46 from sultur/spotify
johannkarlsson Jul 14, 2022
caae3d1
"query" changed to "target" in set_lights.js
johannkarlsson Jul 14, 2022
264bf47
Merge pull request #47 from sultur/iot_hue_name_change
johannkarlsson Jul 14, 2022
c2ee415
initial singleton dsm implementation
KariSt1 Jul 15, 2022
458ceca
hue scene bug fix, color temp grammar for tradfri and spotify device …
johannkarlsson Jul 19, 2022
d2e22d7
First pizza convo implementation, dynamic resources for pizzas added
KariSt1 Jul 19, 2022
0d95fab
Start of answering func for pizza
KariSt1 Jul 20, 2022
d5e623f
Changed toml structure, made Sides, Sauces and Drinks be dynamic_reso…
KariSt1 Jul 20, 2022
2fffbb0
pizza grammar start
hrolfurinn Jul 20, 2022
22e3e7d
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 20, 2022
b7b4abd
fix arrow
hrolfurinn Jul 20, 2022
bbaadd6
pizza fixes
hrolfurinn Jul 20, 2022
10c0244
Added QPizzaToppingsAnswer func, no code yet
KariSt1 Jul 20, 2022
efea4f2
Initial functionality for toppings
KariSt1 Jul 20, 2022
446420a
Toppings now added to result dictionary
KariSt1 Jul 20, 2022
1a5e8bf
grammar size addition
hrolfurinn Jul 20, 2022
5384963
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 20, 2022
8df7f4e
Changing how initial resource gets set, still has to be fixed
KariSt1 Jul 20, 2022
f784dfd
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 20, 2022
2107465
postorder find_current_resource
sultur Jul 20, 2022
48e4794
fixes to find_current_resource
sultur Jul 20, 2022
f9fe459
Toppings can now be added to pizzas
KariSt1 Jul 20, 2022
ab41650
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 20, 2022
ddc7d9c
crust grammar
hrolfurinn Jul 20, 2022
08fe9ef
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 20, 2022
7c01818
added nonterminal function template
hrolfurinn Jul 20, 2022
c47bf24
prettification
sultur Jul 20, 2022
5c57e0b
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
sultur Jul 20, 2022
29c1fc1
Added update_wrapper_state method to dsm
KariSt1 Jul 20, 2022
27f7be3
Moved grammar to specific grammar files for theater and fruitseller
KariSt1 Jul 20, 2022
11e16b0
Pizza size and crust functionality
KariSt1 Jul 20, 2022
7e6936a
Made af pizzu optional in QPizzaSizeAnswer
KariSt1 Jul 20, 2022
2b3c882
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 20, 2022
7977b95
menu and sides grammar
hrolfurinn Jul 20, 2022
e6ce231
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 20, 2022
e5a6988
get_descendants
sultur Jul 21, 2022
faa2b55
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
sultur Jul 21, 2022
14dac19
added get_ancestors function and comments
sultur Jul 21, 2022
a00041e
Moved size functionality to one function
KariSt1 Jul 21, 2022
19b03bd
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 21, 2022
bcaddf3
composite order
hrolfurinn Jul 21, 2022
626e600
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 21, 2022
1f4eaea
removed singleton, made wrappers prefer_over_wrapper by default
sultur Jul 21, 2022
41c0e8a
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
sultur Jul 21, 2022
a97ee86
Type resource now has prefer_over_wrapper as false
KariSt1 Jul 21, 2022
ab642f7
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 21, 2022
28c2906
cancel order and status functionality
hrolfurinn Jul 21, 2022
aa85839
trying new compound word structure
hrolfurinn Jul 21, 2022
1e2e36e
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 21, 2022
8d75d84
fixed prefer_over_wrapper bug
sultur Jul 21, 2022
4c1d06c
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
sultur Jul 21, 2022
36b74a5
fixed composites and toppings
hrolfurinn Jul 21, 2022
b0fdabc
Confirmation when pizzas added to order
KariSt1 Jul 21, 2022
59ff3c9
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 21, 2022
f8b09f8
Scene bug fixed & hue grammar updated
johannkarlsson Jul 21, 2022
79b205e
added nominative composite order
hrolfurinn Jul 21, 2022
274cad7
Added handling for pizza menu items
KariSt1 Jul 21, 2022
0402e99
optional to specify pizza number
hrolfurinn Jul 21, 2022
2b97d63
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 21, 2022
9b97377
name fix
hrolfurinn Jul 21, 2022
ed5e17e
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 21, 2022
992b6e9
added comments
sultur Jul 21, 2022
2dea0e3
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
sultur Jul 21, 2022
b125714
fixed _find_current_resource bug and added finished set
sultur Jul 21, 2022
44a3b6c
skítamix
hrolfurinn Jul 21, 2022
8037094
Grammar changes to help with pizza hotword
KariSt1 Jul 21, 2022
f68bf76
made QPizzaWord optional in QPizzaToppingAnswer grammar
KariSt1 Jul 21, 2022
419f7ab
grammar fix
hrolfurinn Jul 22, 2022
b96965c
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 22, 2022
a503035
composite fix
hrolfurinn Jul 22, 2022
cb5a15b
Added pizza description to text answer
KariSt1 Jul 22, 2022
0f7c8b0
grammar fix
hrolfurinn Jul 22, 2022
ad200a6
Merge
KariSt1 Jul 22, 2022
847f101
Merge
KariSt1 Jul 22, 2022
112bb6a
Start of being able to add a number of pizzas right from the start
KariSt1 Jul 22, 2022
712316c
minor grammar fixes
hrolfurinn Jul 22, 2022
47c0246
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 22, 2022
23b4534
Changed DSM to save the current resource when you call find_current_r…
KariSt1 Jul 22, 2022
59ee86a
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 22, 2022
4fe227c
added multiple pizzas
hrolfurinn Jul 22, 2022
c2a1926
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 22, 2022
daf84af
Status now works for pizzas
KariSt1 Jul 22, 2022
28df12b
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 22, 2022
35b8ce9
You can now finish the pizza dialogue
KariSt1 Jul 22, 2022
dcb26e4
added duplicate dynamic resource function
sultur Jul 22, 2022
726d0af
fixed bug
sultur Jul 22, 2022
78f2692
fixed bug again
sultur Jul 22, 2022
8f2c70c
Started working on duplication, broken
KariSt1 Jul 22, 2022
eba1f1c
.
hrolfurinn Jul 23, 2022
e9813cf
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 25, 2022
81bd37d
fix attempt
hrolfurinn Jul 25, 2022
b705700
Adding multiple pizzas works now
KariSt1 Jul 25, 2022
91d55da
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
KariSt1 Jul 25, 2022
400721a
undo
hrolfurinn Jul 25, 2022
cbea967
Merge branch 'pizza' of github.com:sultur/Greynir into pizza
hrolfurinn Jul 25, 2022
7abf12e
Adding multiple pizzas moved to wrapper and in correct order now
KariSt1 Jul 25, 2022
67ad184
Handling multiple pizzas with eina pítsu með ... now works. Still som…
KariSt1 Jul 25, 2022
875bd8e
Spotify new plaintext module
johannkarlsson Jul 26, 2022
a72d8e4
Spotify devices bug fix
johannkarlsson Jul 27, 2022
a5e3606
Added documentation to pizza.py
KariSt1 Jul 29, 2022
451fb1b
Sonos session fix
johannkarlsson Aug 5, 2022
0fc2f0f
New spotify search fix
johannkarlsson Aug 5, 2022
8b568c0
spotify print exclude
johannkarlsson Aug 5, 2022
b654aae
Changed Hver er staðan. to Hver er staðan?
KariSt1 Aug 5, 2022
cb5560b
New data structure for iot devices
johannkarlsson Aug 9, 2022
6292289
Start of HTML views for iot
KariSt1 Aug 9, 2022
318ed17
Merge conflict
KariSt1 Aug 9, 2022
beb37f7
added delete_iot_data function that deletes a connection from the iot…
KariSt1 Aug 10, 2022
9577766
added routes to delete iot data and get iot data
KariSt1 Aug 10, 2022
8c24356
Fixed bug where empty client_data would cause errors when rendering t…
KariSt1 Aug 10, 2022
a4471ef
Added javascript functionality to the disconnect device button
KariSt1 Aug 10, 2022
9608993
Added html web view for hue connection process
KariSt1 Aug 10, 2022
43a1f56
added get_supported_iot_connections api point. It reads a toml file a…
KariSt1 Aug 10, 2022
8c6f040
Command instructions added to html instructions files
johannkarlsson Aug 11, 2022
e2704ec
Flutter connection in javascript
KariSt1 Aug 11, 2022
d4e73e3
Merge branch 'iot' of github.com:sultur/Greynir into iot
KariSt1 Aug 11, 2022
d0deac8
html instruction fix
johannkarlsson Aug 11, 2022
7d3712d
Merge branch 'iot' of https://github.com/sultur/Greynir into iot
johannkarlsson Aug 11, 2022
1ee3151
Size of headers in html instructions edited
johannkarlsson Aug 11, 2022
e80a68c
HTML now uses toml variables to display info about connections
KariSt1 Aug 11, 2022
d9113b8
Merge branch 'iot' of github.com:sultur/Greynir into iot
KariSt1 Aug 11, 2022
1f1a98e
Added spotify connection and api key to toml
KariSt1 Aug 12, 2022
cfeed9e
Added handling for if there is no iot data
KariSt1 Aug 12, 2022
42fd012
Added styling for h5 and h2-subsection
KariSt1 Aug 12, 2022
9d447fc
Added more styling
KariSt1 Aug 12, 2022
37f353d
Html connection fluff text
johannkarlsson Aug 12, 2022
d951fa5
Merge branch 'iot' of https://github.com/sultur/Greynir into iot
johannkarlsson Aug 12, 2022
b134321
html class name fix
johannkarlsson Aug 12, 2022
39a370b
HTML drop shadow and " fix
johannkarlsson Aug 12, 2022
0ce5db2
Connection html now redirect to login pages for sonos and spotify
KariSt1 Aug 12, 2022
9e7dab5
Merge conflict fixed#
KariSt1 Aug 12, 2022
bb64aad
"aftengja" button drop shadow fix
johannkarlsson Aug 12, 2022
d066451
Html connection button style update
johannkarlsson Aug 12, 2022
946b06a
HTML button styling
johannkarlsson Aug 12, 2022
48f28ef
Iot connection success html
KariSt1 Aug 12, 2022
7e9b2c4
Merge branch 'iot' of github.com:sultur/Greynir into iot
KariSt1 Aug 12, 2022
e06cb97
Connect success template rendered for iot success
KariSt1 Aug 12, 2022
a04954e
Button ripple effect css, philips hue now goes to successful page aft…
KariSt1 Aug 15, 2022
94e52d8
Error page now shown if connection failed
KariSt1 Aug 16, 2022
b59c7fc
Error handling for too many requests and general hub errors
KariSt1 Aug 16, 2022
f2de94d
Removed commented out code
KariSt1 Aug 17, 2022
428b248
Added dark mode and made mdns search use ip instead of findHub
KariSt1 Aug 17, 2022
87c476f
Added darkmode
KariSt1 Aug 17, 2022
1e1c691
Added darkmode
KariSt1 Aug 17, 2022
0a8dd85
Added darkmode
KariSt1 Aug 17, 2022
e199d14
Added darkmode css for iot in Embla
KariSt1 Aug 17, 2022
73976e8
Unlooped checkmark gif, fixed h1 in connection htmls to have padding
KariSt1 Aug 17, 2022
dcca7b1
Fixed philips hue connection process obj being undefined
KariSt1 Aug 17, 2022
a97a955
Fixed error page displaying for spotify when successfully connected
KariSt1 Aug 17, 2022
f8206b2
needs_confirmation added to toml and dialogue, still needs to be adde…
KariSt1 Aug 22, 2022
bb4d7a1
Fixed theater module date selection not working. Also temporarily rem…
KariSt1 Aug 22, 2022
7ae7c92
Model for dialoguedata
KariSt1 Aug 22, 2022
59d2b4a
Added dialogue_key as a part of the primary key for the dialoguedata …
KariSt1 Aug 23, 2022
44db60a
Added banned_nonterminals back in
KariSt1 Aug 23, 2022
4678ed4
Added handling for the dialoguedata table in the database. Now the cu…
KariSt1 Aug 23, 2022
36c7e97
Fixed cancelling an order not displaying the correct answer
KariSt1 Aug 23, 2022
807fea3
Banned all nonterminals except the hotwords if not in the pizza dialogue
KariSt1 Aug 23, 2022
f4e5d7b
Fixed bug where you could not switch between existing conversations
KariSt1 Aug 23, 2022
52e3cb1
Fixed template text
KariSt1 Aug 24, 2022
baa7e8d
Added colors (now use xy coordinates), fixed output from set_lights (…
sultur Aug 25, 2022
50934fc
Spotify album functionality & type hinting and cleanup for spotify an…
johannkarlsson Aug 31, 2022
55de622
Merge branch 'iot' into spotify_album_playlist
johannkarlsson Aug 31, 2022
b3e5d35
More type hinting
johannkarlsson Aug 31, 2022
ad59336
Merge pull request #48 from sultur/spotify_album_playlist
johannkarlsson Aug 31, 2022
99f8b77
Reload server upon grammar changes (uses pathlib)
sultur Sep 7, 2022
ecad8af
re-add disabled query modules
sultur Sep 7, 2022
225dc03
Merge pull request #49 from sultur/iot
sultur Sep 8, 2022
0748ca4
Cleaning up files and folders
sultur Sep 8, 2022
8d9f95b
More cleanup, hopefully sonos/st js isn't used
sultur Sep 8, 2022
708a884
Merge branch 'master' into pizza
sultur Sep 13, 2022
aacecd3
Merge pull request #50 from sultur/pizza
sultur Sep 13, 2022
3474a37
Merge remote-tracking branch 'upstream/master'
sultur Sep 13, 2022
ef62bd9
Moving reducer into query.py, working on sonos
sultur Sep 14, 2022
1fdc78e
More cleanup, rearranged folders
sultur Sep 16, 2022
8172e1d
QueryReducer, banned_nonterminals
sultur Sep 19, 2022
6930644
QueryReducer complete
sultur Sep 20, 2022
03576e1
Use pathlib, more succint
sultur Sep 20, 2022
57c2c61
Merge remote-tracking branch 'upstream/master'
sultur Sep 20, 2022
b9ef96a
Fix QueryStateDict->ParamList type error in query modules
sultur Sep 20, 2022
662f8a8
working on improved serialization of dialogue data
sultur Sep 22, 2022
9b9b363
cleanup
sultur Sep 22, 2022
5042c00
Large fixes to DSM inner functionality and usage in query.py
sultur Sep 23, 2022
3825353
Removed comment
sultur Sep 25, 2022
c95c7f2
Refactoring Hue and Sonos functionality
sultur Sep 28, 2022
18e2acd
Preparing for visindavaka
sultur Sep 29, 2022
99a0416
Small fixes before demo
sultur Sep 30, 2022
373228c
Disabled spotify module, refactoring sonos class
sultur Oct 7, 2022
f2e2f7e
Improved iot modules, js, grammar_gen. Added tests
sultur Oct 13, 2022
d1e6db3
improved grammar_generator (depends on binpackage PRs)
sultur Oct 21, 2022
c7f0836
Working on speaker grammar, modifications to grammar_gen
sultur Oct 28, 2022
e341a4b
Merge remote-tracking branch 'upstream/master'
sultur Oct 28, 2022
baba816
Grammar refactoring, temp. disabled dialogue modules
sultur Dec 14, 2022
3b35f1d
Merge remote-tracking branch 'upstream/master'
KariSt1 Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed dsm declarations in a few non-terminal funcs to the new way t…
…o get them from query
KariSt1 committed Jul 7, 2022
commit 3f298065aa57b8a7f1c4497be42385436ac9188b
12 changes: 6 additions & 6 deletions queries/theater.py
Original file line number Diff line number Diff line change
@@ -1040,7 +1040,7 @@ def QTheaterShowSeats(node: Node, params: QueryStateDict, result: Result) -> Non

def QTheaterGeneralOptions(node: Node, params: QueryStateDict, result: Result) -> None:
# result.options_info = True
dsm: DialogueStateManager = cast(QueryStateDict, result.state)["query"].dsm
dsm: DialogueStateManager = Query.get_dsm(result)
resource = dsm.current_resource
if resource.name == "Show":
QTheaterShowOptions(node, params, result)
@@ -1054,7 +1054,7 @@ def QTheaterGeneralOptions(node: Node, params: QueryStateDict, result: Result) -

def QTheaterShowOptions(node: Node, params: QueryStateDict, result: Result) -> None:
# result.show_options = True
dsm: DialogueStateManager = cast(QueryStateDict, result.state)["query"].dsm
dsm: DialogueStateManager = Query.get_dsm(result)
resource = dsm.current_resource
if resource.name == "Show":
shows: list[str] = []
@@ -1070,7 +1070,7 @@ def QTheaterShowOptions(node: Node, params: QueryStateDict, result: Result) -> N

def QTheaterDateOptions(node: Node, params: QueryStateDict, result: Result) -> None:
# result.date_options = True
dsm: DialogueStateManager = cast(QueryStateDict, result.state)["query"].dsm
dsm: DialogueStateManager = Query.get_dsm(result)
resource = dsm.current_resource
if resource.name == "ShowDateTime":
title = dsm.get_resource("Show").data[0]
@@ -1137,7 +1137,7 @@ def QTheaterDateOptions(node: Node, params: QueryStateDict, result: Result) -> N

def QTheaterRowOptions(node: Node, params: QueryStateDict, result: Result) -> None:
# result.row_options = True
dsm: DialogueStateManager = cast(QueryStateDict, result.state)["query"].dsm
dsm: DialogueStateManager = Query.get_dsm(result)
resource = dsm.current_resource
if resource.name == "ShowSeatRow":
title: str = dsm.get_resource("Show").data[0]
@@ -1174,7 +1174,7 @@ def QTheaterRowOptions(node: Node, params: QueryStateDict, result: Result) -> No

def QTheaterSeatOptions(node: Node, params: QueryStateDict, result: Result) -> None:
result.seat_options = True
dsm: DialogueStateManager = cast(QueryStateDict, result.state)["query"].dsm
dsm: DialogueStateManager = Query.get_dsm(result)
resource = dsm.current_resource
if resource.name == "ShowSeatNumber":
title: str = dsm.get_resource("Show").data[0]
@@ -1271,7 +1271,7 @@ def QTheaterNo(node: Node, params: QueryStateDict, result: Result):
def QTheaterStatus(node: Node, params: QueryStateDict, result: Result):
# TODO: Handle QTheaterStatus again with dsm in query
result.qtype = "QTheaterStatus"
dsm: DialogueStateManager = cast(QueryStateDict, result.state)["query"].dsm
dsm: DialogueStateManager = Query.get_dsm(result)
dsm.set_answer(
gen_answer(
"Leikhúsmiðapöntunin þín gengur bara vel. {0}".format(