update writer vscode examples

This commit is contained in:
tsuky_chen
2024-02-08 01:40:39 +08:00
parent 8dd62178be
commit 0e07964c63
31 changed files with 235 additions and 94 deletions

View File

@@ -0,0 +1,62 @@
{
"id": "30167b0c-976b-491b-a9e5-7747607c6a3c",
"snapshot": "vscode",
"instruction": "Please help me find the file that contains \"import openai\" in the current VS Code project and open that file.",
"source": "https://download.microsoft.com/download/8/A/4/8A48E46A-C355-4E5C-8417-E6ACD8A207D4/VisualStudioCode-TipsAndTricks-Vol.1.pdf",
"config": [
{
"type": "download",
"parameters": {
"files": [
{
"url": "https://codeload.github.com/onlyphantom/llm-python/zip/refs/heads/main",
"path": "/home/user/Downloads/llm-python-main.zip"
}
]
}
},
{
"type": "execute",
"parameters": {
"command": [
"/bin/bash",
"-c",
"cd /home/user/Downloads && unzip -q llm-python-main.zip"
]
}
},
{
"type": "launch",
"parameters": {
"command": [
"code",
"/home/user/Downloads/llm-python-main/"
]
}
},
{
"type": "activate_window",
"parameters": {
"window_name": "Visual Studio Code"
}
}
],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": {
"func": "check_json_settings",
"expected": {
"type": "rule",
"rules": {
"expect": {}
}
},
"result": {
"type": "vm_file",
"path": "/home/user/.config/Code/User/settings.json",
"dest": "settings.json"
}
}
}

View File

@@ -4,14 +4,6 @@
"instruction": "Please help me save current project as workspace \"project\" at \"/home/user/\".",
"source": "https://www.youtube.com/watch?v=B-s71n0dHUk",
"config": [
{
"type": "launch",
"parameters": {
"command": [
"code"
]
}
},
{
"type": "command",
"parameters": {
@@ -41,6 +33,15 @@
]
}
},
{
"type": "launch",
"parameters": {
"command": [
"code",
"/home/user/project/"
]
}
},
{
"type": "activate_window",
"parameters": {
@@ -58,6 +59,7 @@
"type": "vm_command_line",
"command": [
"ls",
"/home/user/project/",
"|",
"grep",
"project.code-workspace"
@@ -71,4 +73,4 @@
}
}
}
}
}

View File

@@ -4,11 +4,33 @@
"instruction": "Please help me open the autosave feature of VS Code and delay AutoSave operations for 500 milliseconds in the VS Code setting.",
"source": "https://download.microsoft.com/download/8/A/4/8A48E46A-C355-4E5C-8417-E6ACD8A207D4/VisualStudioCode-TipsAndTricks-Vol.1.pdf",
"config": [
{
"type": "download",
"parameters": {
"files": [
{
"url": "https://storage.googleapis.com/drive-bulk-export-anonymous/20240207T164539.876Z/4133399871716478688/90e8000b-16d6-481a-a8eb-de0f4613b6c2/1/c7b78392-6016-4d48-9c04-1110303c47c1?authuser",
"path": "/home/user/Downloads/HW-8-main-20240207T164539Z-001.zip"
}
]
}
},
{
"type": "execute",
"parameters": {
"command": [
"/bin/bash",
"-c",
"cd /home/user/Downloads && unzip -q HW-8-main-20240207T164539Z-001.zip"
]
}
},
{
"type": "launch",
"parameters": {
"command": [
"code"
"code",
"/home/user/Downloads/HW-8-main/"
]
}
},
@@ -40,4 +62,4 @@
"dest": "settings.json"
}
}
}
}

View File

@@ -32,7 +32,7 @@
},
"result": {
"type": "vm_file",
"path": "/home/user/Desktop/history.txt",
"path": "Desktop/history.txt",
"dest": "history.txt"
}
}

View File

@@ -4,11 +4,33 @@
"instruction": "Please help me modify VS Code setting to hide all \"__pycache__\" folders in the explorer view.",
"source": "https://download.microsoft.com/download/8/A/4/8A48E46A-C355-4E5C-8417-E6ACD8A207D4/VisualStudioCode-TipsAndTricks-Vol.1.pdf",
"config": [
{
"type": "download",
"parameters": {
"files": [
{
"url": "https://storage.googleapis.com/drive-bulk-export-anonymous/20240207T140008.374Z/4133399871716478688/c9171ab5-0655-4c8e-aac8-e2cf6705e9f3/1/01132d9e-2db6-4984-a1ae-e1ff9150367b?authuser",
"path": "/home/user/Downloads/hw_python_oop-master.zip"
}
]
}
},
{
"type": "execute",
"parameters": {
"command": [
"/bin/bash",
"-c",
"cd /home/user/Downloads && unzip -q hw_python_oop-master.zip"
]
}
},
{
"type": "launch",
"parameters": {
"command": [
"code"
"code",
"/home/user/Downloads/hw_python_oop-master"
]
}
},
@@ -30,7 +52,7 @@
"rules": {
"expect": {
"files.exclude": {
"**/__pycache__": true
"**/__pycache__": true
}
}
}
@@ -41,4 +63,4 @@
"dest": "settings.json"
}
}
}
}

View File

@@ -18,7 +18,10 @@
{
"type": "launch",
"parameters": {
"command": ["code", "/home/user/Desktop/test.py"]
"command": [
"code",
"/home/user/Desktop/test.py"
]
}
},
{
@@ -33,6 +36,36 @@
"vscode"
],
"evaluator": {
"postconfig": [
{
"type": "activate_window",
"parameters": {
"window_name": "test.py - Visual Studio Code"
}
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
},
{
"type": "execute",
"parameters": {
"command": [
"python",
"-c",
"import pyautogui; import time; pyautogui.hotkey(\"ctrl\", \"s\"); time.sleep(0.5); "
]
}
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
}
],
"func": "compare_text_file",
"expected": {
"type": "cloud_file",
@@ -45,4 +78,4 @@
"dest": "test.py"
}
}
}
}