/** Sessions created for BooCoder work (sidebar / project list icons). */
export function isCoderSessionName(name: string | null | undefined): boolean {
  if (!name) return false;
  if (name === 'New BooCode') return true;
  if (name.startsWith('Task [')) return true;
  if (name.startsWith('Coder:')) return true;
  return false;
}

/** Optimistic coder pane shell before scoped chat id arrives from the server. */
export function defaultCoderWorkspacePane(id: string = crypto.randomUUID()) {
  return {
    id,
    kind: 'coder' as const,
    chatIds: [] as string[],
    activeChatIdx: -1,
  };
}
