@@ -11,58 +11,111 @@ import {
1111import { ansi , emitResult , emitBare } from "bailian-cli-runtime" ;
1212
1313export default defineCommand ( {
14- description : "Call a Bailian application (agent or workflow)" ,
14+ description : {
15+ "en-US" : "Call a Bailian application (agent or workflow)" ,
16+ "zh-CN" : "调用百炼应用(智能体或工作流)" ,
17+ } ,
1518 auth : "apiKey" ,
1619 usageArgs : "--app-id <id> --prompt <text> [flags]" ,
1720 flags : {
1821 appId : {
1922 type : "string" ,
2023 valueHint : "<id>" ,
21- description : " Application ID (required)",
24+ description : { "en-US" : " Application ID (required)", "zh-CN" : "应用 ID(必填)" } ,
2225 required : true ,
2326 } ,
2427 prompt : {
2528 type : "string" ,
2629 valueHint : "<text>" ,
27- description : " Input prompt text",
30+ description : { "en-US" : " Input prompt text", "zh-CN" : "输入提示词文本" } ,
2831 required : true ,
2932 } ,
3033 image : {
3134 type : "array" ,
3235 valueHint : "<url>" ,
33- description : "Image URL(s) to pass to the app (repeatable)" ,
36+ description : {
37+ "en-US" : "Image URL(s) to pass to the app (repeatable)" ,
38+ "zh-CN" : "传给应用的图片 URL(可重复)" ,
39+ } ,
3440 } ,
3541 fileId : {
3642 type : "array" ,
3743 valueHint : "<id>" ,
38- description : "Pre-uploaded file ID(s) (repeatable)" ,
44+ description : {
45+ "en-US" : "Pre-uploaded file ID(s) (repeatable)" ,
46+ "zh-CN" : "已上传的文件 ID(可重复)" ,
47+ } ,
3948 } ,
4049 sessionId : {
4150 type : "string" ,
4251 valueHint : "<id>" ,
43- description : "Session ID for multi-turn conversation" ,
52+ description : {
53+ "en-US" : "Session ID for multi-turn conversation" ,
54+ "zh-CN" : "多轮对话的 Session ID" ,
55+ } ,
56+ } ,
57+ stream : {
58+ type : "switch" ,
59+ description : {
60+ "en-US" : "Stream response (default: on in TTY)" ,
61+ "zh-CN" : "流式输出响应(TTY 中默认开启)" ,
62+ } ,
4463 } ,
45- stream : { type : "switch" , description : "Stream response (default: on in TTY)" } ,
4664 pipelineIds : {
4765 type : "string" ,
4866 valueHint : "<ids>" ,
49- description : "Knowledge base pipeline IDs (comma-separated)" ,
67+ description : {
68+ "en-US" : "Knowledge base pipeline IDs (comma-separated)" ,
69+ "zh-CN" : "知识库 Pipeline ID(以逗号分隔)" ,
70+ } ,
71+ } ,
72+ memoryId : {
73+ type : "string" ,
74+ valueHint : "<id>" ,
75+ description : {
76+ "en-US" : "Memory ID for long-term memory" ,
77+ "zh-CN" : "长期记忆使用的 Memory ID" ,
78+ } ,
5079 } ,
51- memoryId : { type : "string" , valueHint : "<id>" , description : "Memory ID for long-term memory" } ,
5280 bizParams : {
5381 type : "string" ,
5482 valueHint : "<json>" ,
55- description : "Business parameters JSON (workflow variables)" ,
83+ description : {
84+ "en-US" : "Business parameters JSON (workflow variables)" ,
85+ "zh-CN" : "业务参数 JSON(工作流变量)" ,
86+ } ,
87+ } ,
88+ hasThoughts : {
89+ type : "switch" ,
90+ description : { "en-US" : "Show agent thinking process" , "zh-CN" : "显示智能体思考过程" } ,
5691 } ,
57- hasThoughts : { type : "switch" , description : "Show agent thinking process" } ,
5892 } ,
5993 exampleArgs : [
60- '--app-id abc123 --prompt "Hello"' ,
61- '--app-id abc123 --prompt "Describe this image" --image https://example.com/photo.jpg' ,
62- '--app-id abc123 --prompt "Analyze the image" --image img1.jpg --image img2.jpg' ,
63- '--app-id abc123 --prompt "Continue" --session-id sess_xxx --stream' ,
64- '--app-id abc123 --prompt "Search for materials" --pipeline-ids pipe1,pipe2' ,
65- '--app-id abc123 --prompt "Start" --biz-params \'{"key":"value"}\'' ,
94+ {
95+ "en-US" : '--app-id abc123 --prompt "Hello"' ,
96+ "zh-CN" : '--app-id abc123 --prompt "你好"' ,
97+ } ,
98+ {
99+ "en-US" :
100+ '--app-id abc123 --prompt "Describe this image" --image https://example.com/photo.jpg' ,
101+ "zh-CN" : '--app-id abc123 --prompt "描述这张图片" --image https://example.com/photo.jpg' ,
102+ } ,
103+ {
104+ "en-US" : '--app-id abc123 --prompt "Analyze the image" --image img1.jpg --image img2.jpg' ,
105+ "zh-CN" : '--app-id abc123 --prompt "分析这些图片" --image img1.jpg --image img2.jpg' ,
106+ } ,
107+ {
108+ "en-US" : '--app-id abc123 --prompt "Continue" --session-id sess_xxx --stream' ,
109+ "zh-CN" : '--app-id abc123 --prompt "继续" --session-id sess_xxx --stream' ,
110+ } ,
111+ {
112+ "en-US" : '--app-id abc123 --prompt "Search for materials" --pipeline-ids pipe1,pipe2' ,
113+ "zh-CN" : '--app-id abc123 --prompt "搜索资料" --pipeline-ids pipe1,pipe2' ,
114+ } ,
115+ {
116+ "en-US" : '--app-id abc123 --prompt "Start" --biz-params \'{"key":"value"}\'' ,
117+ "zh-CN" : '--app-id abc123 --prompt "开始" --biz-params \'{"key":"value"}\'' ,
118+ } ,
66119 ] ,
67120 async run ( ctx ) {
68121 const { settings, flags } = ctx ;
0 commit comments