Compare commits
2
Commits
8b8d2beefe
...
codex/dsh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebd381a2b5 | ||
|
|
51597ad9fc |
No files matched your search
@@ -12,6 +12,30 @@ Beta 4 面向停止与资源收尾复测:普通暂停等待当前项保存核
|
||||
|
||||
本版提供[目标封装选择](docs/user/target-cell-selection.md):目标封装可留空,此时工具不主动覆写封装,可后续与中心库同步;需要指定时,在料号规则中读取并选择合法封装。BOM 保持原 11 列。
|
||||
|
||||
## DSH助手:在工具内使用 AI
|
||||
|
||||
本项目已将 **DSH助手** 集成到任务中心主窗口。顶部固定显示两个入口:左侧 **任务中心**、右侧 **DSH助手**,单击即可切换,无需展开菜单;助手保留 DeepSeek Harness 官方三栏界面、SVG 动画、模型选择、会话和未发送草稿。也可以使用 `Ctrl+Shift+D` 打开助手。
|
||||
|
||||
DSH助手围绕真实任务中心工作,支持:
|
||||
|
||||
- 用自然语言创建任务、修改规则、复制或归档任务;工程选择和提交仍由原生窗口确认。
|
||||
- 查询任务快照、执行预检、影响范围和实际执行历史。
|
||||
- 在原生确认后按冻结范围执行任务,支持安全暂停、原队列恢复和排期授权。
|
||||
- 发生异常时自动介入,收集脱敏证据链、保留诊断记录,并在需要时提交受限 Git 工单。
|
||||
- 在右侧任务监管中查看运行、影响、排期、经验、工单和用量;审计损坏、证据缺失和未知计数会明确显示。
|
||||
|
||||
AI 不能直接写入 CAD、运行 Shell、访问任意文件或绕过确认门禁。自动异常诊断为只读;不确定执行不会自动重放,恢复必须重新核对冻结计划、检查点和业务证据。未配置模型时仍可使用任务监管和本地恢复功能,但不会产生真实模型回复。
|
||||
|
||||
模型配置保存在本机任务中心数据目录,密钥使用 Windows DPAPI 保护,不写入仓库或环境变量。首次接入可在 **工具设置 → DSH工具** 中配置 OpenAI 兼容端点和模型;开发环境也可通过 `DSH_API_BASE`、`DSH_MODEL`、`DSH_API_KEY` 临时提供配置。不要把 API key、Git 凭据或 `integration/dsh/issue-bootstrap.json` 提交到 Git。
|
||||
|
||||
详细的能力边界、异常介入、证据链、排期和工单说明见 [DSH助手使用与监管说明](docs/user/dsh-ai-supervision.md)。源码环境可用下面的命令检查运行时门禁:
|
||||
|
||||
```powershell
|
||||
$env:PYTHONPATH = 'src'
|
||||
python -X utf8 -m dx_productivity.dsh --doctor
|
||||
node tools/verify_dsh_runtime.mjs
|
||||
```
|
||||
|
||||
## 图文教程
|
||||
|
||||
按下面 **13 步**,完成“创建任务 → 填 BOM → 导入校验 → 保存计划 → 替换 → 查看结果”。本例有两个工程 `Audio_D2128`、`Audio_T605A`,各自只替换 `RV05`,保留同料号下的 `RV11`。
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# PR #11 评论 #149 修复验证
|
||||
|
||||
## 根因
|
||||
|
||||
评论 #149 报告完整 UI/DSH 套件在 fixture 清理阶段访问已被 Qt 回收的 `ProjectPlanPanel.report_toggle`,错误为 `RuntimeError: Internal C++ object (QToolButton) already deleted`。相关测试单独运行会通过,问题只在完整测试顺序和窗口销毁时序下暴露。
|
||||
|
||||
## 修复
|
||||
|
||||
`ProjectPlanPanel._restore_bom_report()` 在更新报告控件前使用 `shiboken6.isValid()` 检查自身和 Qt 子控件。内存中的 BOM 预览仍照常释放;控件已经由 Qt 回收时跳过 UI 更新,避免清理路径再次调用已失效的 C++ 包装器。
|
||||
|
||||
新增回归覆盖子控件已被回收后调用 `discard_all()` 的情况;修复前稳定复现评论中的异常,修复后通过。
|
||||
|
||||
## 验证
|
||||
|
||||
- 相关 UI/生命周期回归:70 passed。
|
||||
- 完整套件:**1819 passed,1 skipped,1 warning,0 error**。
|
||||
- 跳过项为本机缺少 DxDesigner 7.9.5 生成 type library;警告为 pywinauto 的预期 COM 线程模式提示。
|
||||
- Python 编译、JS 语法和 `git diff --check` 通过。
|
||||
|
||||
未修改 PR #10 分支,未操作真实 CAD、远端工单或冻结 EXE。
|
||||
@@ -10,6 +10,7 @@ from PySide6.QtGui import QAction,QKeySequence
|
||||
from PySide6.QtWidgets import (QDialog, QDialogButtonBox, QFileDialog, QHBoxLayout, QLabel,
|
||||
QLineEdit, QListWidget, QListWidgetItem, QMessageBox, QPushButton,
|
||||
QVBoxLayout, QWidget, QToolButton, QMenu)
|
||||
from shiboken6 import isValid
|
||||
|
||||
from .detail_windows import BomReportDialog
|
||||
from .target_table import TargetTable
|
||||
@@ -669,6 +670,11 @@ class ProjectPlanPanel(QWidget):
|
||||
self.report_toggle.setChecked(False)
|
||||
|
||||
def _restore_bom_report(self, scope):
|
||||
# Qt may reclaim an owned control while the parent window is already
|
||||
# closing. Cleanup still needs to release the in-memory preview, but
|
||||
# must not call into a dead C++ wrapper.
|
||||
if not isValid(self) or not isValid(self.report_toggle):
|
||||
return
|
||||
machine = self._bom_imports.get(scope)
|
||||
state = machine.state if machine is not None else BomImportState()
|
||||
self.last_bom_report = state.report
|
||||
|
||||
@@ -10,6 +10,14 @@ from PySide6.QtCore import Signal
|
||||
from PySide6.QtWidgets import QMessageBox,QWidget
|
||||
|
||||
|
||||
def test_project_plan_discard_is_safe_after_qt_reclaims_report_control(ui, qtbot):
|
||||
"""Fixture cleanup must tolerate a child control reclaimed during window teardown."""
|
||||
import shiboken6
|
||||
report_toggle = ui.window.plan_panel.report_toggle
|
||||
shiboken6.delete(report_toggle)
|
||||
ui.window.plan_panel.discard_all()
|
||||
|
||||
|
||||
@pytest.mark.parametrize('scope',['single','batch'])
|
||||
@pytest.mark.parametrize('stop_kind',['none','pause','force','pause_then_reauthorize'])
|
||||
def test_last_failed_item_keeps_stop_intent_in_automatic_diagnosis(ui,qtbot,monkeypatch,scope,stop_kind):
|
||||
|
||||
Reference in new issue
Block a user