From a0ce94a5c4444d8fa5ad0622740ed65e9760b178 Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Sat, 21 Jun 2025 16:32:07 +0800 Subject: [PATCH] =?UTF-8?q?parameters=E5=8F=82=E6=95=B0=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=8D=95=E5=BC=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzezhong --- ...apis-app-ability-InsightIntentDecorator.md | 93 +++++++++---------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/zh-cn/application-dev/reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md b/zh-cn/application-dev/reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md index 06f17e79f1f..874377ec280 100644 --- a/zh-cn/application-dev/reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md +++ b/zh-cn/application-dev/reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md @@ -63,38 +63,38 @@ import { InsightIntentLink, LinkParamCategory } from '@kit.AbilityKit'; paramCategory: LinkParamCategory.LINK }], parameters: { - "schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "title": "Song Schema", - "description": "A schema for describing songs and their artists", - "properties": { - "songName": { - "type": "string", - "description": "The name of the song", - "minLength": 1 + 'schema': 'http://json-schema.org/draft-07/schema#', + 'type': 'object', + 'title': 'Song Schema', + 'description': 'A schema for describing songs and their artists', + 'properties': { + 'songName': { + 'type': 'string', + 'description': 'The name of the song', + 'minLength': 1 } }, - "required": ["songName"], - "additionalProperties": false + 'required': ['songName'], + 'additionalProperties': false }, result: { - "type": "object", - "propertyNames": { - "enum": [ - "code", - "result" + 'type': 'object', + 'propertyNames': { + 'enum': [ + 'code', + 'result' ] }, - "required": [ - "code", - "result" + 'required': [ + 'code', + 'result' ], - "properties": { - "code": { - "description": "执行结果码", - "type": "number" + 'properties': { + 'code': { + 'description': '执行结果码', + 'type': 'number' }, - "result": {} + 'result': {} } }, example: '{songName: Song}' @@ -309,19 +309,19 @@ export class ClassForFuncDemo { icon: $r('sys.plural.selecttitlebar_accessibility_message_desc_new'), llmDescription: 'Get weather of an location', parameters: { - "schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "title": "Weather Schema", - "description": "A schema for get weather of an location", - "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. Hangzhou", - "minLength": 1 + 'schema': 'http://json-schema.org/draft-07/schema#', + 'type': 'object', + 'title': 'Weather Schema', + 'description': 'A schema for get weather of an location', + 'properties': { + 'location': { + 'type': 'string', + 'description': 'The city and state, e.g. Hangzhou', + 'minLength': 1 } }, - "required": ["location"], - "additionalProperties": false + 'required': ['location'], + 'additionalProperties': false } }) static getWeather(location: string): string { @@ -372,19 +372,18 @@ const LOG_TAG: string = 'testTag-EntryIntent'; abilityName: 'EntryAbility', executeMode: [insightIntent.ExecuteMode.UI_ABILITY_FOREGROUND], parameters: { - "schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "title": "Song Schema", - "description": "A schema for describing songs and their artists", - "properties": { - "songName": { - "type": "string", - "description": "The name of the song", - "minLength": 1 + 'schema': 'http://json-schema.org/draft-07/schema#', + 'type': 'object', + 'title': 'Song Schema', + 'description': 'A schema for describing songs and their artists', + 'properties': { + 'songName': { + 'type': 'string', + 'description': 'The name of the song', + 'minLength': 1 } }, - "required": ["songName"], - "additionalProperties": false + 'required': ['songName'] } }) export default class PlayMusicDemo extends InsightIntentEntryExecutor { @@ -404,7 +403,7 @@ export default class PlayMusicDemo extends InsightIntentEntryExecutor { // 定义意图的执行结果 let result: insightIntent.IntentResult = { code: 123, - result: "result" + result: 'result' } hilog.info(0x0000, LOG_TAG, 'PlayMusicDemo return %{public}s', JSON.stringify(result)); // 以Promise的方式返回意图执行结果 -- Gitee