Skip to content

Commit

Permalink
feat: add dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 17, 2024
1 parent 2e46196 commit 4ddb9fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ def initialize(self):
@intent_handler(IntentBuilder('RunScriptCommandIntent')
.require('Script').require('Run'))
def run(self, message):
self.acknowledge()
script = message.data.get('Script')
script = self.alias.get(script, script)
alias = message.data.get('Script')
self.speak_dialog("running", {"alias": alias})
script = self.alias[alias]
LOG.info(f"alias: {alias} | command: {script}")
shell = self.settings.get('shell', True)
args = script.split(' ') if shell else script
try:
Expand Down
1 change: 1 addition & 0 deletions locale/en-us/running.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
running {alias} (command|script)
5 changes: 5 additions & 0 deletions translations/en-us/dialogs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"running.dialog": [
"running {alias} (command|script)"
]
}

0 comments on commit 4ddb9fc

Please sign in to comment.