Skip to content

Commit

Permalink
Refactor VS Code configurations and update package import syntax for …
Browse files Browse the repository at this point in the history
…improved project structure
  • Loading branch information
rido-min committed Feb 24, 2025
1 parent a401a0a commit 1f94fd9
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 60 deletions.
33 changes: 0 additions & 33 deletions samples/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,5 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "node-echo-bot",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/basic/echo-bot/nodejs/dist/index.js",
"outFiles": [ "${workspaceFolder}/**/dist/**/*.js" ],
"envFile": "${workspaceFolder}//basic/echo-bot/nodejs/.env",
"preLaunchTask": "npm: build echo-bot"
},
{
"type": "node",
"request": "launch",
"name": "node-copilotstudio-client",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/basic/copilotstudio-client/nodejs/dist/index.js",
"outFiles": [ "${workspaceFolder}/**/dist/**/*.js" ],
"envFile": "${workspaceFolder}/basic/copilotstudio-client/nodejs/.env",
"preLaunchTask": "npm: build copilotstudio-client"
},
{
"type": "node",
"request": "launch",
"name": "node-skill",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/complex/copilotstudio-skill/nodejs/src/index.js",
}
]
}
25 changes: 1 addition & 24 deletions samples/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"path": "basic/echo-bot/nodejs",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build echo-bot"
},
{
"type": "npm",
"script": "build",
"path": "basic/copilotstudio-client/nodejs",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build copilotstudio-client"
}
]
"tasks": []
}
17 changes: 17 additions & 0 deletions samples/basic/copilotstudio-client/nodejs/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "node-copilotstudio-client",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/index.js",
"outFiles": [ "${workspaceFolder}/**/dist/**/*.js" ],
"envFile": "${workspaceFolder}/.env",
"preLaunchTask": "npm: build copilotstudio-client"
}
]
}
15 changes: 15 additions & 0 deletions samples/basic/copilotstudio-client/nodejs/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build copilotstudio-client"
}
]
}
17 changes: 17 additions & 0 deletions samples/basic/echo-bot/nodejs/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "node-echo-bot",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/index.js",
"outFiles": [ "${workspaceFolder}/**/dist/**/*.js" ],
"envFile": "${workspaceFolder}/.env",
"preLaunchTask": "npm: build echo-bot"
}
]
}
15 changes: 15 additions & 0 deletions samples/basic/echo-bot/nodejs/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build echo-bot"
}
]
}
14 changes: 14 additions & 0 deletions samples/complex/copilotstudio-skill/nodejs/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "node-skill",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/src/index.js"
}
]
}
2 changes: 1 addition & 1 deletion samples/complex/copilotstudio-skill/nodejs/src/bot.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { ActivityHandler, MessageFactory } from '@microsoft/agents-bot-hosting'
import pjson from '@microsoft/agents-bot-hosting/package.json'
import pjson from '@microsoft/agents-bot-hosting/package.json' with { type: 'json' }

export class EchoBot extends ActivityHandler {
constructor () {
Expand Down
4 changes: 2 additions & 2 deletions samples/complex/copilotstudio-skill/nodejs/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import express, { json } from 'express'

import { CloudAdapter, loadAuthConfigFromEnv, authorizeJWT } from '@microsoft/agents-bot-hosting'
import pjson from '@microsoft/agents-bot-hosting/package.json' with { type: 'json' }

import { EchoBot } from './bot.js'
import pjson from '@microsoft/agents-bot-hosting/package.json'

const config = loadAuthConfigFromEnv()
const adapter = new CloudAdapter(config)
Expand All @@ -24,5 +24,5 @@ server.post('/api/messages',
const port = process.env.PORT || 3978

server.listen(port, () => {
console.log(`\n echo bot, running on sdk version ${pjson.version} lisenting on ${port} for bot ${process.env.clientId}`)
console.log(`\n echo bot skill, running on sdk version ${pjson.version} lisenting on ${port} for bot ${process.env.clientId}`)
})

0 comments on commit 1f94fd9

Please sign in to comment.