dsh-copy-tool
Enhanced line-selection copy tool for DeepSeek Harness.
AI 분석
核心用途是提供精确的行选择复制功能,支持将源文件的指定行范围映射复制到目标文件,并处理缩进。适合需要进行精准代码片段迁移和重构的开发任务。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:kezan31/dsh-copy-toolUsage
All parameters are required. Expanded lines and target_lines must select the same number of lines; each source line maps to the target line at the same position:
{
"source_file": "source.py",
"target_file": "module.py",
"lines": [[633, 644]],
"target_lines": [[1, 12]],
"indent": 0,
"dry_run": true
}
A line list can mix individual numbers and ranges:
{
"source_file": "source.py",
"target_file": "module.py",
"lines": [633, [640, 645], 700],
"target_lines": [1, [2, 7], 8],
"indent": 1,
"dry_run": false
}
Line numbers are 1-based. Source indentation common to all selected non-empty lines is removed, then indent * 4 spaces are added. Existing targets are edited in place while preserving untouched content; a missing target must use continuous target_lines beginning at 1 and is created as a new file. Use dry_run to inspect the diff before writing.