dsh-vscode-mode 0.11.0 → 0.13.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/README.md +158 -111
- package/assets/shell/dsh-open.cs +65 -149
- package/assets/shell/dsh-open.mjs +241 -0
- package/assets/shell/dsh-open.ps1 +28 -47
- package/assets/shell/dsh-open.sh +25 -66
- package/lib/client.js +13362 -11806
- package/lib/client.js.map +1 -1
- package/lib/index.js +4110 -2507
- package/lib/index.js.map +1 -1
- package/package.json +9 -8
- package/skills/dsh-vscodemode-mcp/SKILL.md +94 -132
- package/src/childEnv.ts +19 -0
- package/src/client/activePathStore.ts +28 -0
- package/src/client/addToConversation.ts +4 -2
- package/src/client/ai/inlineProvider.ts +1 -8
- package/src/client/commandBridge.ts +14 -42
- package/src/client/externalOpen.ts +40 -19
- package/src/client/index.ts +101 -18
- package/src/client/keybindings.ts +36 -73
- package/src/client/monaco/loader.ts +3 -1
- package/src/client/openFlow.ts +36 -28
- package/src/client/openReceipt.ts +64 -0
- package/src/client/panelCommands.ts +101 -0
- package/src/client/pdf/pdfLoader.ts +4 -2
- package/src/client/receiptState.ts +120 -0
- package/src/client/rpc.ts +30 -4
- package/src/client/shortcutRecorder.ts +161 -0
- package/src/client/shortcutsOfficial.ts +460 -0
- package/src/client/sidebar/panels/RulesPanel.ts +15 -11
- package/src/client/sidebarBridge.ts +7 -0
- package/src/client/ui/DiffBadge.ts +2 -1
- package/src/client/ui/EditorView.ts +246 -137
- package/src/client/ui/McpSettings.ts +10 -8
- package/src/client/ui/OfficialSideTab.ts +5 -2
- package/src/client/ui/QuickOpen.ts +16 -16
- package/src/client/ui/ShortcutSettings.ts +274 -0
- package/src/client/ui/commandCatalog.ts +39 -43
- package/src/client/useOpenReceipt.ts +128 -0
- package/src/compat.ts +5 -3
- package/src/dap/manager.ts +46 -13
- package/src/devForm.ts +252 -92
- package/src/externalHandoff.ts +93 -52
- package/src/fileOpenSettings.ts +4 -24
- package/src/hostImport.ts +19 -0
- package/src/httpGuard.ts +101 -0
- package/src/index.ts +106 -97
- package/src/integrate.ts +56 -50
- package/src/lsp/transport.ts +84 -127
- package/src/mcp.ts +58 -9
- package/src/mcpIsolation.ts +211 -102
- package/src/mcpProject.ts +220 -133
- package/src/mcpRuntime.ts +343 -0
- package/src/openBridge.ts +69 -0
- package/src/openInbox.ts +207 -0
- package/src/paths.ts +8 -5
- package/src/processTree.ts +63 -0
- package/src/reveal.ts +5 -3
- package/src/routes.ts +156 -154
- package/src/rpc.ts +14 -13
- package/src/rules.ts +100 -44
- package/src/shared/appUrl.ts +19 -0
- package/src/shared/externalOpen.ts +71 -0
- package/src/shared/integration.ts +2 -0
- package/src/shared/keybindings.ts +256 -0
- package/src/shared/mcp.ts +4 -1
- package/src/shared/rpc.ts +7 -4
- package/src/shared/rules.ts +9 -1
- package/src/shared/svn.ts +6 -8
- package/src/svnPlanTool.ts +51 -0
- package/src/unityBridge.ts +26 -3
- package/unity/com.dsh.editor/Editor/DshCodeEditor.cs +99 -203
- package/unity/com.dsh.editor/Editor/DshOpenWorker.cs +166 -0
- package/unity/com.dsh.editor/Editor/DshOpenWorker.cs.meta +2 -0
- package/unity/com.dsh.editor/README.md +16 -25
- package/unity/com.dsh.editor/package.json +2 -2
- package/src/client/ui/KeybindingsPanel.ts +0 -190
package/assets/shell/dsh-open.sh
CHANGED
|
@@ -1,70 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# 作者 ddj 2026-09-07
|
|
7
|
-
set -u
|
|
8
|
-
export LC_ALL=C
|
|
9
|
-
|
|
2
|
+
# POSIX launcher; use the interpreter recorded by the selected DSH host.
|
|
3
|
+
# @author ddj 2026-09-28
|
|
4
|
+
set -eu
|
|
5
|
+
[ "$#" -gt 0 ] || exit 0
|
|
10
6
|
case "$0" in */*) ini_dir="${0%/*}" ;; *) ini_dir="." ;; esac
|
|
11
|
-
|
|
7
|
+
ini_dir=$(cd "$ini_dir" && pwd -P)
|
|
12
8
|
ini="$ini_dir/dsh-open.ini"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
alert() {
|
|
33
|
-
local msg="$1"
|
|
34
|
-
if [ "$(uname)" = "Darwin" ]; then
|
|
35
|
-
osascript -e "display dialog \"$msg\" with title \"DSH 文件编辑\"" >/dev/null 2>&1 || true
|
|
36
|
-
elif command -v notify-send >/dev/null 2>&1; then
|
|
37
|
-
notify-send "DSH 文件编辑" "$msg" || true
|
|
38
|
-
elif command -v zenity >/dev/null 2>&1; then
|
|
39
|
-
zenity --info --title "DSH 文件编辑" --text "$msg" >/dev/null 2>&1 || true
|
|
40
|
-
fi
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
# 无参数(如 Nautilus 空选)静默退出
|
|
44
|
-
[ $# -gt 0 ] || exit 0
|
|
45
|
-
|
|
46
|
-
# DSH 未运行提示(curl 缺失时跳过探测直接打开)
|
|
47
|
-
if command -v curl >/dev/null 2>&1; then
|
|
48
|
-
if ! curl -s -o /dev/null --max-time 1 "$base"; then
|
|
49
|
-
alert "DSH Web UI 未运行($base)。请先启动 DSH。"
|
|
50
|
-
exit 1
|
|
51
|
-
fi
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
# 全部路径编码后合并为一个深链(多选一次打开)
|
|
55
|
-
query=""
|
|
56
|
-
for p in "$@"; do
|
|
57
|
-
[ -n "$p" ] || continue
|
|
58
|
-
abs=$(cd "$(dirname "$p")" 2>/dev/null && pwd)/$(basename "$p")
|
|
59
|
-
[ -e "$abs" ] || abs="$p"
|
|
60
|
-
seg=$(urlencode "$abs")
|
|
61
|
-
[ -n "$seg" ] || continue
|
|
62
|
-
if [ -z "$query" ]; then query="$seg"; else query="$query,$seg"; fi
|
|
63
|
-
done
|
|
64
|
-
[ -n "$query" ] || exit 0
|
|
65
|
-
|
|
66
|
-
url="${base%/}/?edrvOpen=1&edrvPaths=$query"
|
|
67
|
-
case "$(uname)" in
|
|
68
|
-
Darwin) exec open "$url" ;;
|
|
69
|
-
*) exec xdg-open "$url" ;;
|
|
9
|
+
node=""
|
|
10
|
+
node_mode=""
|
|
11
|
+
helper=""
|
|
12
|
+
# Read values as data; never source/eval an INI file.
|
|
13
|
+
while IFS='=' read -r key value || [ -n "$key" ]; do
|
|
14
|
+
value=${value%$'\r'}
|
|
15
|
+
case "$key" in
|
|
16
|
+
node) node="$value" ;;
|
|
17
|
+
nodeMode) node_mode="$value" ;;
|
|
18
|
+
helper) helper="$value" ;;
|
|
19
|
+
esac
|
|
20
|
+
done < "$ini"
|
|
21
|
+
case "$node" in /*) ;; *) printf '%s\n' 'DSH: missing absolute node executable.' >&2; exit 1 ;; esac
|
|
22
|
+
case "$helper" in /*) ;; *) printf '%s\n' 'DSH: missing absolute producer helper.' >&2; exit 1 ;; esac
|
|
23
|
+
[ -x "$node" ] && [ -f "$helper" ] || { printf '%s\n' 'DSH: configured producer is unavailable.' >&2; exit 1; }
|
|
24
|
+
case "$node_mode" in
|
|
25
|
+
electron) export ELECTRON_RUN_AS_NODE=1 ;;
|
|
26
|
+
node) unset ELECTRON_RUN_AS_NODE ;;
|
|
27
|
+
*) printf '%s\n' 'DSH: missing nodeMode.' >&2; exit 1 ;;
|
|
70
28
|
esac
|
|
29
|
+
exec "$node" "$helper" --config "$ini" -- "$@"
|