From 598f91f5eaa7b359738befa00634a13f40ff0b73 Mon Sep 17 00:00:00 2001 From: "bobo.yang" Date: Mon, 24 Jul 2023 00:11:56 +0800 Subject: [PATCH] Update and add new action settings in workflows - Added new action setting 'finish_task' in auto_command workflow. - Updated the description in 'new_file' action setting in auto_command workflow. - Modified 'run_shell_file' action setting in auto_command workflow to clarify it runs a shell script file. - Added new action settings 'get_project_tree' and 'load_file' in extension_demo workflow. --- .../auto_command/action/finish/_setting_.json | 14 ++++++++++++++ .../action/new_document/_setting_.json | 2 +- .../action/run_shell_file/_setting_.json | 6 +++--- .../action/get_project_tree/_setting_.json | 9 +++++++++ .../action/load_file/_setting_.json | 15 +++++++++++++++ 5 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 workflows/auto_command/action/finish/_setting_.json create mode 100644 workflows/extension_demo/action/get_project_tree/_setting_.json create mode 100644 workflows/extension_demo/action/load_file/_setting_.json diff --git a/workflows/auto_command/action/finish/_setting_.json b/workflows/auto_command/action/finish/_setting_.json new file mode 100644 index 0000000..cd71dcf --- /dev/null +++ b/workflows/auto_command/action/finish/_setting_.json @@ -0,0 +1,14 @@ +{ + "name": "finish_task", + "description": "Flag task as finished", + "type": [ + "task" + ], + "args": [ + ], + "action": "finish_task", + "handler": [ + "echo", + "Task finished" + ] +} \ No newline at end of file diff --git a/workflows/auto_command/action/new_document/_setting_.json b/workflows/auto_command/action/new_document/_setting_.json index 444af33..2e566c3 100644 --- a/workflows/auto_command/action/new_document/_setting_.json +++ b/workflows/auto_command/action/new_document/_setting_.json @@ -1,6 +1,6 @@ { "name": "new_file", - "description": "create new file or replace file with specified content", + "description": "create new file or replace file with new content", "type": [ "*" ], diff --git a/workflows/auto_command/action/run_shell_file/_setting_.json b/workflows/auto_command/action/run_shell_file/_setting_.json index ebb8e64..a91c0d5 100644 --- a/workflows/auto_command/action/run_shell_file/_setting_.json +++ b/workflows/auto_command/action/run_shell_file/_setting_.json @@ -1,12 +1,12 @@ { "name": "run_shell_file", - "description": "run shell script", + "description": "run shell script file", "type": [ "shell" ], "args": [ { - "name": "script", + "name": "script_file", "description": "shell script file to run", "type": "string", "as": "file", @@ -16,6 +16,6 @@ "action": "run_shell", "handler": [ "bash", - "${script}" + "${script_file}" ] } \ No newline at end of file diff --git a/workflows/extension_demo/action/get_project_tree/_setting_.json b/workflows/extension_demo/action/get_project_tree/_setting_.json new file mode 100644 index 0000000..9b833ca --- /dev/null +++ b/workflows/extension_demo/action/get_project_tree/_setting_.json @@ -0,0 +1,9 @@ +{ + "name": "get_project_tree", + "description": "Get project file list", + "type": ["project"], + "action": "get_project_tree", + "args": [ + ], + "handler": ["git", "ls-files"] +} \ No newline at end of file diff --git a/workflows/extension_demo/action/load_file/_setting_.json b/workflows/extension_demo/action/load_file/_setting_.json new file mode 100644 index 0000000..4ad0a3e --- /dev/null +++ b/workflows/extension_demo/action/load_file/_setting_.json @@ -0,0 +1,15 @@ +{ + "name": "load_file", + "description": "Load file content", + "type": ["file"], + "action": "load_file", + "args": [ + { + "name": "fileName", + "description": "Specify the file, which content will be loaded", + "type": "string", + "from": "content.content.fileName" + } + ], + "handler": ["cat", "${fileName}"] +} \ No newline at end of file