@linxin666/dsh-client-ui-browser-view 0.4.15 → 0.4.17

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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # node scripts/verify-docs.mjs --write <dir>
5
- README.md: 42e7f1f349287028ff2863826334597c5458344a
6
- README.zh.md: afbd9e2b3b9a089f53564e10372c71bd080efa19
5
+ README.md: 0cd2c3239c6bedb05d31262009f48104d332c21c
6
+ README.zh.md: 1b0c650f24d8e69705e4fe3ca78ef5beeed4b75a
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  English | [中文](README.zh.md)
4
4
 
5
5
  <p align="center">
6
- <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.1-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
6
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
7
7
  &nbsp;
8
8
  <img src="https://img.shields.io/badge/license-BSD--3--Clause-blue?style=flat-square" alt="License">
9
9
  </p>
@@ -20,7 +20,7 @@ This package is an external plugin for DeepSeek Harness (DSH), structured as a c
20
20
  - **Isolated by default**: the plugin launches its own Chromium with a throwaway profile, so the browser you are signed into is not touched while the mode below stays off.
21
21
  - **Your own browser on request**: with `realBrowserEnabled` set, the plugin attaches over CDP to a browser you started with remote debugging. Each DSH session on this host can enumerate, read, navigate, click and type in every tab that browser has — tabs that existed before the attach and tabs opened afterwards — and the sign-ins already in that profile work, because the pages run in it and no cookie is imported.
22
22
  - **Signs itself in to this host's own GUI**: a fresh isolated profile has no session cookie, so the viewer would only ever see the 401 challenge. When a navigation lands on that challenge over loopback, the plugin asks the host's connection service for the same ticketed URL `dsh web` printed, and retries once. The cookie that mints lives in the throwaway profile and dies with it.
23
- - **Closing is explicit**: `browser_close` without a tab id closes only the tabs the calling session opened; a tab of an attached browser closes only when the call names its id. The panel shows no close control for such a tab.
23
+ - **Closing is explicit, and idle pages clean themselves up**: `browser_close` without a tab id closes only the tabs the calling session opened; a tab of an attached browser closes only when the call names its id. The panel shows no close control for such a tab. Separately, a page the plugin opened itself closes once no browser tool has touched it for `idleCloseDays` days, so a forgotten page does not outlive the session that opened it.
24
24
 
25
25
  ## How it works
26
26
 
@@ -56,12 +56,15 @@ The single-occupant `rightbar` / `rightbar.session` seats are still not touched:
56
56
 
57
57
  ## Configuration
58
58
 
59
- Both fields are volatile, so the host generates this plugin's settings form from them and a change reaches the running plugin without a restart. They also appear as the **Real browser** card under **Web Extensions -> Web Plugins**, alongside the plugin row's configuration page; both surfaces edit the same values.
59
+ All three fields are volatile, so the host generates this plugin's settings form from them and a change reaches the running plugin without a restart. They also appear as the **Real browser** card under **Web Extensions -> Web Plugins**, alongside the plugin row's configuration page; both surfaces edit the same values.
60
60
 
61
61
  | Field | Default | Meaning |
62
62
  | --- | --- | --- |
63
63
  | `realBrowserEnabled` | `false` | Attach to a browser started with remote debugging instead of launching the dedicated Chromium |
64
64
  | `cdpEndpoint` | `http://127.0.0.1:9222` | HTTP endpoint of the browser to attach to; a host that is not loopback is refused |
65
+ | `idleCloseDays` | `3` | Days without a browser tool touching a page the plugin opened itself before that page closes; `0` disables the sweep |
66
+
67
+ Idle close counts tool activity and nothing else: any `browser_*` call that resolves to a page restarts that page's clock, while watching it in the panel does not. The host reads the window every ten minutes, so an edit applies to the next sweep without a restart, and a host with no browser running sweeps nothing. The clock lives in memory only, so restarting the host starts every page's window again. A page adopted from your own browser is never closed by the timer.
65
68
 
66
69
  Turning the mode on, turning it off, and changing the endpoint all detach from the browser the plugin is talking to. An external browser and every tab in it stay exactly as they are; the next tool call connects again with the current setting. A browser the plugin launched itself is shut down as before.
67
70
 
@@ -84,7 +87,8 @@ Sign in to the sites the agent should see inside that profile once; the plugin d
84
87
  - **Your sign-ins stay in your browser**: the plugin reads pages, not the cookie jar; nothing is copied out of the attached profile into the plugin, the isolated profile or disk.
85
88
  - **Every DSH session sees every tab**: while CDP mode is on, every session on this host can enumerate, read, navigate, click and type in every tab of the attached browser, including tabs opened after it attached. The mode grants that to the host, not to one session.
86
89
  - **Headless by default**: in isolated mode nothing pops up on the desktop; the tab is the only view.
87
- - **Process lifetime**: a Chromium the plugin launched is killed when the plugin disposes; disposing or changing configuration only detaches from an external browser and closes neither the browser nor any of its tabs.
90
+ - **Idle close never touches an adopted page**: the sweep selects only targets the plugin created itself, so a tab of your own browser closes only when a caller names its id, and disposing the plugin still closes nothing there.
91
+ - **Process lifetime**: a Chromium the plugin launched is killed when the plugin disposes; disposing or changing configuration only detaches from an external browser and closes neither the browser nor any of its tabs. A session whose CDP socket has closed is dropped on its next call and detached the same way — it never closes an external browser or its tabs — then reconnected to the configured endpoint; a reconnect that fails is reported as the connection error, and the configured source is never swapped for another one.
88
92
  - **Failure is an error, not a downgrade**: an endpoint that does not answer fails the tool call with the connection error, and the plugin never falls back to the isolated browser, so the panel cannot show a browser other than the configured one.
89
93
  - **Token handling**: the launch token is minted per navigation, held in memory, and never written to disk; the retry only happens on a loopback target whose document is DSH's own challenge, so no other local service is ever handed the token.
90
94
 
@@ -93,7 +97,7 @@ Sign in to the sites the agent should see inside that profile once; the plugin d
93
97
  - The tab is a **view**. Input comes from the agent through the tools; it does not forward your mouse or keyboard.
94
98
  - CDP mode lists every tab the browser has, including tabs that have nothing to do with this workspace; the panel does not filter or hide them.
95
99
  - Chrome 136 and later ignore `--remote-debugging-port` for the default data directory, so the default Chrome profile cannot be attached this way: use a profile explicitly started with a non-default `--user-data-dir` ([Changes to remote debugging switches](https://developer.chrome.com/blog/remote-debugging-port)).
96
- - A browser that was launched without the debug port, or that has since exited, produces a connection error on the tool call; the plugin starts nothing in its place.
100
+ - A browser that was launched without the debug port, or that has since exited, produces a connection error on the tool call. The retry on the next call reconnects only to the configured endpoint; the plugin never starts a real browser in its place.
97
101
  - The tab lives inside the right sidebar, so it needs that column; a layout that hides the column hides the tab.
98
102
  - Frames are produced when the page changes, so a static page holds the last frame instead of streaming duplicates.
99
103
  - Switching chips keeps the body mounted (`keepMounted`), so the socket survives; the frame still waits for the next change.
package/README.zh.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [English](README.md) | 中文
4
4
 
5
5
  <p align="center">
6
- <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.1-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
6
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
7
7
  &nbsp;
8
8
  <img src="https://img.shields.io/badge/license-BSD--3--Clause-blue?style=flat-square" alt="License">
9
9
  </p>
@@ -20,7 +20,7 @@
20
20
  - **默认隔离**:插件自己拉起 Chromium,用一次性 profile;只要下面那个模式关着,它就不碰你已经登录的浏览器。
21
21
  - **按需接管你自己的浏览器**:把 `realBrowserEnabled` 打开后,插件经 CDP 接管你用远程调试启动的浏览器。本机每个 DSH 会话都能枚举、读取、导航、点击与输入它现有的全部标签页,以及之后新开的标签页;那个 profile 里已有的登录态直接可用,因为页面就跑在里面,插件不导入任何 cookie。
22
22
  - **能进这台机器自己的 GUI**:全新隔离 profile 没有会话 cookie,本来只会看到 401 提示页。当导航落在 loopback 上的那页提示时,插件向宿主的连接服务要一条与 `dsh web` 启动时打印的同样的带票 URL,补一次。种下的 cookie 只活在这个一次性 profile 里,随它一起销毁。
23
- - **关闭是显式的**:不带 tab id 的 `browser_close` 只关调用它的会话自己打开的标签页;被接管浏览器的标签页,只有调用里点名它的 id 才会关。面板对这种标签页不提供关闭控件。
23
+ - **关闭是显式的,闲置页面由插件自己收尾**:不带 tab id 的 `browser_close` 只关调用它的会话自己打开的标签页;被接管浏览器的标签页,只有调用里点名它的 id 才会关。面板对这种标签页不提供关闭控件。另外,插件自己打开的页面在 `idleCloseDays` 天没有工具动作后自动关闭,被遗忘的页面不会比打开它的会话活得更久。
24
24
 
25
25
  ## 工作原理
26
26
 
@@ -56,12 +56,15 @@ agent 工具调用 ──► 宿主半区 ──► CDP ──► 它自己的 C
56
56
 
57
57
  ## 配置
58
58
 
59
- 两个字段都是 volatile,因此设置表单由宿主按它们生成,改动无需重启即作用于运行中的插件。它们同时以「真实浏览器」卡片出现在「Web 扩展 → Web 插件」中,与插件行配置页编辑的是同一份取值。
59
+ 三个字段都是 volatile,因此设置表单由宿主按它们生成,改动无需重启即作用于运行中的插件。它们同时以「真实浏览器」卡片出现在「Web 扩展 → Web 插件」中,与插件行配置页编辑的是同一份取值。
60
60
 
61
61
  | 字段 | 默认值 | 含义 |
62
62
  | --- | --- | --- |
63
63
  | `realBrowserEnabled` | `false` | 接管用远程调试启动的浏览器,而不是拉起独立 Chromium |
64
64
  | `cdpEndpoint` | `http://127.0.0.1:9222` | 要接管的浏览器的 HTTP 端点;主机不是 loopback 时直接拒绝 |
65
+ | `idleCloseDays` | `3` | 插件自己打开的页面在多少天没有工具动作后关闭;`0` 表示关闭该清理 |
66
+
67
+ 闲置关闭只认工具动作:任何解析到某个页面的 `browser_*` 调用都会重置那个页面的计时,在面板里看它不算。宿主每十分钟读一次窗口,所以改动在下一次扫描就生效、无需重启;没有浏览器在跑时什么也不扫描。计时只在内存里,宿主重启后每个页面的窗口从头开始。从你自己的浏览器接管的页面,永远不会被这个计时关闭。
65
68
 
66
69
  打开接管、关掉接管、改端点,三者都只是从插件当前连着的浏览器上分离。外部浏览器与它的每个标签页都保持原样;下一次工具调用按当前设置重新连接。插件自己拉起的浏览器仍然按原有行为关停。
67
70
 
@@ -84,7 +87,8 @@ agent 工具调用 ──► 宿主半区 ──► CDP ──► 它自己的 C
84
87
  - **登录态留在你自己的浏览器里**:插件读的是页面,不是 cookie 罐;被接管 profile 里的任何东西都不会被复制进插件、隔离 profile 或磁盘。
85
88
  - **每个 DSH 会话都能看到每个标签页**:接管模式开着的时候,本机每个会话都能枚举、读取、导航、点击与输入被接管浏览器的每个标签页,包括接管之后新开的那些。这份权力是给这台主机的,不是给某一个会话的。
86
89
  - **默认无头**:隔离模式下桌面上不会弹出窗口,标签页是唯一的可见视图。
87
- - **进程寿命**:插件自己拉起的 Chromium 在插件卸载时被杀掉;插件卸载或配置变更只从外部浏览器分离,不关闭浏览器,也不关闭它的任何标签页。
90
+ - **闲置关闭不碰接管的页面**:扫描只选插件自己创建的 target,所以你自己的浏览器标签页仍然只有调用点名 id 才会关,插件卸载时那边也依然什么都不关。
91
+ - **进程寿命**:插件自己拉起的 Chromium 在插件卸载时被杀掉;插件卸载或配置变更只从外部浏览器分离,不关闭浏览器,也不关闭它的任何标签页。CDP socket 已关闭的会话在下一次调用时被丢弃、按同样方式分离——绝不关闭外部浏览器或其标签页——再重新连接到所配置的端点;重连失败按连接错误上报,所配置的来源绝不会被换成另一个。
88
92
  - **失败是报错,不是降级**:端点没有应答时工具调用以连接错误失败,插件绝不回退到隔离浏览器,因此面板不会显示出所配置之外的那个浏览器。
89
93
  - **令牌处理**:启动令牌每次导航现取、只在内存里,从不落盘;补票只发生在 loopback 目标且文档确实是 DSH 自己的鉴权页时,因此令牌不会被交给别的本地服务。
90
94
 
@@ -93,7 +97,7 @@ agent 工具调用 ──► 宿主半区 ──► CDP ──► 它自己的 C
93
97
  - 标签页只是**视图**。输入来自 agent 的工具调用,不转发你的鼠标与键盘。
94
98
  - 接管模式列出浏览器现有的每一个标签页,包括与当前工作区毫无关系的那些;面板不过滤也不隐藏它们。
95
99
  - Chrome 136 及以后对默认数据目录忽略 `--remote-debugging-port`,因此默认 Chrome profile 无法这样接管:要使用显式以非默认 `--user-data-dir` 启动的 profile([Changes to remote debugging switches](https://developer.chrome.com/blog/remote-debugging-port))。
96
- - 没有用调试端口启动的浏览器,或已经退出的浏览器,会在工具调用上报连接错误;插件不会替它启动任何东西。
100
+ - 没有用调试端口启动的浏览器,或已经退出的浏览器,会在工具调用上报连接错误。下一次调用的重试只重新连接所配置的端点;插件绝不替它启动真实浏览器。
97
101
  - 标签页住在右侧栏里,因此需要那一栏存在;布局把栏收起来时它也一起不可见。
98
102
  - 帧在页面变化时才产生,静态页面停留在最后一帧,而不是重复推流。
99
103
  - 切换 chip 时内容保持挂载(`keepMounted`),socket 不会断;画面仍等下一次变化。
package/lib/client.js CHANGED
@@ -85,6 +85,8 @@ window.__ModuleLoader__.load({
85
85
  "config.realBrowserEnabled.hint": "开启后,所有 DSH 会话都能操作此浏览器中的全部标签页。",
86
86
  "config.cdpEndpoint": "CDP 地址",
87
87
  "config.cdpEndpoint.hint": "仅支持本机 loopback;Chrome 136+ 默认 profile 不支持远程调试。",
88
+ "config.idleCloseDays": "闲置关闭(天)",
89
+ "config.idleCloseDays.hint": "DSH 自己打开的页面超过这个天数没有工具动作会被自动关闭;接管的真实页面不在此列,0 表示不关闭。",
88
90
  "config.unavailable": "设置暂不可用",
89
91
  "config.failed": "设置保存失败,请重试",
90
92
  "settings.title": "真实浏览器",
@@ -93,6 +95,8 @@ window.__ModuleLoader__.load({
93
95
  "settings.enabledHint": "开启后,所有 DSH 会话都能读取和操作此浏览器中的全部标签页。",
94
96
  "settings.cdpEndpoint": "CDP 地址",
95
97
  "settings.cdpEndpointHint": "仅限本机 loopback;Chrome 136+ 默认 profile 不支持远程调试。",
98
+ "settings.idleCloseDays": "闲置自动关闭(天)",
99
+ "settings.idleCloseDaysHint": "DSH 自己打开的页面超过这个天数没有工具动作就自动关闭;接管的真实页面不在此列,0 表示关闭该能力。",
96
100
  "settings.inherit": "继承",
97
101
  "settings.on": "开启",
98
102
  "settings.off": "关闭",
@@ -128,6 +132,8 @@ window.__ModuleLoader__.load({
128
132
  "config.realBrowserEnabled.hint": "When enabled, every DSH session can operate every tab in this browser.",
129
133
  "config.cdpEndpoint": "CDP endpoint",
130
134
  "config.cdpEndpoint.hint": "Loopback only. Chrome 136+ does not allow remote debugging on its default profile.",
135
+ "config.idleCloseDays": "Idle close (days)",
136
+ "config.idleCloseDays.hint": "Pages DSH opened itself close once no browser tool has touched them for this many days. Adopted real-browser pages are never closed; 0 disables it.",
131
137
  "config.unavailable": "Settings are unavailable",
132
138
  "config.failed": "Could not save settings. Try again.",
133
139
  "settings.title": "Real browser",
@@ -136,6 +142,8 @@ window.__ModuleLoader__.load({
136
142
  "settings.enabledHint": "When enabled, every DSH session can read and operate every tab in this browser.",
137
143
  "settings.cdpEndpoint": "CDP endpoint",
138
144
  "settings.cdpEndpointHint": "Loopback only. Chrome 136+ does not allow remote debugging on its default profile.",
145
+ "settings.idleCloseDays": "Auto-close idle pages (days)",
146
+ "settings.idleCloseDaysHint": "Pages DSH opened itself close once no browser tool has touched them for this many days. Adopted real-browser pages are never closed; 0 disables it.",
139
147
  "settings.inherit": "Inherit",
140
148
  "settings.on": "On",
141
149
  "settings.off": "Off",
@@ -1003,12 +1011,17 @@ window.__ModuleLoader__.load({
1003
1011
  const values = form?.state.value;
1004
1012
  const enabled = values?.realBrowserEnabled === true;
1005
1013
  const endpoint = typeof values?.cdpEndpoint === "string" && values.cdpEndpoint.length > 0 ? values.cdpEndpoint : "http://127.0.0.1:9222";
1014
+ const idleDays = typeof values?.idleCloseDays === "number" ? values.idleCloseDays : 3;
1006
1015
  const [draft, setDraft] = (0, react.useState)(endpoint);
1016
+ const [idleDraft, setIdleDraft] = (0, react.useState)(String(idleDays));
1007
1017
  const [pending, setPending] = (0, react.useState)(false);
1008
1018
  const [failed, setFailed] = (0, react.useState)(false);
1009
1019
  (0, react.useEffect)(() => {
1010
1020
  setDraft(endpoint);
1011
1021
  }, [endpoint]);
1022
+ (0, react.useEffect)(() => {
1023
+ setIdleDraft(String(idleDays));
1024
+ }, [idleDays]);
1012
1025
  if (view === "summary") return t("config.summary");
1013
1026
  if (form === void 0 || form.state.status !== "ready") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1014
1027
  className: config_module_css_default.hint,
@@ -1035,6 +1048,15 @@ window.__ModuleLoader__.load({
1035
1048
  value: next
1036
1049
  }]);
1037
1050
  };
1051
+ const commitIdleDays = async () => {
1052
+ const next = Number(idleDraft.trim());
1053
+ if (!Number.isInteger(next) || next < 0 || next === idleDays) return;
1054
+ await mutate([{
1055
+ op: "set",
1056
+ path: ["idleCloseDays"],
1057
+ value: next
1058
+ }]);
1059
+ };
1038
1060
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
1039
1061
  className: config_module_css_default.root,
1040
1062
  "data-dsh-plugin": BROWSER_VIEW_PLUGIN,
@@ -1085,6 +1107,32 @@ window.__ModuleLoader__.load({
1085
1107
  className: config_module_css_default.hint,
1086
1108
  children: t("config.cdpEndpoint.hint")
1087
1109
  }),
1110
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
1111
+ className: config_module_css_default.field,
1112
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("config.idleCloseDays") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1113
+ type: "text",
1114
+ inputMode: "numeric",
1115
+ value: idleDraft,
1116
+ disabled,
1117
+ spellCheck: false,
1118
+ onChange: (event) => {
1119
+ setIdleDraft(event.currentTarget.value);
1120
+ },
1121
+ onBlur: () => {
1122
+ commitIdleDays();
1123
+ },
1124
+ onKeyDown: (event) => {
1125
+ if (event.key === "Enter") {
1126
+ event.preventDefault();
1127
+ event.currentTarget.blur();
1128
+ }
1129
+ }
1130
+ })]
1131
+ }),
1132
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1133
+ className: config_module_css_default.hint,
1134
+ children: t("config.idleCloseDays.hint")
1135
+ }),
1088
1136
  failed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1089
1137
  className: config_module_css_default.error,
1090
1138
  role: "alert",
@@ -1941,6 +1989,27 @@ window.__ModuleLoader__.load({
1941
1989
  ]
1942
1990
  });
1943
1991
  }
1992
+ /** A whole- or decimal-number field. An empty draft clears the field; any other draft that is not a finite number within the constraints stays unwritten. */
1993
+ function numberField(field, constraints = {}) {
1994
+ const { integer = false, min } = constraints;
1995
+ return {
1996
+ field,
1997
+ entry: "type",
1998
+ format: (value) => typeof value === "number" ? String(value) : "",
1999
+ parse: (text) => {
2000
+ const trimmed = text.trim();
2001
+ if (trimmed === "") return { kind: "clear" };
2002
+ const parsed = Number(trimmed);
2003
+ if (!Number.isFinite(parsed)) return void 0;
2004
+ if (integer && !Number.isInteger(parsed)) return void 0;
2005
+ if (min !== void 0 && parsed < min) return void 0;
2006
+ return {
2007
+ kind: "set",
2008
+ value: parsed
2009
+ };
2010
+ }
2011
+ };
2012
+ }
1944
2013
  /**
1945
2014
  * A free-text field. An empty draft clears the field. `entry` is `pick` when
1946
2015
  * the text arrives whole from a picker (a preset or a reasoning level).
@@ -2386,14 +2455,22 @@ window.__ModuleLoader__.load({
2386
2455
  form;
2387
2456
  store;
2388
2457
  constructor(scope) {
2389
- this.form = new CardForm(scope, [booleanField("realBrowserEnabled"), textField("cdpEndpoint")]);
2458
+ this.form = new CardForm(scope, [
2459
+ booleanField("realBrowserEnabled"),
2460
+ textField("cdpEndpoint"),
2461
+ numberField("idleCloseDays", {
2462
+ integer: true,
2463
+ min: 0
2464
+ })
2465
+ ]);
2390
2466
  this.store = this.form.bind(() => this.projection());
2391
2467
  }
2392
2468
  projection() {
2393
2469
  return {
2394
2470
  ...this.form.shell(),
2395
2471
  realBrowserEnabled: this.form.field("realBrowserEnabled"),
2396
- cdpEndpoint: this.form.field("cdpEndpoint")
2472
+ cdpEndpoint: this.form.field("cdpEndpoint"),
2473
+ idleCloseDays: this.form.field("idleCloseDays")
2397
2474
  };
2398
2475
  }
2399
2476
  inject() {
@@ -2425,35 +2502,53 @@ window.__ModuleLoader__.load({
2425
2502
  state,
2426
2503
  onSave: props.save,
2427
2504
  onDiscard: props.discard,
2428
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BooleanField, {
2429
- id: "settings-browser-view-real",
2430
- label: t("settings.enabled"),
2431
- hint: t("settings.enabledHint"),
2432
- inheritLabel: t("settings.inherit"),
2433
- onLabel: t("settings.on"),
2434
- offLabel: t("settings.off"),
2435
- ...shared,
2436
- ...state.realBrowserEnabled,
2437
- onEdit: (text) => {
2438
- props.edit("realBrowserEnabled", text);
2439
- },
2440
- onReset: () => {
2441
- props.resetField("realBrowserEnabled");
2442
- }
2443
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueField, {
2444
- id: "settings-browser-view-endpoint",
2445
- label: t("settings.cdpEndpoint"),
2446
- hint: t("settings.cdpEndpointHint"),
2447
- placeholder: "http://127.0.0.1:9222",
2448
- ...shared,
2449
- ...state.cdpEndpoint,
2450
- onEdit: (text) => {
2451
- props.edit("cdpEndpoint", text);
2452
- },
2453
- onReset: () => {
2454
- props.resetField("cdpEndpoint");
2455
- }
2456
- })]
2505
+ children: [
2506
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BooleanField, {
2507
+ id: "settings-browser-view-real",
2508
+ label: t("settings.enabled"),
2509
+ hint: t("settings.enabledHint"),
2510
+ inheritLabel: t("settings.inherit"),
2511
+ onLabel: t("settings.on"),
2512
+ offLabel: t("settings.off"),
2513
+ ...shared,
2514
+ ...state.realBrowserEnabled,
2515
+ onEdit: (text) => {
2516
+ props.edit("realBrowserEnabled", text);
2517
+ },
2518
+ onReset: () => {
2519
+ props.resetField("realBrowserEnabled");
2520
+ }
2521
+ }),
2522
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueField, {
2523
+ id: "settings-browser-view-endpoint",
2524
+ label: t("settings.cdpEndpoint"),
2525
+ hint: t("settings.cdpEndpointHint"),
2526
+ placeholder: "http://127.0.0.1:9222",
2527
+ ...shared,
2528
+ ...state.cdpEndpoint,
2529
+ onEdit: (text) => {
2530
+ props.edit("cdpEndpoint", text);
2531
+ },
2532
+ onReset: () => {
2533
+ props.resetField("cdpEndpoint");
2534
+ }
2535
+ }),
2536
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueField, {
2537
+ id: "settings-browser-view-idle-days",
2538
+ label: t("settings.idleCloseDays"),
2539
+ hint: t("settings.idleCloseDaysHint"),
2540
+ placeholder: "3",
2541
+ numeric: true,
2542
+ ...shared,
2543
+ ...state.idleCloseDays,
2544
+ onEdit: (text) => {
2545
+ props.edit("idleCloseDays", text);
2546
+ },
2547
+ onReset: () => {
2548
+ props.resetField("idleCloseDays");
2549
+ }
2550
+ })
2551
+ ]
2457
2552
  });
2458
2553
  }
2459
2554
  //#endregion