persist panel sizes for email and automation screens, fix session title from prompt prefix

- switch email and automation screens from WorkspaceLayout to WorkspaceView + useWorkspacesState
- add promptPrefix prop to WorkspaceView, thread into WorkspaceContext
- automation dynamically adds/removes chat panel while preserving persisted sizes
- use displayText for session title so prompt prefix doesn't leak into titles
- fix email context filter to match screens/email workspace key

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 00:23:21 +00:00
co-authored by Claude Opus 4.6
parent c443fe0fe2
commit 968d502eaa
8 changed files with 73 additions and 73 deletions
+2 -2
View File
@@ -242,7 +242,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[]; thinking?: string; context?: string; contextId?: string }
msg: { prompt: string; displayText?: string; sessionId?: string; model?: string; cwd?: string; cwdRoot?: string; sandboxed?: boolean; groupSlug?: string; attachmentIds?: string[]; thinking?: string; context?: string; contextId?: string }
): Promise<void> {
const { email, username, userId } = ws.data;
const sessionId = msg.sessionId || randomUUID();
@@ -336,7 +336,7 @@ async function handleChat(
session.meta.updatedAt = Date.now();
if (!session.meta.title) {
session.meta.title = msg.prompt.slice(0, 100);
session.meta.title = (msg.displayText ?? msg.prompt).slice(0, 100);
}
// Set thinking level if provided