fix(web): address skill row review feedback

This commit is contained in:
Yichen Jiang
2026-08-06 17:21:13 +08:00
parent 690f7ae035
commit a667d2cd64
39 changed files with 326 additions and 142 deletions

View File

@@ -53,6 +53,23 @@ describe('open', () => {
expect(snapshot.turnEnds.get(3)).toBe(15)
})
it('installs host-carried call metadata for a result-only tail page', async () => {
const { api, session } = makeSession()
api.onHistory = () => Promise.resolve(ok({
events: [{
event: ev.toolResult(50, 3, 'outside-call', '已加载 skill'),
call: { name: 'skill', arguments: '{"name":"dsh-code-review"}', time: 40 },
}],
hasMore: true,
}))
await session.open()
expect(session.getSnapshot().nodes).toMatchObject([{
kind: 'tool-result',
call: { name: 'skill', argsRaw: '{"name":"dsh-code-review"}' },
callTime: 40,
}])
})
it('is idempotent: concurrent opens share one history call, reopening when open is a no-op', async () => {
const { api, session } = makeSession()
await Promise.all([session.open(), session.open()])