Skip to content

Commit

Permalink
fix: Pty proxy build
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 committed Dec 10, 2024
1 parent 5b23bf6 commit 16eb318
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/pty-proxy/src/controller/user-socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,39 @@ export class UserSocket {
ifMessage()
.is(sessionCreate, (data) => {
logger.debug("Received session create request", {
targetId: data.targetId,
resourceId: data.resourceId,
sessionId: data.sessionId,
userId: user.id,
});

const { agent } = agents.get(data.targetId) ?? { agent: null };
const { agent } = agents.get(data.resourceId) ?? { agent: null };
if (agent == null) {
logger.warn("Agent not found for session create", {
targetId: data.targetId,
resourceId: data.resourceId,
sessionId: data.sessionId,
userId: user.id,
});
return;
}

logger.info("Found agent for session create", {
targetId: data.targetId,
resourceId: data.resourceId,
});

createSessionSocket(data.sessionId);
agent.send(data);
})
.is(sessionResize, (data) => {
const { sessionId, targetId } = data;
const { sessionId, resourceId } = data;
logger.info("Received session resize request", {
sessionId: data.sessionId,
userId: user.id,
});

const { agent } = agents.get(targetId) ?? { agent: null };
const { agent } = agents.get(resourceId) ?? { agent: null };
if (agent == null) {
logger.warn("Agent not found for session resize", {
targetId,
resourceId,
sessionId,
});
return;
Expand Down

0 comments on commit 16eb318

Please sign in to comment.