Skip to content

Commit

Permalink
Merge pull request #1105 from microsoft/burkeholland-lm-api-tutorial
Browse files Browse the repository at this point in the history
add lm-api-tutorial
  • Loading branch information
ntrogh authored Oct 15, 2024
2 parents c56375d + e40a7c6 commit 7ce43a4
Show file tree
Hide file tree
Showing 9 changed files with 3,505 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lm-api-tutorial/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}
21 changes: 21 additions & 0 deletions lm-api-tutorial/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// 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}"
}
]
}
11 changes: 11 additions & 0 deletions lm-api-tutorial/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
20 changes: 20 additions & 0 deletions lm-api-tutorial/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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": {
"kind": "build",
"isDefault": true
}
}
]
}
16 changes: 16 additions & 0 deletions lm-api-tutorial/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Language Model API Tutorial Sample

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.

## Demo
![Link to demo from docs]()

### Running the sample

- Run `npm install` in terminal to install depedencies
- Run the `Run Extension` target in the Debug View. This will:
- Start a task `npm: watch` to compile the client code
- Run the extension in a new VS Code window.
- Open a folder in the new VS Code window.
- Open a code file.
- Run the `Toggle Tutor Annotations` command from the command palette.
Loading

0 comments on commit 7ce43a4

Please sign in to comment.