Skip to content

Commit e6b7b11

Browse files
authored
fix: fix the meta-os-da templates to the latest (#14212)
1 parent 287ac3b commit e6b7b11

File tree

3 files changed

+84
-6
lines changed

3 files changed

+84
-6
lines changed

packages/fx-core/src/component/generator/officeAddin/metaOSHelper.ts

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import {
77
AppManifestUtils,
88
AppPackageFolderName,
9-
DeclarativeAgentManifestV1D3,
9+
DeclarativeAgentManifestV1D4,
1010
ManifestTemplateFileName,
1111
TeamsManifestVDevPreview,
1212
} from "@microsoft/teamsfx-api";
@@ -247,10 +247,10 @@ export class MetaOSHelper {
247247
ActionFilename: string,
248248
appName: string
249249
): Promise<void> {
250-
const fileJson: DeclarativeAgentManifestV1D3.DeclarativeAgentManifestV1D3 = {
250+
const fileJson: DeclarativeAgentManifestV1D4.DeclarativeAgentManifestV1D4 = {
251251
$schema:
252-
"https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.3/schema.json",
253-
version: "v1.3",
252+
"https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.4/schema.json",
253+
version: "v1.4",
254254
name: `Add-in Skill + Agent for ${appName}`,
255255
description:
256256
"You are an agent for working with add-in. You can work with any cells, not only well formatted table.",
@@ -296,11 +296,23 @@ export class MetaOSHelper {
296296
schema_version: "v2.3",
297297
name_for_human: `Add-in Skill + Agent for ${appName}`,
298298
description_for_human: "Get answer for user's question related to Microsoft 365 products",
299+
namespace: "AddInFunctions",
299300
functions: [
300301
{
301302
name: `${commandName.w}`,
302303
description:
303304
"Action addfooter: take in arg a JSON object, with a footer message in the field 'Footer'.",
305+
parameters: {
306+
type: "object",
307+
properties: {
308+
Footer: {
309+
type: "string",
310+
description: "example message to be added to footer",
311+
default: "Declarative Agent Footer",
312+
},
313+
},
314+
required: ["Footer"],
315+
},
304316
states: {
305317
reasoning: {
306318
description:
@@ -318,6 +330,22 @@ export class MetaOSHelper {
318330
name: `${commandName.x}`,
319331
description:
320332
"Action fillcolor: take in arg a JSON object, a cell location and a color in hex. Cell location is a single cell.",
333+
parameters: {
334+
type: "object",
335+
properties: {
336+
Cell: {
337+
type: "string",
338+
description: "example cell location",
339+
default: "B7",
340+
},
341+
Color: {
342+
type: "string",
343+
description: "example color in hex",
344+
default: "#30d5c8",
345+
},
346+
},
347+
required: ["Cell", "Color"],
348+
},
321349
states: {
322350
reasoning: {
323351
description:
@@ -335,6 +363,17 @@ export class MetaOSHelper {
335363
name: `${commandName.p}`,
336364
description:
337365
"Action addtexttoslide: take in arg a JSON object, a text to be added to a slide.",
366+
parameters: {
367+
type: "object",
368+
properties: {
369+
Text: {
370+
type: "string",
371+
description: "example text to be added to a slide",
372+
default: "hello declarative agent",
373+
},
374+
},
375+
required: ["Text"],
376+
},
338377
states: {
339378
reasoning: {
340379
description:

templates/vsc/common/declarative-agent-meta-os-new-project/appPackage/alchemy-plugin.json.tpl

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@
33
"schema_version": "v2.3",
44
"name_for_human": "Add-in Skill + Agent for {{appName}}",
55
"description_for_human": "Get answer for user's question related to Microsoft 365 products",
6+
"namespace": "AddInFunctions",
67
"functions": [
78
{
89
"name": "addfooter",
910
"description": "Action addfooter: take in arg a JSON object, with a footer message in the field 'Footer'.",
11+
"parameters": {
12+
"type": "object",
13+
"properties": {
14+
"Footer": {
15+
"type": "string",
16+
"description": "example message to be added to footer",
17+
"default" : "Declarative Agent Footer"
18+
}
19+
},
20+
"required": ["Footer"]
21+
},
1022
"states": {
1123
"reasoning": {
1224
"description": "\n# `addfooter(Footer: str = 'example message to be added to footer') -> str` Action addfooter: take in arg a JSON object with a string field 'Footer', a footer message.",
@@ -21,6 +33,22 @@
2133
{
2234
"name": "fillcolor",
2335
"description": "Action fillcolor: take in arg a JSON object, a cell location and a color in hex. Cell location is a single cell.",
36+
"parameters": {
37+
"type": "object",
38+
"properties": {
39+
"Cell": {
40+
"type": "string",
41+
"description": "example cell location",
42+
"default": "B7"
43+
},
44+
"Color": {
45+
"type": "string",
46+
"description": "example color in hex",
47+
"default": "#30d5c8"
48+
}
49+
},
50+
"required": ["Cell", "Color"]
51+
},
2452
"states": {
2553
"reasoning": {
2654
"description": "\n# `fillcolor(Cell: str = 'B7', Color: str = '#30d5c8') -> str` Action fillcolor: take in arg a JSON object, a cell location and a color in hex. Cell location is a single cell.",
@@ -35,6 +63,17 @@
3563
{
3664
"name": "addtexttoslide",
3765
"description": "Action addtexttoslide: take in arg a JSON object, a text to be added to a slide.",
66+
"parameters": {
67+
"type": "object",
68+
"properties": {
69+
"Text": {
70+
"type": "string",
71+
"description": "example text to be added to a slide",
72+
"default": "hello declarative agent"
73+
}
74+
},
75+
"required": ["Text"]
76+
},
3877
"states": {
3978
"reasoning": {
4079
"description": "\n# `addtexttoslide(Text: str = 'hello') -> str` Action addtexttoslide: take in arg a JSON object, a text to be added to a slide.",

templates/vsc/common/declarative-agent-meta-os-new-project/appPackage/declarativeAgent.json.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.3/schema.json",
3-
"version": "v1.3",
2+
"$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.4/schema.json",
3+
"version": "v1.4",
44
"name": "Add-in Skill + Agent for {{appName}}",
55
"description": "You are an agent for working with add-in. You can work with any cells, not only well formatted table.",
66
"instructions": "You are an agent for working with add-in. You can work with any cells, not only well formatted table.",

0 commit comments

Comments
 (0)