feat(history): full conversation trajectory — GetCascadeTrajectory RPC, all step types rendered

This commit is contained in:
2026-03-08 00:25:33 +09:00
parent 215409535b
commit 410d77537e
3 changed files with 109 additions and 35 deletions

View File

@@ -46,6 +46,16 @@ class BridgeClient {
return this._get('/api/cascades');
}
/**
* 개별 대화의 전체 스텝/메시지 (GetCascadeTrajectory RPC)
*/
async getTrajectory(cascadeId) {
return this._post('/api/ls/rpc', {
method: 'GetCascadeTrajectory',
payload: { cascadeId },
});
}
/**
* 메시지 전송
*/

View File

@@ -321,6 +321,15 @@ app.post('/api/bridge/accept-terminal', async (req, res) => {
}
});
app.get('/api/bridge/trajectory/:id', async (req, res) => {
try {
const data = await bridge.getTrajectory(req.params.id);
res.json(data);
} catch (e) {
res.status(502).json({ error: e.message });
}
});
// Bridge WS 이벤트 → 프론트엔드 포워딩
bridge.connectWs((msg) => {
broadcastToAll({ type: 'bridge_event', ...msg });