p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] src/extension.ts (typescript)
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';

// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {

	// Use the console to output diagnostic information (console.log) and errors (console.error)
	// This line of code will only be executed once when your extension is activated
	console.log('Congratulations, your extension "crowd-pilot" is now active!');

	// Configure terminal to allow tab keybinding to work
	// This makes the command skip the shell so VS Code can intercept tab in terminals
	const config = vscode.workspace.getConfiguration('terminal.integrated');
	const commandsToSkipShell = config.get<string[]>('commandsToSkipShell', []);
	if (!commandsToSkipShell.includes('crowd-pilot.testRun')) {
		commandsToSkipShell.push('crowd-pilot.testRun');
		config.update('commandsToSkipShell', commandsToSkipShell, vscode.ConfigurationTarget.Global);
	}

	// The command has been defined in the package.json file
	// Now provide the implementation of the command with registerCommand
	// The commandId parameter must match the command field in package.json
	const disposable = vscode.commands.registerCommand('crowd-pilot.helloWorld', () => {
		// The code you place here will be executed every time your command is executed
		// Display a message box to the user
		vscode.window.showInformationMessage('Hello World from crowd-pilot-extension!');
	});

	context.subscriptions.push(disposable);
	const testRun = vscode.commands.registerCommand('crowd-pilot.testRun', async () => {
		const editor = vscode.window.activeTextEditor;
		const doc = editor!.document;
		const term = vscode.window.terminals[0] ?? vscode.window.createTerminal('Test');
		const git = vscode.extensions.getExtension('vscode.git')?.exports?.getAPI(1);
		const repo = git?.repositories?.[0];
	
		// Emit a few actions:
		await vscode.window.showTextDocument(doc);
		editor!.selections = [new vscode.Selection(0, 0, 0, 0)];
		await editor!.edit(e => e.insert(new vscode.Position(0, 0), 'hello world
'));
		term.show();
		term.sendText('echo VSCode test');
		//await repo?.pull();
	
		vscode.window.showInformationMessage('All actions emitted');
	  });

	context.subscriptions.push(testRun);
}

// This method is called when your extension is deactivated
export function deactivate() {}
[tab] package.json (json)
{
  "name": "crowd-pilot",
  "displayName": "crowd-pilot-extension",
  "description": "Teaching language models to code like humans.",
  "version": "0.0.1",
  "engines": {
    "vscode": "^1.99.3"
  },
  "categories": [
    "Other"
  ],
  "activationEvents": [],
  "main": "./out/extension.js",
  "contributes": {
    "commands": [
      {
        "command": "crowd-pilot.helloWorld",
        "title": "Hello World!"
      },
      {
        "command": "crowd-pilot.testRun",
        "title": "Test Run"
      }
    ],
    "keybindings": [
      {
        "command": "crowd-pilot.testRun",
        "key": "tab",
        "mac": "tab",
        "when": "editorTextFocus || terminalFocus"
      }
    ]
  },
  "scripts": {
    "vscode:prepublish": "npm run compile",
    "compile": "tsc -p ./",
    "watch": "tsc -watch -p ./",
    "pretest": "npm run compile && npm run lint",
    "lint": "eslint src",
    "test": "vscode-test"
  },
  "devDependencies": {
    "@types/vscode": "^1.105.0",
    "@types/mocha": "^10.0.10",
    "@types/node": "22.x",
    "@typescript-eslint/eslint-plugin": "^8.45.0",
    "@typescript-eslint/parser": "^8.45.0",
    "eslint": "^9.36.0",
    "typescript": "^5.9.3",
    "@vscode/test-cli": "^0.0.11",
    "@vscode/test-electron": "^2.5.2"
  }
}
[tab] out/extension.js.map (json)
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,4BA4CC;AAGD,gCAA+B;AArD/B,6DAA6D;AAC7D,8EAA8E;AAC9E,+CAAiC;AAEjC,yDAAyD;AACzD,0EAA0E;AAC1E,SAAgB,QAAQ,CAAC,OAAgC;IAExD,4FAA4F;IAC5F,gFAAgF;IAChF,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAE5E,qDAAqD;IACrD,kFAAkF;IAClF,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IACxE,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAW,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC5E,IAAI,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