package.json•19.7 kB
{
"name": "genaiscript-vscode",
"publisher": "genaiscript",
"homepage": "https://microsoft.github.io/genaiscript/",
"author": {
"name": "Microsoft Corporation"
},
"displayName": "GenAIScript Insiders",
"description": "Generative AI Scripting.",
"version": "1.140.0",
"icon": "icon.png",
"engines": {
"vscode": "^1.98.0"
},
"keywords": [
"javascript",
"typescript",
"genai",
"openai",
"chatgpt",
"gpt4",
"ai",
"copilot",
"scripting",
"python",
"llm",
"gpt",
"mcp"
],
"categories": [
"AI",
"Programming Languages",
"Machine Learning",
"Education",
"Notebooks",
"Other"
],
"license": "MIT",
"extensionKind": [
"workspace"
],
"npm": {
"publish": false
},
"activationEvents": [
"workspaceContains:*.genai.{js,mjs,mts}",
"workspaceContains:**/*.genai.{js,mjs,mts}",
"onNotebook:genaiscript"
],
"main": "./built/extension.js",
"bugs": {
"url": "https://github.com/microsoft/genaiscript/issues"
},
"repository": {
"url": "https://github.com/microsoft/genaiscript"
},
"contributes": {
"chatParticipants": [
{
"id": "genaiscript",
"description": "Calls the GenAIScript agent.",
"name": "genaiscript",
"fullName": "GenAIScript",
"isSticky": false,
"commands": [
{
"name": "list",
"description": "Lists all available GenAIScript scripts.",
"isSticky": false,
"sampleRequest": "/list"
},
{
"name": "run",
"description": "Runs a GenAIScript script. The query should start with the script filename without the extension.",
"isSticky": false,
"sampleRequest": "/run poem"
},
{
"name": "models",
"description": "Lists available Language Models and the aliases.",
"isSticky": false,
"sampleRequest": "/models"
}
]
}
],
"configurationDefaults": {
"files.associations": {
".gitignore.genai": "ignore"
}
},
"markdown.markdownItPlugins": true,
"problemMatchers": [
{
"name": "genaiscript",
"label": "GenAIScript annotations",
"source": "Generated by a LLM.",
"applyTo": "allDocuments",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^\\s*::(info|notice|warning|error)\\s+file=([^,]+),\\s*line=(\\d+)(,\\s*endLine=(\\d+)\\s*)?(,\\s*code=([^,:]+)?\\s*)?::(.*)$",
"severity": 1,
"file": 2,
"line": 3,
"code": 7,
"message": 8
}
}
],
"taskDefinitions": [
{
"type": "genaiscript",
"required": [
"script"
],
"properties": {
"script": {
"type": "string",
"description": "GenAIScript script to run"
}
}
}
],
"walkthroughs": [
{
"id": "genaiscript.tutorial",
"title": "GenAI scripting with GenAIScript",
"description": "Use GenAIScript to create LLM-powered scripts.",
"steps": [
{
"id": "genaiscript.tutirla.node",
"title": "Install Node.JS LTS (v22+)",
"description": "GenAIScript requires Node.JS LTS (v22+) to run. [Read more...](https://microsoft.github.io/genaiscript/getting-started/installation/)",
"media": {
"image": "media/tutorial-start.png",
"altText": ""
}
},
{
"id": "genaiscript.tutorial.start",
"title": "Open Tutorial Notebook",
"description": "You will learn how to create LLM-powered scripts using JavaScript.\nOpen the command palette and select **GenAIScript: Create Markdown Notebook** to get started.",
"media": {
"image": "media/tutorial-start.png",
"altText": ""
},
"completionEvents": [
"onCommand:genaiscript.notebook.create"
]
}
]
}
],
"notebooks": [
{
"type": "genaiscript",
"displayName": "GenAIScript Markdown Notebook",
"priority": "option",
"selector": [
{
"filenamePattern": "*.{md,mdx,markdown}"
}
]
}
],
"markdown.previewStyles": [
"./markdown.css"
],
"icons": {
"genaiscript-logo": {
"description": "GenAIScript logo",
"default": {
"fontPath": "./media/genaiscript.woff",
"fontCharacter": "\\E000"
}
}
},
"viewsContainers": {
"activitybar": [
{
"id": "genaiscript",
"title": "GenAIScript",
"icon": "./icon.svg"
}
]
},
"views": {
"genaiscript": [
{
"id": "genaiscript.trace",
"name": "Trace",
"visibility": "visible",
"type": "tree",
"icon": "./icon.svg"
},
{
"id": "genaiscript.connections",
"name": "Connections",
"visibility": "collapsed",
"type": "tree",
"icon": "./icon.svg"
},
{
"id": "genaiscript.prompts",
"name": "Scripts",
"visibility": "collapsed",
"type": "tree",
"icon": "./icon.svg"
}
]
},
"menus": {
"editor/context": [
{
"command": "genaiscript.fragment.prompt",
"when": "!inDebugMode",
"group": "genaiscript@1"
},
{
"command": "genaiscript.fragment.debug",
"when": "!inDebugMode",
"group": "genaiscript@2"
},
{
"command": "genaiscript.fragment.fix",
"when": "!inDebugMode && resourceFilename =~ /.*\\.genai\\.(js|mjs|mts)$/",
"group": "genaiscript@2"
}
],
"file/newFile": [
{
"command": "genaiscript.newfile.script"
}
],
"editor/title/run": [
{
"command": "genaiscript.fragment.prompt",
"when": "!inDebugMode && resourceFilename =~ /.*\\.((genai\\.(js|mjs|mts))|prompty)$/",
"group": "genaiscript@1"
},
{
"command": "genaiscript.fragment.debug",
"when": "!inDebugMode && resourceFilename =~ /.*\\.genai\\.(js|mjs|mts)$/",
"group": "genaiscript@2"
},
{
"command": "genaiscript.server.show",
"when": "activeWebviewPanelId == genaiscript",
"group": "genaiscript@4"
}
],
"commandPalette": [
{
"command": "genaiscript.fragment.debug",
"when": "false"
},
{
"command": "genaiscript.newfile.script",
"when": "false"
},
{
"command": "genaiscript.prompt.navigate",
"when": "false"
},
{
"command": "genaiscript.request.open",
"when": "false"
},
{
"command": "genaiscript.request.status",
"when": "false"
},
{
"command": "genaiscript.connections.refresh",
"when": "false"
}
],
"view/title": [
{
"command": "genaiscript.request.abort",
"when": "view == genaiscript.trace",
"group": "navigation"
},
{
"command": "genaiscript.connections.refresh",
"when": "view == genaiscript.connections",
"group": "navigation"
},
{
"command": "genaiscript.prompt.create",
"when": "view == genaiscript.prompts",
"group": "navigation"
},
{
"command": "genaiscript.prompt.refresh",
"when": "view == genaiscript.prompts",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "genaiscript.prompt.fork",
"when": "view == genaiscript.prompts && viewItem =~ /^prompt/"
}
],
"explorer/context": [
{
"command": "genaiscript.fragment.prompt",
"when": "explorerViewletVisible && !inDebugMode && !(resourceFilename =~ /\\.genai\\.(js|mjs|mts|prompty)$/)",
"group": "genaiscript@1"
}
]
},
"configuration": [
{
"title": "GenAIScript",
"properties": {
"genaiscript.localTypeDefinitions": {
"type": "boolean",
"default": true,
"description": "Use local type definitions for GenAIScript (.genaiscript.d.ts and tsconfig.json in any project containing *.genai.* files)."
},
"genaiscript.githubCopilotInstructions": {
"type": "boolean",
"default": true,
"description": "Add custom instructions.md in .genaiscript/instructions folder to support GenAIScript script generation."
},
"genaiscript.hideServerTerminal": {
"type": "boolean",
"default": true,
"description": "Hide server terminal from user."
},
"genaiscript.languageChatModels": {
"type": "object",
"description": "Mapping from GenAIScript model (openai:gpt-4) to Visual Studio Code Language Chat Model (github...)"
},
"genaiscript.languageChatModelsProvider": {
"type": "boolean",
"description": "Use GitHub Copilot Chat Models (or other models provided in Visual Studio Code) as the preferred LLM provider when a model is not specified."
},
"genaiscript.diagnostics": {
"type": "boolean",
"default": false,
"description": "Enable developer diagnostic mode. Including opening server terminal and leaving terminals opened."
},
"genaiscript.debug": {
"type": "string",
"default": "script",
"description": "List of logging categories that will be set as 'DEBUG' environment variable when launching the GenAIScript server. If 'diagnostics' is on, it is overriden by '*'."
},
"genaiscript.cache": {
"type": "boolean",
"default": true,
"description": "Enable or disables LLM request cache support."
},
"genaiscript.cli.packageManager": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"npm",
"pnpm"
],
"description": "Package manager to use for GenAIScript CLI. Default is npm."
},
"genaiscript.cli.version": {
"type": "string",
"description": "GenAIScript CLI version to use. Default matches the extension version."
},
"genaiscript.cli.path": {
"type": "string",
"description": "Path to GenAIScript CLI. Default uses npx."
}
}
}
],
"commands": [
{
"command": "genaiscript.server.stop",
"title": "Stop GenAIScript server",
"category": "GenAIScript",
"icon": "$(close)"
},
{
"command": "genaiscript.server.start",
"title": "Start GenAIScript server",
"category": "GenAIScript",
"icon": "$(server-process)"
},
{
"command": "genaiscript.server.show",
"title": "Show GenAIScript server",
"category": "GenAIScript",
"icon": "$(terminal)"
},
{
"command": "genaiscript.notebook.create",
"title": "Create GenAIScript Markdown Notebook",
"category": "GenAIScript"
},
{
"command": "genaiscript.request.abort",
"title": "Abort OpenAI request",
"category": "GenAIScript",
"icon": "$(debug-stop)"
},
{
"command": "genaiscript.fragment.prompt",
"title": "Run GenAIScript...",
"category": "GenAIScript",
"icon": "$(genaiscript-logo)"
},
{
"command": "genaiscript.fragment.debug",
"title": "Debug GenAIScript...",
"category": "GenAIScript",
"icon": "$(debug)"
},
{
"command": "genaiscript.fragment.fix",
"title": "Fix GenAIScript Types",
"category": "GenAIScript",
"icon": "$(lightbulb-autofix)"
},
{
"command": "genaiscript.prompt.navigate",
"title": "Navigate to script",
"category": "GenAIScript"
},
{
"command": "genaiscript.prompt.create",
"title": "Create new script...",
"icon": "$(add)",
"category": "GenAIScript"
},
{
"command": "genaiscript.prompt.refresh",
"title": "Refresh script list",
"icon": "$(refresh)",
"category": "GenAIScript"
},
{
"command": "genaiscript.newfile.script",
"title": "GenAIScript File",
"category": "GenAIScript"
},
{
"command": "genaiscript.prompt.fork",
"title": "Fork GenAIScript...",
"category": "GenAIScript",
"icon": "$(repo-forked)"
},
{
"command": "genaiscript.request.open",
"title": "Open request or response",
"category": "GenAIScript"
},
{
"command": "genaiscript.request.open.view",
"title": "View request",
"category": "GenAIScript"
},
{
"command": "genaiscript.request.open.trace",
"title": "Open Trace",
"category": "GenAIScript"
},
{
"command": "genaiscript.request.open.output",
"title": "Open Output",
"category": "GenAIScript"
},
{
"command": "genaiscript.request.status",
"title": "Show information message about OpenAI request status",
"category": "GenAIScript"
},
{
"command": "genaiscript.connections.refresh",
"title": "Refresh",
"category": "GenAIScript",
"icon": "$(refresh)"
}
]
},
"scripts": {
"vscode:update-dts": "npx @vscode/dts dev && mv vscode.*.d.ts src/",
"vscode:prepublish": "yarn run compile",
"compile:icons": "node updatefonts.mjs",
"compile:extension": "node build.mjs",
"compile": "yarn compile:extension",
"vis:treemap": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.treemap.html",
"vis:network": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.network.html --template network",
"vis:sunburst": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.sunburst.html --template sunburst",
"lint": "eslint src --ext ts",
"run-in-browser": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. ../sample",
"typecheck": "tsc -p .",
"prepackage": "zx prepackage.mjs",
"postpackage": "zx postpackage.mjs",
"package": "vsce package --dependencies --out genaiscript.vsix --yarn",
"generate-manifest": "vsce generate-manifest -i genaiscript.vsix -o genaiscript.manifest"
},
"devDependencies": {
"@types/markdown-it": "^14.1.2",
"@types/vscode": "^1.98.0",
"@vscode/vsce": "^3.4.2",
"assert": "^2.1.0",
"es-toolkit": "^1.38.0",
"markdown-it": "^14.1.0",
"markdown-it-github-alerts": "0.2.0",
"process": "^0.11.10",
"typescript": "5.8.3",
"vscode-uri": "^3.1.0",
"websocket-polyfill": "0.0.3",
"zx": "^8.5.4"
}
}