@shuind/dsh-codex-harness 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,49 +1,49 @@
1
- # @shuind/dsh-codex-harness
2
-
3
- 为 DSH 提供可自定义提示词与 Codex 工具的编码模式。
4
-
5
- ## 功能
6
-
7
- - 使用精简codex提示词;对gpt过度拉屎做了少量提示词约束。
8
- - 在 **设置 → 插件 → 插件配置 → Codex Harness** 中查看、编辑或恢复完整提示词。
9
- - 提供 `exec_command`、`write_stdin`、`apply_patch` 和 `update_plan`。
10
- - 支持 Fast 请求、GPT 图片与思考强度和上下文容量。
11
- - 实时显示请求模型、模型回复和上下文压缩状态及耗时。
12
- - Responses 请求优先使用原生 `apply_patch`、hosted `web_search` 和远程压缩,失败时回退到 DSH 实现。
13
-
14
- ## 安装
15
-
16
- ```sh
17
- dsh plugin --profile web add @shuind/dsh-codex-harness@0.2.1
18
- ```
19
-
20
- 重启 Web,在 **Agent 预设** 中选择 **Codex 模式**,再创建会话。
21
-
22
- ## 配置
23
-
24
- ### 模型
25
-
26
- 在 DSH 的 Models 中配置支持 OpenAI Responses 的 provider、endpoint、API key 和 GPT 模型。例如:
27
-
28
- ```yaml
29
- api: openai-responses
30
- baseURL: https://your-responses-endpoint.example.com
31
- apiKeyEnv: OPENAI_API_KEY
32
- ```
33
-
34
- 也可以配合 [dsh-codex-connect](https://github.com/shuind/dsh-codex-connect) 使用 ChatGPT 订阅模型。
35
-
36
- ### 提示词
37
-
38
- 打开 **设置 → 插件 → 插件配置 → Codex Harness**。编辑器展示本插件实际注入的完整提示词;保存后从下一次请求开始生效,点击“恢复默认”可回到随包模板。
39
-
40
- 身份、模型、工作目录、工具说明和 DSH 运行时上下文由对应插件动态提供,不会写死在可编辑模板中。
41
-
42
- ### Fast 与上下文
43
-
44
- - **Fast**:在 Codex 模式的模型菜单中开启,向 Responses 请求发送 `service_tier: "priority"`。
45
- - **上下文容量**:点击输入栏旁的上下文用量指示器,可设置 `1K`–`1000K` tokens;下一次请求和自动压缩使用该值。
46
-
47
- ## License
48
-
49
- MIT
1
+ # @shuind/dsh-codex-harness
2
+
3
+ 为 DSH 提供可自定义提示词与 Codex 工具的编码模式。
4
+
5
+ ## 功能
6
+
7
+ - 使用精简codex提示词;对gpt过度拉屎做了少量提示词约束。
8
+ - 在 **设置 → 插件 → 插件配置 → Codex Harness** 中查看、编辑或恢复完整提示词。
9
+ - 提供 `exec_command`、`write_stdin`、`apply_patch` 和 `update_plan`。
10
+ - 支持 Fast 请求、GPT 图片与思考强度和上下文容量。
11
+ - 实时显示请求模型、模型回复和上下文压缩状态及耗时。
12
+ - Responses 请求优先使用原生 `apply_patch`、hosted `web_search` 和远程压缩,失败时回退到 DSH 实现。
13
+
14
+ ## 安装
15
+
16
+ ```sh
17
+ dsh plugin --profile web add @shuind/dsh-codex-harness@0.2.1
18
+ ```
19
+
20
+ 重启 Web,在 **Agent 预设** 中选择 **Codex 模式**,再创建会话。
21
+
22
+ ## 配置
23
+
24
+ ### 模型
25
+
26
+ 在 DSH 的 Models 中配置支持 OpenAI Responses 的 provider、endpoint、API key 和 GPT 模型。例如:
27
+
28
+ ```yaml
29
+ api: openai-responses
30
+ baseURL: https://your-responses-endpoint.example.com
31
+ apiKeyEnv: OPENAI_API_KEY
32
+ ```
33
+
34
+ 也可以配合 [dsh-codex-connect](https://github.com/shuind/dsh-codex-connect) 使用 ChatGPT 订阅模型。
35
+
36
+ ### 提示词
37
+
38
+ 打开 **设置 → 插件 → 插件配置 → Codex Harness**。编辑器展示本插件实际注入的完整提示词;保存后从下一次请求开始生效,点击“恢复默认”可回到随包模板。
39
+
40
+ 身份、模型、工作目录、工具说明和 DSH 运行时上下文由对应插件动态提供,不会写死在可编辑模板中。
41
+
42
+ ### Fast 与上下文
43
+
44
+ - **Fast**:在 Codex 模式的模型菜单中开启,向 Responses 请求发送 `service_tier: "priority"`。
45
+ - **上下文容量**:点击输入栏旁的上下文用量指示器,可设置 `1K`–`1000K` tokens;下一次请求和自动压缩使用该值。
46
+
47
+ ## License
48
+
49
+ MIT
package/cordis.patch.yml CHANGED
@@ -1,11 +1,11 @@
1
- - insert:
2
- # Keep preset installation and settings registration on the host plane.
3
- - id: codex-preset-installer
4
- name: '@shuind/dsh-codex-harness/installer'
5
- # This row owns the global capability layer and also advertises the
6
- # browser face. Codex prompt/tools remain agent-preset scoped.
7
- - id: codex-client
8
- name: '@shuind/dsh-codex-harness'
9
- config:
10
- globalEnhancements: true
11
- codexCore: false
1
+ - insert:
2
+ # Keep preset installation and settings registration on the host plane.
3
+ - id: codex-preset-installer
4
+ name: '@shuind/dsh-codex-harness/installer'
5
+ # This row owns the global capability layer and also advertises the
6
+ # browser face. Codex prompt/tools remain agent-preset scoped.
7
+ - id: codex-client
8
+ name: '@shuind/dsh-codex-harness'
9
+ config:
10
+ globalEnhancements: true
11
+ codexCore: false
package/lib/client.js CHANGED
@@ -49,10 +49,25 @@ window.__ModuleLoader__.load({
49
49
 
50
50
  ## Working principles
51
51
 
52
- - Ask, align, and clarify first. Gather enough context from the user, then align the approach to achieve the user's goal through the clearest, most effective path.
52
+ - Actively establish the user's current context rather than relying on stale assumptions or prior context. Before committing to an approach that could materially shape the outcome or direction of the work, state the intended path and align it with the user; clarify any material uncertainty first. Then pursue the user's goal through the clearest, most effective path.
53
53
  - Keep only the essential logic and core actions. Don't explain or test what was removed or why something wasn't done, especially when writing documentation or communicating. Convey enough valuable information with as few words as possible.
54
54
  - Solve problems by thinking from first principles and at a higher level.
55
55
  `;
56
+ /** Default deployment Persona template used by the Codex preset. */
57
+ const DEFAULT_CODEX_PERSONA = String.raw`You are Codex, a coding agent based on the {{model}} model. Your working directory is {{cwd}}.`;
58
+ /** Default DSH Core source-checkout guidance template. */
59
+ const DEFAULT_DSH_CORE_SOURCE_PROMPT = String.raw`The DeepSeek Harness implementation checkout is at {{sourceRoot}}. The checkout location and current working directory are separate values and may differ; never infer the working directory from this path. Use pwd to determine the current working directory. Use this checkout only to inspect or extend DSH itself.`;
60
+ /** Default DSH Web runtime guidance template. */
61
+ const DEFAULT_DSH_CORE_WEB_PROMPT = [
62
+ "You are interacting with the user through the DeepSeek Harness Web GUI at {{webUrl}}.",
63
+ "When the user refers to \"this page\", \"this GUI\", or \"this app\" without naming another target, they mean this GUI.",
64
+ "The browser provides no implicit DOM, route, or screenshot context.",
65
+ "The client-plugin HMR receiver is active, but client-plugin changes reload without a refresh only while `pnpm run dev:web` is also running from this same checkout to rebuild their bundles; verify that watcher before promising automatic updates.",
66
+ "Every other change - the apps/web shell and plain packages - requires rebuilding the affected Web artifacts and verifying this existing URL after a page refresh.",
67
+ "Starting another server does not update this GUI.",
68
+ "The apps/web Vite entry builds the shell but is not a standalone application because only dsh web injects window.__DSH_BOOT__.",
69
+ "Do not start a replacement server unless the user asks; if one is needed, use a managed background job and verify its exact URL."
70
+ ].join(" ");
56
71
  //#endregion
57
72
  //#region lib/types/client/activity.js
58
73
  /** Client-only inference used while the host activity projection frame is in flight. */
@@ -122,25 +137,32 @@ window.__ModuleLoader__.load({
122
137
  contextRestore: "Restore model default",
123
138
  promptCardTitle: "Codex Harness",
124
139
  promptCardDescription: "Choose Codex capabilities and customize the operating prompt.",
125
- capabilitiesLabel: "Codex mode capabilities",
140
+ codexOnlyCapabilitiesLabel: "Codex mode only",
141
+ otherCapabilitiesLabel: "Additional capabilities",
126
142
  capabilityPrompt: "Codex operating prompt",
127
- capabilityPromptHint: "Inject the editable instructions and persona-first prompt layout in Codex mode.",
143
+ capabilityPromptHint: "Inject the editable instructions and persona-first prompt layout.",
128
144
  capabilityTerminal: "Terminal tools",
129
- capabilityTerminalHint: "Expose exec_command and write_stdin in Codex mode.",
145
+ capabilityTerminalHint: "Expose exec_command and write_stdin.",
130
146
  capabilityPatch: "Patch tool",
131
- capabilityPatchHint: "Expose apply_patch in Codex mode, using the native Responses grammar when supported.",
147
+ capabilityPatchHint: "Expose apply_patch, using the native Responses grammar when supported.",
132
148
  capabilityPlan: "Plan tool",
133
- capabilityPlanHint: "Expose update_plan for implementation task tracking in Codex mode.",
149
+ capabilityPlanHint: "Expose update_plan for implementation task tracking.",
134
150
  capabilityWebSearch: "Hosted web search",
135
151
  capabilityWebSearchHint: "Use the provider-native Responses web_search tool when available.",
136
152
  capabilityCompaction: "Remote compaction",
137
153
  capabilityCompactionHint: "Prefer the provider Responses compact endpoint before local compaction.",
138
154
  capabilityActivity: "Activity indicator",
139
155
  capabilityActivityHint: "Show request, reply, and compaction status beside the conversation.",
140
- promptLabel: "System prompt",
141
- promptHint: "This is the full prompt owned by this plugin. Persona and DSH tool guidance stay dynamic.",
142
- promptOverridden: "Overridden",
143
- promptReset: "Restore default",
156
+ promptCustomizationLabel: "Prompt customization",
157
+ personaLabel: "Persona",
158
+ personaHint: "Deployment identity and role. Supports {{model}} and {{cwd}}.",
159
+ sourcePromptLabel: "DSH Core source instructions",
160
+ sourcePromptHint: "Guidance about the DSH checkout and working directory. Supports {{sourceRoot}}.",
161
+ webPromptLabel: "DSH Core Web instructions",
162
+ webPromptHint: "Guidance about this Web GUI, HMR, builds, and verification. Supports {{webUrl}}.",
163
+ promptRestoreAll: "Restore all prompt defaults",
164
+ promptLabel: "Codex operating prompt",
165
+ promptHint: "This is the Codex operating prompt. Persona and DSH Core instructions are edited separately above.",
144
166
  promptUnsaved: "Unsaved",
145
167
  promptDiscard: "Discard",
146
168
  promptSave: "Save",
@@ -164,25 +186,32 @@ window.__ModuleLoader__.load({
164
186
  contextRestore: "恢复模型默认值",
165
187
  promptCardTitle: "Codex Harness",
166
188
  promptCardDescription: "选择 Codex 能力并自定义完整的操作提示词。",
167
- capabilitiesLabel: "Codex 模式能力",
189
+ codexOnlyCapabilitiesLabel: "仅在 Codex 模式下",
190
+ otherCapabilitiesLabel: "其他能力",
168
191
  capabilityPrompt: "Codex 操作提示词",
169
- capabilityPromptHint: "仅在 Codex 模式注入可编辑指令,并将 Persona 放在提示词首位。",
192
+ capabilityPromptHint: "注入可编辑指令,并将 Persona 放在提示词首位。",
170
193
  capabilityTerminal: "终端工具",
171
- capabilityTerminalHint: "仅在 Codex 模式提供 exec_command 和 write_stdin。",
194
+ capabilityTerminalHint: "提供 exec_command 和 write_stdin。",
172
195
  capabilityPatch: "补丁工具",
173
- capabilityPatchHint: "仅在 Codex 模式提供 apply_patch,并在支持时使用 Responses 原生语法。",
196
+ capabilityPatchHint: "提供 apply_patch,并在支持时使用 Responses 原生语法。",
174
197
  capabilityPlan: "计划工具",
175
- capabilityPlanHint: "仅在 Codex 模式提供 update_plan,用于跟踪实施任务。",
198
+ capabilityPlanHint: "提供 update_plan,用于跟踪实施任务。",
176
199
  capabilityWebSearch: "托管网络搜索",
177
200
  capabilityWebSearchHint: "可用时使用提供商原生的 Responses web_search 工具。",
178
201
  capabilityCompaction: "远程上下文压缩",
179
202
  capabilityCompactionHint: "优先调用提供商的 Responses compact 端点,失败时回退本地压缩。",
180
203
  capabilityActivity: "活动状态",
181
204
  capabilityActivityHint: "在对话旁显示请求、回复和压缩状态。",
182
- promptLabel: "系统提示词",
183
- promptHint: "这是本插件负责的全部提示词;Persona 和 DSH 工具指导仍会动态注入。",
184
- promptOverridden: "已覆盖",
185
- promptReset: "恢复默认",
205
+ promptCustomizationLabel: "提示词定制",
206
+ personaLabel: "Persona",
207
+ personaHint: "定义 Agent 的身份与角色,支持 {{model}} 和 {{cwd}}。",
208
+ sourcePromptLabel: "DSH Core 源码说明",
209
+ sourcePromptHint: "说明 DSH 源码检出目录与工作目录,支持 {{sourceRoot}}。",
210
+ webPromptLabel: "DSH Core Web 说明",
211
+ webPromptHint: "说明 Web GUI、HMR、构建与验证,支持 {{webUrl}}。",
212
+ promptRestoreAll: "恢复所有提示词默认值",
213
+ promptLabel: "Codex 操作提示词",
214
+ promptHint: "这是 Codex 操作提示词。Persona 和 DSH Core 说明在上方分别编辑。",
186
215
  promptUnsaved: "未保存",
187
216
  promptDiscard: "放弃",
188
217
  promptSave: "保存",
@@ -200,9 +229,6 @@ window.__ModuleLoader__.load({
200
229
  const value = layer["systemPrompt"];
201
230
  return typeof value === "string" ? value : void 0;
202
231
  }
203
- function hasPromptOverride(layer) {
204
- return typeof layer === "object" && layer !== null && !Array.isArray(layer) && Object.hasOwn(layer, "systemPrompt");
205
- }
206
232
  function CapabilityToggle({ field, label, hint, enabled, disabled, setSetting }) {
207
233
  return (0, react_jsx_runtime.jsxs)("label", {
208
234
  style: {
@@ -249,14 +275,107 @@ window.__ModuleLoader__.load({
249
275
  })]
250
276
  });
251
277
  }
278
+ /** Visually separate capability scope while keeping the host's light settings style. */
279
+ function CapabilityGroup({ label, children, accent }) {
280
+ return (0, react_jsx_runtime.jsxs)("section", {
281
+ style: {
282
+ display: "grid",
283
+ gap: 4
284
+ },
285
+ children: [(0, react_jsx_runtime.jsxs)("div", {
286
+ style: {
287
+ display: "flex",
288
+ alignItems: "center",
289
+ gap: 7,
290
+ paddingLeft: 2
291
+ },
292
+ children: [(0, react_jsx_runtime.jsx)("span", {
293
+ "aria-hidden": "true",
294
+ style: {
295
+ width: 6,
296
+ height: 6,
297
+ flex: "0 0 auto",
298
+ borderRadius: 999,
299
+ background: accent
300
+ }
301
+ }), (0, react_jsx_runtime.jsx)("strong", {
302
+ style: {
303
+ color: "var(--dsw-alias-label-secondary)",
304
+ fontSize: 14,
305
+ fontWeight: 600,
306
+ letterSpacing: "0.01em"
307
+ },
308
+ children: label
309
+ })]
310
+ }), (0, react_jsx_runtime.jsx)("div", {
311
+ style: {
312
+ display: "grid",
313
+ marginLeft: 5,
314
+ paddingLeft: 12
315
+ },
316
+ children
317
+ })]
318
+ });
319
+ }
320
+ function PromptEditor({ id, label, hint, value, writable, saving, minHeight, onChange }) {
321
+ return (0, react_jsx_runtime.jsxs)("div", {
322
+ style: {
323
+ display: "grid",
324
+ gap: 5
325
+ },
326
+ children: [
327
+ (0, react_jsx_runtime.jsx)("label", {
328
+ htmlFor: id,
329
+ style: {
330
+ fontSize: 13,
331
+ fontWeight: 500
332
+ },
333
+ children: label
334
+ }),
335
+ (0, react_jsx_runtime.jsx)("textarea", {
336
+ id,
337
+ value,
338
+ disabled: !writable || saving,
339
+ onChange: (event) => {
340
+ onChange(event.target.value);
341
+ },
342
+ spellCheck: false,
343
+ style: {
344
+ boxSizing: "border-box",
345
+ width: "100%",
346
+ minHeight,
347
+ resize: "vertical",
348
+ padding: 10,
349
+ border: "1px solid var(--dsw-alias-border-l2)",
350
+ borderRadius: 8,
351
+ background: "var(--dsw-alias-bg-layer-3)",
352
+ color: "var(--dsw-alias-label-primary)",
353
+ font: "inherit",
354
+ fontSize: 12,
355
+ lineHeight: 1.5
356
+ }
357
+ }),
358
+ (0, react_jsx_runtime.jsx)("span", {
359
+ style: {
360
+ color: "var(--dsw-alias-label-tertiary)",
361
+ fontSize: 11,
362
+ lineHeight: 1.45
363
+ },
364
+ children: hint
365
+ })
366
+ ]
367
+ });
368
+ }
252
369
  /** Full-prompt editor contributed to Settings > Plugins. */
253
370
  function PromptSettingsCard(props) {
254
371
  const { useSettings, setSetting, unsetSetting, t } = props;
255
372
  const snapshot = useSettings((state) => state);
373
+ const currentPersona = snapshot.value?.persona ?? DEFAULT_CODEX_PERSONA;
374
+ const currentSourcePrompt = snapshot.value?.harnessSourcePrompt ?? DEFAULT_DSH_CORE_SOURCE_PROMPT;
375
+ const currentWebPrompt = snapshot.value?.webSurfacePrompt ?? DEFAULT_DSH_CORE_WEB_PROMPT;
256
376
  const current = snapshot.value?.systemPrompt ?? DEFAULT_CODEX_SYSTEM_PROMPT;
257
377
  const inherited = promptFromLayer(snapshot.base) ?? DEFAULT_CODEX_SYSTEM_PROMPT;
258
- const overridden = hasPromptOverride(snapshot.user);
259
- const capabilities = [
378
+ const codexOnlyCapabilities = [
260
379
  {
261
380
  field: "promptEnabled",
262
381
  label: "capabilityPrompt",
@@ -276,7 +395,9 @@ window.__ModuleLoader__.load({
276
395
  field: "planToolEnabled",
277
396
  label: "capabilityPlan",
278
397
  hint: "capabilityPlanHint"
279
- },
398
+ }
399
+ ];
400
+ const otherCapabilities = [
280
401
  {
281
402
  field: "hostedWebSearchEnabled",
282
403
  label: "capabilityWebSearch",
@@ -294,19 +415,43 @@ window.__ModuleLoader__.load({
294
415
  }
295
416
  ];
296
417
  const [open, setOpen] = (0, react.useState)(false);
418
+ const [personaDraft, setPersonaDraft] = (0, react.useState)(currentPersona);
419
+ const [sourcePromptDraft, setSourcePromptDraft] = (0, react.useState)(currentSourcePrompt);
420
+ const [webPromptDraft, setWebPromptDraft] = (0, react.useState)(currentWebPrompt);
297
421
  const [draft, setDraft] = (0, react.useState)(current);
298
422
  const [saving, setSaving] = (0, react.useState)(false);
299
423
  const [failed, setFailed] = (0, react.useState)(false);
300
424
  (0, react.useEffect)(() => {
425
+ setPersonaDraft(currentPersona);
426
+ setSourcePromptDraft(currentSourcePrompt);
427
+ setWebPromptDraft(currentWebPrompt);
301
428
  setDraft(current);
302
- }, [current]);
429
+ }, [
430
+ current,
431
+ currentPersona,
432
+ currentSourcePrompt,
433
+ currentWebPrompt
434
+ ]);
303
435
  if (snapshot.status === "unavailable") return null;
304
- const dirty = draft !== current;
436
+ const dirty = personaDraft !== currentPersona || sourcePromptDraft !== currentSourcePrompt || webPromptDraft !== currentWebPrompt || draft !== current;
437
+ const renderCapability = (capability) => (0, react_jsx_runtime.jsx)(CapabilityToggle, {
438
+ field: capability.field,
439
+ label: t(capability.label),
440
+ hint: t(capability.hint),
441
+ enabled: snapshot.value?.[capability.field] ?? true,
442
+ disabled: !snapshot.writable || saving,
443
+ setSetting
444
+ }, capability.field);
305
445
  const save = async () => {
306
446
  setSaving(true);
307
447
  setFailed(false);
308
448
  try {
309
- await setSetting("systemPrompt", draft);
449
+ await Promise.all([
450
+ setSetting("persona", personaDraft),
451
+ setSetting("harnessSourcePrompt", sourcePromptDraft),
452
+ setSetting("webSurfacePrompt", webPromptDraft),
453
+ setSetting("systemPrompt", draft)
454
+ ]);
310
455
  } catch {
311
456
  setFailed(true);
312
457
  } finally {
@@ -316,11 +461,20 @@ window.__ModuleLoader__.load({
316
461
  const reset = async () => {
317
462
  setSaving(true);
318
463
  setFailed(false);
464
+ setPersonaDraft(DEFAULT_CODEX_PERSONA);
465
+ setSourcePromptDraft(DEFAULT_DSH_CORE_SOURCE_PROMPT);
466
+ setWebPromptDraft(DEFAULT_DSH_CORE_WEB_PROMPT);
319
467
  setDraft(inherited);
320
468
  try {
321
469
  await unsetSetting("systemPrompt");
470
+ await unsetSetting("persona");
471
+ await unsetSetting("harnessSourcePrompt");
472
+ await unsetSetting("webSurfacePrompt");
322
473
  } catch {
323
474
  setFailed(true);
475
+ setPersonaDraft(currentPersona);
476
+ setSourcePromptDraft(currentSourcePrompt);
477
+ setWebPromptDraft(currentWebPrompt);
324
478
  setDraft(current);
325
479
  } finally {
326
480
  setSaving(false);
@@ -412,102 +566,101 @@ window.__ModuleLoader__.load({
412
566
  },
413
567
  children: t("promptReadOnly")
414
568
  }),
415
- (0, react_jsx_runtime.jsx)("strong", {
416
- style: {
417
- display: "block",
418
- marginBottom: 4,
419
- fontSize: 13
420
- },
421
- children: t("capabilitiesLabel")
422
- }),
423
- (0, react_jsx_runtime.jsx)("div", {
569
+ (0, react_jsx_runtime.jsxs)("div", {
424
570
  style: {
425
571
  display: "grid",
572
+ gap: 16,
426
573
  marginBottom: 14
427
574
  },
428
- children: capabilities.map((capability) => (0, react_jsx_runtime.jsx)(CapabilityToggle, {
429
- field: capability.field,
430
- label: t(capability.label),
431
- hint: t(capability.hint),
432
- enabled: snapshot.value?.[capability.field] ?? true,
433
- disabled: !snapshot.writable || saving,
434
- setSetting
435
- }, capability.field))
575
+ children: [(0, react_jsx_runtime.jsx)(CapabilityGroup, {
576
+ label: t("codexOnlyCapabilitiesLabel"),
577
+ accent: "var(--dsw-static-blue-500)",
578
+ children: codexOnlyCapabilities.map(renderCapability)
579
+ }), (0, react_jsx_runtime.jsx)(CapabilityGroup, {
580
+ label: t("otherCapabilitiesLabel"),
581
+ accent: "var(--dsw-alias-label-tertiary)",
582
+ children: otherCapabilities.map(renderCapability)
583
+ })]
436
584
  }),
437
585
  (0, react_jsx_runtime.jsxs)("div", {
438
586
  style: {
439
- display: "flex",
440
- alignItems: "center",
441
- gap: 8,
442
- marginBottom: 7,
587
+ display: "grid",
588
+ gap: 14,
443
589
  paddingTop: 12,
444
590
  borderTop: "1px solid var(--dsw-alias-border-l2)"
445
591
  },
446
- children: [(0, react_jsx_runtime.jsx)("label", {
447
- htmlFor: "codex-system-prompt",
448
- style: {
449
- flex: 1,
450
- fontSize: 13,
451
- fontWeight: 500
452
- },
453
- children: t("promptLabel")
454
- }), overridden && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
455
- style: {
456
- borderRadius: 999,
457
- padding: "1px 8px",
458
- background: "var(--dsw-alias-bg-module-platform)",
459
- color: "var(--dsw-alias-label-secondary)",
460
- fontSize: 11
461
- },
462
- children: t("promptOverridden")
463
- }), (0, react_jsx_runtime.jsx)("button", {
464
- type: "button",
465
- disabled: !snapshot.writable || saving,
466
- onClick: () => {
467
- reset();
468
- },
469
- style: {
470
- border: 0,
471
- background: "none",
472
- color: "var(--dsw-alias-label-secondary)",
473
- font: "inherit",
474
- fontSize: 12,
475
- cursor: "pointer"
476
- },
477
- children: t("promptReset")
478
- })] })]
479
- }),
480
- (0, react_jsx_runtime.jsx)("textarea", {
481
- id: "codex-system-prompt",
482
- value: draft,
483
- disabled: !snapshot.writable || saving,
484
- onChange: (event) => {
485
- setDraft(event.target.value);
486
- },
487
- spellCheck: false,
488
- style: {
489
- boxSizing: "border-box",
490
- width: "100%",
491
- minHeight: 320,
492
- resize: "vertical",
493
- padding: 12,
494
- border: "1px solid var(--dsw-alias-border-l2)",
495
- borderRadius: 8,
496
- background: "var(--dsw-alias-bg-layer-3)",
497
- color: "var(--dsw-alias-label-primary)",
498
- fontFamily: "ui-monospace, SFMono-Regular, Consolas, monospace",
499
- fontSize: 12,
500
- lineHeight: 1.55
501
- }
502
- }),
503
- (0, react_jsx_runtime.jsx)("p", {
504
- style: {
505
- margin: "6px 0 12px",
506
- color: "var(--dsw-alias-label-tertiary)",
507
- fontSize: 12,
508
- lineHeight: 1.5
509
- },
510
- children: t("promptHint")
592
+ children: [
593
+ (0, react_jsx_runtime.jsxs)("div", {
594
+ style: {
595
+ display: "flex",
596
+ alignItems: "center",
597
+ gap: 8
598
+ },
599
+ children: [(0, react_jsx_runtime.jsx)("strong", {
600
+ style: {
601
+ flex: 1,
602
+ fontSize: 13
603
+ },
604
+ children: t("promptCustomizationLabel")
605
+ }), (0, react_jsx_runtime.jsx)("button", {
606
+ type: "button",
607
+ disabled: !snapshot.writable || saving || !dirty,
608
+ onClick: () => {
609
+ reset();
610
+ },
611
+ style: {
612
+ border: 0,
613
+ padding: 0,
614
+ background: "none",
615
+ color: "var(--dsw-alias-label-secondary)",
616
+ font: "inherit",
617
+ fontSize: 11,
618
+ cursor: "pointer"
619
+ },
620
+ children: t("promptRestoreAll")
621
+ })]
622
+ }),
623
+ (0, react_jsx_runtime.jsx)(PromptEditor, {
624
+ id: "codex-persona",
625
+ label: t("personaLabel"),
626
+ hint: t("personaHint"),
627
+ value: personaDraft,
628
+ writable: snapshot.writable,
629
+ saving,
630
+ minHeight: 84,
631
+ onChange: setPersonaDraft
632
+ }),
633
+ (0, react_jsx_runtime.jsx)(PromptEditor, {
634
+ id: "codex-harness-source-prompt",
635
+ label: t("sourcePromptLabel"),
636
+ hint: t("sourcePromptHint"),
637
+ value: sourcePromptDraft,
638
+ writable: snapshot.writable,
639
+ saving,
640
+ minHeight: 100,
641
+ onChange: setSourcePromptDraft
642
+ }),
643
+ (0, react_jsx_runtime.jsx)(PromptEditor, {
644
+ id: "codex-web-surface-prompt",
645
+ label: t("webPromptLabel"),
646
+ hint: t("webPromptHint"),
647
+ value: webPromptDraft,
648
+ writable: snapshot.writable,
649
+ saving,
650
+ minHeight: 120,
651
+ onChange: setWebPromptDraft
652
+ }),
653
+ (0, react_jsx_runtime.jsx)(PromptEditor, {
654
+ id: "codex-system-prompt",
655
+ label: t("promptLabel"),
656
+ hint: t("promptHint"),
657
+ value: draft,
658
+ writable: snapshot.writable,
659
+ saving,
660
+ minHeight: 320,
661
+ onChange: setDraft
662
+ })
663
+ ]
511
664
  }),
512
665
  (0, react_jsx_runtime.jsxs)("div", {
513
666
  style: {