Skip to content

Commit c8d69ca

Browse files
authored
✨ Change provideRunSummary param from read-only to editable
✨ Change provideRunSummary param from read-only to editable
2 parents a525bd4 + 8b848e1 commit c8d69ca

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

frontend/app/[locale]/agents/components/agentInfo/AgentGenerateDetail.tsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ export default function AgentGenerateDetail({
220220
dutyPrompt: editedAgent.duty_prompt || "",
221221
constraintPrompt: editedAgent.constraint_prompt || "",
222222
fewShotsPrompt: editedAgent.few_shots_prompt || "",
223+
provideRunSummary: editedAgent.provide_run_summary || false,
223224
};
224225

225226
if (isCreatingMode) {
@@ -254,7 +255,7 @@ export default function AgentGenerateDetail({
254255
});
255256
}
256257

257-
}, [currentAgentId, defaultLlmModel?.id, isCreatingMode, editedAgent.ingroup_permission]);
258+
}, [currentAgentId, defaultLlmModel?.id, isCreatingMode, editedAgent.ingroup_permission, editedAgent.provide_run_summary]);
258259

259260
// Default to selecting all groups when creating a new agent.
260261
// Only applies when groups are loaded and no group is selected yet.
@@ -573,6 +574,7 @@ export default function AgentGenerateDetail({
573574
constraint_prompt: generatedContent.constraintPrompt || formValues.constraintPrompt,
574575
few_shots_prompt: generatedContent.fewShotsPrompt || formValues.fewShotsPrompt,
575576
ingroup_permission: formValues.ingroup_permission || "READ_ONLY",
577+
provide_run_summary: formValues.provideRunSummary || false,
576578
};
577579

578580
// Update profile info in global agent config store
@@ -802,6 +804,28 @@ export default function AgentGenerateDetail({
802804
/>
803805
</Form.Item>
804806

807+
<Form.Item
808+
name="provideRunSummary"
809+
label={t("agent.provideRunSummary")}
810+
rules={[
811+
{
812+
required: true,
813+
message: t("agent.provideRunSummary.error"),
814+
},
815+
]}
816+
className="mb-3"
817+
>
818+
<Select
819+
options={[
820+
{ value: true, label: t("common.yes") },
821+
{ value: false, label: t("common.no") },
822+
]}
823+
onChange={(value) => {
824+
updateProfileInfo({ provide_run_summary: value });
825+
}}
826+
/>
827+
</Form.Item>
828+
805829
<Form.Item
806830
name="agentDescription"
807831
label={t("agent.description")}

frontend/public/locales/en/common.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@
294294
"agent.author": "Author",
295295
"agent.authorPlaceholder": "Please enter author name",
296296
"agent.author.hint": "Default: {{email}}",
297+
"agent.provideRunSummary": "Provide Run Summary",
298+
"agent.provideRunSummary.error": "Please select whether to provide run summary",
297299
"agent.description": "Agent Description",
298300
"agent.descriptionPlaceholder": "Please enter agent description",
299301
"agent.userGroup": "User Group",

frontend/public/locales/zh/common.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@
297297
"agent.author": "作者",
298298
"agent.authorPlaceholder": "请输入作者名称",
299299
"agent.author.hint": "默认:{{email}}",
300+
"agent.provideRunSummary": "提供运行摘要",
301+
"agent.provideRunSummary.error": "请选择是否提供运行摘要",
300302
"agent.description": "智能体描述",
301303
"agent.userGroup": "用户组",
302304
"agent.userGroup.empty": "暂无用户组",

frontend/types/agentConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type AgentProfileInfo = Partial<
1919
| "model"
2020
| "model_id"
2121
| "max_step"
22+
| "provide_run_summary"
2223
| "description"
2324
| "duty_prompt"
2425
| "constraint_prompt"

0 commit comments

Comments
 (0)