This commit is contained in:
2026-02-25 16:04:11 +00:00
parent 05c5b648fa
commit b6a0a57893
11 changed files with 698 additions and 22 deletions
+6 -1
View File
@@ -244,7 +244,7 @@ function createEventHandler(sessionId: string, model: string, cwd: string, stora
async function handleChat(
ws: ServerWebSocket<WSData>,
msg: { prompt: string; sessionId?: string; model?: string; cwd?: string; cwdRoot?: string; sandboxed?: boolean; groupSlug?: string; attachmentIds?: string[] }
msg: { prompt: string; sessionId?: string; model?: string; cwd?: string; cwdRoot?: string; sandboxed?: boolean; groupSlug?: string; attachmentIds?: string[]; thinking?: string }
): Promise<void> {
const { email, username, userId } = ws.data;
const sessionId = msg.sessionId || randomUUID();
@@ -312,6 +312,11 @@ async function handleChat(
session.meta.title = msg.prompt.slice(0, 100);
}
// Set thinking level if provided
if (msg.thinking) {
piBridge.setThinkingLevel(session.piProcess, msg.thinking);
}
// Send prompt to Pi
const requestId = randomUUID();
session.isGenerating = true;