chore: drop unreachable external knowledge states and helpers

Remove code with no production path: the probeStatus value 'healthy' that no
probe can produce, the external.transportConfirm string and the
remote-missing and config-invalid state strings that nothing renders,
KnowledgeService.searchHybridMany which lost its last caller when chat search
moved to retrieveMany, and the sourceUrl field that no provider parser
populates.

Keep sourceUrl in externalKnowledgeLocatorSchema because that schema parses
already-persisted citations. Point the affected fixtures at catalog-ready,
the status testInstance actually writes.

Document why ProjectActivity adjusts state during render: the guarded call is
the recommended pattern for resetting state on prop changes here, and the
repository lint rule rejects the useEffect alternative.
This commit is contained in:
mesalogo
2026-09-13 16:02:01 +08:00
parent 4222351f3c
commit f7f0332143
7 changed files with 12 additions and 10 deletions
+3 -3
View File
@@ -8459,7 +8459,7 @@ describe('registerIpcHandlers agent terminal state', () => {
})
it('returns no results for an explicitly empty knowledge search scope', async () => {
const searchHybridMany = vi.fn(() => {
const retrieveMany = vi.fn(() => {
throw new Error('must not search')
})
const harness = createHarness(
@@ -8474,7 +8474,7 @@ describe('registerIpcHandlers agent terminal state', () => {
undefined,
{
database: { listKnowledgeBases: vi.fn(() => []) },
searchHybridMany
retrieveMany
}
)
await expect(
@@ -8483,7 +8483,7 @@ describe('registerIpcHandlers agent terminal state', () => {
{ libraryIds: [], query: 'anything' }
)
).resolves.toEqual([])
expect(searchHybridMany).not.toHaveBeenCalled()
expect(retrieveMany).not.toHaveBeenCalled()
await harness.dispose()
})