diff --git a/.github/workflows/check_build.yml b/.github/workflows/check_build.yml index b695cc1c..95cf2b1b 100644 --- a/.github/workflows/check_build.yml +++ b/.github/workflows/check_build.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03adb255..bf1ec9d6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 diff --git a/demo/src/features/ai.ts b/demo/src/features/ai.ts index 254a530e..79fa68e6 100644 --- a/demo/src/features/ai.ts +++ b/demo/src/features/ai.ts @@ -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' } ], @@ -85,7 +86,8 @@ const { getApi } = registerExtension( 'defaultChatParticipant', 'chatParticipantAdditions', 'chatParticipantPrivate', - 'languageModelThinkingPart' + 'languageModelThinkingPart', + 'chatProvider' ] }, ExtensionHostKind.LocalProcess, @@ -152,11 +154,11 @@ void getApi().then(async (vscodeApi) => { const _onDidChangeLanguageModelChatInformation = new vscodeApi.EventEmitter() - vscodeApi.lm.registerLanguageModelChatProvider('coddingame.aiDemo.modelProvider', { + vscodeApi.lm.registerLanguageModelChatProvider('copilot', { provideLanguageModelChatInformation() { return [ { - id: 'codingame', + id: 'auto', capabilities: { toolCalling: true }, diff --git a/src/service-override/policy.ts b/src/service-override/policy.ts index 01aa9a68..dd5ccdae 100644 --- a/src/service-override/policy.ts +++ b/src/service-override/policy.ts @@ -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) { super() @@ -33,4 +33,4 @@ export default function getServiceOverride( } } -export type { PolicyName, PolicyValue, PolicyService } +export type { PolicyName, PolicyValue, PolicyService, PolicyCategory } diff --git a/vscode-patches/0012-fix-improve-extension-contribution-types.patch b/vscode-patches/0012-fix-improve-extension-contribution-types.patch index 51705199..7cf8a866 100644 --- a/vscode-patches/0012-fix-improve-extension-contribution-types.patch +++ b/vscode-patches/0012-fix-improve-extension-contribution-types.patch @@ -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 @@ @@ -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. @@ -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. @@ -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[]; + /** @@ -656,7 +656,7 @@ 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; @@ -664,7 +664,7 @@ index 3e5b309b826..6e099d27098 100644 } export interface IDebugVisualizationContribution { -@@ -157,16 +625,706 @@ export interface IDebugVisualizationContribution { +@@ -157,32 +625,735 @@ export interface IDebugVisualizationContribution { } export interface ITranslation { @@ -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 { @@ -1528,7 +1539,7 @@ index 3e5b309b826..6e099d27098 100644 readonly chatParticipants?: ReadonlyArray; readonly chatPromptFiles?: ReadonlyArray; readonly chatInstructions?: ReadonlyArray; -@@ -240,6 +1482,82 @@ export interface IExtensionContributions { +@@ -240,6 +1491,82 @@ export interface IExtensionContributions { readonly languageModelTools?: ReadonlyArray; readonly languageModelToolSets?: ReadonlyArray; readonly mcpServerDefinitionProviders?: ReadonlyArray;