diff --git a/conformance_test.go b/conformance_test.go index 3372b38..988a256 100644 --- a/conformance_test.go +++ b/conformance_test.go @@ -63,7 +63,7 @@ func TestGoldenDomain(t *testing.T) { golden(t, "message", sampleMessage()) golden(t, "run", sampleRun()) golden(t, "project", Project{ID: "prj_abc123def456", Name: "示例项目"}) - golden(t, "conversation", Conversation{ID: "cnv_abc123def456", ProjectID: "prj_abc123def456", Title: "新会话"}) + golden(t, "conversation", Conversation{ID: "cnv_abc123def456", ProjectID: "prj_abc123def456", Title: "新会话", AllowCrossRead: true, CrossPrivate: true}) golden(t, "artifact", Artifact{ID: "art_abc123def456", ProjectID: "prj_abc123def456", Name: "报告.md", Kind: "document", MIME: "text/markdown", Size: 128}) } diff --git a/model.go b/model.go index c64f24e..08f028e 100644 --- a/model.go +++ b/model.go @@ -33,6 +33,8 @@ type Conversation struct { ProfileID ID `json:"profileId,omitempty"` // 空为默认画像 Pinned bool `json:"pinned,omitempty"` // 侧栏置顶(方案 A P6/P8:本端组织偏好,服务端权威) Archived bool `json:"archived,omitempty"` // 归档:列表默认隐藏,数据保留 + AllowCrossRead bool `json:"allowCrossRead,omitempty"` // 跨会话出站:本会话读取同项目其他会话记录(需项目开关 crossSession.read) + CrossPrivate bool `json:"crossPrivate,omitempty"` // 跨会话入站:私有会话,不被他读、不出现在他方列表 CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } diff --git a/testdata/golden/conversation.json b/testdata/golden/conversation.json index 5a2c2b8..7be2dc8 100644 --- a/testdata/golden/conversation.json +++ b/testdata/golden/conversation.json @@ -2,6 +2,8 @@ "id": "cnv_abc123def456", "projectId": "prj_abc123def456", "title": "新会话", + "allowCrossRead": true, + "crossPrivate": true, "createdAt": "0001-01-01T00:00:00Z", "updatedAt": "0001-01-01T00:00:00Z" } diff --git a/ts/types.ts b/ts/types.ts index e754c42..ef4927b 100644 --- a/ts/types.ts +++ b/ts/types.ts @@ -14,6 +14,7 @@ export interface Project { export interface Conversation { id: ID; projectId: ID; owner?: ID; title: string; profileId?: ID; pinned?: boolean; archived?: boolean; + allowCrossRead?: boolean; crossPrivate?: boolean; createdAt: string; updatedAt: string; }