chore(hmos): 导入生产环境鸿蒙工程
- 以 D:\SmartSenior 生产工程为源,纳入 AppScope、entry、cjagent、hvigor 及根配置 - 移除 build-profile.json5 的 signingConfigs(p12/p7b/cer 路径与加密口令)及 products.signingConfig 引用 - 不纳入本地与开发产物:local.properties、.idea、.hvigor、.codegenie、demo、backup_a2a_native、SESSION_LOG.md、build_err.txt、build/、oh_modules - .gitignore 追加 .codegenie 与密钥文件通配(*.p12/*.p7b/*.cer/*.jks/*.keystore/*.pem)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// 小艺意图框架 · 执行型意图:取消午餐(路由即槽位)
|
||||
import { insightIntent, InsightIntentEntry, InsightIntentEntryExecutor } from '@kit.AbilityKit';
|
||||
import { cancelMealByIntent } from '../utils/A2AServer';
|
||||
import { hilog } from '@kit.PerformanceAnalysisKit';
|
||||
|
||||
const INTENT_DOMAIN = 0x0000;
|
||||
|
||||
async function runCancel(): Promise<insightIntent.IntentResult<string>> {
|
||||
hilog.info(INTENT_DOMAIN, 'OrderMealIntent', 'CancelLunch execute');
|
||||
const reply = await cancelMealByIntent('lunch', false);
|
||||
hilog.info(INTENT_DOMAIN, 'OrderMealIntent', 'CancelLunch reply=%{public}s', reply);
|
||||
return { code: 0, result: reply };
|
||||
}
|
||||
|
||||
@InsightIntentEntry({
|
||||
intentName: 'CancelLunch',
|
||||
domain: 'ElderlyCare',
|
||||
intentVersion: '1.0.0',
|
||||
displayName: '取消午餐',
|
||||
displayDescription: '取消老人已预订的午餐',
|
||||
keywords: ['取消午餐', '取消午饭', '不吃午饭', '退订午餐'],
|
||||
llmDescription: '取消老人已预订的午餐。当用户表达"取消午餐""中午不吃了"等意图时调用。执行后返回取消结果说明文本。',
|
||||
parameters: { type: 'object', properties: {} },
|
||||
result: { type: 'string', description: '取消结果说明文本' },
|
||||
abilityName: 'EntryAbility',
|
||||
executeMode: [insightIntent.ExecuteMode.UI_ABILITY_BACKGROUND],
|
||||
})
|
||||
export default class CancelLunchIntent extends InsightIntentEntryExecutor<string> {
|
||||
executeMode: insightIntent.ExecuteMode = insightIntent.ExecuteMode.UI_ABILITY_BACKGROUND;
|
||||
|
||||
async onExecute(): Promise<insightIntent.IntentResult<string>> {
|
||||
return runCancel();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user