Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
48c885d
Add prettier
yassine-cc Mar 27, 2025
f9bb47e
Add extension init command
yassine-cc Mar 27, 2025
6b812c9
Initial working prototype
yassine-cc Apr 4, 2025
425f744
Debug testdriverai
yassine-cc Apr 4, 2025
a2afd1f
Fix typo
yassine-cc Apr 4, 2025
57588fe
Add tests related output and handle null exit code
yassine-cc Apr 4, 2025
4ee2976
emit show:vm event
yassine-cc Apr 4, 2025
9b97488
Merge branch 'yassine/v1' of github.com:testdriverai/vscode into yass…
yassine-cc Apr 4, 2025
8662d66
respond to global chat
ianjennings Apr 4, 2025
23cd524
Merge branch 'yassine/v1' of github.com:testdriverai/vscode into yass…
ianjennings Apr 4, 2025
086e78f
Add test output to the output terminal
yassine-cc Apr 4, 2025
102b366
Remove duplicate debug output
yassine-cc Apr 4, 2025
c436038
drastically improve testdriverai
ianjennings Apr 4, 2025
20457e3
Merge branch 'yassine/v1' of github.com:testdriverai/vscode into yass…
ianjennings Apr 4, 2025
d19bc2f
Prompt the user again if empty input
yassine-cc Apr 8, 2025
18798ad
Add markdown parsing and run buttons to normal testdriver chatbot
yassine-cc Apr 9, 2025
a1ba7dc
Improve the reliability of command running in long running instances
yassine-cc Apr 9, 2025
5f6f1de
Ensure the overlay works by launching it from the terminal
yassine-cc Apr 9, 2025
31dad34
Make a single shared chat cli instance and ensure proper use of the …
yassine-cc Apr 9, 2025
7b7ecc9
Merge branch 'yassine/v1' of github.com:testdriverai/vscode into yass…
yassine-cc Apr 9, 2025
252f537
Fix issue
yassine-cc Apr 9, 2025
c6cc767
add status updates, keep single chat instance
ianjennings Apr 9, 2025
d9b340d
working
ianjennings Apr 10, 2025
c90709b
Remove unused dependencies
yassine-cc Apr 11, 2025
38973ec
Add proper typing for the status event
yassine-cc Apr 11, 2025
cd0a101
update to latest action format
Apr 11, 2025
114ed0f
DRY
yassine-cc Apr 11, 2025
95b1bab
Merge branch 'yassine/v1' of github.com:testdriverai/vscode into yass…
yassine-cc Apr 11, 2025
3683834
Add running tests through the gutter buttons
yassine-cc Apr 11, 2025
d685e20
Adjust steps order
yassine-cc Apr 11, 2025
b127dc6
fix eslint, types, attempt to add walkthrough
ianjennings Apr 13, 2025
3f64b2e
we're gonna be rich
ianjennings Apr 13, 2025
670281f
resolve merge
ianjennings Apr 13, 2025
2022870
revert partial running
ianjennings Apr 13, 2025
9d52dab
seems stable
ianjennings Apr 13, 2025
f6f2a51
save point
ianjennings Apr 14, 2025
b12b454
we got it
ianjennings Apr 14, 2025
0881fc2
guide updates
ianjennings Apr 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/testdriver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: TestDriver.ai

on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:

jobs:
test:
name: "TestDriver"
runs-on: ubuntu-latest
steps:
- uses: testdriverai/action@main
with:
key: ${{secrets.TESTDRIVER_API_KEY}}
prompt: |
1. /run testdriver/testdriver.yml
prerun: |
cd $env:TEMP
npm init -y
npm install dashcam-chrome
Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "${{ env.WEBSITE_URL }}"
exit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORCE_COLOR: "3"
WEBSITE_URL: "https://example.com" # Define the website URL here
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"singleQuote": true,
"useTabs": false,
"printWidth": 80,
"arrowParens": "always",
"trailingComma": "all",
"tabWidth": 2,
"semi": true
}
55 changes: 26 additions & 29 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,30 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
"version": "0.2.0",
"configurations": [

{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
}
14 changes: 6 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"search.exclude": {
"out": true
},
"git.branchProtection": [
"main"
],
"files.trimTrailingWhitespace": true
}
"search.exclude": {
"out": true
},
"git.branchProtection": ["main"],
"files.trimTrailingWhitespace": true
}
69 changes: 33 additions & 36 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": [
"npm: watch",
"npm: watch-tests"
],
"problemMatcher": []
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": ["npm: watch", "npm: watch-tests"],
"problemMatcher": []
}
]
}
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ This GitHub Copilot Extension sample shows:
![demo](./demo.png)

Documentation can be found here:

- https://code.visualstudio.com/api/extension-guides/cha
- https://code.visualstudio.com/api/extension-guides/language-model

## Running the Sample

- Run `npm install` in terminal to install dependencies
- Run the `Run Extension` target in the Debug View. This will:
- Start a task `npm: watch` to compile the code
- Run the extension in a new VS Code window
- You will see the @cat chat participant show in the GitHub Copilot Chat view
- Start a task `npm: watch` to compile the code
- Run the extension in a new VS Code window
- You will see the @cat chat participant show in the GitHub Copilot Chat view

## About this sample

Expand All @@ -34,4 +35,5 @@ This sample shows two different ways to build a chat participant in VS Code:
See [simple.ts](src/simple.ts) for an example of a simple chat participant that makes requests and responds to user queries. It shows how you can create chat participants with or without the [@vscode/prompt-tsx](https://www.npmjs.com/package/@vscode/prompt-tsx) library.

See [toolParticipant.ts](src/toolParticipant.ts) for an example of a chat participant that invokes tools, either dynamically or using the `toolReferences` that are attached to the request. This is a more advanced example that shows how you can use the [@vscode/prompt-tsx](https://www.npmjs.com/package/@vscode/prompt-tsx) library to implement the LLM tool calling flow and tries to implement all the features of the chat API.

# vscode
73 changes: 35 additions & 38 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* ESLint configuration for the project.
*
*
* See https://eslint.style and https://typescript-eslint.io for additional linting options.
*/
// @ts-check
Expand All @@ -9,40 +9,37 @@ import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';

export default tseslint.config(
{
ignores: [
'.vscode-test',
'out',
]
},
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
},
js.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
{
plugins: {
'@stylistic': stylistic
},
rules: {
'curly': 'warn',
'@stylistic/semi': ['warn', 'always'],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/naming-convention': [
'warn',
{
'selector': 'import',
'format': ['camelCase', 'PascalCase']
}
],
'@typescript-eslint/no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_'
}
]
}
}
);
{
ignores: ['.vscode-test', 'out'],
},
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
},
js.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
{
plugins: {
'@stylistic': stylistic,
},
rules: {
curly: 'warn',
'@stylistic/semi': ['warn', 'always'],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'import',
format: ['camelCase', 'PascalCase'],
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
},
},
);
Loading
Loading