Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Lint commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# we actually need "github.event.pull_request.commits + 1" commit
fetch-depth: 0
Expand All @@ -23,13 +23,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install libkrb5-dev libxkbfile-dev libx11-6
- name: mise-en-place
uses: jdx/mise-action@v2
uses: jdx/mise-action@v3
- name: Install dependencies
run: npm ci
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# get all tags for semantic release
fetch-depth: 0
Expand All @@ -26,7 +26,7 @@ jobs:
sudo apt-get update
sudo apt-get install libkrb5-dev libxkbfile-dev libx11-6 pkg-config
- name: mise-en-place
uses: jdx/mise-action@v2
uses: jdx/mise-action@v3
- name: Install dependencies
run: npm ci
- name: Build
Expand Down
12 changes: 7 additions & 5 deletions demo/src/features/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ const { getApi } = registerExtension(
fullName: 'Codingame AI',
name: 'codingame-ai',
isDefault: true,
modes: ['agent']
modes: ['agent'],
locations: ['panel', 'terminal', 'editor']
}
],
languageModelChatProviders: [
{
vendor: 'coddingame.aiDemo.modelProvider',
vendor: 'copilot',
displayName: 'Codingame provider'
}
],
Expand Down Expand Up @@ -85,7 +86,8 @@ const { getApi } = registerExtension(
'defaultChatParticipant',
'chatParticipantAdditions',
'chatParticipantPrivate',
'languageModelThinkingPart'
'languageModelThinkingPart',
'chatProvider'
]
},
ExtensionHostKind.LocalProcess,
Expand Down Expand Up @@ -152,11 +154,11 @@ void getApi().then(async (vscodeApi) => {

const _onDidChangeLanguageModelChatInformation = new vscodeApi.EventEmitter<void>()

vscodeApi.lm.registerLanguageModelChatProvider('coddingame.aiDemo.modelProvider', {
vscodeApi.lm.registerLanguageModelChatProvider('copilot', {
provideLanguageModelChatInformation() {
return [
{
id: 'codingame',
id: 'auto',
capabilities: {
toolCalling: true
},
Expand Down
4 changes: 2 additions & 2 deletions src/service-override/policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { IEditorOverrideServices } from 'vs/editor/standalone/browser/stand
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
import { AbstractPolicyService, type PolicyValue } from 'vs/platform/policy/common/policy'
import { IPolicyService } from 'vs/platform/policy/common/policy.service'

import { PolicyCategory } from 'vs/base/common/policy'
class PolicyService extends AbstractPolicyService {
constructor(defaultPolicies: Map<PolicyName, PolicyValue>) {
super()
Expand Down Expand Up @@ -33,4 +33,4 @@ export default function getServiceOverride(
}
}

export type { PolicyName, PolicyValue, PolicyService }
export type { PolicyName, PolicyValue, PolicyService, PolicyCategory }
57 changes: 34 additions & 23 deletions vscode-patches/0012-fix-improve-extension-contribution-types.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Date: Mon, 11 Mar 2024 17:38:30 +0100
Subject: [PATCH] fix: improve extension contribution types

---
.../platform/extensions/common/extensions.ts | 1448 ++++++++++++++++-
.../platform/extensions/common/extensions.ts | 1457 ++++++++++++++++-
.../services/search/common/queryBuilder.ts | 8 +-
.../themes/common/colorExtensionPoint.ts | 2 +-
.../tokenClassificationExtensionPoint.ts | 1 +
4 files changed, 1389 insertions(+), 70 deletions(-)
4 files changed, 1398 insertions(+), 70 deletions(-)

diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
index 3e5b309b826..6e099d27098 100644
index 3e5b309b826..22328736cac 100644
--- a/src/vs/platform/extensions/common/extensions.ts
+++ b/src/vs/platform/extensions/common/extensions.ts
@@ -3,6 +3,7 @@
Expand Down Expand Up @@ -369,10 +369,8 @@ index 3e5b309b826..6e099d27098 100644
+ * Path of the tmTheme file. The path is relative to the extension folder and is typically './colorthemes/awesome-color-theme.json'.
+ */
+ readonly path: string;
}

-export interface ITheme {
- label: string;
+}
+
+export interface IIconTheme {
+ /**
+ * Id of the file icon theme as used in the user settings.
Expand All @@ -386,8 +384,10 @@ index 3e5b309b826..6e099d27098 100644
+ * Path of the file icon theme definition file. The path is relative to the extension folder and is typically './fileicons/awesome-icon-theme.json'.
+ */
+ readonly path: string;
+}
+
}

-export interface ITheme {
- label: string;
+export interface IProductTheme {
+ /**
+ * Id of the product icon theme as used in the user settings.
Expand Down Expand Up @@ -642,11 +642,11 @@ index 3e5b309b826..6e099d27098 100644
+ * Unique identifier of the notebook output renderer.
+ */
readonly id: string;
- readonly displayName: string;
+ /**
+ * Human readable name of the notebook output renderer.
+ */
readonly displayName: string;
- readonly mimeTypes: string[];
+ readonly displayName: string;
+ readonly dependencies?: string[];
+ readonly optionalDependencies?: string[];
+ /**
Expand All @@ -656,15 +656,15 @@ index 3e5b309b826..6e099d27098 100644
+ /**
+ * Set of globs that the notebook is for.
+ */
+ readonly mimeTypes: string[];
readonly mimeTypes: string[];
+ readonly entrypoint: string | {
+ readonly extends: string;
+ readonly path: string;
+ };
}

export interface IDebugVisualizationContribution {
@@ -157,16 +625,706 @@ export interface IDebugVisualizationContribution {
@@ -157,32 +625,735 @@ export interface IDebugVisualizationContribution {
}

export interface ITranslation {
Expand Down Expand Up @@ -1377,31 +1377,42 @@ index 3e5b309b826..6e099d27098 100644
}

export interface IChatParticipantContribution {
@@ -176,6 +1334,7 @@ export interface IChatParticipantContribution {
id: string;
name: string;
fullName: string;
+ when?: string;
description?: string;
isDefault?: boolean;
+ isSticky?: boolean;
+ sampleRequest?: string;
commands?: { name: string }[];
+ modes: string[]
+ locations?: string[];
+ modes: string[];
+ disambiguation?: { category: string; categoryName?: string /** Deprecated */; description: string; examples: string[] }[];
}

export interface IToolContribution {
@@ -183,6 +1342,9 @@ export interface IToolContribution {
name: string;
displayName: string;
modelDescription: string;
userDescription?: string;
+ toolReferenceName?: string;
+ canBeReferencedInPrompt?: boolean
+ inputSchema?: object
+ legacyToolReferenceFullNames?: string[];
+ icon?: string | { light: string; dark: string };
+ when?: string;
+ tags?: string[];
userDescription?: string;
+ inputSchema?: IJSONSchema;
+ canBeReferencedInPrompt?: boolean;
}

export interface IToolSetContribution {
@@ -206,32 +1368,112 @@ export interface IChatFileContribution {
@@ -206,32 +1377,112 @@ export interface IChatFileContribution {
readonly when?: string;
}

+export interface ILanguageModelChatProvider {
+ vendor: string
+ displayName?: string
+ vendor: string;
+ displayName?: string;
+}
+
export interface IExtensionContributions {
Expand Down Expand Up @@ -1528,7 +1539,7 @@ index 3e5b309b826..6e099d27098 100644
readonly chatParticipants?: ReadonlyArray<IChatParticipantContribution>;
readonly chatPromptFiles?: ReadonlyArray<IChatFileContribution>;
readonly chatInstructions?: ReadonlyArray<IChatFileContribution>;
@@ -240,6 +1482,82 @@ export interface IExtensionContributions {
@@ -240,6 +1491,82 @@ export interface IExtensionContributions {
readonly languageModelTools?: ReadonlyArray<IToolContribution>;
readonly languageModelToolSets?: ReadonlyArray<IToolSetContribution>;
readonly mcpServerDefinitionProviders?: ReadonlyArray<IMcpCollectionContribution>;
Expand Down
Loading