feat(web): export the session log from the trajectory toolbar

The 导出 button fetches GET /api/session.export and saves the ZIP (root
artifact plus subagent descendants). The plugin exposes exportLog through
the view's inject face, resolves the tab label through the locale service,
and disables the button while in flight; fixture mode answers 404 so the
error bar explains the gap.
This commit is contained in:
_Kerman
2026-08-10 17:47:49 +08:00
parent ded90bffba
commit 9574a99f45
18 changed files with 369 additions and 10 deletions

View File

@@ -2834,6 +2834,12 @@ function createFixtureWorld(options: FixtureOptions): FixtureWorld {
})
return Promise.resolve({ accepted: true })
},
// The host-only streaming download has no in-memory counterpart: fixture
// mode answers 404 so the export button's error bar explains the gap
// instead of hanging.
downloads: {
sessionLog: () => Promise.resolve(new Response('fixture mode does not serve session export', { status: 404 })),
},
}
const rpc: ClientConnectionRpc = {