From b4056502ec49cad3e24ece377c3bc6798e6267a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 28 May 2026 19:47:16 -0400 Subject: [PATCH] Support the full set of chat space types The PRD calls for company, division, department, project, pod and ad-hoc spaces, but only company, department, project and direct were accepted. Add division, pod and ad_hoc to the command contract, the service whitelist and the new-space dialog. The space_type column is free text, so no migration is needed. --- AgentCompany-New/src/main/services/chat-service.ts | 10 +++++++++- AgentCompany-New/src/renderer/src/pages/ChatPage.tsx | 5 ++++- AgentCompany-New/src/shared/commands.ts | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/AgentCompany-New/src/main/services/chat-service.ts b/AgentCompany-New/src/main/services/chat-service.ts index 3b9c8c51..370d87f0 100644 --- a/AgentCompany-New/src/main/services/chat-service.ts +++ b/AgentCompany-New/src/main/services/chat-service.ts @@ -18,7 +18,15 @@ import { ChatMessageMutationService } from "./chat-message-mutation-service"; import { recordChatMentions, resolveChatMentions, type ResolvedMention } from "./chat-mentions"; import { FileHandoffService, type FileHandoffAttachment } from "./file-handoff-service"; -const SPACE_TYPES = new Set(["company", "department", "project", "direct"]); +const SPACE_TYPES = new Set([ + "company", + "division", + "department", + "project", + "pod", + "ad_hoc", + "direct", +]); const SPACE_VISIBILITIES = new Set(["workspace", "restricted"]); const RETENTION_POLICIES = new Set(["standard_365d", "restricted_365d"]); diff --git a/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx b/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx index b5893e95..7ce26917 100644 --- a/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx +++ b/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx @@ -14,7 +14,7 @@ import { ROLE_KEY } from "../../../shared/domain"; import type { PageProps } from "./types"; import { activeOrgId, requireActiveEmployee } from "./types"; -type SpaceType = "company" | "department" | "project" | "direct"; +type SpaceType = "company" | "division" | "department" | "project" | "pod" | "ad_hoc" | "direct"; type Visibility = "workspace" | "restricted"; function value(form: FormData, key: string): string { @@ -274,8 +274,11 @@ export function ChatPage({ snapshot, actions }: PageProps) { diff --git a/AgentCompany-New/src/shared/commands.ts b/AgentCompany-New/src/shared/commands.ts index 3784a4a0..e824efe2 100644 --- a/AgentCompany-New/src/shared/commands.ts +++ b/AgentCompany-New/src/shared/commands.ts @@ -140,7 +140,7 @@ export interface DeleteMessageInput { export interface CreateChatSpaceInput { orgId: string; - spaceType: "company" | "department" | "project" | "direct"; + spaceType: "company" | "division" | "department" | "project" | "pod" | "ad_hoc" | "direct"; name: string; topic: string; visibility: "workspace" | "restricted";