Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/38063-unserved-knowledge-singular.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/objectql': patch
---

fix(objectql): the boot warning for one knowledge_source item with no knowledge service says the item is not loaded

Clause-②: no
Metadata-protocol: none

With exactly one `knowledge_source` item and no `knowledge` service registered, the warning read "it is loaded, indexed or searched", the opposite of the fact. It now reads "it is not loaded, indexed or searched". The plural wording ("none is loaded") is unchanged. Nothing to migrate.
3 changes: 2 additions & 1 deletion packages/objectql/src/knowledge-source-unserved.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ describe('describeUnservedKnowledgeSources — items with no knowledge service (
const line = describeUnservedKnowledgeSources(['faq'], false)!;
expect(line).toContain("1 knowledge_source item ('faq')");
expect(line).toContain("no 'knowledge' service is registered");
expect(line).toContain('it is loaded, indexed or searched');
expect(line).toContain('it is not loaded, indexed or searched');
expect(line).not.toContain('it is loaded');
expect(line).toContain('@objectstack/service-knowledge');
expect(line).toContain('or remove the item.');
// The remedy an author's save on such a deployment is refused with: the token, then a restart.
Expand Down
2 changes: 1 addition & 1 deletion packages/objectql/src/knowledge-source-unserved.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function describeUnservedKnowledgeSources(names: readonly string[], servi
return (
`[ObjectQLPlugin] this deployment holds ${count} knowledge_source ${count === 1 ? 'item' : 'items'} ` +
`(${shown}${rest > 0 ? `, and ${rest} more` : ''}), but no '${KNOWLEDGE_SERVICE}' service is registered, so ` +
`${count === 1 ? 'it is' : 'none is'} loaded, indexed or searched. ${UNSERVED_REMEDY} or remove the ` +
`${count === 1 ? 'it is not' : 'none is'} loaded, indexed or searched. ${UNSERVED_REMEDY} or remove the ` +
`${count === 1 ? 'item' : 'items'}.`
);
}
Expand Down
Loading