mirror of
https://github.com/yexi-by/dsh-unrestricted.git
synced 2026-12-03 18:50:22 +08:00
chore: 适配 DSH 0.2.3-alpha.3 工具注册表、React 19 与提示词快照(v0.2.18)
This commit is contained in:
1 parent
561a1236ab
commit
a4c7c530d8
29 files changed
+517
-1857
No files matched your search
@@ -75,6 +75,9 @@ const overrides = [
|
||||
},
|
||||
]
|
||||
|
||||
const overridesPath = join(home, 'dump-overrides.yml')
|
||||
await writeFile(overridesPath, `${JSON.stringify(overrides, null, 2)}\n`)
|
||||
|
||||
const profileDir = join(home, 'profiles', 'spec')
|
||||
await mkdir(profileDir, { recursive: true })
|
||||
appBoot.initProfile(profileDir, ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app'])
|
||||
@@ -99,7 +102,7 @@ const ctx = await appBoot.boot('dsh-test', rootConfig, [...bundlePatches, ...ove
|
||||
name: 'spec', dir: profileDir, patchPath: profile.patchPath,
|
||||
installAnchor: INSTALL_ANCHOR, home, cwd: home,
|
||||
startedBundles: ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app'],
|
||||
overlays: overrides, telemetryDisabledEnv: '1',
|
||||
overlayPaths: [overridesPath], telemetryDisabledEnv: '1',
|
||||
})
|
||||
await bootCtx.plugin(appBoot.PluginPackages, { resolution })
|
||||
cmdline.provideCmdline(bootCtx, { args: [], exit: () => {} })
|
||||
@@ -119,8 +122,11 @@ const meta = {
|
||||
dumps: {},
|
||||
}
|
||||
|
||||
const { ToolStep } = await import(pathToFileURL(join(repo, 'packages/core/tools/lib/pipeline.js')).href)
|
||||
|
||||
async function dumpAgent(label, agent) {
|
||||
const assembly = await ctx.systemPrompt.assemble({ agent, scope: agent })
|
||||
const toolStep = typeof ToolStep?.capture === 'function' ? ToolStep.capture(ctx.tools, agent) : undefined
|
||||
const assembly = await ctx.systemPrompt.assemble(toolStep === undefined ? { agent, scope: agent } : { agent, scope: agent, toolStep })
|
||||
// WorkingDirectory 验证实际目录;仅在落盘时将临时路径换为固定夹具路径。
|
||||
const rendered = renderPrompt(assembly).replaceAll(workspace, FIXTURE_CWD)
|
||||
await writeFile(join(out, `original-${label}.md`), rendered)
|
||||
|
||||
Reference in new issue
Block a user