Skip to content

Commit 7ce43a4

Browse files
authored
Merge pull request #1105 from microsoft/burkeholland-lm-api-tutorial
add lm-api-tutorial
2 parents c56375d + e40a7c6 commit 7ce43a4

File tree

9 files changed

+3505
-0
lines changed

9 files changed

+3505
-0
lines changed
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint",
6+
"ms-vscode.extension-test-runner"
7+
]
8+
}

lm-api-tutorial/.vscode/launch.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
],
15+
"outFiles": [
16+
"${workspaceFolder}/out/**/*.js"
17+
],
18+
"preLaunchTask": "${defaultBuildTask}"
19+
}
20+
]
21+
}

lm-api-tutorial/.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
11+
}

lm-api-tutorial/.vscode/tasks.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
20+
}

lm-api-tutorial/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Language Model API Tutorial Sample
2+
3+
This is the source code for the [Language Model API Tutorial](). It demonstrates how to use the GitHub Copilot Language Model API to build an extension that annotates your code with inline tutoring tips.
4+
5+
## Demo
6+
![Link to demo from docs]()
7+
8+
### Running the sample
9+
10+
- Run `npm install` in terminal to install depedencies
11+
- Run the `Run Extension` target in the Debug View. This will:
12+
- Start a task `npm: watch` to compile the client code
13+
- Run the extension in a new VS Code window.
14+
- Open a folder in the new VS Code window.
15+
- Open a code file.
16+
- Run the `Toggle Tutor Annotations` command from the command palette.

0 commit comments

Comments
 (0)