feat(history): full conversation trajectory — GetCascadeTrajectory RPC, all step types rendered
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 메시지 전송
|
||||
*/
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user