diff --git a/packages/vscode-extension/package.json b/packages/vscode-extension/package.json index be8c64a722..451c781b8b 100644 --- a/packages/vscode-extension/package.json +++ b/packages/vscode-extension/package.json @@ -1551,21 +1551,6 @@ } }, "chatParticipants": [ - { - "id": "ms-teams-vscode-extension.teams", - "name": "teams", - "description": "%teamstoolkit.chatParticipants.teams.description%", - "commands": [ - { - "name": "create", - "description": "%teamstoolkit.chatParticipants.create.description%" - }, - { - "name": "nextstep", - "description": "%teamstoolkit.chatParticipants.nextStep.description%" - } - ] - }, { "id": "ms-teams-vscode-extension.office", "name": "office", diff --git a/packages/vscode-extension/src/chat/prompts.ts b/packages/vscode-extension/src/chat/prompts.ts index 4169620481..a65167430b 100644 --- a/packages/vscode-extension/src/chat/prompts.ts +++ b/packages/vscode-extension/src/chat/prompts.ts @@ -11,7 +11,7 @@ export const defaultSystemPrompt = () => { ); return new vscode.LanguageModelChatMessage( - vscode.LanguageModelChatMessageRole.System, + vscode.LanguageModelChatMessageRole.User, `You are an expert in Teams Toolkit Extension for VS Code. The user wants to use Teams Toolkit Extension for VS Code. Your job is to answer general conceputal question related Teams Toolkit Extension for VS Code. Folow the instruction and think step by step. @@ -40,22 +40,22 @@ export const defaultSystemPrompt = () => { export const describeProjectSystemPrompt = () => new vscode.LanguageModelChatMessage( - vscode.LanguageModelChatMessageRole.System, + vscode.LanguageModelChatMessageRole.User, `You are an advisor for Teams App developers. You need to describe the project based on the name and description field of user's JSON content. You should control the output between 50 and 80 words.` ); export const brieflyDescribeProjectSystemPrompt = () => new vscode.LanguageModelChatMessage( - vscode.LanguageModelChatMessageRole.System, + vscode.LanguageModelChatMessageRole.User, `You are an advisor for Teams App developers. You need to describe the project based on the name and description field of user's JSON content. You should control the output between 30 and 40 words.` ); export const describeScenarioSystemPrompt = () => new vscode.LanguageModelChatMessage( - vscode.LanguageModelChatMessageRole.System, + vscode.LanguageModelChatMessageRole.User, `You are an advisor for Teams App developers. You need to describe the project based on the name and description field of user's JSON content. You should control the output between 50 and 80 words.` ); export const describeStepSystemPrompt = () => new vscode.LanguageModelChatMessage( - vscode.LanguageModelChatMessageRole.System, + vscode.LanguageModelChatMessageRole.User, `You are an advisor for Teams App developers. You need to reorganize the content. You should control the output between 30 and 50 words. Don't split the content into multiple sentences.` ); @@ -69,7 +69,7 @@ export function getTemplateMatchChatMessages( .join(", "); const chatMessages = [ new vscode.LanguageModelChatMessage( - vscode.LanguageModelChatMessageRole.System, + vscode.LanguageModelChatMessageRole.User, `You're an assistant designed to find matched Teams template projects based on user's input and templates. The users will describe their requirement and application scenario in user ask. Follow the instructions and think step by step. You'll respond with IDs you've found from the templates as a JSON object. Respond result contains the app IDs you choose with a float number between 0-1.0 representing confidence. Here's an example of your output format: {"app": [{"id": "", "score": 1.0}]} @@ -125,7 +125,7 @@ export function getSampleMatchChatMessages( .join(", "); const chatMessages = [ new vscode.LanguageModelChatMessage( - vscode.LanguageModelChatMessageRole.System, + vscode.LanguageModelChatMessageRole.User, `You're an assistant designed to find matched Teams application projects based on user's input and a list of existing application descriptions. Users will paste in a string of text that describes their requirement and application scenario. Follow the instructions and think step by step. You'll respond with IDs you've found from the existing application list as a JSON object. Respond result contains the app IDs you choose with a float number between 0-1.0 representing confidence. Here's an example of your output format: {"app": [{"id": "", "score": 1.0}]} diff --git a/packages/vscode-extension/src/extension.ts b/packages/vscode-extension/src/extension.ts index c53ea79403..7151423c4b 100644 --- a/packages/vscode-extension/src/extension.ts +++ b/packages/vscode-extension/src/extension.ts @@ -198,14 +198,10 @@ import { checkProjectTypeAndSendTelemetry, isM365Project } from "./utils/project import { ReleaseNote } from "./utils/releaseNote"; import { ExtensionSurvey } from "./utils/survey"; import { getSettingsVersion, projectVersionCheck } from "./utils/telemetryUtils"; -import { isVSCodeInsiderVersion } from "./utils/versionUtil"; import { createPluginWithManifest } from "./handlers/createPluginWithManifestHandler"; export async function activate(context: vscode.ExtensionContext) { - const value = - IsChatParticipantEnabled && - semver.gte(vscode.version, "1.90.0-insider") && - isVSCodeInsiderVersion(); + const value = IsChatParticipantEnabled && semver.gte(vscode.version, "1.90.0"); featureFlagManager.setBooleanValue(FeatureFlags.ChatParticipant, value); context.subscriptions.push(new ExtTelemetry.Reporter(context)); @@ -225,8 +221,6 @@ export async function activate(context: vscode.ExtensionContext) { registerInternalCommands(context); if (featureFlagManager.getBooleanValue(CoreFeatureFlags.ChatParticipant)) { - registerChatParticipant(context); - registerOfficeChatParticipant(context); } diff --git a/packages/vscode-extension/test/chat/utils.test.ts b/packages/vscode-extension/test/chat/utils.test.ts index 4829be270a..77e0e25797 100644 --- a/packages/vscode-extension/test/chat/utils.test.ts +++ b/packages/vscode-extension/test/chat/utils.test.ts @@ -169,7 +169,7 @@ describe("chat utils", () => { it("count empty message", () => { const message = new vscodeMocks.chat.LanguageModelChatMessage( - vscodeMocks.chat.LanguageModelChatMessageRole.System, + vscodeMocks.chat.LanguageModelChatMessageRole.User, "" ); const result = utils.countMessageTokens(message); @@ -178,7 +178,7 @@ describe("chat utils", () => { it("count message without name", () => { const message = new vscodeMocks.chat.LanguageModelChatMessage( - vscodeMocks.chat.LanguageModelChatMessageRole.System, + vscodeMocks.chat.LanguageModelChatMessageRole.User, "testContent1" ); const result = utils.countMessageTokens(message); @@ -221,7 +221,7 @@ describe("chat utils", () => { it("count messages", () => { const messages = [ new vscodeMocks.chat.LanguageModelChatMessage( - vscodeMocks.chat.LanguageModelChatMessageRole.System, + vscodeMocks.chat.LanguageModelChatMessageRole.User, "testContent1" ), new vscodeMocks.chat.LanguageModelChatMessage(