cliamp music player integration with browser audio streaming

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 17:23:52 +00:00
co-authored by Claude Opus 4.6
parent fd4d77a389
commit 30f06e91e4
16 changed files with 1051 additions and 18 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ wss.on('connection', (ws) => {
let ptyEnv;
if (isHost) {
ptyEnv = { ...process.env, TERM: 'xterm-256color' };
ptyEnv = { ...process.env, TERM: 'xterm-256color', ...(msg.env ?? {}) };
} else {
const prompt = `${userLabel} in %~ %# `;
const bashPrompt = `${userLabel} \\w \\$ `;
+13
View File
@@ -344,6 +344,19 @@ const startHostSidecar = async () => {
console.log(`[terminal] host sidecar started on port ${HOST_SIDECAR_PORT}`);
};
export const ensureHostSidecar = async () => {
const alive = await sidecarAlive(HOST_SIDECAR_PORT);
if (!alive) {
await startHostSidecar();
// Wait for it to come up
for (let i = 0; i < 10; i++) {
await new Promise((r) => setTimeout(r, 300));
if (await sidecarAlive(HOST_SIDECAR_PORT)) return;
}
throw new Error('Host sidecar failed to start');
}
};
export const initTerminalSidecars = async () => {
await startHostSidecar();
ensureDockerImage();