dsh-ide-window 0.3.4 → 0.3.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/AGENTS.md +1 -1
- package/CHANGELOG.md +8 -0
- package/client.js +17 -3
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -211,7 +211,7 @@ tail -f /tmp/dsh-ide-test/logs/dsh-ide-window.log # 自测实例
|
|
|
211
211
|
- **未装 LSP 的引导页**:进入代码工作区时打 `/dsh-ide/doctor`,`ctx.lsp` 没挂载就弹「代码导航未就绪」。页面**直接给可复制的命令**(不再是「去做某件事」的描述):macOS 第 1 步 `~/dev/dsh-ide-window/enable-navigation.sh`(装包 + 下载服务器 + 写 patch),第 2 步 `~/.dsh/lsp-bin/*/bin/intellij-server license login`,最后「完全退出 DSH 再打开」;Windows 显示 profile 内的 `pnpm add` 两条。按钮是「复制命令 / 重新检测 / 关闭」,命令按 `ideRuntimeContext.platform` 切换,复制走 `ideCopyWithNotice`。授权在服务器进程内,插件只引导不登录
|
|
212
212
|
- **Code Vision**:可见的**方法**声明行尾显示「N 个用法 · M 个实现」和该行最后提交人(`simon · 2026/11/3`);只认类体层级(缩进 ≤4)的方法声明,字段与局部变量都不会出现;计数用 2 次 LSP 查询、作者用 1 次 `git blame`,都按文件版本缓存,滚动不重查;LSP 不可用时只显示作者,失败的查询不写缓存(不会显示假的 0)
|
|
213
213
|
|
|
214
|
-
- **源码里的符号右键菜单**:在方法名、字段、类名等任意符号上右键
|
|
214
|
+
- **源码里的符号右键菜单**:在方法名、字段、类名等任意符号上右键 →「复制名称」/「复制引用」/「复制引用回对话」。引用是 DSH 的 `@相对路径` **加行号和符号名**:`@…/FlowService.java#L58 selectPage`(目录带尾斜杠、含空格时加引号,规则与 DSH 的 reference codec 一致)。**只给文件路径是信息缺失**——对方只能知道是哪个类,不知道是哪个方法;行号由符号 span 上的 `data-iw-line`、名字由 `data-iw-sym` 一起进菜单(`anchor = #L{n}`,`lineSuffix = anchor + ' ' + 名字`)。插入对话时 chip 必须保持是 chip,`#L58 selectPage` 在 chip 之后另打字补上;jar 源码标签页只有「复制名称」,因为 jar 内的路径不是工作区路径
|
|
215
215
|
- **复制引用回对话**:直接回到对话,并把 `@引用` **追加**到草稿末尾——已有文本和附件一律不动,插入的是真正的引用芯片(不是纯文本)。实现方式:对话输入框是 Lexical 编辑器,`@` 触发菜单,只有从菜单里选中候选才会变成芯片,所以按「人打字」的顺序逐段输入(Tab 进入目录、最后一段回车确认),每一步都核对菜单候选;任何一步对不上就退化成纯文本 `@相对路径`,绝不选错文件。目录无法用芯片表达,直接插入 `@目录/` 文本
|
|
216
216
|
|
|
217
217
|
### 4.2.1 截图编辑器
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
升级方式:DSH →「插件」→ 打开插件的「版本」区 →「检查更新」,或直接卸载后重新安装。
|
|
7
7
|
(`link:` 本地安装不参与版本检查,拉取仓库即可。)
|
|
8
8
|
|
|
9
|
+
## [0.3.5] — 2026-11-19
|
|
10
|
+
|
|
11
|
+
### 改进
|
|
12
|
+
|
|
13
|
+
- **源码里「复制引用」带上行号和符号名**:原来只给 `@…/SalesChannelServiceImpl.java`,只知道是哪个类、不知道是哪个方法。现在是 `@…/SalesChannelServiceImpl.java#L58 selectPage`,行号精确到那一行、名字就是右键的那个符号(同名重载也能区分)。
|
|
14
|
+
- 「复制引用回对话」同样受益:芯片仍然是真芯片(路径可解析),`#L58 selectPage` 作为芯片后的文本补上。
|
|
15
|
+
- 文件树右键的引用保持原样(文件级,不带行号)。
|
|
16
|
+
|
|
9
17
|
## [0.3.4] — 2026-11-19
|
|
10
18
|
|
|
11
19
|
### 修复
|
package/client.js
CHANGED
|
@@ -5613,6 +5613,7 @@ function IdeCodeLine({ index, text, lang, hit, vcs, vision, annotate }) {
|
|
|
5613
5613
|
className: `${run.cls} iw-sym`,
|
|
5614
5614
|
'data-iw-sym': symbol.name,
|
|
5615
5615
|
'data-iw-col': at + symbol.offset,
|
|
5616
|
+
'data-iw-line': String(index + 1),
|
|
5616
5617
|
}, run.text)
|
|
5617
5618
|
}
|
|
5618
5619
|
if (run.cls === '') return run.text
|
|
@@ -6753,6 +6754,7 @@ function IdeCodeView({ tab, tr, store, navigate }) {
|
|
|
6753
6754
|
store.setCodeSymbolMenu({
|
|
6754
6755
|
path: tab.path,
|
|
6755
6756
|
symbol: symbol.getAttribute('data-iw-sym') ?? '',
|
|
6757
|
+
line: Number(symbol.getAttribute('data-iw-line')) || 0,
|
|
6756
6758
|
jar: tab.kind === 'jar',
|
|
6757
6759
|
x: event.clientX,
|
|
6758
6760
|
y: event.clientY,
|
|
@@ -7891,17 +7893,23 @@ function IdeSymbolMenu({ store, state, tr, copy, onReferenceToChat }) {
|
|
|
7891
7893
|
}
|
|
7892
7894
|
const name = menu.symbol === '' ? ideBasename(menu.path) : menu.symbol
|
|
7893
7895
|
const mention = ideReferenceMention(ideRelativeTo(state.rootPath, menu.path), false)
|
|
7896
|
+
// A method or field reference without its line is only half the answer: the
|
|
7897
|
+
// line says *where*, the name says *what*. Both are needed for the other side
|
|
7898
|
+
// to read that member instead of guessing inside the file.
|
|
7899
|
+
const anchor = menu.line > 0 ? `#L${menu.line}` : ''
|
|
7900
|
+
const symbolName = String(menu.symbol ?? '').trim()
|
|
7901
|
+
const lineSuffix = `${anchor}${symbolName === '' ? '' : ` ${symbolName}`}`
|
|
7894
7902
|
const items = [
|
|
7895
7903
|
{ key: 'name', icon: IdeCopyIcon, label: tr('symbolMenuCopyName'), run: run(() => copy(name)) },
|
|
7896
7904
|
]
|
|
7897
7905
|
if (menu.jar !== true) {
|
|
7898
|
-
items.push({ key: 'ref', icon: IdeLinkIcon, label: tr('symbolMenuCopyReference'), run: run(() => copy(mention)) })
|
|
7906
|
+
items.push({ key: 'ref', icon: IdeLinkIcon, label: tr('symbolMenuCopyReference'), run: run(() => copy(`${mention}${lineSuffix}`)) })
|
|
7899
7907
|
items.push({
|
|
7900
7908
|
key: 'chat',
|
|
7901
7909
|
icon: IdeAtIcon,
|
|
7902
7910
|
label: tr('symbolMenuReferenceToChat'),
|
|
7903
7911
|
run: run(() => {
|
|
7904
|
-
void onReferenceToChat(menu.path, false)
|
|
7912
|
+
void onReferenceToChat(menu.path, false, lineSuffix)
|
|
7905
7913
|
}),
|
|
7906
7914
|
})
|
|
7907
7915
|
}
|
|
@@ -11648,7 +11656,7 @@ function apply(ctx) {
|
|
|
11648
11656
|
* The existing draft is never replaced: the caret is moved to its end first,
|
|
11649
11657
|
* so text and attachments the user already had stay untouched.
|
|
11650
11658
|
*/
|
|
11651
|
-
async function referenceToChat(path, isDir) {
|
|
11659
|
+
async function referenceToChat(path, isDir, suffix = '') {
|
|
11652
11660
|
const relative = ideRelativeTo(store.getState().rootPath, path)
|
|
11653
11661
|
const mention = ideReferenceMention(relative, isDir)
|
|
11654
11662
|
backToChat()
|
|
@@ -11662,6 +11670,12 @@ function apply(ctx) {
|
|
|
11662
11670
|
caretToEnd(editor)
|
|
11663
11671
|
const outcome = await typeReferenceMention(editor, relative, isDir)
|
|
11664
11672
|
if (outcome !== 'chip') await finishPlainMention(editor, relative, isDir)
|
|
11673
|
+
// `#L120` is typed *after* the chip: the chip must stay a real reference,
|
|
11674
|
+
// and the line is the part that says which member is meant.
|
|
11675
|
+
if (suffix !== '') {
|
|
11676
|
+
caretToEnd(editor)
|
|
11677
|
+
document.execCommand('insertText', false, suffix)
|
|
11678
|
+
}
|
|
11665
11679
|
store.setNotice(outcome === 'chip'
|
|
11666
11680
|
? `${translate('referenceInserted')}: ${mention}`
|
|
11667
11681
|
: `${translate('referenceInsertedPlain')}: ${mention}`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ide-window",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "IDEA-style code workspace for DeepSeek Harness: a centre panel with a workspace file tree, editor tabs and live-updating source, while the left navigation column hides.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"icon": "icon.svg",
|