Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

merge-upstream-vscode

БесплатноБез исполняемых скриптовНе проверен

This skill should be used when merging upstream changes from vscode-server into the Positron IDE repository. Invoke it when the git repository contains the…

posit-devот posit-dev★ 4 361 звезда на GitHub

Об этом скилле

Merge Upstream VSCode

Background

Positron is a fork of a project called 'vscode-server' (https://github.com/rstudio/vscode-server), which is itself a fork of VS Code, aka Code OSS (https://github.com/microsoft/vscode). vscode-server is a version of Code OSS that has been customized to run in Posit Workbench (annotated in the source as PWB). Positron, this repository, is a fork of vscode-server, and runs in both Posit Workbench and as a standalone desktop app for macOS, Windows, and Linux.

On a regular basis, changes are merged from Code OSS into vscode-server, and then from vscode-server into Positron.

The skill is typically invoked in the middle of a cherry-pick merge from vscode-server into Positron. The working tree is dirty and contains conflicted changes from the upstream merge.

Your goal is to resolve the conflicts that arise in this second phase until the code compiles cleanly and passes tests.

General Principles

Extension

Positron's main goal is to extend Code OSS with addtional functionality; only in a few places do we actually need to override or modify the upstream code. So where genuine conflicts are encountered, your goal should generally be to resolve them in a way that preserves Positron's changes while still integrating with the upstream code.

Here is an example:

	// extensions/copilot has its own code style
	'!extensions/copilot/**',

	'!src/vs/base/browser/dompurify/**',
	'!src/vs/workbench/services/keybinding/browser/keyboardLayouts/**',
	'!src/vs/workbench/contrib/terminal/common/scripts/psreadline/**',

<<<<<<< HEAD
	// --- Start Positron ---
	'!scripts/positron/**/*',
	// --- End Positron ---
=======
	// Files with licences
	'!src/vs/platform/endpoint/common/licenseAgreement.ts',
>>>>>>> 83301f3f7d9 (Upstream Code OSS changes from 1.124.0 to 1.130.0)

In this case, Positron has added an entry to an array in the same place as the upstream change, so the conflict can be resolved creating a change that preserves both the upstream and Positron changes.

Modification

In other places, Positron needs to modify the upstream code to add or change functionality. In these cases, the conflict can be resolved by accepting the upstream changes and then reapplying the Positron changes. For example:

<<<<<<< HEAD
			// --- Start Positron ---
			.pipe(jsonEditor({ commit, date: readISODate(sourceFolderName), version, positronVersion, positronBuildNumber, quality: releaseChannel }))
			// --- End Positron ---
=======
			.pipe(jsonEditor((json: Record<string, unknown>) => {
				json.commit = commit;
				json.date = readISODate(sourceFolderName);
				json.version = version;
				// Stamp agentSdks from the per-platform results file produced
				// by `build/agent-sdk/produce.ts`. REH-only: REH-web is
				// browser-served and the agent host is node-only, so the
				// SDK config has no consumer there.
				if (type === 'reh') {
					const agentSdks = readAgentSdkResults();
					if (Object.keys(agentSdks).length > 0) {
						json.agentSdks = agentSdks;
					}
				}
				return json;
			}))
>>>>>>> 83301f3f7d9 (Upstream Code OSS changes from 1.124.0 to 1.130.0)

Here, Positron has added several fields to the JSON object that are not present in the upstream code. The correct resolution to this class of conflict is to accept the upstream change and then reapply the Positron change by adding the missing fields, matching the new formatting and adding appropriate change markers..

Copilot AI commands and menus

Don't add chatAiFeaturesEnabled to Copilot's AI commands or menu items by hand. Positron already gates every command and menu item from GitHub.copilot-chat where the extension points read them, via gateCopilotContribution in src/vs/workbench/services/actions/common/menusExtensionPoint.ts, so anything upstream adds is covered.

  • Check that the two Positron-marked call sites in menusExtensionPoint.ts survived the merge, one on precondition: and one on item.when =. Nothing else does the gating, so if they're gone the gate is gone.
  • test/e2e/tests/assistant/chat-command-palette-gating.test.ts checks this end to end.

Upstream Divergence

Because vscode-server and Positron merge upstream release branches, it is frequently the case that merge conflicts arise that are simply conflicts between two upstream release branches. If a merge conflict arises that contains no Positron or PWB (Posit Workbench) change markers, it is often a simple conflict between two upstream release branches that can be resolved by accepting the upstream changes.

This is especially common in chat/AI related files.

Here's an example:

<<<<<<< HEAD
                    "key": "updateModePolicy",
                    "value": "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."
=======
                    "key": "updateMode",
                    "value": "Configure whether you
Полный SKILL.md на GitHub

Установить merge-upstream-vscode в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/change-markers.mdreferences/codicons.mdreferences/package-json.mdreferences/themes.md

FAQ

Что делает скилл merge-upstream-vscode?

This skill should be used when merging upstream changes from vscode-server into the Positron IDE repository. Invoke it when the git repository contains the conflicted changes from an upstream merge.

Как установить скилл merge-upstream-vscode?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл merge-upstream-vscode запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить merge-upstream-vscode с