🙌 OpenHands: AI-Driven Development
feat(agent-profiles): give a profile its own persona or extra instructions (#17843)
simonrosenbergbab766dae35c
diff --git a/.pr/persona-00-modes.png b/.pr/persona-00-modes.pngnew file mode 100644index 0000000000..2093c5d585Binary files /dev/null and b/.pr/persona-00-modes.png differdiff --git a/.pr/persona-01-editor-persona.png b/.pr/persona-01-editor-persona.pngnew file mode 100644index 0000000000..d09903bcaeBinary files /dev/null and b/.pr/persona-01-editor-persona.png differdiff --git a/.pr/persona-02-editor-instructions.png b/.pr/persona-02-editor-instructions.pngnew file mode 100644index 0000000000..fa21fea926Binary files /dev/null and b/.pr/persona-02-editor-instructions.png differdiff --git a/.pr/persona-03-editor-default-profile.png b/.pr/persona-03-editor-default-profile.pngnew file mode 100644index 0000000000..dd90118b9bBinary files /dev/null and b/.pr/persona-03-editor-default-profile.png differdiff --git a/.pr/persona-04-persona-system-message.png b/.pr/persona-04-persona-system-message.pngnew file mode 100644index 0000000000..48ed63ead1Binary files /dev/null and b/.pr/persona-04-persona-system-message.png differdiff --git a/.pr/persona-05-persona-kept.png b/.pr/persona-05-persona-kept.pngnew file mode 100644index 0000000000..70a2f919f7Binary files /dev/null and b/.pr/persona-05-persona-kept.png differdiff --git a/.pr/persona-06-instructions-system-message.png b/.pr/persona-06-instructions-system-message.pngnew file mode 100644index 0000000000..43208a52c8Binary files /dev/null and b/.pr/persona-06-instructions-system-message.png differdiff --git a/.pr/persona-07-default-system-message.png b/.pr/persona-07-default-system-message.pngnew file mode 100644index 0000000000..75a9ebb2c1Binary files /dev/null and b/.pr/persona-07-default-system-message.png differdiff --git a/.pr/persona-live-check.md b/.pr/persona-live-check.mdnew file mode 100644index 0000000000..e6ae11afd2--- /dev/null+++ b/.pr/persona-live-check.md@@ -0,0 +1,17 @@+# Persona / instructions live check++- Date: 2026-10-05+- Canvas: `c9fd7fd11` (#17843 stacked on #17516), `npm run dev`, fresh state dir, agent-server run with an isolated `HOME`+- Agent-server: 1.53.0 (`/server_info`), browser tool usable+- LLM: recording mock (`openai/mock-test-model`); facts below come from its `GET /admin/requests`+- Launches: each profile picked in the home chat profile menu (`agent_profile_id` path)++| Profile | Mode | Starts with persona | Kept sections sent | Persona-layer sections sent | Instructions sent |+|---|---|---|---|---|---|+| `explorer` | Custom persona | true | MEMORY, SECURITY, SECURITY_RISK_ASSESSMENT, BROWSER_TOOLS, EXTERNAL_SERVICES, PROCESS_MANAGEMENT, SKILLS | none (no SOUL, ROLE, EFFICIENCY, FILE_SYSTEM_GUIDELINES, CODE_QUALITY, VERSION_CONTROL, PULL_REQUESTS, PROBLEM_SOLVING_WORKFLOW, SELF_DOCUMENTATION, ENVIRONMENT_SETUP, TROUBLESHOOTING) | n/a |+| `helper` | Default + your instructions | false | all of the above | SOUL, ROLE, EFFICIENCY, … TROUBLESHOOTING (full default set) | true ("Always answer in bullet points." after `</SKILLS>`) |+| `plain` | OpenHands default | false | all of the above | full default set | n/a |++All three conversations finished with the mock's reply.++Page errors: none. The only console error is a 404 from `GET /api/file/search_subdirs?path=/projects` (the workspace picker probing a missing folder; unrelated to this PR).diff --git a/.pr/tools-01-standard.png b/.pr/tools-01-standard.pngnew file mode 100644index 0000000000..7d80c38429Binary files /dev/null and b/.pr/tools-01-standard.png differdiff --git a/.pr/tools-02-choose.png b/.pr/tools-02-choose.pngnew file mode 100644index 0000000000..7ed6d5f50eBinary files /dev/null and b/.pr/tools-02-choose.png differdiff --git a/.pr/tools-03-global-notice.png b/.pr/tools-03-global-notice.pngnew file mode 100644index 0000000000..83d9f0677cBinary files /dev/null and b/.pr/tools-03-global-notice.png differdiff --git a/__tests__/api/agent-profiles-service/profile-field-support.test.ts b/__tests__/api/agent-profiles-service/profile-field-support.test.tsindex d20e159b88..329bb2198c 100644--- a/__tests__/api/agent-profiles-service/profile-field-support.test.ts+++ b/__tests__/api/agent-profiles-service/profile-field-support.test.ts@@ -1,5 +1,6 @@import { describe, expect, it, vi } from "vitest";import {+ agentProfileSupportsInstructions,agentProfileSupportsSecretRefs,agentProfileSupportsTools,} from "#/api/agent-profiles-service/profile-field-support";@@ -12,6 +13,7 @@ vi.mock("#/api/backend-registry/active-store", () => ({describe.each([["agentProfileSupportsSecretRefs", agentProfileSupportsSecretRefs],+ ["agentProfileSupportsInstructions", agentProfileSupportsInstructions],["agentProfileSupportsTools", agentProfileSupportsTools],])("%s", (_name, supports) => {it("is offered on a local backend", () => {diff --git a/__tests__/components/settings/agent-profiles/agent-profiles-local-view.test.tsx b/__tests__/components/settings/agent-profiles/agent-profiles-local-view.test.tsxindex 680d6dd7a3..531654db15 100644--- a/__tests__/components/settings/agent-profiles/agent-profiles-local-view.test.tsx+++ b/__tests__/components/settings/agent-profiles/agent-profiles-local-view.test.tsx@@ -24,9 +24,11 @@ vi.mock("#/routes/agent-settings", () => {const MockAgentSettings = ({agentSettingsOverride,onSaveControlChange,+ isDefaultProfile,}: {agentSettingsOverride?: Record<string, unknown> | null;onSaveControlChange?: (c: AgentSettingsSaveControl) => void;+ isDefaultProfile?: boolean;}) => {useEffect(() => {if (emitControl) onSaveControlChange?.(emitControl);@@ -37,6 +39,7 @@ vi.mock("#/routes/agent-settings", () => {<divdata-testid="mock-agent-settings"data-override={JSON.stringify(agentSettingsOverride)}+ data-default-profile={String(Boolean(isDefaultProfile))}/>);};@@ -356,6 +359,62 @@ describe("AgentProfilesLocalView save mapping", () => {.getAttribute("data-override") as string,);expect(seededOverride.secret_refs).toEqual(["DATADOG_API_KEY"]);+ expect(+ screen+ .getByTestId("mock-agent-settings")+ .getAttribute("data-default-profile"),+ ).toBe("true");+ });++ it("seeds the editor with a stored persona and instructions", async () => {+ vi.mocked(AgentProfilesService.getProfile).mockResolvedValue({+ name: "default",+ profile: {+ schema_version: 2,+ id: "p-1",+ name: "default",+ revision: 3,+ agent_kind: "openhands",+ llm_profile_ref: "default",+ persona: "You triage issues.",+ system_message_suffix: "Be terse.",+ },+ } as never);+ emitControl = {+ agentType: "openhands",+ isValid: true,+ isDirty: false,+ buildAgentProfileFields: () => ({+ agent_kind: "openhands",+ mcp_server_refs: null,+ }),+ credentials: { isDirty: false, save: vi.fn(), reset: vi.fn() },+ };++ render(<AgentProfilesLocalView />);+ const user = userEvent.setup();+ await user.click(screen.getByTestId("edit-agent-profile"));+ await screen.findByTestId("mock-agent-settings");++ const seededOverride = JSON.parse(+ screen+ .getByTestId("mock-agent-settings")+ .getAttribute("data-override") as string,+ );+ expect(seededOverride.persona).toBe("You triage issues.");+ expect(seededOverride.system_message_suffix).toBe("Be terse.");+ });++ it("does not flag a named profile as the default", async () => {+ emitControl = null;+ render(<AgentProfilesLocalView />);+ await openCreateAndName("triage");++ expect(+ screen+ .getByTestId("mock-agent-settings")+ .getAttribute("data-default-profile"),+ ).toBe("false");});it("edit-save persists an edited secret scope over the stored value", async () => {diff --git a/__tests__/routes/agent-settings.test.tsx b/__tests__/routes/agent-settings.test.tsxindex bde6b5d051..7ad0964203 100644--- a/__tests__/routes/agent-settings.test.tsx+++ b/__tests__/routes/agent-settings.test.tsx@@ -25,8 +25,10 @@ vi.mock("#/hooks/query/use-acp-auth-status", () => ({}));const profileSupportsSecretRefsMock = vi.hoisted(() => vi.fn(() => true));+const profileSupportsInstructionsMock = vi.hoisted(() => vi.fn(() => false));vi.mock("#/api/agent-profiles-service/profile-field-support", () => ({agentProfileSupportsSecretRefs: () => profileSupportsSecretRefsMock(),+ agentProfileSupportsInstructions: () => profileSupportsInstructionsMock(),agentProfileSupportsTools: () => true,}));@@ -1008,3 +1010,168 @@ describe("AgentSettingsScreen — MCP scope dirty tracking", () => {});});});++describe("AgentSettingsScreen — system prompt", () => {+ beforeEach(() => {+ vi.restoreAllMocks();+ vi.spyOn(SettingsService, "getSettings").mockResolvedValue(buildSettings());+ vi.spyOn(SecretsService, "getSecrets").mockResolvedValue([]);+ profileSupportsInstructionsMock.mockReturnValue(true);+ });++ const OPENHANDS_PROFILE = {+ agent_kind: "openhands",+ mcp_server_refs: null,+ };++ async function openModes() {+ const user = userEvent.setup();+ const combo = screen.getByTestId("agent-settings-system-prompt-mode");+ combo.focus();+ await user.keyboard("{ArrowDown}");+ return user;+ }++ async function chooseMode(name: string) {+ const user = await openModes();+ await user.click(await screen.findByRole("option", { name }));+ return user;+ }++ it("is hidden where launches would not apply it", async () => {+ profileSupportsInstructionsMock.mockReturnValue(false);+ const { control } = renderAgentSettingsScreen({+ agentSettingsOverride: OPENHANDS_PROFILE,+ });+ await screen.findByTestId("agent-settings-screen");++ expect(+ screen.queryByTestId("agent-settings-system-prompt-mode"),+ ).not.toBeInTheDocument();+ const fields = control().buildAgentProfileFields();+ expect(fields).not.toHaveProperty("persona");+ expect(fields).not.toHaveProperty("system_message_suffix");+ });++ it("persists null for both fields on the OpenHands default", async () => {+ const { control } = renderAgentSettingsScreen({+ agentSettingsOverride: OPENHANDS_PROFILE,+ });+ await screen.findByTestId("agent-settings-system-prompt-mode");++ expect(+ screen.queryByTestId("agent-settings-system-prompt"),+ ).not.toBeInTheDocument();+ expect(control().buildAgentProfileFields()).toMatchObject({+ persona: null,+ system_message_suffix: null,+ });+ });++ it.each([+ ["system_message_suffix", "append"],+ ["persona", "custom"],+ ])("opens a stored %s in %s mode, clean", async (field, mode) => {+ const { control } = renderAgentSettingsScreen({+ agentSettingsOverride: { ...OPENHANDS_PROFILE, [field]: "Stored text." },+ });++ expect(+ await screen.findByTestId("agent-settings-system-prompt"),+ ).toHaveValue("Stored text.");+ expect(+ screen.getByTestId("agent-settings-system-prompt-hint"),+ ).toHaveTextContent(+ mode === "append"+ ? "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND_HINT"+ : "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_CUSTOM_HINT",+ );+ expect(control().isDirty).toBe(false);+ expect(control().buildAgentProfileFields()).toMatchObject({+ [field]: "Stored text.",+ });+ });++ it("saves typed instructions as the suffix, not an override", async () => {+ const { control } = renderAgentSettingsScreen({+ agentSettingsOverride: OPENHANDS_PROFILE,+ });+ await screen.findByTestId("agent-settings-system-prompt-mode");++ const user = await chooseMode(+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND",+ );+ await user.type(+ screen.getByTestId("agent-settings-system-prompt"),+ "Be terse.",+ );+ await waitFor(() => expect(control().isDirty).toBe(true));+ expect(control().buildAgentProfileFields()).toMatchObject({+ persona: null,+ system_message_suffix: "Be terse.",+ });+ });++ it("blocks saving empty text, then saves the typed custom persona", async () => {+ const { control } = renderAgentSettingsScreen({+ agentSettingsOverride: OPENHANDS_PROFILE,+ });+ await screen.findByTestId("agent-settings-system-prompt-mode");++ const user = await chooseMode(+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_CUSTOM",+ );+ await waitFor(() => expect(control().isValid).toBe(false));+ expect(+ screen.getByTestId("agent-settings-system-prompt-required"),+ ).toBeInTheDocument();++ await user.type(+ screen.getByTestId("agent-settings-system-prompt"),+ "You review PRs.",+ );+ await waitFor(() => expect(control().isValid).toBe(true));+ expect(control().buildAgentProfileFields()).toMatchObject({+ persona: "You review PRs.",+ system_message_suffix: null,+ });+ });++ it("clears a stored persona when switched back to the default", async () => {+ const { control } = renderAgentSettingsScreen({+ agentSettingsOverride: {+ ...OPENHANDS_PROFILE,+ persona: "You triage issues.",+ },+ });+ await screen.findByTestId("agent-settings-system-prompt");++ await chooseMode("SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_STANDARD");+ await waitFor(() => expect(control().isDirty).toBe(true));+ expect(control().buildAgentProfileFields()).toMatchObject({+ persona: null,+ system_message_suffix: null,+ });+ });++ it("explains instead of editing on the default profile, and leaves both fields alone", async () => {+ const { control } = renderAgentSettingsScreen({+ agentSettingsOverride: {+ ...OPENHANDS_PROFILE,+ persona: "Set through the API.",+ system_message_suffix: "Also set through the API.",+ },+ isDefaultProfile: true,+ });++ expect(+ await screen.findByTestId("agent-settings-system-prompt-default-profile"),+ ).toBeInTheDocument();+ expect(+ screen.queryByTestId("agent-settings-system-prompt-mode"),+ ).not.toBeInTheDocument();+ const fields = control().buildAgentProfileFields();+ expect(fields).not.toHaveProperty("persona");+ expect(fields).not.toHaveProperty("system_message_suffix");+ });+});diff --git a/__tests__/routes/build-agent-profile-fields.test.ts b/__tests__/routes/build-agent-profile-fields.test.tsindex 51b7ad3745..e1a109469f 100644--- a/__tests__/routes/build-agent-profile-fields.test.ts+++ b/__tests__/routes/build-agent-profile-fields.test.ts@@ -1,5 +1,8 @@import { describe, expect, it } from "vitest";-import { buildAgentProfileFields } from "#/routes/agent-settings";+import {+ buildAgentProfileFields,+ readSystemPromptSeed,+} from "#/routes/agent-settings";import type { SettingsFieldSchema } from "#/types/settings";const baseAcp = {@@ -15,6 +18,9 @@ const baseAcp = {secretsMode: "standard" as const,selectedSecrets: [] as string[],secretRefsSupportedOnProfile: true,+ systemPromptMode: "standard" as const,+ systemPromptText: "",+ systemPromptEditable: false,toolsMode: "standard" as const,selectedTools: [] as string[],toolParams: {},@@ -98,6 +104,9 @@ describe("buildAgentProfileFields — OpenHands", () => {secretsMode: "standard" as const,selectedSecrets: [] as string[],secretRefsSupportedOnProfile: true,+ systemPromptMode: "standard" as const,+ systemPromptText: "",+ systemPromptEditable: false,};it("leaves tools out until the catalog loads, so the stored selection survives", () => {@@ -176,6 +185,9 @@ describe("buildAgentProfileFields — mcp_server_refs", () => {secretsMode: "standard" as const,selectedSecrets: [] as string[],secretRefsSupportedOnProfile: true,+ systemPromptMode: "standard" as const,+ systemPromptText: "",+ systemPromptEditable: false,};it("emits null in standard mode, so the profile inherits every server", () => {@@ -226,6 +238,9 @@ describe("buildAgentProfileFields — secret scope", () => {secretsMode: "standard" as const,selectedSecrets: [] as string[],secretRefsSupportedOnProfile: true,+ systemPromptMode: "standard" as const,+ systemPromptText: "",+ systemPromptEditable: false,mcpMode: "standard" as const,selectedMcpServers: [] as string[],toolsMode: "standard" as const,@@ -279,6 +294,102 @@ describe("buildAgentProfileFields — secret scope", () => {});});+describe("buildAgentProfileFields — system prompt", () => {+ const base = {+ isAcp: false,+ selectedPreset: "custom",+ isDefaultProviderCommand: false,+ commandTokens: [] as string[],+ acpModel: "",+ toolConcurrencyField: undefined,+ toolConcurrency: "",+ mcpMode: "standard" as const,+ selectedMcpServers: [] as string[],+ secretsMode: "standard" as const,+ selectedSecrets: [] as string[],+ secretRefsSupportedOnProfile: false,+ systemPromptMode: "custom" as const,+ systemPromptText: "You triage issues.",+ systemPromptEditable: true,+ };++ it("a custom prompt saves persona and clears the instructions", () => {+ expect(buildAgentProfileFields(base)).toMatchObject({+ persona: "You triage issues.",+ system_message_suffix: null,+ });+ });++ it("instructions save system_message_suffix and clear the persona", () => {+ expect(+ buildAgentProfileFields({ ...base, systemPromptMode: "append" }),+ ).toMatchObject({+ persona: null,+ system_message_suffix: "You triage issues.",+ });+ });++ it("the OpenHands default clears both, even with leftover text", () => {+ expect(+ buildAgentProfileFields({ ...base, systemPromptMode: "standard" }),+ ).toMatchObject({ persona: null, system_message_suffix: null });+ });++ it.each(["custom", "append"] as const)(+ "a blank %s text clears both",+ (mode) => {+ expect(+ buildAgentProfileFields({+ ...base,+ systemPromptMode: mode,+ systemPromptText: " \n ",+ }),+ ).toMatchObject({ persona: null, system_message_suffix: null });+ },+ );++ it("omits both keys when the section is hidden", () => {+ const fields = buildAgentProfileFields({+ ...base,+ systemPromptEditable: false,+ });+ expect(fields).not.toHaveProperty("persona");+ expect(fields).not.toHaveProperty("system_message_suffix");+ });++ it("never rides the ACP variant", () => {+ const fields = buildAgentProfileFields({+ ...base,+ isAcp: true,+ selectedPreset: "claude-code",+ commandTokens: ["npx", "claude-code-acp"],+ });+ expect(fields).not.toHaveProperty("persona");+ expect(fields).not.toHaveProperty("system_message_suffix");+ });+});++describe("readSystemPromptSeed", () => {+ it.each([+ [null, { mode: "standard", text: "" }],+ [+ { system_message_suffix: "Be terse." },+ { mode: "append", text: "Be terse." },+ ],+ [{ persona: "You triage." }, { mode: "custom", text: "You triage." }],+ [+ { persona: "You triage.", system_message_suffix: "Be terse." },+ { mode: "custom", text: "You triage." },+ ],+ [+ { persona: null, system_message_suffix: "" },+ { mode: "standard", text: "" },+ ],+ ])("%j opens as %j", (override, expected) => {+ expect(readSystemPromptSeed(override)).toEqual(expected);+ });+});+describe("tool selection", () => {const baseOpenHands = { ...baseAcp, isAcp: false };diff --git a/src/api/agent-profiles-service/profile-field-support.ts b/src/api/agent-profiles-service/profile-field-support.tsindex e1d6b6e233..16b6b5d31b 100644--- a/src/api/agent-profiles-service/profile-field-support.ts+++ b/src/api/agent-profiles-service/profile-field-support.ts@@ -5,6 +5,11 @@ export function agentProfileSupportsSecretRefs(): boolean {return getActiveBackend().backend.kind !== "cloud";}+/** Only offer profile instructions where launches apply them. */+export function agentProfileSupportsInstructions(): boolean {+ return getActiveBackend().backend.kind !== "cloud";+}+/** Local only: cloud launches ignore a profile's tools for now. */export function agentProfileSupportsTools(): boolean {return getActiveBackend().backend.kind !== "cloud";diff --git a/src/components/features/settings/agent-profiles/agent-profiles-local-view.tsx b/src/components/features/settings/agent-profiles/agent-profiles-local-view.tsxindex ed8c6b5790..f1bd82429c 100644--- a/src/components/features/settings/agent-profiles/agent-profiles-local-view.tsx+++ b/src/components/features/settings/agent-profiles/agent-profiles-local-view.tsx@@ -61,6 +61,8 @@ function toAgentSettingsOverride(tools: (profile.tools as SettingsValue) ?? null,tool_concurrency_limit: profile.tool_concurrency_limit,secret_refs: secretRefs,+ persona: profile.persona ?? null,+ system_message_suffix: profile.system_message_suffix ?? null,};}diff --git a/src/components/features/settings/agent-profiles/merge-agent-profile-save-input.ts b/src/components/features/settings/agent-profiles/merge-agent-profile-save-input.tsindex 787cb7f75b..788540da83 100644--- a/src/components/features/settings/agent-profiles/merge-agent-profile-save-input.ts+++ b/src/components/features/settings/agent-profiles/merge-agent-profile-save-input.ts@@ -6,8 +6,8 @@ import type {/*** Merge the minimal editor's fields over the stored profile so an edit-save* doesn't wipe the fields the editor doesn't model (condenser, verification,- * system_message_suffix, mcp_server_refs, the disabled_skills deny-list, ACP- * session mode/timeout, …) — `POST /api/agent-profiles/{name}` is a+ * mcp_server_refs, the disabled_skills deny-list, ACP session mode/timeout,+ * …) — `POST /api/agent-profiles/{name}` is a* whole-profile overwrite, and unset fields fall back to server-side defaults.** Kind-aware: when the editor switched `agent_kind`, the stored variant'sdiff --git a/src/i18n/translation.json b/src/i18n/translation.jsonindex 4d210b6d8b..c1934dbdeb 100644--- a/src/i18n/translation.json+++ b/src/i18n/translation.json@@ -43842,6 +43842,193 @@"uk": "Дозволяє секрети, передані під час запуску агента. Для автоматизацій явно виберіть секрети в цьому профілі.","ca": "Permet els secrets proporcionats en iniciar l’agent. Per a les automatitzacions, tria explícitament els secrets en aquest perfil."},+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT": {+ "en": "System prompt",+ "ja": "システムプロンプト",+ "zh-CN": "系统提示词",+ "zh-TW": "系統提示詞",+ "ko-KR": "시스템 프롬프트",+ "no": "Systemprompt",+ "it": "Prompt di sistema",+ "pt": "Prompt do sistema",+ "es": "Prompt del sistema",+ "ar": "موجّه النظام",+ "fr": "Prompt système",+ "tr": "Sistem istemi",+ "de": "System-Prompt",+ "uk": "Системний промпт",+ "ca": "Indicació del sistema"+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND": {+ "en": "Default + your instructions",+ "ja": "デフォルト + 独自の指示",+ "zh-CN": "默认 + 你的说明",+ "zh-TW": "預設 + 你的說明",+ "ko-KR": "기본값 + 사용자 지침",+ "no": "Standard + dine instruksjoner",+ "it": "Predefinito + le tue istruzioni",+ "pt": "Padrão + suas instruções",+ "es": "Predeterminado + tus instrucciones",+ "ar": "الافتراضي + تعليماتك",+ "fr": "Par défaut + vos instructions",+ "tr": "Varsayılan + talimatlarınız",+ "de": "Standard + eigene Anweisungen",+ "uk": "Типовий + ваші інструкції",+ "ca": "Predeterminat + les teves instruccions"+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND_HINT": {+ "en": "Your instructions are added after the built-in OpenHands instructions, which stay in place.",+ "ja": "指示は OpenHands の組み込み指示の後に追加され、組み込み指示はそのまま残ります。",+ "zh-CN": "你的说明会添加在 OpenHands 内置说明之后,内置说明保持不变。",+ "zh-TW": "你的說明會加在 OpenHands 內建說明之後,內建說明保持不變。",+ "ko-KR": "지침은 OpenHands 기본 제공 지침 뒤에 추가되며, 기본 지침은 그대로 유지됩니다.",+ "no": "Instruksjonene dine legges til etter de innebygde OpenHands-instruksjonene, som beholdes.",+ "it": "Le tue istruzioni vengono aggiunte dopo quelle integrate di OpenHands, che restano invariate.",+ "pt": "Suas instruções são adicionadas depois das instruções integradas do OpenHands, que continuam valendo.",+ "es": "Tus instrucciones se añaden después de las instrucciones integradas de OpenHands, que se mantienen.",+ "ar": "تُضاف تعليماتك بعد تعليمات OpenHands المضمّنة، والتي تبقى كما هي.",+ "fr": "Vos instructions sont ajoutées après les instructions intégrées d’OpenHands, qui restent en place.",+ "tr": "Talimatlarınız, yerinde kalan yerleşik OpenHands talimatlarının ardından eklenir.",+ "de": "Ihre Anweisungen werden nach den integrierten OpenHands-Anweisungen angefügt, die erhalten bleiben.",+ "uk": "Ваші інструкції додаються після вбудованих інструкцій OpenHands, які залишаються без змін.",+ "ca": "Les teves instruccions s’afegeixen després de les instruccions integrades d’OpenHands, que es mantenen."+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND_PLACEHOLDER": {+ "en": "Instructions to add, e.g. how to answer or what to avoid.",+ "ja": "追加する指示(例: 回答の仕方や避けるべきこと)",+ "zh-CN": "要添加的说明,例如回答方式或需要避免的事项。",+ "zh-TW": "要加入的說明,例如回答方式或需要避免的事項。",+ "ko-KR": "추가할 지침(예: 답변 방식이나 피해야 할 것)",+ "no": "Instruksjoner som skal legges til, f.eks. hvordan den skal svare eller hva den skal unngå.",+ "it": "Istruzioni da aggiungere, ad es. come rispondere o cosa evitare.",+ "pt": "Instruções a adicionar, por exemplo, como responder ou o que evitar.",+ "es": "Instrucciones que añadir, p. ej., cómo responder o qué evitar.",+ "ar": "تعليمات لإضافتها، مثل طريقة الإجابة أو ما يجب تجنّبه.",+ "fr": "Instructions à ajouter, par exemple comment répondre ou quoi éviter.",+ "tr": "Eklenecek talimatlar; örneğin nasıl yanıt verileceği veya nelerden kaçınılacağı.",+ "de": "Hinzuzufügende Anweisungen, z. B. wie geantwortet oder was vermieden werden soll.",+ "uk": "Інструкції, які потрібно додати, наприклад як відповідати або чого уникати.",+ "ca": "Instruccions per afegir, p. ex. com respondre o què evitar."+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_CUSTOM": {+ "en": "Custom persona",+ "ja": "カスタムペルソナ",+ "zh-CN": "自定义角色设定",+ "zh-TW": "自訂角色設定",+ "ko-KR": "사용자 지정 페르소나",+ "no": "Egendefinert persona",+ "it": "Persona personalizzata",+ "pt": "Persona personalizada",+ "es": "Persona personalizada",+ "ar": "شخصية مخصصة",+ "fr": "Persona personnalisée",+ "tr": "Özel persona",+ "de": "Eigene Persona",+ "uk": "Власна персона",+ "ca": "Persona personalitzada"+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_CUSTOM_HINT": {+ "en": "Replaces OpenHands' built-in persona and coding workflow. Memory, security and tool guidance, skills, repository instructions and runtime context are still included.",+ "ja": "OpenHands の組み込みペルソナとコーディングのワークフローを置き換えます。メモリ、セキュリティ、ツールのガイダンス、スキル、リポジトリの指示、実行時のコンテキストは引き続き含まれます。",+ "zh-CN": "替换 OpenHands 内置的角色设定和编码工作流程。记忆、安全和工具指引、技能、仓库说明以及运行时上下文仍会保留。",+ "zh-TW": "取代 OpenHands 內建的角色設定與程式設計工作流程。記憶、安全性與工具指引、技能、存放庫說明以及執行階段內容仍會保留。",+ "ko-KR": "OpenHands 기본 제공 페르소나와 코딩 워크플로를 대체합니다. 메모리, 보안 및 도구 지침, 스킬, 저장소 지침, 런타임 컨텍스트는 계속 포함됩니다.",+ "no": "Erstatter den innebygde OpenHands-personaen og kodearbeidsflyten. Minne, sikkerhets- og verktøyveiledning, ferdigheter, repositoryinstruksjoner og kjøretidskontekst er fortsatt med.",+ "it": "Sostituisce la persona integrata di OpenHands e il flusso di lavoro di programmazione. Memoria, indicazioni su sicurezza e strumenti, skill, istruzioni del repository e contesto di runtime restano inclusi.",+ "pt": "Substitui a persona integrada do OpenHands e o fluxo de trabalho de programação. Memória, orientações de segurança e de ferramentas, skills, instruções do repositório e contexto de execução continuam incluídos.",+ "es": "Reemplaza la persona integrada de OpenHands y su flujo de trabajo de programación. La memoria, las pautas de seguridad y de herramientas, las skills, las instrucciones del repositorio y el contexto de ejecución se siguen incluyendo.",+ "ar": "يستبدل شخصية OpenHands المضمّنة وسير عمل البرمجة. تبقى الذاكرة وإرشادات الأمان والأدوات والمهارات وتعليمات المستودع وسياق التشغيل مضمّنة.",+ "fr": "Remplace la persona intégrée d’OpenHands et son flux de travail de programmation. La mémoire, les consignes de sécurité et d’outils, les skills, les instructions du dépôt et le contexte d’exécution restent inclus.",+ "tr": "Yerleşik OpenHands personasını ve kodlama iş akışını değiştirir. Bellek, güvenlik ve araç yönergeleri, yetenekler, depo talimatları ve çalışma zamanı bağlamı yine dahil edilir.",+ "de": "Ersetzt die integrierte OpenHands-Persona und den Programmier-Workflow. Gedächtnis, Sicherheits- und Werkzeughinweise, Skills, Repository-Anweisungen und Laufzeitkontext bleiben enthalten.",+ "uk": "Замінює вбудовану персону OpenHands і робочий процес програмування. Пам’ять, настанови з безпеки та інструментів, навички, інструкції репозиторію й контекст виконання й надалі включаються.",+ "ca": "Substitueix la persona integrada d’OpenHands i el flux de treball de programació. La memòria, les pautes de seguretat i d’eines, les habilitats, les instruccions del repositori i el context d’execució s’hi continuen incloent."+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_DEFAULT_PROFILE": {+ "en": "The default profile always uses the OpenHands system prompt. Create a named profile to customize it.",+ "ja": "デフォルトのプロファイルでは常に OpenHands のシステムプロンプトが使われます。カスタマイズするには、名前付きのプロファイルを作成してください。",+ "zh-CN": "默认配置文件始终使用 OpenHands 系统提示词。如需自定义,请创建一个命名配置文件。",+ "zh-TW": "預設設定檔一律使用 OpenHands 系統提示詞。若要自訂,請建立具名設定檔。",+ "ko-KR": "기본 프로필은 항상 OpenHands 시스템 프롬프트를 사용합니다. 사용자 지정하려면 이름이 있는 프로필을 만드세요.",+ "no": "Standardprofilen bruker alltid OpenHands-systemprompten. Opprett en navngitt profil for å tilpasse den.",+ "it": "Il profilo predefinito usa sempre il prompt di sistema di OpenHands. Crea un profilo con nome per personalizzarlo.",+ "pt": "O perfil padrão sempre usa o prompt do sistema do OpenHands. Crie um perfil com nome para personalizá-lo.",+ "es": "El perfil predeterminado siempre usa el prompt del sistema de OpenHands. Crea un perfil con nombre para personalizarlo.",+ "ar": "يستخدم الملف الشخصي الافتراضي دائمًا موجّه نظام OpenHands. أنشئ ملفًا شخصيًا باسم لتخصيصه.",+ "fr": "Le profil par défaut utilise toujours le prompt système d’OpenHands. Créez un profil nommé pour le personnaliser.",+ "tr": "Varsayılan profil her zaman OpenHands sistem istemini kullanır. Özelleştirmek için adlandırılmış bir profil oluşturun.",+ "de": "Das Standardprofil verwendet immer den OpenHands-System-Prompt. Erstellen Sie ein benanntes Profil, um ihn anzupassen.",+ "uk": "Типовий профіль завжди використовує системний промпт OpenHands. Щоб налаштувати його, створіть іменований профіль.",+ "ca": "El perfil predeterminat sempre fa servir la indicació del sistema d’OpenHands. Crea un perfil amb nom per personalitzar-la."+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_PLACEHOLDER": {+ "en": "Describe who this agent is and how it should work.",+ "ja": "このエージェントの役割と作業の進め方を説明してください。",+ "zh-CN": "描述此代理的身份及其工作方式。",+ "zh-TW": "描述此代理的身分及其工作方式。",+ "ko-KR": "이 에이전트가 누구이며 어떻게 작업해야 하는지 설명하세요.",+ "no": "Beskriv hvem denne agenten er og hvordan den skal jobbe.",+ "it": "Descrivi chi è questo agente e come deve lavorare.",+ "pt": "Descreva quem é este agente e como ele deve trabalhar.",+ "es": "Describe quién es este agente y cómo debe trabajar.",+ "ar": "صف هوية هذا الوكيل وطريقة عمله.",+ "fr": "Décrivez qui est cet agent et comment il doit travailler.",+ "tr": "Bu aracının kim olduğunu ve nasıl çalışması gerektiğini açıklayın.",+ "de": "Beschreiben Sie, wer dieser Agent ist und wie er arbeiten soll.",+ "uk": "Опишіть, хто цей агент і як він має працювати.",+ "ca": "Descriu qui és aquest agent i com ha de treballar."+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_REQUIRED": {+ "en": "Enter the text, or switch back to the OpenHands default.",+ "ja": "テキストを入力するか、OpenHands のデフォルトに戻してください。",+ "zh-CN": "请输入文本,或切换回 OpenHands 默认值。",+ "zh-TW": "請輸入文字,或切換回 OpenHands 預設值。",+ "ko-KR": "텍스트를 입력하거나 OpenHands 기본값으로 다시 전환하세요.",+ "no": "Skriv inn teksten, eller bytt tilbake til OpenHands-standarden.",+ "it": "Inserisci il testo oppure torna al predefinito di OpenHands.",+ "pt": "Insira o texto ou volte ao padrão do OpenHands.",+ "es": "Introduce el texto o vuelve al predeterminado de OpenHands.",+ "ar": "أدخل النص، أو ارجع إلى الإعداد الافتراضي لـ OpenHands.",+ "fr": "Saisissez le texte ou revenez à la valeur par défaut d’OpenHands.",+ "tr": "Metni girin veya OpenHands varsayılanına geri dönün.",+ "de": "Geben Sie den Text ein oder wechseln Sie zurück zum OpenHands-Standard.",+ "uk": "Введіть текст або поверніться до типового OpenHands.",+ "ca": "Introdueix el text o torna al predeterminat d’OpenHands."+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_STANDARD": {+ "en": "OpenHands default",+ "ja": "OpenHands のデフォルト",+ "zh-CN": "OpenHands 默认",+ "zh-TW": "OpenHands 預設",+ "ko-KR": "OpenHands 기본값",+ "no": "OpenHands-standard",+ "it": "Predefinito di OpenHands",+ "pt": "Padrão do OpenHands",+ "es": "Predeterminado de OpenHands",+ "ar": "افتراضي OpenHands",+ "fr": "Par défaut d’OpenHands",+ "tr": "OpenHands varsayılanı",+ "de": "OpenHands-Standard",+ "uk": "Типовий OpenHands",+ "ca": "Predeterminat d’OpenHands"+ },+ "SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_STANDARD_HINT": {+ "en": "Uses the built-in OpenHands instructions for coding, security and tool use.",+ "ja": "コーディング、セキュリティ、ツールの使用に関する OpenHands の組み込み指示を使用します。",+ "zh-CN": "使用 OpenHands 内置的编码、安全和工具使用说明。",+ "zh-TW": "使用 OpenHands 內建的程式設計、安全性與工具使用說明。",+ "ko-KR": "코딩, 보안, 도구 사용에 관한 OpenHands 기본 제공 지침을 사용합니다.",+ "no": "Bruker de innebygde OpenHands-instruksjonene for koding, sikkerhet og verktøybruk.",+ "it": "Usa le istruzioni integrate di OpenHands per programmazione, sicurezza e uso degli strumenti.",+ "pt": "Usa as instruções integradas do OpenHands para programação, segurança e uso de ferramentas.",+ "es": "Usa las instrucciones integradas de OpenHands para programación, seguridad y uso de herramientas.",+ "ar": "يستخدم تعليمات OpenHands المضمّنة للبرمجة والأمان واستخدام الأدوات.",+ "fr": "Utilise les instructions intégrées d’OpenHands pour le code, la sécurité et l’utilisation des outils.",+ "tr": "Kodlama, güvenlik ve araç kullanımı için yerleşik OpenHands talimatlarını kullanır.",+ "de": "Verwendet die integrierten OpenHands-Anweisungen für Programmierung, Sicherheit und Werkzeugnutzung.",+ "uk": "Використовує вбудовані інструкції OpenHands щодо програмування, безпеки та використання інструментів.",+ "ca": "Fa servir les instruccions integrades d’OpenHands per a programació, seguretat i ús d’eines."+ },"SETTINGS$AGENT_PROFILE_SECRETS_CHOOSE_HINT": {"en": "This agent can use only the secrets you select — make sure it has everything it needs. An external agent needs its own provider credentials to sign in.","ja": "このエージェントは選択したシークレットのみを使用できます。必要なものがすべて含まれているか確認してください。外部エージェントはサインインに自身のプロバイダー認証情報が必要です。",diff --git a/src/routes/agent-settings.tsx b/src/routes/agent-settings.tsxindex 62bbb277dd..62a419e74c 100644--- a/src/routes/agent-settings.tsx+++ b/src/routes/agent-settings.tsx@@ -17,6 +17,8 @@ import {import { ProfileScopeList } from "#/components/features/settings/agent-profiles/profile-scope-list";import { Typography } from "#/ui/typography";import { I18nKey } from "#/i18n/declaration";+import { formControlMultilineFieldClassName } from "#/utils/form-control-classes";+import { cn } from "#/utils/utils";import { SettingsFieldSchema, SettingsValue } from "#/types/settings";import {coerceFieldValue,@@ -41,6 +43,7 @@ import { flattenMcpConfig } from "#/utils/mcp-installed-servers";import { parseMcpConfig } from "#/utils/mcp-config";import {agentProfileSupportsSecretRefs,+ agentProfileSupportsInstructions,agentProfileSupportsTools,} from "#/api/agent-profiles-service/profile-field-support";import { useSearchSecrets } from "#/hooks/query/use-get-secrets";@@ -60,6 +63,9 @@ const TOOL_CONCURRENCY_FIELD_KEY = "tool_concurrency_limit";const MCP_SERVER_REFS_KEY = "mcp_server_refs";const SECRET_REFS_KEY = "secret_refs";const TOOLS_KEY = "tools";+const PERSONA_KEY = "persona";+const SYSTEM_MESSAGE_SUFFIX_KEY = "system_message_suffix";+const SYSTEM_PROMPT_MAX_LENGTH = 65536;const COMMAND_PLACEHOLDER_FALLBACK = "npx -y <package-name>";const ACP_CUSTOM_MODEL_KEY = "__custom_model__";const EMPTY_AGENT_SETTINGS_SNAPSHOT: AgentSettingsSnapshot = {@@ -88,6 +94,21 @@ function detectPreset(return ACP_CUSTOM_PRESET_KEY;}+export type SystemPromptMode = "standard" | "append" | "custom";++/** A stored persona wins over stored instructions; the editor models one choice. */+export function readSystemPromptSeed(+ override: Record<string, SettingsValue> | null | undefined,+): { mode: SystemPromptMode; text: string } {+ const persona = override?.[PERSONA_KEY];+ if (typeof persona === "string" && persona)+ return { mode: "custom", text: persona };+ const suffix = override?.[SYSTEM_MESSAGE_SUFFIX_KEY];+ if (typeof suffix === "string" && suffix)+ return { mode: "append", text: suffix };+ return { mode: "standard", text: "" };+}+function isKnownAcpModel(provider: ACPProviderConfig | undefined,model: string,@@ -108,6 +129,8 @@ export type AgentProfileFieldsDraft =tool_concurrency_limit?: number;secret_refs?: string[] | null;tools?: ProfileToolSpec[] | null;+ persona?: string | null;+ system_message_suffix?: string | null;}| {agent_kind: "acp";@@ -142,6 +165,10 @@ export interface AgentProfileFieldsInput {toolParams?: Record<string, Record<string, SettingsValue>>;/** Whether the tool catalog loaded; `tools` is only written then. */toolCatalogLoaded?: boolean;+ systemPromptMode: SystemPromptMode;+ systemPromptText: string;+ /** False when the section is hidden, so neither prompt field is written. */+ systemPromptEditable: boolean;}/**@@ -182,6 +209,9 @@ export function buildAgentProfileFields(selectedTools = [],toolParams = {},toolCatalogLoaded = false,+ systemPromptMode,+ systemPromptText,+ systemPromptEditable,} = input;// Both are base-model fields, so they ride both variants. `mcp_server_refs`// needs no version gate — it has existed since agent profiles shipped, below@@ -213,6 +243,11 @@ export function buildAgentProfileFields(...mcpRefs,...secretRefs,};+ if (systemPromptEditable) {+ const text = systemPromptText.trim() ? systemPromptText : null;+ fields.system_message_suffix = systemPromptMode === "append" ? text : null;+ fields.persona = systemPromptMode === "custom" ? text : null;+ }if (toolCatalogLoaded) {fields.tools = buildProfileToolsValue({mode: toolsMode,@@ -264,7 +299,7 @@ interface AgentSettingsScreenProps {/** `agent_settings`-shaped profile fields the form opens on. */agentSettingsOverride?: Record<string, SettingsValue> | null;onSaveControlChange: (control: AgentSettingsSaveControl) => void;- /** Local launches route the `default` profile around its stored tools. */+ /** Local launches route the `default` profile around its stored prompt and tools. */isDefaultProfile?: boolean;}@@ -354,6 +389,20 @@ export function AgentSettingsScreen({[toolPickerCatalog, selectedTools],);+ // --- System prompt (OpenHands path) ---+ const instructionsSupported = agentProfileSupportsInstructions();+ const showSystemPrompt = instructionsSupported && !isDefaultProfile;+ const initialSystemPrompt = React.useMemo(+ () => readSystemPromptSeed(agentSettingsOverride),+ [agentSettingsOverride],+ );+ const [systemPromptMode, setSystemPromptMode] = useState<SystemPromptMode>(+ initialSystemPrompt.mode,+ );+ const [systemPromptText, setSystemPromptText] = useState(+ initialSystemPrompt.text,+ );+// --- MCP servers (both variants; a base-model field) ---const initialMcpRefs = React.useMemo(() => readProfileScope(agentSettingsOverride?.[MCP_SERVER_REFS_KEY]),@@ -546,6 +595,11 @@ export function AgentSettingsScreen({setToolConcurrency(initialToolConcurrency);}, [initialToolConcurrency]);+ useEffect(() => {+ setSystemPromptMode(initialSystemPrompt.mode);+ setSystemPromptText(initialSystemPrompt.text);+ }, [initialSystemPrompt]);+// Sync the MCP scope when settings reloaduseEffect(() => {setMcpMode(initialMcpRefs.mode);@@ -613,6 +667,16 @@ export function AgentSettingsScreen({toolsMode !== initialTools.mode ||(toolsMode === "custom" &&!sameScopeSelection(orderedSelectedTools, initialTools.selected));+ const systemPromptDirty =+ showSystemPrompt &&+ (systemPromptMode !== initialSystemPrompt.mode ||+ (systemPromptMode !== "standard" &&+ systemPromptText !== initialSystemPrompt.text));+ const systemPromptMissing =+ agentType === "openhands" &&+ showSystemPrompt &&+ systemPromptMode !== "standard" &&+ !systemPromptText.trim();const settingsDirty =agentType !== loadedSnapshot.agentType ||mcpScopeDirty ||@@ -622,7 +686,7 @@ export function AgentSettingsScreen({? commandText !== loadedSnapshot.commandText ||acpModel !== loadedSnapshot.acpModel ||isCustomAcpModel !== loadedSnapshot.isCustomAcpModel- : toolConcurrency !== initialToolConcurrency);+ : toolConcurrency !== initialToolConcurrency || systemPromptDirty);const credentialsDirty = acpCredentialForm.isDirty;const isAnyDirty = settingsDirty || credentialsDirty;const customToolsUninitialized =@@ -630,10 +694,12 @@ export function AgentSettingsScreen({agentType === "openhands" &&toolsMode === "custom" &&selectedTools === null;+ const isFormValid =+ !acpCommandEmpty && !systemPromptMissing && !customToolsUninitialized;useEffect(() => {onSaveControlChange({agentType,- isValid: !acpCommandEmpty && !customToolsUninitialized,+ isValid: isFormValid,isDirty: isAnyDirty,buildAgentProfileFields: stableBuildFields,credentials: {@@ -645,8 +711,7 @@ export function AgentSettingsScreen({}, [onSaveControlChange,agentType,- acpCommandEmpty,- customToolsUninitialized,+ isFormValid,isAnyDirty,credentialsDirty,stableBuildFields,@@ -696,6 +761,9 @@ export function AgentSettingsScreen({selectedTools: orderedSelectedTools,toolParams: initialTools.params,toolCatalogLoaded,+ systemPromptMode,+ systemPromptText,+ systemPromptEditable: showSystemPrompt,});const isSaving = acpCredentialForm.isSaving;@@ -741,6 +809,98 @@ export function AgentSettingsScreen({}}/>+ {!isAcp && instructionsSupported ? (+ <div className="flex flex-col gap-2.5">+ <Typography.Text className="text-sm">+ {t(I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT)}+ </Typography.Text>+ {isDefaultProfile ? (+ <Typography.Text+ testId="agent-settings-system-prompt-default-profile"+ className="text-xs text-tertiary-alt"+ >+ {t(I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_DEFAULT_PROFILE)}+ </Typography.Text>+ ) : (+ <>+ <SettingsDropdownInput+ testId="agent-settings-system-prompt-mode"+ name="agent-system-prompt-mode"+ label=""+ items={[+ {+ key: "standard",+ label: t(+ I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_STANDARD,+ ),+ },+ {+ key: "append",+ label: t(+ I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND,+ ),+ },+ {+ key: "custom",+ label: t(+ I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_CUSTOM,+ ),+ },+ ]}+ selectedKey={systemPromptMode}+ isDisabled={isSaving}+ onSelectionChange={(key) => {+ if (key) setSystemPromptMode(key as SystemPromptMode);+ }}+ />+ {systemPromptMode !== "standard" ? (+ <textarea+ data-testid="agent-settings-system-prompt"+ aria-label={t(I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT)}+ className={cn(+ formControlMultilineFieldClassName,+ "min-h-48 font-mono placeholder:italic",+ "disabled:bg-surface-raised disabled:border-border-subtle",+ )}+ value={systemPromptText}+ maxLength={SYSTEM_PROMPT_MAX_LENGTH}+ placeholder={t(+ systemPromptMode === "custom"+ ? I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_PLACEHOLDER+ : I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND_PLACEHOLDER,+ )}+ disabled={isSaving}+ onChange={(e) => setSystemPromptText(e.target.value)}+ />+ ) : null}+ {systemPromptMissing ? (+ <Typography.Text+ testId="agent-settings-system-prompt-required"+ className="text-xs text-danger"+ >+ {t(I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_REQUIRED)}+ </Typography.Text>+ ) : null}+ <Typography.Text+ testId="agent-settings-system-prompt-hint"+ className="text-xs text-tertiary-alt"+ >+ {t(+ {+ standard:+ I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_STANDARD_HINT,+ append:+ I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_APPEND_HINT,+ custom:+ I18nKey.SETTINGS$AGENT_PROFILE_SYSTEM_PROMPT_CUSTOM_HINT,+ }[systemPromptMode],+ )}+ </Typography.Text>+ </>+ )}+ </div>+ ) : null}+{!isAcp && toolConcurrencyField ? (<SchemaFieldfield={toolConcurrencyField}