fix(dsh): slim packaged runtime and surface startup errors

This commit is contained in:
阿白叔 committed 2026-11-02 11:37:20 +08:00
1 parent df250e04ba
commit caa79e7fcf
7 files changed
+159 -5

No files matched your search

+6 -1
View File
@@ -3,11 +3,14 @@
from pathlib import Path
import shutil
import sys
import win32com.client.gencache
project_root = Path(SPECPATH).parent
sys.path.insert(0, str(project_root / 'packaging'))
from dsh_runtime_staging import stage_node_modules
generated_root = project_root / "build" / "DxPartReplace-generated"
generated_root.mkdir(parents=True, exist_ok=True)
viewdraw_api = win32com.client.gencache.EnsureModule(
@@ -38,11 +41,13 @@ if (dsh_root / 'issue-bootstrap.json').is_file():
if (dsh_root / 'node_modules' / '@deepseek-ai' / 'dsh' / 'package.json').is_file():
if not (dsh_root / 'issue-bootstrap.json').is_file():
raise RuntimeError('Provision the DSH issue-only reporter before packaging the native assistant.')
staged_node_modules = stage_node_modules(
dsh_root / 'node_modules', generated_root / 'dsh-node_modules')
legacy_runtime_datas.extend([
(str(dsh_root / 'start.mjs'), 'dsh-runtime'),
(str(dsh_root / 'package.json'), 'dsh-runtime'),
(str(dsh_root / 'task-plugin'), 'dsh-runtime/task-plugin'),
(str(dsh_root / 'node_modules'), 'dsh-runtime/node_modules'),
(str(staged_node_modules), 'dsh-runtime/node_modules'),
(shutil.which('node'), 'dsh-runtime'),
(str(project_root / 'licenses' / 'DeepSeek-Harness-MIT.txt'), 'licenses'),
])