@sparkelf/dsh-patch-better-sidebar-browser-url-seed 0.2.0-rc.10

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write patches/npm/better-sidebar-browser-url-seed/README.md
5
+ README.md: 9aa819a75e83429e8d0847eee0ddbe3bbc614f84
6
+ README.zh.md: 958d55c95f581e5b16696a338c6e08b5f1cb9ea9
package/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # @sparkelf/dsh-patch-better-sidebar-browser-url-seed
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ This data-only package patches `dsh-better-sidebar@0.19.1`. Clicking an external link in the conversation opened the sidebar's browser tab with an empty address bar: the tab record never received the link's URL.
6
+
7
+ Three places dropped it. `openTab` builds the tab record for the native surface and copied only `path` and `diff` from the seed, ignoring `url`; the native tab adapter did the same when minting a record on first open; and when navigating a record that already existed it stored the URL in `meta.url`, a field no view reads. The browser view takes its address from `tab.path` and writes navigations back to the same field, so all three left the address bar empty.
8
+
9
+ The payload changes only `lib/client.js`. Each site now resolves `path ?? url` into `path`, the field the browser view already owns, and the dead `meta.url` copy is removed. The parenthesised comparison is deliberate: `??` binds looser than `===`, so the unparenthesised form sends a present `path` into the empty-object branch and loses it.
10
+
11
+ ## Model Experience
12
+
13
+ None. The patch changes which field an already-passed URL lands in; no model-visible input, tool result, prompt, or session event changes.
14
+
15
+ ## Known Limitations and Deferred Work
16
+
17
+ - **The patch pins `dsh-better-sidebar@0.19.1`.** A later release that carries the URL seed itself makes this patch redundant rather than wrong; retire it then.
18
+ - **Only the native right-Sidebar path is covered.** A bottom-workbench open resolves the URL onto `path` already, so it needs no change here; a future surface that introduces a third path would need the same treatment.
package/README.zh.md ADDED
@@ -0,0 +1,18 @@
1
+ # @sparkelf/dsh-patch-better-sidebar-browser-url-seed
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 这个纯数据包给 `dsh-better-sidebar@0.19.1` 打补丁。点击对话中的外部链接会打开侧边栏的浏览器标签,但地址栏是空的:标签记录从未拿到该链接的 URL。
6
+
7
+ 三处把它丢了。`openTab` 为原生承载面构造标签记录时,只从 seed 复制了 `path` 与 `diff`,忽略了 `url`;原生标签适配器在首次打开铸造记录时同样如此;而在导航一个已存在的记录时,它把 URL 存进了 `meta.url` —— 一个没有任何视图读取的字段。浏览器视图从 `tab.path` 取地址、并把导航写回同一字段,因此这三处都让地址栏空着。
8
+
9
+ 载荷只改 `lib/client.js`。每处现在把 `path ?? url` 归到 `path`,也就是浏览器视图本就拥有的那个字段,并删掉了已死的 `meta.url` 副本。那对括号是刻意的:`??` 的优先级比 `===` 低,不加括号会把存在的 `path` 送进空对象分支从而丢失。
10
+
11
+ ## Model Experience
12
+
13
+ 无。本补丁改变的是一个已经传入的 URL 落在哪个字段;没有模型可见的输入、工具结果、提示词或会话事件发生变化。
14
+
15
+ ## Known Limitations and Deferred Work
16
+
17
+ - **本补丁钉住 `dsh-better-sidebar@0.19.1`。** 后续版本若自行承载 URL seed,本补丁会变得多余而非错误;届时退役它。
18
+ - **只覆盖原生右侧栏这条路径。** 底部工作台的打开已经把 URL 归到 `path`,因此无需改动;将来若出现第三个承载面,需要同样处理。
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "description": "Data-only patch carrying a link URL seed onto the opened tab in dsh-better-sidebar",
3
+ "dshPatch": {
4
+ "formatVersion": 1,
5
+ "variants": [
6
+ {
7
+ "dsh": ">=0.1.6-alpha.2",
8
+ "file": "./patches/better-sidebar-browser-url-seed.patch",
9
+ "id": "better-sidebar-browser-url-seed",
10
+ "target": {
11
+ "kind": "npm",
12
+ "name": "dsh-better-sidebar",
13
+ "range": "0.19.1"
14
+ }
15
+ }
16
+ ]
17
+ },
18
+ "exports": {
19
+ "./package.json": "./package.json",
20
+ "./patches/better-sidebar-browser-url-seed.patch": "./patches/better-sidebar-browser-url-seed.patch"
21
+ },
22
+ "files": [
23
+ "patches/*.patch"
24
+ ],
25
+ "license": "MIT",
26
+ "name": "@sparkelf/dsh-patch-better-sidebar-browser-url-seed",
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "repository": {
31
+ "directory": "patches/npm/better-sidebar-browser-url-seed",
32
+ "type": "git",
33
+ "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
34
+ },
35
+ "type": "module",
36
+ "version": "0.2.0-rc.10"
37
+ }
@@ -0,0 +1,37 @@
1
+ diff --git a/lib/client.js b/lib/client.js
2
+ index f137630..f0f6415 100644
3
+ --- a/lib/client.js
4
+ +++ b/lib/client.js
5
+ @@ -1383,7 +1383,7 @@ window.__ModuleLoader__.load({
6
+ id: seed.id ?? minted?.tab.id ?? seed.type,
7
+ type: seed.type,
8
+ title,
9
+ - ...seed.path === void 0 ? {} : { path: seed.path },
10
+ + ...((seed.path ?? seed.url) === void 0 ? {} : { path: seed.path ?? seed.url }),
11
+ ...seed.diff === void 0 ? {} : { diff: seed.diff },
12
+ ...seed.meta === void 0 && minted?.tab.meta === void 0 ? {} : { meta: seed.meta ?? minted?.tab.meta }
13
+ };
14
+ @@ -16611,7 +16611,7 @@ Mode: this is a continuable side conversation. Your answers stay in this side th
15
+ id,
16
+ type: kind,
17
+ title: params?.title ?? seeded?.title ?? title,
18
+ - ...params?.path === void 0 ? {} : { path: params.path },
19
+ + ...((params?.path ?? params?.url) === void 0 ? {} : { path: params?.path ?? params?.url }),
20
+ ...params?.diff === void 0 ? {} : { diff: params.diff },
21
+ ...meta === void 0 ? {} : { meta }
22
+ },
23
+ @@ -16624,12 +16624,9 @@ Mode: this is a continuable side conversation. Your answers stay in this side th
24
+ return minted;
25
+ }
26
+ const patch = {};
27
+ - if (params?.path !== void 0 && params.path !== existing.tab.path) patch.path = params.path;
28
+ + const nextPath = params?.path ?? params?.url;
29
+ + if (nextPath !== void 0 && nextPath !== existing.tab.path) patch.path = nextPath;
30
+ if (params?.diff !== void 0) patch.diff = params.diff;
31
+ - if (params?.url !== void 0) patch.meta = {
32
+ - ...typeof existing.tab.meta === "object" && existing.tab.meta !== null ? existing.tab.meta : {},
33
+ - url: params.url
34
+ - };
35
+ if (existing.scope.cwd !== scope.cwd) {
36
+ views.set(id, {
37
+ ...existing,