Skip to content

World's first open-source enterprise world model.

The pack picker stops reporting collisions it already resolved

WaylandYang2fa8d5776eb7
diff --git a/crates/utopia-server/src/api/kbs.rs b/crates/utopia-server/src/api/kbs.rs
index 374ba218..d5ac9523 100644
--- a/crates/utopia-server/src/api/kbs.rs
+++ b/crates/utopia-server/src/api/kbs.rs
@@ -19,7 +19,7 @@ pub struct CreateKbReq {
pub description: Option<String>,
#[serde(default)]
pub visibility: Option<String>,
- /// 起点本体包的 id,按给定顺序装。空 = 只有十个种子。
+ /// 预置本体包的 id,按给定顺序装。空 = 只有十个种子。
///
/// **顺序有意义**:第一个包的类会认领同名的种子类(它们没有 IRI),
/// 后面的包撞名时查对齐表。schema.org 放第一个,别的包才对得上。
@@ -319,7 +319,6 @@ pub async fn list_packs(AuthUser(_): AuthUser) -> ApiResult<Json<serde_json::Val
"summary": p.summary,
"classes": p.classes,
"properties": p.properties,
- "overlaps": p.overlaps,
})
})
.collect();
diff --git a/crates/utopia-server/src/ontology_packs.rs b/crates/utopia-server/src/ontology_packs.rs
index 7a0a51d4..4f580ca2 100644
--- a/crates/utopia-server/src/ontology_packs.rs
+++ b/crates/utopia-server/src/ontology_packs.rs
@@ -1,4 +1,4 @@
-//! 预制本体包:建库时可选的起点。
+//! 预置本体包:建库时可选的起点。
//!
//! 十个种子关系一个类型签名都没有(`graph.rs` 的 `DEFAULT_RELATION_TYPES`),
//! 而抽取提示词是支持签名的——`- buys_from (employee|team → *)`。没有签名,方向
@@ -11,7 +11,7 @@
use utopia_core::{AppError, AppResult};
-/// 一个可选的起点本体。
+/// 一个可选的预置本体。
///
/// `classes` / `properties` 是**抓取当天数过的展示数字**,给建库界面用;
/// 真正建了多少以导入返回的 plan 为准——投影只覆盖当下能消费的构造。
@@ -24,8 +24,6 @@ pub struct Pack {
pub filename: &'static str,
pub classes: u32,
pub properties: u32,
- /// 与已选包重叠时给用户的提示;`None` = 与其他包基本不重叠
- pub overlaps: Option<&'static str>,
gz: &'static [u8],
}
@@ -37,7 +35,6 @@ pub const PACKS: &[Pack] = &[
filename: "schema-org.ttl",
classes: 1010,
properties: 1676,
- overlaps: None,
gz: include_bytes!("../packs/schema-org.ttl.gz"),
},
Pack {
@@ -47,7 +44,6 @@ pub const PACKS: &[Pack] = &[
filename: "w3c-org.ttl",
classes: 13,
properties: 34,
- overlaps: Some("与 schema.org 撞名 6 处,已预先对齐"),
gz: include_bytes!("../packs/w3c-org.ttl.gz"),
},
Pack {
@@ -57,7 +53,6 @@ pub const PACKS: &[Pack] = &[
filename: "prov-o.ttl",
classes: 49,
properties: 69,
- overlaps: Some("与 schema.org 撞名 4 处,已预先对齐"),
gz: include_bytes!("../packs/prov-o.ttl.gz"),
},
Pack {
@@ -67,7 +62,6 @@ pub const PACKS: &[Pack] = &[
filename: "foaf.rdf",
classes: 12,
properties: 62,
- overlaps: Some("与 schema.org 重叠 21%,是候选里最高的"),
gz: include_bytes!("../packs/foaf.rdf.gz"),
},
Pack {
@@ -77,7 +71,6 @@ pub const PACKS: &[Pack] = &[
filename: "iof-core.rdf",
classes: 294,
properties: 75,
- overlaps: None,
gz: include_bytes!("../packs/iof-core.rdf.gz"),
},
];
diff --git a/web/src/api.ts b/web/src/api.ts
index 5d16c934..9cd18240 100644
--- a/web/src/api.ts
+++ b/web/src/api.ts
@@ -64,15 +64,13 @@ export interface Workspace {
created_at: string;
}
-/** 建库时可选的起点本体包(`GET /ontology-packs`)。 */
+/** 建库时可选的预置本体包(`GET /ontology-packs`)。 */
export type OntologyPack = {
id: string;
name: string;
summary: string;
classes: number;
properties: number;
- /** 与已有包重叠时的提示;null = 基本不重叠 */
- overlaps: string | null;
};
export interface Kb {
@@ -657,7 +655,7 @@ export const api = {
name: string;
description?: string | null;
visibility?: string;
- /** 起点本体包 id,顺序有意义:第一个会认领同名的种子类 */
+ /** 预置本体包 id,顺序有意义:第一个会认领同名的种子类 */
ontology_packs?: string[];
},
) =>
diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts
index c8507dcb..f143b5fa 100644
--- a/web/src/i18n/en.ts
+++ b/web/src/i18n/en.ts
@@ -658,8 +658,8 @@ export const en = {
"members switch between them from the top bar.",
defaultChip: "Default",
newKb: "New knowledge base",
- packsLabel: "Starting ontology",
- packsHint: "Optional — packs bring declared direction, so subject and object cannot come out reversed.",
+ packsLabel: "Bundled ontologies",
+ packsHint: "Optional. Packs declare direction, so subject and object cannot come out reversed. More can be imported later.",
packsNone: "None — start from the ten seed relations",
packsCount: (c: number, p: number) => `${c} classes · ${p} properties`,
name: "Name",
diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts
index 371e4d23..b4194fa0 100644
--- a/web/src/i18n/zh.ts
+++ b/web/src/i18n/zh.ts
@@ -601,8 +601,8 @@ export const zh: Strings = {
"创建知识库是管理员动作——成员在顶栏切换。",
defaultChip: "默认",
newKb: "新建知识库",
- packsLabel: "起点本体",
- packsHint: "可不选。包里的谓语带方向声明,主宾颠倒进不来。",
+ packsLabel: "预置本体",
+ packsHint: "可不选。包里的谓语带方向声明,主宾颠倒进不来。之后还能再导入。",
packsNone: "不选 —— 从十个种子关系起步",
packsCount: (c: number, p: number) => `${c} 个类 · ${p} 个属性`,
name: "名称",
diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx
index 2abc6e9c..9b6fa56b 100644
--- a/web/src/pages/Settings.tsx
+++ b/web/src/pages/Settings.tsx
@@ -451,11 +451,6 @@ function NewKbModal({
{S.settings.kbs.packsCount(p.classes, p.properties)}
</span>
</span>
- {p.overlaps && (
- <span className="block text-[11px] text-amber-500/80">
- {p.overlaps}
- </span>
- )}
</span>
</label>
);