fix: correct RPC method names from LS binary (Heartbeat, GetUserTrajectoryDescriptions, GetCascadeTrajectorySteps)
This commit is contained in:
@@ -199,7 +199,7 @@ function activate(context) {
|
||||
const req = proto.request({
|
||||
hostname: '127.0.0.1',
|
||||
port,
|
||||
path: '/exa.language_server_pb.LanguageServerService/GetTrajectoryDescriptions',
|
||||
path: '/exa.language_server_pb.LanguageServerService/Heartbeat',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -287,15 +287,16 @@ function activate(context) {
|
||||
}
|
||||
try {
|
||||
// Get trajectory descriptions — lightweight list of all conversations
|
||||
const result = await lsRPC('GetTrajectoryDescriptions');
|
||||
const result = await lsRPC('GetUserTrajectoryDescriptions');
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
// Debug: log structure on first call
|
||||
if (Object.keys(lastStepIndex).length === 0) {
|
||||
console.log(`Gravity Bridge: [LS] trajectories: ${JSON.stringify(result).substring(0, 500)}`);
|
||||
console.log(`Gravity Bridge: [LS] trajectories response keys: ${typeof result === 'object' ? Object.keys(result).join(', ') : typeof result}`);
|
||||
console.log(`Gravity Bridge: [LS] trajectories sample: ${JSON.stringify(result).substring(0, 600)}`);
|
||||
}
|
||||
const trajectories = result.trajectories || result.trajectory_descriptions || [];
|
||||
const trajectories = result.trajectories || result.trajectory_descriptions || result.userTrajectoryDescriptions || result.user_trajectory_descriptions || [];
|
||||
if (!Array.isArray(trajectories)) {
|
||||
return;
|
||||
}
|
||||
@@ -306,10 +307,16 @@ function activate(context) {
|
||||
if (prev !== undefined && stepIdx > prev) {
|
||||
// New steps! Fetch full trajectory to get AI response
|
||||
console.log(`Gravity Bridge: [LS] ${id.substring(0, 8)} new steps: ${prev} → ${stepIdx}`);
|
||||
const full = await lsRPC('GetCascadeTrajectory', {
|
||||
const full = await lsRPC('GetCascadeTrajectorySteps', {
|
||||
googleAgentId: id,
|
||||
trajectoryId: traj.trajectoryId || traj.trajectory_id || '',
|
||||
startStepIndex: prev,
|
||||
});
|
||||
// Also log structure on first fetch
|
||||
if (full) {
|
||||
console.log(`Gravity Bridge: [LS] steps response keys: ${typeof full === 'object' ? Object.keys(full).join(', ') : typeof full}`);
|
||||
console.log(`Gravity Bridge: [LS] steps sample: ${JSON.stringify(full).substring(0, 600)}`);
|
||||
}
|
||||
if (full) {
|
||||
extractAndRelay(full, prev, stepIdx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user