OpenJelly / Open-Jellycore

A compiler for the Jelly language that allows you to create Apple Shortcuts using Jelly!
https://openjelly.com
GNU General Public License v3.0
72 stars 4 forks source link

magicvariable not used in sendNotification string interpolation #26

Open chrysaora-achlyos opened 1 month ago

chrysaora-achlyos commented 1 month ago

Describe the bug

The following code does not behave as in AppStore Jellycuts import Shortcuts askForInput(prompt: "What is your name?", type: Text, default: "", allowDecimal: false, allowNegative: false) >> userName sendNotification(body: "Hello ${userName}", title: "Meet the Team!", sound: true) In particular, it does not use value of userName. The notification merely says "Hello"

after compiling the code, signing the shortcut, and opening in Shortcuts, there is no vertical line connecting the actions

To Reproduce

Steps to reproduce the behavior:

  1. paste the code above into oj_chat_2.jelly
  2. run the command jelly oj_chat_2.jelly --export --out u_oj_chat_2.shortcut
  3. run the command shortcuts sign --mode anyone --input u_oj_chat_2.shortcut --output oj_chat_2.shortcut
  4. run the command open -a Shortcuts oj_chat_2.shortcut
  5. click the "Add Shortcut" button
  6. click to select the oj_chat_2 Shortcut in Shortcuts
  7. click to open the selected shortcut
  8. run the shortcut with play icon on top right of shortcut
  9. Type in your name
  10. click the "Done" button
  11. click "Allow" button to allow notifications from shortcut
  12. Observe the Notification does not have your name
  13. Observe there is no vertical line between the two actions

Expected behavior

If one type "foo" at the name, the notification should say "Hello foo"

Information

Additional context

This may have the same cause as issue #24

chrysaora-achlyos commented 1 month ago

likely fix in https://github.com/chrysaora-achlyos/Open-Jellycore/commit/ea0675a1bf1fd36350007e17f7b37f89e7ab8ea7 the attachmentsByRange key values were being miscalculated, Need to solve some issues among forks before generating pull request