mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Less stream logging in Node.
This commit is contained in:
parent
17f46c84c8
commit
3c081f90f4
1 changed files with 0 additions and 8 deletions
|
|
@ -274,9 +274,6 @@ app.get('/api/sessions/:sessionId/stream', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(line);
|
const parsed = JSON.parse(line);
|
||||||
if (parsed.version && parsed.width && parsed.height) {
|
if (parsed.version && parsed.width && parsed.height) {
|
||||||
console.log(
|
|
||||||
`[STREAM] Terminal header for session ${sessionId}: ${parsed.width}x${parsed.height}`
|
|
||||||
);
|
|
||||||
res.write(`data: ${line}\n\n`);
|
res.write(`data: ${line}\n\n`);
|
||||||
headerSent = true;
|
headerSent = true;
|
||||||
} else if (Array.isArray(parsed) && parsed.length >= 3) {
|
} else if (Array.isArray(parsed) && parsed.length >= 3) {
|
||||||
|
|
@ -354,12 +351,10 @@ app.get('/api/sessions/:sessionId/stream', async (req, res) => {
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
if (line.trim()) {
|
if (line.trim()) {
|
||||||
console.log(`[STREAM] Processing line: ${line.substring(0, 200)}`);
|
|
||||||
let eventData;
|
let eventData;
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(line);
|
const parsed = JSON.parse(line);
|
||||||
if (parsed.version && parsed.width && parsed.height) {
|
if (parsed.version && parsed.width && parsed.height) {
|
||||||
console.log(`[STREAM] Skipping duplicate header in live stream`);
|
|
||||||
continue; // Skip duplicate headers
|
continue; // Skip duplicate headers
|
||||||
}
|
}
|
||||||
if (Array.isArray(parsed) && parsed.length >= 3) {
|
if (Array.isArray(parsed) && parsed.length >= 3) {
|
||||||
|
|
@ -386,7 +381,6 @@ app.get('/api/sessions/:sessionId/stream', async (req, res) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventData && streamInfo) {
|
if (eventData && streamInfo) {
|
||||||
console.log(`[STREAM] Broadcasting to ${streamInfo.clients.size} clients`);
|
|
||||||
// Broadcast to all connected clients
|
// Broadcast to all connected clients
|
||||||
streamInfo.clients.forEach((client) => {
|
streamInfo.clients.forEach((client) => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -632,8 +626,6 @@ app.post('/api/sessions/:sessionId/input', async (req, res) => {
|
||||||
return res.status(400).json({ error: 'Text is required' });
|
return res.status(400).json({ error: 'Text is required' });
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Sending input to session ${sessionId}:`, JSON.stringify(text));
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Validate session exists
|
// Validate session exists
|
||||||
const session = ptyService.getSession(sessionId);
|
const session = ptyService.getSession(sessionId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue