Skip to content

Commit ce1a28f

Browse files
authored
Merge branch 'main' into fix-include-after-comment
2 parents a266b20 + 186b8e7 commit ce1a28f

File tree

2 files changed

+3
-42
lines changed

2 files changed

+3
-42
lines changed

actions/shortcuts.cherri

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ enum shortcutDetail {
2020
#define action v16.4 'com.apple.shortcuts.SearchShortcutsAction' searchShortcuts(text query: 'searchPhrase')
2121

2222
#define action v16.4 'com.apple.shortcuts.CreateWorkflowAction' makeShortcut(text name, bool ?open: 'OpenWhenRun' = true)
23+
24+
// [Doc]: Run Shortcut: Run Shortcut with name shortcutName, providing it with output.
25+
#define action 'runworkflow' run(text shortcutName: 'WFWorkflowName', variable output: 'WFInput')

actions_std.go

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,48 +1478,6 @@ var actions = map[string]*actionDefinition{
14781478
return
14791479
},
14801480
},
1481-
"run": {
1482-
identifier: "runworkflow",
1483-
defaultAction: true,
1484-
parameters: []parameterDefinition{
1485-
{
1486-
name: "shortcutName",
1487-
validType: String,
1488-
},
1489-
{
1490-
name: "output",
1491-
validType: Variable,
1492-
key: "WFInput",
1493-
optional: true,
1494-
},
1495-
},
1496-
addParams: func(args []actionArgument) map[string]any {
1497-
if len(args) == 0 {
1498-
return map[string]any{
1499-
"isSelf": false,
1500-
}
1501-
}
1502-
1503-
return map[string]any{
1504-
"WFWorkflow": map[string]any{
1505-
"workflowIdentifier": uuid.New().String(),
1506-
"isSelf": false,
1507-
"workflowName": argumentValue(args, 0),
1508-
},
1509-
}
1510-
},
1511-
decomp: func(action *ShortcutAction) (arguments []string) {
1512-
var workflow = action.WFWorkflowActionParameters["WFWorkflow"].(map[string]any)
1513-
if workflow["isSelf"] != nil && !workflow["isSelf"].(bool) {
1514-
arguments = append(arguments, decompValue(workflow["workflowName"]))
1515-
}
1516-
if action.WFWorkflowActionParameters["WFInput"] != nil {
1517-
arguments = append(arguments, decompValue(action.WFWorkflowActionParameters["WFInput"]))
1518-
}
1519-
1520-
return
1521-
},
1522-
},
15231481
"list": {
15241482
parameters: []parameterDefinition{
15251483
{

0 commit comments

Comments
 (0)