@sidequest-007/dsh-atlas 1.0.12 → 1.2.0
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/CHANGELOG.md +80 -0
- package/README.md +28 -2
- package/README.zh.md +25 -2
- package/assets/diagrams/atlas-social-1280x640.png +0 -0
- package/dsh.plugin.json +1 -1
- package/lib/client.js +26 -23
- package/lib/index.js +1 -2
- package/lib/types/client/FilesDock.d.ts +19 -1
- package/lib/types/client/source.d.ts +1 -1
- package/lib/types/runtime.d.ts +1 -1
- package/package.json +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.0] - 2026-11-20
|
|
4
|
+
|
|
5
|
+
The two lines that were being released in parallel — the history/composer line
|
|
6
|
+
(`1.1.0`) and the reference-quality line (`1.0.10`–`1.0.12`) — are one release again.
|
|
7
|
+
`1.1.0` was never published, so anyone on `latest` was getting `1.0.12`: line-range
|
|
8
|
+
pricing and the restored first-screen definition, but not the `Esc` ladder, the
|
|
9
|
+
palette, the folder picker or the plugin-registered `@` categories.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`Esc` walks the session back, one turn at a time.** The composer turns into a ladder, a
|
|
14
|
+
frame cursor shows where you stand (`第 3 / 11 轮`), and `Enter` hands that turn back for
|
|
15
|
+
reuse. One stop per turn — the same unit the GUI's own turn rail counts, so the two
|
|
16
|
+
numbers can never disagree.
|
|
17
|
+
- **`Ctrl+Shift+H`** (and `Ctrl+H`) opens a searchable palette over the same history.
|
|
18
|
+
- **`@` references every source**: files, folders, skills, past sessions, installed plugins,
|
|
19
|
+
workspace git changes, and any category a third-party plugin registers through `ctx.atlas`.
|
|
20
|
+
Paths outside the workspace work and carry a scope badge.
|
|
21
|
+
- Folder picker is keyboard-only (arrows, Tab, paging, create folder), recent folders are
|
|
22
|
+
remembered, and `@atlas` resolves registrations from other plugins.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **The one-sentence definition is back on the first screen**, in both languages.
|
|
27
|
+
- **A line-range reference is priced by its lines, not by the file.** `@src/db.ts:88-140`
|
|
28
|
+
used to be quoted at the full weight of `db.ts`; it now costs its line count and never
|
|
29
|
+
more than the file's own figure.
|
|
30
|
+
- **The palette had no surface of its own**, and nine surfaces referenced theme tokens this
|
|
31
|
+
shell does not define, so they resolved to `transparent`.
|
|
32
|
+
- **The sidebar's folder fallback recursed.** A refused `openResource` fell back to
|
|
33
|
+
`openReferenceTarget`, which calls back into `openOwningFolder` for a folder — one
|
|
34
|
+
refusal was enough to recurse and log until the tab died. It now falls back to the
|
|
35
|
+
native folder opener.
|
|
36
|
+
- `dsh.plugin.json` carried a different version than `package.json`; both agree.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- `description` names the line ranges and the per-reference token cost.
|
|
41
|
+
- Cursor users get the menu they already know (`Ctrl+Shift+H`), plus the two rows the
|
|
42
|
+
real Cursor menu does not have.
|
|
43
|
+
- **The published surface is gated**: `pnpm run verify:publish` reads the tarball for
|
|
44
|
+
internal paths, sources, sourcemaps and ad inlining, and the release workflow runs it
|
|
45
|
+
next to an install-from-registry acceptance job.
|
|
46
|
+
|
|
47
|
+
### Notes
|
|
48
|
+
|
|
49
|
+
- Requires dsh `0.2.0-rc.2`.
|
|
50
|
+
- Upgrading in place from `1.0.0` / `1.0.8` / `1.0.9` / `1.0.12` is verified: settings and
|
|
51
|
+
session files stay byte-identical, boot is clean, and rollback is one command.
|
|
52
|
+
|
|
53
|
+
## [1.1.0] - 2026-10-27
|
|
54
|
+
|
|
55
|
+
The history line, cut but never published: `1.0.10`–`1.0.12` took `latest` instead.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
The first stable release of the history line. Same code as `1.0.9-port.9`, published
|
|
59
|
+
under `latest` so a plain `dsh plugin add @sidequest-007/dsh-atlas` no longer hands out the
|
|
60
|
+
old 1.0.9 composer.
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- **`Esc` walks the session back, one turn at a time.** The composer turns into a ladder, a
|
|
65
|
+
frame cursor shows where you stand (`第 3 / 11 轮`), and `Enter` hands that turn back for
|
|
66
|
+
reuse. One stop per turn — the same unit the GUI's own turn rail counts, so the two
|
|
67
|
+
numbers can never disagree.
|
|
68
|
+
- **`Ctrl+Shift+H`** (and `Ctrl+H`) opens a searchable palette over the same history.
|
|
69
|
+
- **`@` references every source**: files, folders, skills, past sessions, installed plugins,
|
|
70
|
+
workspace git changes, and any category a third-party plugin registers through `ctx.atlas`.
|
|
71
|
+
Paths outside the workspace work and carry a scope badge.
|
|
72
|
+
- Folder picker is keyboard-only (arrows, Tab, paging, create folder), recent folders are
|
|
73
|
+
remembered, and `@atlas` resolves registrations from other plugins.
|
|
74
|
+
- Fixed: the palette (and eight other surfaces) referenced theme tokens this shell does not
|
|
75
|
+
define, so they resolved to `transparent` — the history dialog had no surface of its own and
|
|
76
|
+
the transcript read through it.
|
|
77
|
+
|
|
78
|
+
### Notes
|
|
79
|
+
|
|
80
|
+
- Requires dsh `0.2.0-rc.2`.
|
|
81
|
+
- Upgrading in place from `1.0.0` / `1.0.8` / `1.0.9` is verified: settings and session files
|
|
82
|
+
stay byte-identical, boot is clean, and rollback is one command.
|
|
3
83
|
## [1.0.12] - 2026-10-28
|
|
4
84
|
|
|
5
85
|
### Fixed
|
package/README.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [简体中文](README.zh.md)
|
|
4
4
|
|
|
5
|
+
> [](https://www.npmjs.com/package/@sidequest-007/dsh-atlas) [](https://www.npmjs.com/package/@sidequest-007/dsh-atlas) [](LICENSE) [](https://github.com/jameswatt139240-crypto/dsh-ATLAS/stargazers)
|
|
6
|
+
|
|
7
|
+
**One `@` jumps anywhere. One `Esc` walks the session back — one turn at a time.**
|
|
8
|
+
Type `@` to reference any source. Press `Esc` to stand inside your own history: the
|
|
9
|
+
composer turns into a ladder, the right rail shows which turn you are on (`第 3 / 11 轮`),
|
|
10
|
+
and `Enter` hands that turn back to you for reuse. `Ctrl+Shift+H` opens a searchable
|
|
11
|
+
palette over the same history.
|
|
12
|
+
|
|
5
13
|
Beyond the **built-in `@`**: line ranges like `@src/a.ts:12-40`, skills, plugins and any git repo as source groups — with the approximate token cost of each reference shown before you send.
|
|
6
14
|
|
|
7
15
|
A **Side Quest** project (工作室:支线任务, **Side Quest Labs**) — npm scope `@sidequest-007/*`, repository [`jameswatt139240-crypto/dsh-ATLAS`](https://github.com/jameswatt139240-crypto/dsh-ATLAS); the DSH plugin id keeps the ecosystem's unscoped `dsh-*` form.
|
|
@@ -40,12 +48,30 @@ dsh plugin --profile web add github:jameswatt139240-crypto/dsh-ATLAS
|
|
|
40
48
|
git clone https://github.com/jameswatt139240-crypto/dsh-ATLAS
|
|
41
49
|
dsh plugin --profile web add link:/path/to/dsh-ATLAS
|
|
42
50
|
|
|
43
|
-
# npm (published; `latest` is the
|
|
44
|
-
dsh plugin --profile web add @sidequest-007/dsh-atlas
|
|
51
|
+
# npm (published; `latest` is 1.2.0 since 2026-11-20, `port` carries the ported builds)
|
|
52
|
+
dsh plugin --profile web add @sidequest-007/dsh-atlas@1.2.0
|
|
45
53
|
```
|
|
46
54
|
|
|
47
55
|
Restart `dsh web` after installing or updating so the Host and the browser client load the same version. Then type `@` in the composer.
|
|
48
56
|
|
|
57
|
+
## Coming from Cursor?
|
|
58
|
+
|
|
59
|
+
Cursor's `@` menu taught a lot of people to type `@file`, `@folder`, `@Chats`, `@Commit`. The DSH composer resolves `@path` and `@label` on its own. This plugin widens that menu to the shape you already expect, and adds the two things Cursor does not do:
|
|
60
|
+
|
|
61
|
+
| | Cursor | DSH built-in | dsh-ATLAS |
|
|
62
|
+
|---|:---:|:---:|:---:|
|
|
63
|
+
| `@file` | yes | yes | yes |
|
|
64
|
+
| `@folder`, with `/` to descend | yes | yes | yes |
|
|
65
|
+
| previous conversations | `@Chats` | `@label` | yes |
|
|
66
|
+
| git diff | `@Commit` / `@Branch` | — | `@git` |
|
|
67
|
+
| a skill as a source | via `/` | — | yes |
|
|
68
|
+
| a plugin as a source | — | — | yes |
|
|
69
|
+
| **line range** `@src/a.ts:12-40` | — | — | **yes** |
|
|
70
|
+
| **token cost, before you send** | — | — | **yes** |
|
|
71
|
+
| `@Terminals`, `@Browser` | yes | — | — |
|
|
72
|
+
|
|
73
|
+
The last two rows are the argument. In an editor, attaching `@db.ts` to reach one function drags the whole file into the window, and you find out what it cost once the window is already full. Here you write `@src/db.ts:88-140`, the dock prices it at `~348 tokens`, and it stays 348 — `TOKENS_PER_LINE = 12`, capped by the whole-file estimate, so an over-long range can never look cheaper than the file itself.
|
|
74
|
+
|
|
49
75
|
## The categories
|
|
50
76
|
|
|
51
77
|
The menu keeps the category rows — five built in, plus the bundled `@git` — in its **bottom band**, the rows nearest the composer, so pressing `@` opens on them rather than on whatever else shares the trigger.
|
package/README.zh.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · **简体中文**
|
|
4
4
|
|
|
5
|
+
> [](https://www.npmjs.com/package/@sidequest-007/dsh-atlas) [](https://www.npmjs.com/package/@sidequest-007/dsh-atlas) [](LICENSE) [](https://github.com/jameswatt139240-crypto/dsh-ATLAS/stargazers)
|
|
6
|
+
|
|
7
|
+
**一个 `@` 跳到任何来源;一个 `Esc` 把整段会话倒着走,一轮一格。**
|
|
8
|
+
输入 `@` 引用任何来源;按 `Esc` 站进自己的历史:输入框变成一把阶梯,右侧帧游标显示你正停在哪一轮(`第 3 / 11 轮`),回车把这一轮的内容交回给你复用。`Ctrl+Shift+H` 打开可搜索的历史调色板。
|
|
9
|
+
|
|
5
10
|
在**内置 `@`** 之上:行区间如 `@src/a.ts:12-40`、Skill、插件与任意 git 仓库作为可选来源,并在发送前显示每条引用要花多少 token。
|
|
6
11
|
|
|
7
12
|
本项目属于 **Side Quest(支线任务)** 工作室(**Side Quest Labs**)—— npm 范围 `@sidequest-007/*`,仓库 [`jameswatt139240-crypto/dsh-ATLAS`](https://github.com/jameswatt139240-crypto/dsh-ATLAS);**DSH 插件 id 沿用生态惯例的无 scope 形式 `dsh-*`**。
|
|
@@ -40,12 +45,30 @@ dsh plugin --profile web add github:jameswatt139240-crypto/dsh-ATLAS
|
|
|
40
45
|
git clone https://github.com/jameswatt139240-crypto/dsh-ATLAS
|
|
41
46
|
dsh plugin --profile web add link:/path/to/dsh-ATLAS
|
|
42
47
|
|
|
43
|
-
# npm 包(已发布;`latest`
|
|
44
|
-
dsh plugin --profile web add @sidequest-007/dsh-atlas
|
|
48
|
+
# npm 包(已发布;`latest` 自 2026-11-20 起是 1.2.0,`port` 是移植版使用的 tag)
|
|
49
|
+
dsh plugin --profile web add @sidequest-007/dsh-atlas@1.2.0
|
|
45
50
|
```
|
|
46
51
|
|
|
47
52
|
安装或更新后**重启 `dsh web`**,确保 Host 与浏览器客户端都加载同一版本。然后在输入框打 `@`。
|
|
48
53
|
|
|
54
|
+
## 如果你用过 Cursor
|
|
55
|
+
|
|
56
|
+
Cursor 的 `@` 菜单把 `@file`、`@folder`、`@Chats`、`@Commit` 这套手感教给了很多人。DSH 输入框自己就能解析 `@路径` 和 `@会话标签`。这个插件把菜单扩成你已经习惯的形状,并补上 Cursor 没做的两件事:
|
|
57
|
+
|
|
58
|
+
| | Cursor | DSH 内置 | dsh-ATLAS |
|
|
59
|
+
|---|:---:|:---:|:---:|
|
|
60
|
+
| `@文件` | 有 | 有 | 有 |
|
|
61
|
+
| `@文件夹`,打 `/` 继续下钻 | 有 | 有 | 有 |
|
|
62
|
+
| 过往会话 | `@Chats` | `@标签` | 有 |
|
|
63
|
+
| git diff | `@Commit` / `@Branch` | — | `@git` |
|
|
64
|
+
| 把 Skill 当来源 | 走 `/` | — | 有 |
|
|
65
|
+
| 把插件当来源 | — | — | 有 |
|
|
66
|
+
| **行区间** `@src/a.ts:12-40` | — | — | **有** |
|
|
67
|
+
| **发送前看到 token 成本** | — | — | **有** |
|
|
68
|
+
| `@Terminals`、`@Browser` | 有 | — | — |
|
|
69
|
+
|
|
70
|
+
后两行才是重点。在编辑器里为了一个函数 `@db.ts`,整个文件都被拖进窗口,等窗口塞满才知道它值多少钱。这里你写 `@src/db.ts:88-140`,dock 上标 `≈348 tokens`,而且它就一直是 348 —— `TOKENS_PER_LINE = 12`,并以整文件估算封顶,所以再长的区间也不会显得比整个文件还便宜。
|
|
71
|
+
|
|
49
72
|
## 类别
|
|
50
73
|
|
|
51
74
|
输入 `@` 后,菜单顶部是五个常驻类别行;也可以直接输入关键字跨类别混合搜索。
|
|
Binary file
|
package/dsh.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sidequest-007/dsh-atlas",
|
|
3
3
|
"description": "AT Last, All Sources. One @ to jump anywhere — line ranges like @src/a.ts:12-40, the token cost of each reference before you send, and Esc to walk the session back.",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"entry": {
|
|
6
6
|
"name": "@sidequest-007/dsh-atlas",
|
|
7
7
|
"inject": []
|
package/lib/client.js
CHANGED
|
@@ -20360,9 +20360,8 @@ function normalizeUsage(values) {
|
|
|
20360
20360
|
const key = entry.key.trim();
|
|
20361
20361
|
if (key === "" || entry.count < 1) continue;
|
|
20362
20362
|
const current = byKey.get(key);
|
|
20363
|
-
if (current
|
|
20364
|
-
|
|
20365
|
-
}
|
|
20363
|
+
if (current !== void 0 && entry.count <= current.count) continue;
|
|
20364
|
+
byKey.set(key, { key, count: entry.count, at: entry.at });
|
|
20366
20365
|
}
|
|
20367
20366
|
return [...byKey.values()].sort((a, b) => b.count - a.count || b.at - a.at).slice(0, MAX_USAGE_ENTRIES);
|
|
20368
20367
|
}
|
|
@@ -21763,7 +21762,6 @@ function createMentionSource(deps) {
|
|
|
21763
21762
|
const abort = new AbortController();
|
|
21764
21763
|
const promise2 = load(sessionId, path, abort.signal);
|
|
21765
21764
|
remember({ promise: promise2, abort, at });
|
|
21766
|
-
if (signal === void 0) return promise2;
|
|
21767
21765
|
return promise2.then((value) => signal.aborted ? { path, entries: [] } : value);
|
|
21768
21766
|
};
|
|
21769
21767
|
const insideWorkspace = (sessionId, path) => {
|
|
@@ -21831,9 +21829,9 @@ function createMentionSource(deps) {
|
|
|
21831
21829
|
const ownByName = dirs.filter((file2) => nameOf(file2.relative).includes(needle));
|
|
21832
21830
|
const ownNamed = new Set(ownByName);
|
|
21833
21831
|
const ownByPath = dirs.filter((file2) => !ownNamed.has(file2) && file2.relative.toLowerCase().includes(needle));
|
|
21834
|
-
const outsideByName = outside.filter((row) => nameOf(row.value
|
|
21832
|
+
const outsideByName = outside.filter((row) => nameOf(row.value).includes(needle));
|
|
21835
21833
|
const namedOutside = new Set(outsideByName.map((row) => row.value));
|
|
21836
|
-
const outsideByPath = outside.filter((row) => !namedOutside.has(row.value) &&
|
|
21834
|
+
const outsideByPath = outside.filter((row) => !namedOutside.has(row.value) && row.value.toLowerCase().includes(needle));
|
|
21837
21835
|
const byPath = [...candidateRows(ownByPath, "dir", false, t), ...outsideByPath];
|
|
21838
21836
|
const explicitPath = collapsedGroups.get(sessionId)?.get(PATH_GROUP_KEY);
|
|
21839
21837
|
const rows = [];
|
|
@@ -21928,10 +21926,9 @@ function createMentionSource(deps) {
|
|
|
21928
21926
|
return rows;
|
|
21929
21927
|
};
|
|
21930
21928
|
const fileScopeKey = (path) => `file:scope:${path.toLowerCase()}`;
|
|
21931
|
-
const resolveFileScope = async (sessionId, query,
|
|
21929
|
+
const resolveFileScope = async (sessionId, query, abort) => {
|
|
21932
21930
|
const read = deps.scopeFolder;
|
|
21933
21931
|
if (read === void 0) return void 0;
|
|
21934
|
-
const abort = signal ?? new AbortController().signal;
|
|
21935
21932
|
let path;
|
|
21936
21933
|
try {
|
|
21937
21934
|
path = await read(sessionId, abort);
|
|
@@ -22333,7 +22330,7 @@ function createMentionSource(deps) {
|
|
|
22333
22330
|
const entry = candidate.value === void 0 ? void 0 : findEntry(session.sessionId, candidate.value);
|
|
22334
22331
|
const file2 = entry ?? (candidate.recent === true && candidate.value !== void 0 ? { relative: candidate.value, kind: "file" } : void 0);
|
|
22335
22332
|
if (file2 === void 0) return void 0;
|
|
22336
|
-
if (file2.kind === "file" && entry !== void 0) deps.onRecent?.(session.sessionId, file2.relative);
|
|
22333
|
+
if (file2.kind === "file" && entry !== void 0) deps.onRecent?.(session.sessionId, entry.path, file2.relative);
|
|
22337
22334
|
deps.onUsage?.(session.sessionId, file2.kind === "dir" ? "dir" : "file", file2.relative);
|
|
22338
22335
|
const suffix = file2.kind === "dir" ? "/" : "";
|
|
22339
22336
|
return { text: `@${file2.relative}${suffix} ` };
|
|
@@ -22482,6 +22479,7 @@ function draftMentions(draft) {
|
|
|
22482
22479
|
label,
|
|
22483
22480
|
relative,
|
|
22484
22481
|
link: directoryForm ? { kind: "folder", path: relative } : { kind: "file", path: relative },
|
|
22482
|
+
...lines === void 0 ? {} : { lines },
|
|
22485
22483
|
start: match.index,
|
|
22486
22484
|
end: match.index + match[0].length
|
|
22487
22485
|
});
|
|
@@ -25226,10 +25224,10 @@ function tokenAtPoint(root, node2, offset) {
|
|
|
25226
25224
|
if (local === void 0) return void 0;
|
|
25227
25225
|
const run = tokenRunAt(index.text, local);
|
|
25228
25226
|
if (run === void 0) return void 0;
|
|
25229
|
-
const head = [...line.querySelectorAll(TEXT_REF_SELECTOR)].find((span) => startOf(index, span) === run.start &&
|
|
25227
|
+
const head = [...line.querySelectorAll(TEXT_REF_SELECTOR)].find((span) => startOf(index, span) === run.start && span.textContent.length > 0);
|
|
25230
25228
|
const settled = settledIn(index.text, run.end, line === root.lastElementChild);
|
|
25231
25229
|
if (head === void 0) return { ...run, line, index, local, settled };
|
|
25232
|
-
return { ...run, line, index, local, settled, decoratedEnd: run.start +
|
|
25230
|
+
return { ...run, line, index, local, settled, decoratedEnd: run.start + head.textContent.length };
|
|
25233
25231
|
}
|
|
25234
25232
|
function settledIn(text, end, lastLine) {
|
|
25235
25233
|
if (end < text.length) return isSpace(text[end]);
|
|
@@ -25335,9 +25333,16 @@ function DraftLinks({ actionFor, repeatClick, noteClick, useReferenceInfo, resol
|
|
|
25335
25333
|
() => new Map(infos.map((info) => [referenceKey(info.relative), { exists: info.exists, kind: info.kind }])),
|
|
25336
25334
|
[infos]
|
|
25337
25335
|
);
|
|
25338
|
-
const
|
|
25336
|
+
const faceOf = () => ({
|
|
25337
|
+
actionFor,
|
|
25338
|
+
repeatClick,
|
|
25339
|
+
noteClick,
|
|
25340
|
+
verdict: (path) => verdictByPath.get(referenceKey(path)),
|
|
25341
|
+
resolveSession
|
|
25342
|
+
});
|
|
25343
|
+
const face = (0, import_react6.useRef)(faceOf());
|
|
25339
25344
|
(0, import_react6.useEffect)(() => {
|
|
25340
|
-
face.current =
|
|
25345
|
+
face.current = faceOf();
|
|
25341
25346
|
}, [actionFor, repeatClick, noteClick, verdictByPath, resolveSession]);
|
|
25342
25347
|
const repaint = (0, import_react6.useRef)(() => {
|
|
25343
25348
|
});
|
|
@@ -25538,7 +25543,6 @@ function buildFrames(order, getNode, mode = "message", outline = void 0) {
|
|
|
25538
25543
|
if (mode === "turn" && (turn === void 0 || promptTurns.has(turn))) continue;
|
|
25539
25544
|
if (turn === void 0 || lastAnswerKey.get(turn) !== key) continue;
|
|
25540
25545
|
const replyText = answerTextOf(node2);
|
|
25541
|
-
if (replyText === void 0 || replyText.trim() === "") continue;
|
|
25542
25546
|
const replyData = node2.data;
|
|
25543
25547
|
frames.push({
|
|
25544
25548
|
key,
|
|
@@ -25897,8 +25901,9 @@ function FrameCursor(props) {
|
|
|
25897
25901
|
if (chordResetRef.current.newestQuickTurn !== newestQuickTurn) {
|
|
25898
25902
|
const previous = chordResetRef.current;
|
|
25899
25903
|
chordResetRef.current = { quickSlot, turnRunning: sessionRunning, newestQuickTurn };
|
|
25900
|
-
if (previous.quickSlot !== 0
|
|
25901
|
-
|
|
25904
|
+
if (previous.quickSlot !== 0) {
|
|
25905
|
+
const stillRunning = previous.turnRunning && sessionRunning;
|
|
25906
|
+
if (!stillRunning) setQuickSlot(0);
|
|
25902
25907
|
}
|
|
25903
25908
|
} else if (chordResetRef.current.quickSlot !== quickSlot || chordResetRef.current.turnRunning !== sessionRunning) {
|
|
25904
25909
|
chordResetRef.current = { quickSlot, turnRunning: sessionRunning, newestQuickTurn };
|
|
@@ -26409,7 +26414,7 @@ function composerChipBody(host) {
|
|
|
26409
26414
|
return host.querySelector("[title]") ?? host;
|
|
26410
26415
|
}
|
|
26411
26416
|
function composerChipLink(host, resolve = (label) => label) {
|
|
26412
|
-
const raw = (composerChipBody(host).getAttribute("title") ?? host.textContent
|
|
26417
|
+
const raw = (composerChipBody(host).getAttribute("title") ?? host.textContent).trim();
|
|
26413
26418
|
if (raw === "" || raw.startsWith("/")) return void 0;
|
|
26414
26419
|
const label = raw.startsWith("@") ? raw.slice(1) : raw;
|
|
26415
26420
|
const path = resolve(label);
|
|
@@ -27399,7 +27404,7 @@ function crumbsOf(path) {
|
|
|
27399
27404
|
const crumbs = [];
|
|
27400
27405
|
if (parts[0] === "") crumbs.push({ name: "/", path: "/", hidden: false });
|
|
27401
27406
|
for (let index = 1; index < parts.length; index += 1) {
|
|
27402
|
-
const segment = parts[index]
|
|
27407
|
+
const segment = parts[index];
|
|
27403
27408
|
if (segment === "") continue;
|
|
27404
27409
|
crumbs.push({ name: segment, path: parts.slice(0, index + 1).join("/"), hidden: false });
|
|
27405
27410
|
}
|
|
@@ -27677,10 +27682,8 @@ function apply(ctx) {
|
|
|
27677
27682
|
if (!result.ok) throw new Error(`listPlugins failed: ${result.error.code}: ${result.error.message}`);
|
|
27678
27683
|
return result.value;
|
|
27679
27684
|
};
|
|
27680
|
-
const onRecent = (
|
|
27681
|
-
const
|
|
27682
|
-
if (entry === void 0) return;
|
|
27683
|
-
const workspace = workspaceFromAbsolute(entry.path, relative);
|
|
27685
|
+
const onRecent = (_sessionId, absolute, relative) => {
|
|
27686
|
+
const workspace = workspaceFromAbsolute(absolute, relative);
|
|
27684
27687
|
const current = scope.getSnapshot().value;
|
|
27685
27688
|
void updateSettings({ field: "recentFiles", value: recordRecentFile(current, workspace, relative) });
|
|
27686
27689
|
};
|
|
@@ -27916,7 +27919,7 @@ function apply(ctx) {
|
|
|
27916
27919
|
return "opened";
|
|
27917
27920
|
} catch (error62) {
|
|
27918
27921
|
console.error("[dsh-atlas] sidebar folder open failed:", error62);
|
|
27919
|
-
return
|
|
27922
|
+
return openNativeFolder(sessionId, link.path);
|
|
27920
27923
|
}
|
|
27921
27924
|
};
|
|
27922
27925
|
const clickReference = (sessionId, link) => {
|
package/lib/index.js
CHANGED
|
@@ -1395,7 +1395,6 @@ import { stat as stat2 } from "node:fs/promises";
|
|
|
1395
1395
|
|
|
1396
1396
|
// src/external.ts
|
|
1397
1397
|
var EXTERNAL_ADDING_MODE = "danger-full-access";
|
|
1398
|
-
var NO_EXTERNAL_DISCOVERY = { canDiscover: false, roots: [], known: [] };
|
|
1399
1398
|
function externalAccess(mode, roots, known = []) {
|
|
1400
1399
|
return { canDiscover: mode === EXTERNAL_ADDING_MODE, roots, known };
|
|
1401
1400
|
}
|
|
@@ -21866,7 +21865,7 @@ var _AtFileRuntime = class _AtFileRuntime extends (_a3 = TypertRemoteService, _g
|
|
|
21866
21865
|
* @param config - resolved plugin configuration.
|
|
21867
21866
|
* @param isEnabled - live settings read; false refuses the endpoint.
|
|
21868
21867
|
*/
|
|
21869
|
-
constructor(ctx, config2, readSettings, writeSettings, externalAccessFor
|
|
21868
|
+
constructor(ctx, config2, readSettings, writeSettings, externalAccessFor) {
|
|
21870
21869
|
super(ctx, "atFile");
|
|
21871
21870
|
this.config = config2;
|
|
21872
21871
|
this.readSettings = readSettings;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
2
|
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
|
|
3
3
|
import type { AtFileSettings, ReferenceInfo } from '../contract.ts';
|
|
4
|
+
import type { LineRange } from '../tokens.ts';
|
|
4
5
|
import type { ReferenceLink } from './reference-links.ts';
|
|
5
6
|
import type { MentionKind } from './source.ts';
|
|
6
7
|
export interface AtFileSettingsSnapshot {
|
|
@@ -28,15 +29,30 @@ export interface AtFileDockInjected {
|
|
|
28
29
|
}
|
|
29
30
|
/** Approximate bytes per token for text files (the dock's cost hint). */
|
|
30
31
|
export declare const BYTES_PER_TOKEN = 4;
|
|
32
|
+
/**
|
|
33
|
+
* Approximate tokens per source line, used when the reference carries a line
|
|
34
|
+
* range. The Host never opens the referenced file, so the exact span size is
|
|
35
|
+
* unknowable here; this constant is what turns a line COUNT into a plausible
|
|
36
|
+
* cost. The estimate is always capped by the whole-file figure, so a range can
|
|
37
|
+
* never be quoted as heavier than the file that contains it.
|
|
38
|
+
*/
|
|
39
|
+
export declare const TOKENS_PER_LINE = 12;
|
|
31
40
|
/** References heavier than this many tokens are flagged in the dock. */
|
|
32
41
|
export declare const COST_WARN_TOKENS = 8000;
|
|
33
42
|
/**
|
|
34
43
|
* Approximate context cost of one reference, or undefined when there is nothing
|
|
35
44
|
* to price (missing path, directory, or a file whose size is unknown).
|
|
45
|
+
*
|
|
46
|
+
* A reference with a line range is priced by its line count, not by the file's
|
|
47
|
+
* size: `@src/a.ts:12-40` asks the agent for 29 lines, and quoting the whole
|
|
48
|
+
* file's cost there made a narrow reference look like the most expensive thing
|
|
49
|
+
* in the draft. Without a range the file's size is the only fact available and
|
|
50
|
+
* is still the best answer.
|
|
36
51
|
* @param info - the host-inspected facts for this reference, when available.
|
|
52
|
+
* @param lines - the inclusive line range on this reference, when it has one.
|
|
37
53
|
* @returns the token estimate and whether it exceeds the warning threshold.
|
|
38
54
|
*/
|
|
39
|
-
export declare function referenceCost(info: ReferenceInfo | undefined): {
|
|
55
|
+
export declare function referenceCost(info: ReferenceInfo | undefined, lines?: LineRange): {
|
|
40
56
|
readonly tokens: number;
|
|
41
57
|
readonly warn: boolean;
|
|
42
58
|
} | undefined;
|
|
@@ -59,6 +75,8 @@ export interface DraftMention {
|
|
|
59
75
|
readonly relative?: string;
|
|
60
76
|
/** The click action's target, for rows this build can open. */
|
|
61
77
|
readonly link?: ReferenceLink;
|
|
78
|
+
/** The inclusive line range the token asked for, when it carried one. */
|
|
79
|
+
readonly lines?: LineRange;
|
|
62
80
|
readonly start: number;
|
|
63
81
|
readonly end: number;
|
|
64
82
|
}
|
|
@@ -102,7 +102,7 @@ export interface MentionSourceDeps {
|
|
|
102
102
|
/** Locale binder for time/tier labels (defaults to zh copy). */
|
|
103
103
|
t?: (key: string, params?: Record<string, string>) => string;
|
|
104
104
|
/** Record one referenced path into the session workspace's recent list. */
|
|
105
|
-
onRecent?(sessionId: SessionId, relative: string): void;
|
|
105
|
+
onRecent?(sessionId: SessionId, absolute: string, relative: string): void;
|
|
106
106
|
/** Record one pick in the cross-category usage counters. */
|
|
107
107
|
onUsage?(sessionId: SessionId, kind: string, value: string): void;
|
|
108
108
|
/** The live cross-category pick counters (highest count first). */
|
package/lib/types/runtime.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare class AtFileRuntime extends TypertRemoteService {
|
|
|
35
35
|
*/
|
|
36
36
|
constructor(ctx: Context, config: ResolvedConfig, readSettings: () => AtFileSettings, writeSettings: (update: AtFileSettingsUpdate) => Promise<AtFileSettings>,
|
|
37
37
|
/** The session's out-of-workspace access (see src/external.ts). */
|
|
38
|
-
externalAccessFor
|
|
38
|
+
externalAccessFor: (agent: Agent) => ExternalAccess);
|
|
39
39
|
/** One TTL for the workspace index cache (matches the client cache). */
|
|
40
40
|
private static readonly FILE_CACHE_TTL_MS;
|
|
41
41
|
/** Read the resolved durable settings through the plugin-owned wire. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sidequest-007/dsh-atlas",
|
|
3
3
|
"description": "AT Last, All Sources. One @ to jump anywhere — line ranges like @src/a.ts:12-40, the token cost of each reference before you send, and Esc to walk the session back.",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Side Quest Labs",
|
|
7
7
|
"publishConfig": {
|
|
@@ -21,7 +21,14 @@
|
|
|
21
21
|
"keyboard",
|
|
22
22
|
"navigation",
|
|
23
23
|
"session-history",
|
|
24
|
-
"esc"
|
|
24
|
+
"esc",
|
|
25
|
+
"deepseek",
|
|
26
|
+
"harness",
|
|
27
|
+
"mention-anything",
|
|
28
|
+
"command-palette",
|
|
29
|
+
"history-navigation",
|
|
30
|
+
"keyboard-shortcuts",
|
|
31
|
+
"dsh-atlas"
|
|
25
32
|
],
|
|
26
33
|
"homepage": "https://github.com/jameswatt139240-crypto/dsh-ATLAS#readme",
|
|
27
34
|
"bugs": {
|